/* =================================================================== */
/* 1. TOKENS DE DESIGN, LAYOUT BASE E DARK MODE                        */
/* =================================================================== */
:root {
    --m3-color-primary: #6750A4;
    --m3-color-primary-rgb: 103, 80, 164;
    --m3-color-on-primary: #FFFFFF;
    --m3-color-primary-container: #EADDFF;
    --m3-color-on-primary-container: #21005D;
    --m3-color-surface: #FFFBFE;
    --m3-color-surface-rgb: 255, 251, 254;
    --m3-color-surface-container-low: #F7F2FA;
    --m3-color-on-surface: #1C1B1F;
    --m3-color-on-surface-quote: #6b727d;
    --m3-color-on-surface-variant: #49454F;
    --m3-color-outline-variant: #CAC4D0;
    --m3-shape-corner-xl: 32px;
    --m3-shape-corner-full: 999px;
    --font-expressive: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* TEMA ESCURO (DARK MODE) */
html[data-theme='dark'] {
    --m3-color-primary: #D0BCFF;
    --m3-color-primary-rgb: 208, 188, 255;
    --m3-color-on-primary: #381E72;
    --m3-color-primary-container: #4F378B;
    --m3-color-on-primary-container: #EADDFF;
    --m3-color-surface: #141218;
    --m3-color-surface-rgb: 20, 18, 24;
    --m3-color-surface-container-low: #1C1B1F;
    --m3-color-on-surface: #E6E1E5;
    --m3-color-on-surface-quote: #c2c8d2;
    --m3-color-on-surface-variant: #CAC4D0;
    --m3-color-outline-variant: #49454F;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--m3-color-surface);
    color: var(--m3-color-on-surface);
    overflow: hidden; /* Correção do flicker do scroll vertical */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* CONTAINER PRINCIPAL COM ROLAGEM ESTILIZADA */
.main-container {
    padding-top: 72px;
    height: 100vh;
    overflow-y: scroll;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

.main-container.menu-open {
    transform: translateX(-20%);
    filter: blur(2px);
}

/* Estilização da barra de rolagem */
.main-container::-webkit-scrollbar {
    width: 6px;
}

.main-container::-webkit-scrollbar-track {
    background: var(--m3-color-surface-container-low);
    border-radius: var(--m3-shape-corner-full);
}

.main-container::-webkit-scrollbar-thumb {
    background: var(--m3-color-primary);
    border-radius: var(--m3-shape-corner-full);
    transition: opacity 0.2s ease;
    opacity: 0.5;
}

.main-container::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

.section-container {
    padding: clamp(3rem, 8vw, 6rem) 15px;
    display: grid;
    place-items: center;
    background-color: var(--m3-color-surface); /* Cor base para todas as seções */
    transition: background-color 0.3s ease;
}

/* Intercalação automática de cores para as seções */
.section-container:nth-of-type(even) {
    background-color: var(--m3-color-surface-container-low);
}

.content-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

/* ================================================== */
/* 2. HEADER E MENU HÍBRIDO (ESTILO MATERIAL YOU / M3) */
/* ================================================== */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(var(--m3-color-surface-rgb), 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--m3-color-outline-variant);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 15px;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 500;
    font-family: var(--font-expressive);
}

.logo .logo-icon {
    color: var(--m3-color-primary);
}

/* Novo contêiner para agrupar desktop-nav e botões */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Espaço entre nav e botões */
}

@media (max-width: 768px) {
    .nav-controls > div {
        gap: 1rem; /* Espaçamento menor para mobile */
    }
}

.desktop-nav {
    display: none;
    position: relative;
}

.desktop-nav a, .mobile-menu-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    color: var(--m3-color-on-surface-variant);
    padding: 8px 16px;
    border-radius: var(--m3-shape-corner-full);
    transition: color 0.3s ease, background-color 0.3s ease;
    position: relative;
    z-index: 2;
}

.desktop-nav a:hover {
    background-color: rgba(var(--m3-color-primary-rgb), 0.08);
}

.desktop-nav a.active {
    color: var(--m3-color-on-primary-container);
}

.nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--m3-color-primary-container);
    border-radius: var(--m3-shape-corner-full);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.mobile-menu-link.active {
    background-color: var(--m3-color-primary-container);
    color: var(--m3-color-on-primary-container);
}

#menu-trigger {
    display: grid;
    z-index: 1001;
}

.mobile-menu-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--m3-color-surface-container-low);
    border: none;
    padding: 72px 15px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: skew(-15deg) translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s ease, visibility 0.5s, background-color 0.3s ease;
    z-index: 999;
}

.mobile-menu-dropdown.is-open {
    transform: skew(0deg) translateX(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-link {
    text-align: center;
    font-size: 1.5rem;
    padding: 16px;
    color: var(--m3-color-on-surface);
    width: 100%;
    max-width: 300px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-dropdown.is-open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-dropdown.is-open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-dropdown.is-open .mobile-menu-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-dropdown.is-open .mobile-menu-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-dropdown.is-open .mobile-menu-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-dropdown.is-open .mobile-menu-link:nth-child(5) { transition-delay: 0.5s; }

.mobile-menu-link:hover {
    background-color: rgba(var(--m3-color-primary-rgb), 0.08);
}

@media (min-width: 960px) {
    #menu-trigger { display: none; }
    .desktop-nav { display: flex; align-items: center; gap: 0.5rem; }
    .mobile-menu-dropdown { display: none !important; }
}

/* ================================================== */
/* 3. TIPOGRAFIA E COMPONENTES GERAIS                   */
/* ================================================== */
.expressive-title { font-family: var(--font-expressive); font-weight: 700; }
.m3-display-large { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.1; margin-bottom: 1rem; }
.m3-display-medium { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin-bottom: 3rem; }
.m3-headline-medium { font-size: clamp(1rem, 2.5vw, 1.25rem); line-height: 1.6; max-width: 650px; margin: 0 auto 2rem; color: var(--m3-color-on-surface-variant); }
.m3-title-large { font-family: var(--font-expressive); font-weight: 500; font-size: 1.75rem; }
.m3-body-large { color: var(--m3-color-on-surface-variant); margin-top: 1rem; line-height: 1.6; }
.m3-title-medium { font-weight: 500; }
.m3-label-medium { color: var(--m3-color-on-surface-variant); }

.m3-button.filled {
    background-color: var(--m3-color-primary);
    color: var(--m3-color-on-primary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    height: 56px;
    padding: 0 32px;
    border-radius: var(--m3-shape-corner-full);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.m3-button.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px -8px var(--m3-color-primary);
}

/* ================================================== */
/* 4. CARDS E HERO                                    */
/* ================================================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.m3-card { 
    background-color: var(--m3-color-surface); 
    border-radius: var(--m3-shape-corner-xl); 
    padding: 2.5rem; 
    text-align: left; 
    border: 1px solid var(--m3-color-outline-variant); 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.m3-card:hover { transform: translateY(-10px); box-shadow: 0 16px 32px -12px rgba(0,0,0,0.15); }
.m3-card span { font-size: 3rem; color: var(--m3-color-primary); margin-bottom: 1.5rem; display: block; }

/* ================================================== */
/* 5. SLIDER DE DEPOIMENTOS (VERSÃO FINAL CORRIGIDA)  */
/* ================================================== */
#testimonials { 
    overflow-x: hidden;
    position: relative;
}

#testimonials .m3-display-medium {
    margin-bottom: 1.5rem;
}

.testimonial-slider-container { 
    position: relative; 
    width: 100%;
    margin: 0 auto; 
    padding: 0; 
    overflow: visible;
}

.testimonial-carousel { 
    position: relative; 
    display: grid; 
    width: 100%;
    cursor: grab; 
    touch-action: pan-y;
    overflow: hidden;
    min-height: auto;
    align-content: center;
}

.testimonial-carousel:active { cursor: grabbing; }

.testimonial-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    visibility: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.testimonial-slide.active { 
    opacity: 1; 
    pointer-events: auto; 
    visibility: visible; 
}

.testimonial-quote { 
    font-family: var(--font-expressive); 
    font-size: clamp(1.25rem, 4vw, 2.5rem); 
    font-weight: 300; 
    line-height: 1.4; 
    color: var(--m3-color-on-surface-quote); 
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 98% !important;
    padding-left: clamp(70px, 10vw, 78px);
    padding-right: clamp(70px, 10vw, 78px);
    box-sizing: border-box;
}

.testimonial-author { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: clamp(0.5rem, 2vw, 1rem);      
}

.testimonial-author img { 
    width: clamp(40px, 6vw, 60px); 
    height: clamp(40px, 6vw, 60px); 
    border-radius: 50%; 
    border: 3px solid var(--m3-color-primary); 
}

.author-info { 
    text-align: left; 
}

.slider-nav-button {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 20;
    width: clamp(40px, 6vw, 48px);
    height: clamp(40px, 6vw, 48px);
    border-radius: 50%;
    background-color: var(--m3-color-surface);
    color: var(--m3-color-primary);
    border: 1px solid var(--m3-color-outline-variant);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.slider-nav-button:hover { 
    background-color: var(--m3-color-primary-container); 
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
}

.slider-nav-button .slider-icon {
    font-size: clamp(18px, 4vw, 24px);
    line-height: 1;
}

.slider-icon-prev,
.slider-icon-next {
    /* Nenhum ajuste extra é necessário com os ícones simétricos */
}

#prev-testimonial { 
    left: 15px; 
}

#next-testimonial { 
    right: 15px; 
}

@media (max-width: 600px) {
    .testimonial-quote {
        margin-top: 10px;
        font-size: clamp(1.1rem, 5vw, 1.5rem);
        max-width: 98%;
    }
    .testimonial-author img {
        width: clamp(62px, 7vw, 48px);
        height: clamp(62px, 7vw, 48px);
    }
    .testimonial-author {
        margin-bottom: 80px;
    }
    
    .slider-nav-button {
        position: absolute;
        top: 30%;
    }
}

/* ================================================== */
/* 6. ICON BUTTONS GERAL                              */
/* ================================================== */
.m3-button.icon-only {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: var(--m3-color-on-surface);
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.m3-button.icon-only::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.m3-button.icon-only:hover::before {
    opacity: 0.08;
}

.m3-button.icon-only:active::before {
    opacity: 0.12;
}

.m3-button.icon-only.is-open::before {
    opacity: 0.12;
}

.m3-button.icon-only .icon-menu,
.m3-button.icon-only .icon-close {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: rotate(0deg);
}

.m3-button.icon-only .icon-close {
    opacity: 0;
    transform: rotate(90deg);
    position: absolute;
}

.m3-button.icon-only.is-open .icon-menu {
    opacity: 0;
    transform: rotate(-90deg);
}

.m3-button.icon-only.is-open .icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

/* ================================================== */
/* 7. NOVA SEÇÃO: ROTEIROS (VERSÃO COM DEGRADÊ)       */
/* ================================================== */
#roteiros .m3-display-medium {
    margin-bottom: 3rem;
}

.roteiros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.roteiro-card {
    background-color: var(--m3-color-surface);
    border-radius: var(--m3-shape-corner-xl);
    overflow: hidden;
    border: 1px solid var(--m3-color-outline-variant);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.roteiro-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px -12px rgba(0,0,0,0.15);
}

.roteiro-card .card-image {
    height: 250px; 
    position: relative; /* ESSENCIAL para posicionar o degradê */
    overflow: hidden; 
}

.roteiro-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out; 
}

.roteiro-card:hover .card-image img {
    transform: scale(1.1) rotate(2deg);
}

/* --- NOVO: EFEITO DEGRADÊ COM OPACIDADE --- */
.roteiro-card .card-image::before {
    content: ''; /* Necessário para pseudo-elementos */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradê de preto semi-transparente para totalmente transparente */
    background: linear-gradient(to bottom, 
                rgba(0, 0, 0, 0.4), /* Começa com 40% de opacidade */
                rgba(0, 0, 0, 0.1)); /* Termina com 10% de opacidade */
    z-index: 1; /* Garante que fique acima da imagem, mas abaixo de qualquer texto futuro */
    opacity: 1; /* Opacidade inicial (visível) */
    transition: opacity 0.3s ease; /* Transição suave para mudança de opacidade no hover */
}

/* OPCIONAL: Você pode fazer o degradê CLAREAR ou ESCURECER no hover do card */
.roteiro-card:hover .card-image::before {
    opacity: 0.7; /* Exemplo: degragê fica um pouco mais "forte" ao passar o mouse */
    /* ou opacity: 0.5; para ficar mais suave */
}
/* --- FIM DO NOVO BLOCO --- */


.roteiro-card .card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.roteiro-card h3 {
    font-family: var(--font-expressive);
    font-weight: 500;
    font-size: 1.5rem;
    margin-bottom: 0rem;
}

.roteiro-card p {
    color: var(--m3-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.roteiro-card .m3-button.filled {
    align-self: center;
    width: auto;
    height: 48px;
    padding: 0 24px;
    font-size: 0.875rem;
}

@media (max-width: 600px) {
    .roteiro-card .card-image {
        height: 250px; 
    }
}