/* VARIÁVEIS DO TEMA DARK (PADRÃO AGORA) */
:root {
    --primary: #1d86bf;
    --secondary: #00b4d8;
    --bg-main: #0a1118;
    --bg-light: #16222f;
    --bg-surface: #101a24;
    --bg-hero: linear-gradient(135deg, #050a0f 0%, #0d1b2a 100%);
    --bg-stats: linear-gradient(135deg, #0d1b2a 0%, #101a24 100%);
    --text-main: #f5f9fc;
    --text-muted: #94a3b8;
    --text-hero: #94a3b8;
    --header-bg: rgba(16, 26, 36, 0.9);
    --card-shadow: rgba(0, 0, 0, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --btn-text: #0a1118;
    --title-color: #ffffff;
}

/* VARIÁVEIS DO TEMA LIGHT (OPCIONAL) */
[data-theme="light"] {
    --primary: #003f78;
    --secondary: #1d86bf;
    --bg-main: #ffffff;
    --bg-light: #f5f9fc;
    --bg-surface: #ffffff;
    --bg-hero: linear-gradient(135deg, #022949 0%, #003f78 100%);
    --bg-stats: linear-gradient(135deg, #003f78, #1d86bf);
    --text-main: #333333;
    --text-muted: #666666;
    --text-hero: #e0f0ff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: rgba(0, 0, 0, 0.06);
    --border-color: rgba(0, 0, 0, 0.08);
    --btn-text: #ffffff;
    --title-color: #003f78;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family: "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x:hidden;
}

.container{
    width:min(1200px,90%);
    margin:auto;
}

header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:1000;
    background: var(--header-bg);
    backdrop-filter:blur(10px);
    box-shadow:0 2px 15px rgba(0,0,0,.1);
    overflow: visible !important;
}

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

.logo img{
    height:55px;
    border-radius:50%;
}

.hero-content .logo{
    border-radius: 50%;
    margin-top:30px!important;
}

/* CONTAINER DAS AÇÕES DA NAVBAR (LINKS + BOTÕES) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 40px;
}

nav{
    display:flex;
    gap:40px;
    align-items: center;
}

nav a{
    text-decoration:none;
    color: var(--text-main);
    font-weight:600;
}

nav a:hover {
    color: var(--secondary);
}

/* BOTÃO DE PREFERÊNCIA DO TEMA (FLAT) */
.theme-toggle {
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
}
.theme-toggle:hover {
    color: var(--secondary);
}
.theme-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* MENU HAMBÚRGUER MOBILE */
.menu-burger {
    display: none;
    background: transparent !important;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 0;
}
.menu-burger svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* OVERLAY PARA O MENU MOBILE */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90; /* Fica abaixo da nav (1002) mas acima do conteúdo geral */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* HERO */
.hero{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    overflow:hidden;
    background: var(--bg-hero);
    padding-top: 80px;
    padding-bottom: 120px;
}

.wave-bg{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    overflow:hidden;
    line-height:0;
    transform:rotate(180deg);
}

.wave-bg svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.wave-bg path {
    fill: var(--bg-main); 
}

.hero-content{
    position:relative;
    z-index:2;
    text-align:center;
}

.hero-content img{
    width:220px;
    margin-bottom:30px;
    filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.3));
}

.hero h1{
    font-size:4rem;
    color: #ffffff;
    max-width:900px;
    margin:auto;
    line-height:1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p{
    max-width:700px;
    margin:30px auto;
    font-size:1.3rem;
    color: var(--text-hero);
}

.buttons{
    display:flex;
    gap:20px;
    justify-content:center;
    flex-wrap:wrap;
}

.btn{
    padding:16px 35px;
    border-radius:50px;
    text-decoration:none;
    font-weight:600;
    transition:.3s;
}

.btn-primary{
    background: var(--secondary);
    color: var(--btn-text);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn-primary:hover{
    transform:translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
    opacity: 0.9;
}

[data-theme="light"] .btn-primary {
    box-shadow: 0 4px 15px rgba(29, 134, 191, 0.4);
}

.btn-outline{
    border:2px solid #ffffff;
    color: #ffffff;
}

.btn-outline:hover{
    background: #ffffff;
    color: #003f78;
    transform:translateY(-3px);
}

section{
    padding:120px 0;
}

.title{
    text-align:center;
    color: var(--title-color);
    font-size:2.5rem;
    margin-bottom:20px;
}

.subtitle{
    text-align:center;
    max-width:800px;
    margin:auto;
    margin-bottom:70px;
    color: var(--text-muted);
}

.cards{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px;
}

.card{
    background: var(--bg-surface);
    padding:40px;
    border-radius:20px;
    box-shadow:0 15px 40px var(--card-shadow);
    border: 1px solid var(--border-color);
}

.card h3{
    color: var(--primary);
    margin-bottom:15px;
}

.card p {
    color: var(--text-muted);
}

/* ESTILOS DA NOVA SEÇÃO DE PORTFÓLIO (CASES) */
.cases-section {
    background: var(--bg-light);
}

.case-card {
    background: var(--bg-surface);
    border-radius: 20px;
    box-shadow: 0 15px 40px var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.case-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.case-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.case-card:hover .case-image-wrapper img {
    transform: scale(1.05);
}

.case-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.case-body h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.case-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.stats{
    background: var(--bg-stats);
    color: white;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:40px;
    text-align:center;
}

.stat-number{
    font-size:3rem;
    font-weight:bold;
    color: var(--secondary);
}

[data-theme="light"] .stat-number {
    color: #ffffff;
}

/* ESTILOS DA SEÇÃO DE FAQ / PROCESSO */
.faq-section {
    background: var(--bg-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 24px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 10px 30px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
}

.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.faq-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.faq-icon {
    font-size: 1.3rem;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.faq-item h3 {
    font-size: 1.2rem;
    color: var(--title-color);
    margin: 0;
    font-weight: 600;
}

.faq-toggle {
    transition: transform 0.3s ease;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.faq-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    padding-top: 0;
}

.faq-content p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Estado Ativo do Acordeon */
.faq-item.faq-active .faq-toggle {
    transform: rotate(90deg);
    color: var(--secondary);
}

.faq-item.faq-active .faq-content {
    max-height: 1000px; /* Valor alto para acomodar o texto */
    transition: max-height 0.5s cubic-bezier(1, 0, 1, 0);
    padding-top: 15px;
}

.contact{
    background: var(--bg-main); /* Ajustado para quebrar o tom com o fundo cinza claro */
}

.form{
    max-width:800px;
    margin:auto;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

input,
textarea{
    width:100%;
    border: 1px solid var(--border-color);
    padding:18px;
    border-radius:12px;
    background: var(--bg-surface);
    color: var(--text-main);
    font-size:1rem;
    outline: none;
}

input:focus, textarea:focus {
    border-color: var(--primary);
}

textarea{
    margin-top:20px;
    resize:none;
}

/* ESTILO ESPECÍFICO PARA O BOTÃO DO FORMULÁRIO */
.form button {
    margin-top:20px;
    width:100%;
    border:none;
    background: var(--secondary);
    color: var(--btn-text);
    font-weight: 600;
    padding:18px;
    border-radius:12px;
    font-size:1rem;
    cursor:pointer;
}

[data-theme="light"] .form button {
    background: var(--primary);
    color: #ffffff;
}

footer{
    background: var(--bg-hero);
    color: white;
    text-align:center;
    padding:40px;
    opacity: 0.9;
}

.wave-nav {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
}

.wave-nav svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 40px;
}

.wave-nav path {
    fill: var(--header-bg); 
}

.bg-hero-section {
    background: var(--bg-hero);
    color: #ffffff;
}

.bg-hero-section .title {
    color: #ffffff;
}

.bg-hero-section .subtitle {
    color: var(--text-hero);
}

/* RESPONSIVIDADE E DESIGN DO MENU MOBILE CORRIGIDO */
@media(max-width:900px){
    .hero h1{ font-size:2.5rem; }
    .cards{ grid-template-columns:1fr; }
    .stats-grid{ grid-template-columns:1fr 1fr; }
    .form-grid{ grid-template-columns:1fr; }
    
    .menu-burger {
        display: block;
        z-index: 1005; /* Acima da barra lateral */
    }

    .theme-toggle {
        z-index: 1005; /* Mantém o botão acessível no mobile */
    }

    /* Sidebar Mobile corrigida */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-surface);
        box-shadow: -5px 0 25px rgba(0,0,0,0.3);
        flex-direction: column;
        justify-content: center;
        gap: 35px;
        z-index: 1009!important; /* Fica acima do overlay (1001) para permitir cliques */
        transition: right 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
        padding: 40px;
    }

    nav.active {
        right: 0;
    }

    nav a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-actions {
        gap: 25px;
    }
}

@media(max-width:600px){
    .hero h1{ font-size:2rem; }
    .hero-content img{ width:180px; }
    .stats-grid{ grid-template-columns:1fr; }
    section{ padding:80px 0; }
}

