/* ==========================================================================
   NEXUS CAROUSEL.CSS
   Landing focada em Empregada Doméstica | Google Ads
   Carrossel sólido, comercial, responsivo e compatível com o JS atual
   ========================================================================== */

/* ==========================================================================
   1. SEÇÃO DE SERVIÇOS / ÁREAS DE CONTRATAÇÃO
   ========================================================================== */

.services-section {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: clamp(68px, 8vw, 108px) 0;
    background:
        radial-gradient(circle at 8% 0%, rgba(11, 61, 145, 0.08) 0, transparent 30%),
        linear-gradient(180deg, #FFFFFF 0%, #F6F8FC 100%);
    border-top: 1px solid rgba(11, 61, 145, 0.06);
}

.services-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(11, 61, 145, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(11, 61, 145, 0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: 0.32;
}

.services-section > * {
    position: relative;
    z-index: 1;
}

.services-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
}

.services-section .section-title {
    max-width: 760px;
    margin-bottom: 0;
}

.section-title.left-align {
    text-align: left;
}

.section-title.left-align h2,
.services-section h2 {
    position: relative;
    color: var(--dark-blue, #06295F);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-title.left-align h2::after,
.services-section h2::after {
    content: "";
    display: block;
    width: 86px;
    height: 5px;
    margin-top: 18px;
    border-radius: 999px;
    background: var(--primary-blue, #0B3D91);
}

.services-section .section-subtitle {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--text-muted, #5A6475);
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    line-height: 1.7;
}

.services-section .shadow-text {
    display: none !important;
}

/* ==========================================================================
   2. CONTROLES DO CARROSSEL
   ========================================================================== */

.carousel-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-btn {
    width: 50px;
    height: 50px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(11, 61, 145, 0.18);
    background: #FFFFFF;
    color: var(--primary-blue, #0B3D91);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(6, 41, 95, 0.10);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        background-color 220ms ease,
        border-color 220ms ease,
        color 220ms ease;
}

.nav-btn svg {
    width: 16px;
    height: 16px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-blue, #0B3D91);
    border-color: var(--primary-blue, #0B3D91);
    color: #FFFFFF;
    box-shadow: 0 16px 30px rgba(11, 61, 145, 0.18);
}

.nav-btn:active {
    transform: translateY(0);
}

.nav-btn:disabled,
.nav-btn[aria-disabled="true"] {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nav-btn:disabled:hover,
.nav-btn[aria-disabled="true"]:hover {
    background: #FFFFFF;
    border-color: rgba(11, 61, 145, 0.18);
    color: var(--primary-blue, #0B3D91);
}

/* ==========================================================================
   3. ESTRUTURA DO CARROSSEL
   ========================================================================== */

.carousel-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 4px 0 20px;
}

.carousel-container.full-width {
    width: 100%;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    transform: none !important;
}

#carouselTrack,
.carousel-track {
    display: flex;
    flex-flow: row nowrap;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px clamp(20px, 5vw, 40px) 34px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-left: clamp(20px, 5vw, 40px);
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue, #0B3D91) #EAF2FF;
    cursor: grab;
}

#carouselTrack.is-dragging,
.carousel-track.is-dragging {
    cursor: grabbing;
    user-select: none;
}

#carouselTrack::-webkit-scrollbar,
.carousel-track::-webkit-scrollbar {
    height: 9px;
}

#carouselTrack::-webkit-scrollbar-track,
.carousel-track::-webkit-scrollbar-track {
    background: #EAF2FF;
    border-radius: 999px;
}

#carouselTrack::-webkit-scrollbar-thumb,
.carousel-track::-webkit-scrollbar-thumb {
    background: var(--primary-blue, #0B3D91);
    border-radius: 999px;
    border: 2px solid #EAF2FF;
}

@media (min-width: 1360px) {
    #carouselTrack,
    .carousel-track {
        padding-left: calc(((100vw - var(--container-max, 1180px)) / 2) + 32px);
        padding-right: calc(((100vw - var(--container-max, 1180px)) / 2) + 32px);
        scroll-padding-left: calc(((100vw - var(--container-max, 1180px)) / 2) + 32px);
    }
}

/* ==========================================================================
   4. CARD COMERCIAL
   ========================================================================== */

.card-elite {
    position: relative;
    flex: 0 0 clamp(286px, 25vw, 352px);
    min-height: 472px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    border-radius: 24px;
    background: #FFFFFF;
    border: 1px solid rgba(11, 61, 145, 0.13);
    box-shadow: 0 16px 36px rgba(6, 41, 95, 0.10);
    isolation: isolate;
    transition:
        transform 240ms ease,
        box-shadow 240ms ease,
        border-color 240ms ease;
}

.card-elite::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.card-elite:hover,
.card-elite:focus-within {
    transform: translateY(-6px);
    border-color: rgba(11, 61, 145, 0.42);
    box-shadow: 0 24px 48px rgba(6, 41, 95, 0.16);
}

/* Destaque visual para o primeiro card: Empregada Doméstica */
.card-elite:first-child {
    flex-basis: clamp(310px, 29vw, 398px);
    border: 2px solid var(--primary-blue, #0B3D91);
    box-shadow: 0 24px 54px rgba(11, 61, 145, 0.18);
}

.card-elite:first-child::before {
    content: "Serviço principal";
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
    padding: 9px 14px;
    border-radius: 999px;
    background: #F6C343;
    color: #082D6B;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(246, 195, 67, 0.30);
}

.card-elite img {
    width: 100%;
    height: 240px;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #EAF2FF;
    border-bottom: 1px solid rgba(11, 61, 145, 0.10);
    transition: transform 420ms ease, filter 420ms ease;
}

.card-elite:hover img {
    transform: scale(1.035);
    filter: saturate(1.04) contrast(1.02);
}

.card-overlay {
    position: relative;
    inset: auto;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: stretch;
    padding: 0;
    background: #FFFFFF !important;
    color: var(--text-dark, #172033);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.card-content {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 26px;
}

.card-content h3 {
    margin: 0 0 12px;
    color: var(--dark-blue, #06295F);
    font-size: clamp(1.24rem, 1.6vw, 1.5rem);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.035em;
    text-shadow: none;
}

.card-elite:first-child .card-content h3 {
    color: var(--primary-blue, #0B3D91);
}

.card-match {
    margin: 0 0 22px;
    color: var(--text-muted, #5A6475);
    font-size: 0.97rem;
    line-height: 1.62;
    font-weight: 550;
    opacity: 1 !important;
    transform: none !important;
}

/* Microprova visual nos cards */
.card-content::before {
    content: "Seleção criteriosa • Perfil avaliado";
    order: -1;
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #EAF2FF;
    color: var(--primary-blue, #0B3D91);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.card-elite:first-child .card-content::before {
    content: "Mais buscado por famílias em SP";
    background: rgba(246, 195, 67, 0.22);
    color: #082D6B;
}

/* ==========================================================================
   5. BOTÃO DO CARD
   ========================================================================== */

.btn-quick-action {
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--primary-blue, #0B3D91);
    background: var(--primary-blue, #0B3D91);
    color: #FFFFFF;
    box-shadow: 0 10px 22px rgba(11, 61, 145, 0.16);
    font-size: 0.80rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.06em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    opacity: 1 !important;
    transform: none !important;
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        background-color 220ms ease,
        border-color 220ms ease,
        color 220ms ease;
}

.btn-quick-action::after {
    content: "→";
    font-size: 1rem;
    line-height: 1;
    transition: transform 220ms ease;
}

.card-elite:first-child .btn-quick-action {
    background: #F6C343;
    border-color: #F6C343;
    color: #082D6B;
    box-shadow: 0 12px 26px rgba(246, 195, 67, 0.28);
}

.btn-quick-action:hover {
    transform: translateY(-2px) !important;
    background: var(--dark-blue, #06295F);
    border-color: var(--dark-blue, #06295F);
    color: #FFFFFF;
    box-shadow: 0 14px 28px rgba(6, 41, 95, 0.18);
}

.card-elite:first-child .btn-quick-action:hover {
    background: #FFD766;
    border-color: #FFD766;
    color: #082D6B;
}

.btn-quick-action:hover::after {
    transform: translateX(3px);
}

.btn-quick-action:active {
    transform: translateY(0) !important;
}

/* ==========================================================================
   6. PAGINAÇÃO
   ========================================================================== */

.carousel-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    padding: 0 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border: 1px solid var(--primary-blue, #0B3D91);
    border-radius: 999px;
    background: #FFFFFF;
    cursor: pointer;
    transition:
        width 220ms ease,
        background-color 220ms ease,
        border-color 220ms ease,
        transform 220ms ease;
}

.dot:hover {
    transform: scale(1.1);
    background: #EAF2FF;
}

.dot.active,
.dot[aria-selected="true"] {
    width: 30px;
    background: var(--primary-blue, #0B3D91);
    border-color: var(--primary-blue, #0B3D91);
}

/* ==========================================================================
   7. DESKTOP
   ========================================================================== */

@media (min-width: 1024px) {
    .services-section {
        padding-top: 94px;
        padding-bottom: 98px;
    }

    .card-elite {
        min-height: 480px;
    }

    .card-elite img {
        height: 248px;
    }

    .card-elite:first-child img {
        height: 258px;
    }
}

@media (min-width: 1440px) {
    .card-elite {
        flex-basis: 348px;
    }

    .card-elite:first-child {
        flex-basis: 410px;
    }
}

/* ==========================================================================
   8. TABLET E CELULAR
   ========================================================================== */

@media (max-width: 992px) {
    .services-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .carousel-controls {
        display: none;
    }

    #carouselTrack,
    .carousel-track {
        gap: 18px;
        padding: 8px 24px 28px;
        scroll-padding-left: 24px;
    }

    .card-elite,
    .card-elite:first-child {
        flex-basis: 330px;
        min-height: 454px;
    }

    .card-elite:hover,
    .card-elite:focus-within {
        transform: none;
    }

    .card-elite:hover img {
        transform: none;
        filter: none;
    }
}

@media (max-width: 768px) {
    .services-section {
        padding: 64px 0;
    }

    .section-title.left-align,
    .services-section .section-title {
        text-align: center;
        margin-inline: auto;
    }

    .section-title.left-align h2::after,
    .services-section h2::after {
        margin-left: auto;
        margin-right: auto;
    }

    .services-section .section-subtitle {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    #carouselTrack,
    .carousel-track {
        gap: 16px;
        padding: 8px 16px 26px;
        scroll-padding-left: 16px;
    }

    .card-elite,
    .card-elite:first-child {
        flex: 0 0 84vw;
        max-width: 350px;
        min-height: 436px;
        border-radius: 20px;
    }

    .card-elite:first-child::before {
        top: 14px;
        left: 14px;
        font-size: 0.68rem;
        padding: 8px 11px;
    }

    .card-elite img,
    .card-elite:first-child img {
        height: 218px;
    }

    .card-content {
        padding: 20px;
    }

    .card-content h3 {
        font-size: 1.22rem;
    }

    .card-match {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .card-content::before {
        font-size: 0.66rem;
        letter-spacing: 0.035em;
    }

    .btn-quick-action {
        min-height: 46px;
        font-size: 0.76rem;
        border-radius: 13px;
    }

    .carousel-pagination {
        margin-top: 0;
    }
}

@media (max-width: 420px) {
    .card-elite,
    .card-elite:first-child {
        flex-basis: 87vw;
        min-height: 430px;
    }

    .card-elite img,
    .card-elite:first-child img {
        height: 204px;
    }

    .card-content {
        padding: 18px;
    }

    .card-content::before {
        white-space: normal;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ==========================================================================
   9. ACESSIBILIDADE
   ========================================================================== */

.card-elite:focus-within {
    outline: 3px solid rgba(11, 61, 145, 0.18);
    outline-offset: 4px;
}

.btn-quick-action:focus-visible,
.nav-btn:focus-visible,
.dot:focus-visible {
    outline: 3px solid rgba(11, 61, 145, 0.42);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    #carouselTrack,
    .carousel-track {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   10. IMPRESSÃO
   ========================================================================== */

@media print {
    .services-section {
        background: #FFFFFF !important;
        padding: 0;
    }

    .services-section::before,
    .carousel-controls,
    .carousel-pagination,
    .card-elite::before,
    .card-elite::after,
    .card-content::before {
        display: none !important;
    }

    #carouselTrack,
    .carousel-track {
        display: block;
        overflow: visible;
        padding: 0;
    }

    .card-elite,
    .card-elite:first-child {
        display: block;
        min-height: auto;
        max-width: none;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000000;
        margin-bottom: 20px;
    }

    .card-elite img {
        position: static;
        height: auto;
        border-bottom: 1px solid #000000;
    }

    .card-overlay {
        position: static;
        background: #FFFFFF !important;
        color: #000000;
    }

    .card-content h3,
    .card-match {
        color: #000000;
    }

    .btn-quick-action {
        display: none;
    }
}
