.hero {
    gap: 50px;
    align-items: start;
}

.hero-bg {
    background-image: url("/img/hero-bg.jpg");
    background-size: cover;
}

/* ==========================
   Hero Content
   ========================== */

.hero-content {
    width: 30%;
}

.hero-content h1 {
    font-size: 26px;
    line-height: 32px;
    font-weight: 300;
    margin: 0;
    color: var(--primary-foreground);
    margin-bottom: 5px;
}

.hero-content-span {
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    color: var(--primary-foreground);
}

.hero-input {
    margin-top: 70px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.search.hero-input {
    margin-top: 0px;
}

.hero-input input {
    padding: 12px;
    width: 85%;
}

.hero-input .btn {
    padding: 12px;
    width: 15%;
    display: block;
    text-align: center;
    border: none;
}

.hero-filters {
    display: none;
}

.hero-agendamentos h2 {
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 40px;
    color: var(--muted-foreground);
}

/* ==========================
   Hero Recomendados
   ========================== */

.hero-card {
    width: 70%;
}

.card-container h2 {
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--muted-foreground);
}

.card {
    width: 100%;
    background-color: var(--secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 5px;
}

.card h3 {
    font-weight: 700;
    font-size: 18px;
    line-height: 24px;
    color: var(--primary-foreground);
}

.card p {
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: var(--muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Chrome, Edge, Safari */
    -webkit-box-orient: vertical;

    line-clamp: 3; /* Padrão (ainda experimental) */
    overflow: hidden;
    text-overflow: ellipsis;
}

.card img {
    width: 100%;
    border-radius: 16px 16px 0 0;
}

.card-content {
    padding: 12px;
    gap: 10px;
    display: flex;
    flex-direction: column;
}

.btn-card {
    padding: 8px 16px;
    background-color: var(--border);
    text-align: center;
    color: var(--primary-foreground);
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    border-radius: 10px;
    width: 100%;
    display: block;
}

/* ===== Default (mobile/tablet) ===== */
.scroll-cards {
    display: flex;
    flex-wrap: nowrap; /* não quebra linha */
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

.scroll-cards > .card {
    flex: 0 0 40%; /* ocupa 80% da tela */
    max-width: 420px;
    scroll-snap-align: start;
}

/* esconde a barra (opcional) */
.scroll-cards::-webkit-scrollbar {
    display: none;
}
.scroll-cards {
    scrollbar-width: none;
}

.only-desk {
    display: none;
}
.only-mobile {
    display: flex;
}

.cards-flex {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ==========================
   Responsividade
   ========================== */

@media (max-width: 1366px) {
    .hero {
        gap: 20px;
    }

    .hero-input input {
        width: 80%;
    }

    .hero-input .btn {
        width: 20%;
    }

    .card h3 {
        font-size: 16px;
        line-height: 20px;
    }

    .card p {
        font-size: 14px;
        line-height: 18px;
    }
}

@media (max-width: 1024px) {
    .hero-bg {
        background-image: none;
    }

    .hero {
        flex-direction: column;
        padding-bottom: 10px;
    }

    .popular {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .hero-content {
        width: 100%;
    }

    .card-container {
        width: 100%;
    }

    .card-container h2 {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .card {
        margin-bottom: 0px;
    }

    .search-results .only-mobile {
        flex-wrap: wrap;
    }

    /* ===== Filtros ===== */

    .hero-filters {
        flex-wrap: nowrap; /* não quebra linha */
        justify-content: flex-start; /* alinha à esquerda */
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 10px;
        padding: 4px 8px;
    }
    .hero-filters::-webkit-scrollbar {
        display: none;
    }
    .hero-filters {
        scrollbar-width: none;
    }

    .hero-filters {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        margin-top: 30px;
    }

    .btn-filters {
        flex: 1 1 30%; /* 3 colunas no desktop */
        padding: 12px 16px;
        border-radius: 10px;
        background-color: var(--secondary);
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 14px;
        line-height: 18px;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    .btn-filters img {
        width: 25px;
        height: 25px;
    }
    .cards-flex {
        padding-top: 20px;
    }
}

@media (max-width: 768px) {
    .hero-input {
        flex-direction: row;
        align-items: stretch;
    }

    .hero-input input {
        width: 85%;
    }

    .hero-input .btn {
        width: 15%;
    }

    .card {
        width: 47%;
    }

    .btn-filters img {
        width: 25px;
        height: 25px;
        margin-right: 5px;
    }

    .search-results .only-mobile {
        flex-wrap: wrap;
    }

    .scroll-cards {
        padding: 0;
        gap: 12px;
    }
    .scroll-cards > .card {
        flex: 0 0 40%; /* ocupa 80% da tela */
    }
}

@media (max-width: 480px) {
    .scroll-cards > .card {
        flex: 0 0 70%; /* ocupa 80% da tela */
    }

    .scroll-cards {
        padding: 0;
    }

    .card-content {
        padding: 6px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .card {
        width: 48%;
        margin: 0;
    }

    .card h3 {
        font-size: 16px;
        line-height: 20px;
    }

    .card p {
        font-weight: 400;
        font-size: 14px;
        line-height: 18px;
        color: var(--muted-foreground);
    }

    .card-container h2 {
        font-size: 18px;
        line-height: 24px;
        margin-bottom: 10px;
    }
}

/* ===== Desktop (>=1024px) ===== */
@media (min-width: 1024px) {
    .scroll-cards {
        overflow: visible; /* não tem rolagem */
        flex-wrap: wrap; /* agora quebra linha normal */
        gap: 20px; /* espaçamento maior se quiser */
        scroll-snap-type: none; /* desativa snap */
        justify-content: flex-start;
    }

    .only-mobile {
        display: none;
    }
    .only-desk {
        display: flex;
        gap: 20px;
        flex-wrap: nowrap;
    }

    .search-results .only-desk {
        flex-wrap: wrap;
        gap: 26px;
    }

    .scroll-cards > .card {
        flex: 1 1 calc(25% - 20px); /* ex: 4 cards por linha */
        max-width: none;
    }

    .search-results .scroll-cards > .card {
        flex: 1 1 calc(25% - 20px); /* 4 colunas, menos o espaçamento */
        max-width: calc(25% - 20px); /* 4 colunas no total */
        box-sizing: border-box;
    }
}

/* Responsividade */
@media (max-width: 1024px) {
    .search-results .scroll-cards > .card {
        flex: 0 1 calc(33.33% - 20px); /* 3 colunas em telas menores */
    }
}

@media (max-width: 768px) {
    .search-results .scroll-cards > .card {
        flex: 1 1 calc(50% - 20px); /* 2 colunas em telas médias */
    }
}

@media (max-width: 480px) {
    .search-results .scroll-cards > .card {
        flex: 1 1 100%; /* 1 coluna em telas pequenas */
    }
}
