/* ============================================================
   SESMT Digital — estilos exclusivos da home (/)
   ------------------------------------------------------------
   Carregado DEPOIS de landing.css. Contém o que é só da home
   (hero centralizado, dropdowns, módulos, waffle charts, modal)
   e as poucas regras cujo valor difere do usado nas LPs de módulo.
   ============================================================ */






.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

/* Zebrado da home na mesma escala das demais páginas. */
section.section:nth-of-type(even) {
    background-color: var(--surface-raised);
}


/* Navbar (Optional visual anchor, simple) */
.nav-placeholder {
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    text-decoration: none;
}


.logo span { color: var(--accent); }

/* Fixed Header - Light Theme Test */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.1); /* Slight white tint initially */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.75); /* Lower opacity for glass effect */
    backdrop-filter: blur(20px); /* Stronger blur */
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Subtle glass edge */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Default link color (White on dark hero) */
.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Legibility on glass */
}

/* Scrolled link color (Dark on light header) */
.header.scrolled .nav-link {
    color: #001f3f;
    text-shadow: none;
}

.nav-link:hover {
    color: var(--accent);
}

.header.scrolled .nav-link:hover {
    color: var(--accent);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, .95); /* Light Glass Dropdown */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.8rem 1.5rem;
    color: #001f3f; /* Dark text */
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.3s;
    display: block;
}

.dropdown-item:hover {
    background: rgba(57, 204, 204, 0.6); /* Light Blue Hover */
    color: #188585; /* Darker Teal for better contrast */
    font-weight: 900;
}

/* Hero Section */
/* O header fixo (~107px) cobre o topo do hero: o padding de cima soma essa
   altura para o respiro visível acima do título igualar o de baixo.
   Texto à esquerda e formulário à direita: a grade (.hero-content, .hero-text,
   .hero-form) vem do landing.css, igual às LPs de módulo. Aqui só a medida da home. */
.hero {
    padding: 12rem 0 5.5rem;
}

/* Mesma largura do .container das demais seções (1400px), para a primeira
   dobra não ficar mais estreita que as seguintes. */
.hero .hero-content {
    max-width: 1400px;
    align-items: center;
}

/* Desktop: respiro entre colunas igual ao do #sobre (4rem). Os limites do
   landing.css (texto 650px, formulário 500px) são da grade de 1200px das LPs. */
@media (min-width: 992px) {
    .hero .hero-content { gap: 4rem; }
    .hero .hero-text { max-width: none; }
    .hero .hero-form { max-width: 540px; }
}

.hero h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.hero h1 span { color: var(--accent); }

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 640px;
    margin: 0 0 2rem;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero-actions .btn-cta { margin: 0; }

.hero-proofline {
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.hero-form-lead {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Botões da home. A base define .btn como inline-flex para as LPs de módulo;
   aqui usamos inline-block, que respeita o padding sem esticar a caixa. */
.btn {
    display: inline-block;
    text-align: center;
}

.btn-cta {
    display: inline-block;
    background: var(--accent);
    color: #001f3f;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin: 0 10px;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(57, 204, 204, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #001f3f;
}

/* Featured Services (Icons top) */
.featured-services {
    padding: 4rem;
    margin: 4rem;
    border-radius: 16px;
}

/* Preenche a margem em volta do card com a cor da faixa, para o gradiente do body não aparecer. */
.featured-services::before {
    content: "";
    position: absolute;
    inset: -4rem;
    background-color: var(--surface-base);
    z-index: -1;
}

/* Como card, não há emenda de faixa a dissolver; o véu quadrado vazaria pelos cantos arredondados. */
.featured-services::after {
    content: none;
}

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

.fs-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition);
}

.fs-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.08); }

.fs-icon {
    font-size: 2rem;
    color: var(--accent);
    background: rgba(57, 204, 204, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

/* SESMT Digital / About */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    /* A base limita o cabeçalho a 700px para as LPs de módulo;
       na home os títulos usam a largura total do container. */
    max-width: none;
}

.section-header h2 { font-size: 3rem; margin-bottom: 1rem; }
.section-header h3 { font-size: 1.5rem; color: var(--accent); font-weight: 400; margin-bottom: 1.5rem; }
.section-header p { max-width: 800px; margin: 0 auto; color: var(--text-gray); font-size: 1.1rem; }

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 2rem;
}

.module-card {
    background: var(--card-bg);
    padding: 2.5rem;
    padding-bottom: 4rem; /* Added padding for 'Acessar' text space */
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.module-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-family: var(--font-main);
    font-weight: 700;
    opacity: 0.8;
}

.module-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
}

.module-card p {
    font-size: 0.95rem;
    color: var(--text-gray);
    flex-grow: 1;
}

.module-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(255,255,255,0.08);
}

.active-module {
    border: 1px solid var(--accent);
    background: rgba(57, 204, 204, 0.05);
}

.active-module:after {
    content: "Acessar \2192";
    position: absolute;
    bottom: 1.5rem; /* Lowered position */
    right: 2rem;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
}

/* SIPAT 360 */
.sipat-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.sipat-img {
    flex: 1;
    min-width: min(300px, 100%);
    display: flex;
    justify-content: center;
}

.sipat-img img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.sipat-content { flex: 1; min-width: min(300px, 100%); }

/* SIPAT Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 2rem;
    margin-top: 3rem;
    min-width: 0;
}

.features-grid > * {
    min-width: 0;
}


.feature-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border-top: 3px solid var(--accent);
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

/* Footer */

/* Responsive Design */
.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
}

/* Helper Classes for Menu Split */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Mobile Navigation */
@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }

    /* Header Mobile Override */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
    }

    .container {
        max-width: 800px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(2, 27, 53, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start; /* Fix vertical centering clipping */
        align-items: flex-start;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        z-index: 9998;
        overflow-y: auto;
        padding: 8rem 3rem 2rem 3rem; /* Increased top padding to 8rem */
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        margin: 0;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator line */
    }
    
    .nav-link {
        color: #fff !important;
        font-size: 0.95rem; /* Further reduced font size */
        display: block;
        white-space: normal;
        text-align: left;
        padding: 0.75rem 0; /* Increased padding for touch target & spacing */
    }

    .mobile-toggle {
        display: block;
        margin-left: auto;
        position: relative;
        z-index: 10002; /* Higher than header */
    }
    
    .header.scrolled .mobile-toggle {
        color: #001f3f;
    }

    /* Ensure Close Icon is always white against dark menu */
    .mobile-toggle .bi-x {
        color: #fff !important;
    }

    /* Responsive Hero Buttons */
    .hero-actions {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 0.8rem;
        flex-wrap: wrap;
        margin-top: 0;
    }

    .hero-actions .btn-cta {
        width: auto !important; /* Prevent full width */
        display: inline-flex !important;
        margin: 0 !important;
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }

    /* Typography Adjustments */
    .hero h1 { font-size: 2.2rem; }
    .hero-lead { font-size: 1rem; margin: 0 auto 1.5rem; }
    .section-header h2 { font-size: 2rem; }

    /* Fix Link Colors in Mobile Menu (Always White) */
    .nav-link {
        color: #fff !important;
        font-size: 1.5rem;
    }

    .dropdown-item {
        color: #fff !important;
    }
    
    /* Layout Adjustments */
    .header .btn-cta { display: none; }
    .row { gap: 2rem !important; margin-top: 2rem !important; }
    .section { padding: 3rem 0; }

    /* Padding, margens e gap do hero com formulário vêm do landing.css,
       os mesmos das LPs de produto. Aqui só o que é da home. */
    .hero h1 { margin-bottom: 1rem; }
    .hero-proofline { margin-top: 1rem; font-size: 0.85rem; }
    .hero-form-lead { margin-bottom: 1rem; }
    
    /* Specific Sections */
    .sipat-container { flex-direction: column; text-align: center; }
    .sipat-img { margin-bottom: 2rem; }

    /* Reorder Images on Mobile (Image Top, Text Bottom) */
    /* These sections have [Text, Image] in HTML, so column-reverse puts Image first */
    #integra .row, 
    #ensina .row, 
    #conecta .row,
    #areas-de-atuacao .row {
        flex-direction: column-reverse;
    }
    
    /* Dropdown Mobile */
    .dropdown-menu {
        position: relative;
        top: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        text-align: left; /* Updated to left */
        display: none;
        padding-left: 1rem; /* Indent for hierarchy */
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s;
    }
    
    .dropdown-item { 
        color: #fff !important; 
        opacity: 0.9;
        display: block;
        padding: 0.8rem 0;
        font-size: 1.1rem;
    }

    .featured-services {
        padding: 1.5rem;
        margin: 2rem 1rem;
    }

    .featured-services::before {
        inset: -2rem -1rem;
    }
}

/* Celular: os botões da home são .btn-cta, não .btn, então o empilhamento em
   largura total do landing.css não os alcança. */
@media (max-width: 479px) {
    .hero h1 { font-size: 2rem; }
    .hero-actions .btn-cta {
        flex: 1 1 100%;
        justify-content: center;
    }
}


/* Contact Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    /* Changed from flex/visibility hidden to none */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    /* Activate flex when active */
    opacity: 1;
}

.modal-content {
    background: #fff;
    padding: 2.5rem 2rem 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s;
    line-height: 1;
    z-index: 10;
}

.modal-close:hover {
    color: #333;
}

/* End of landing.css */

/* ---------- FAQ (accordion) ---------- */
details.faq-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(57, 204, 204, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}
details.faq-item[open] {
    background: rgba(255,255,255,0.08);
    border-color: rgba(57, 204, 204, 0.6);
}
summary.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent); /* Light blue updated */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    list-style: none; /* Remove default arrow */
}
summary.faq-question::-webkit-details-marker {
    display: none;
}
summary.faq-question::after {
    content: '\F282'; /* Bootstrap Icons 'chevron-down' */
    font-family: 'bootstrap-icons';
    font-size: 1.2rem;
    transition: transform 0.3s;
}
details[open] summary.faq-question::after {
    transform: rotate(180deg);
}
.faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-gray);
    line-height: 1.6;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* Nossos Clientes */
.clientes-grid {
    display: grid;
    grid-template-columns: repeat(4, 200px);
    justify-content: center;
    gap: 2rem;
}

.clientes-grid--2 {
    grid-template-columns: repeat(2, 200px);
}

@media (max-width: 991px) {
    .clientes-grid {
        grid-template-columns: repeat(2, 200px);
    }
}

/* width, height e padding dos cards vêm inline no HTML, daí o !important. */
@media (max-width: 479px) {
    .clientes-grid,
    .clientes-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .clientes-grid--2 {
        margin-top: 1rem !important;
    }

    .clientes-grid .client-logo {
        width: auto !important;
        height: 80px !important;
        padding: 0.75rem 1rem !important;
    }
}

/* ---------- Faixa do Diagnóstico IMD Express ----------
   Chamada curta entre Resultados e Ecossistema, com um único botão. */
.imd-faixa {
    padding: 4.5rem 0;
}

.imd-faixa-conteudo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem 4rem;
}

.imd-faixa-texto {
    max-width: 640px;
}

.imd-faixa h2 {
    font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
    letter-spacing: -0.02em;
}

.imd-faixa-sub {
    margin-top: 0.75rem;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--accent);
}

.imd-faixa-texto p:not(.imd-faixa-sub) {
    margin-top: 0.75rem;
    color: var(--text-secondary);
}

.imd-faixa .btn-cta {
    flex: none;
    margin: 0;
}

@media (max-width: 899px) {
    .imd-faixa-conteudo {
        flex-direction: column;
        align-items: flex-start;
    }
}
