/* --- 1. TRANSIÇÕES E ESTADOS GERAIS --- */
header {
    transition: background-color 0.2s ease, border 0.1s ease, box-shadow 0.1s ease !important;
    border-bottom: 1px solid transparent !important;
    box-shadow: none !important;
}

/* Base de transição para os links */
header .nav-text-color, 
header .nav-link {
    transition: color 0.3s ease, opacity 0.3s ease !important;
}

/* --- 2. LÓGICA DE CORES (DESKTOP) --- */

/* ESTADO: TOPO DA HOME (Branco/Transparente) */
body:not(.bg-interno) header:not(.header-scrolled) .nav-link,
body:not(.bg-interno) header:not(.header-scrolled) .nav-text-color {
    color: rgba(255, 255, 255, 0.65) !important;
}
@keyframes fadeInScale {

    from {

        opacity: 0;

        transform: scale(0.95) translateY(10px);

    }

    to {

        opacity: 1;

        transform: scale(1) translateY(0);

    }
}

/* ESTADO: TOPO DA INTERNA (Fundo Translúcido e Navy) */
body.bg-interno header:not(.header-scrolled) {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
body.bg-interno header:not(.header-scrolled) .nav-link,
body.bg-interno header:not(.header-scrolled) .nav-text-color {
    color: #001f3f !important; /* Navy */
}

/* HOVER NO TOPO (Geral) */
header:not(.header-scrolled) .nav-link:hover,
header:not(.header-scrolled) .nav-text-color:hover {
    color: rgba(255, 255, 255, 1) !important;
    opacity: 1 !important;
}
/* Hover específico da interna no topo */
body.bg-interno header:not(.header-scrolled) .nav-link:hover {
    color: rgb(0, 106, 255) !important;
}

/* --- 3. ESTADO SCROLLED (PARA TODAS AS PÁGINAS) --- */
.header-scrolled {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(233, 234, 237, 0.4) !important; 
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.3), 0 2px 4px rgba(255, 255, 255, 1), 0 5px 12px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.header-scrolled .nav-link,
.header-scrolled .nav-text-color {
    color: #1e2a35 !important;
    opacity: 0.8;
}

.header-scrolled .nav-link:hover,
.header-scrolled .nav-text-color:hover {
    color: rgb(0, 106, 255) !important;
    opacity: 1 !important;
}

/* --- 4. CORREÇÃO DOS BUGS NO @MEDIA (MOBILE) --- */
@media (max-width: 1024px) {
    body.overflow-hidden { overflow: hidden !important; }
    
    /* RESET MOBILE: Garante que ao voltar ao topo da INTERNA, ele volte a ser Navy */
    body.bg-interno header:not(.header-scrolled) .nav-text-color,
    body.bg-interno header:not(.header-scrolled) button svg,
    body.bg-interno header:not(.header-scrolled) button svg line {
        color: #001f3f !important;
        stroke: #001f3f !important;
    }

    /* RESET MOBILE: Garante que ao voltar ao topo da HOME, ele volte a ser Branco */
    body:not(.bg-interno) header:not(.header-scrolled) .nav-text-color,
    body:not(.bg-interno) header:not(.header-scrolled) button svg,
    body:not(.bg-interno) header:not(.header-scrolled) button svg line {
        color: #ffffff !important;
        stroke: #ffffff !important;
    }

    /* ESTADO SCROLLED MOBILE */
    header.header-scrolled:not(.menu-aberto-manual) .nav-text-color,
    header.header-scrolled button svg,
    header.header-scrolled button svg line {
        color: #1e2a35 !important;
        stroke: #1e2a35 !important;
    }

    /* MENU ABERTO: Sempre Branco sobre o fundo Navy do menu */
    .bg-navy button svg, 
    .bg-navy button svg line,
    div[x-show="mobileMenuOpen"] .text-white,
    div[x-show="mobileMenuOpen"] button svg,
    div[x-show="mobileMenuOpen"] button svg line {
        color: #ffffff !important;
        stroke: #ffffff !important;
    }

    div[x-show="mobileMenuOpen"].flex-col {
        height: 100vh !important;
        overflow-y: auto !important;
    }

    /* --- RESTANTE DO SEU CÓDIGO (SIMULAÇÃO E SOBRE) --- */
    #simulacao { padding-top: 4rem !important; padding-bottom: 4rem !important; }
    #simulacao form, .success-card-container { padding: 2rem 1.25rem !important; border-radius: 1.5rem !important; }
    .success-card-container h4 { font-size: 1.5rem !important; margin-bottom: 1rem !important; }
    .custom-date-input { font-size: 16px !important; }
    .success-card-container p { font-size: 0.95rem !important; padding: 0 !important; }
    .success-icon-wrapper { width: 4.5rem !important; height: 4.5rem !important; margin-bottom: 1.5rem !important; }
    .success-icon-wrapper svg { width: 2.25rem !important; height: 2.25rem !important; }
    .btn-success-spacing, #simulacao button[type="submit"] {
        width: 100% !important; margin-top: 1.25rem !important; height: 52px !important; 
        font-size: 1rem !important; display: flex !important; align-items: center; justify-content: center;
    }
    #simulacao input { height: 48px !important; }
    .grid { display: grid !important; grid-template-columns: 1fr !important; gap: 1.25rem !important; }
    @media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr !important; } }
    .card-sobre { padding: 1.5rem !important; }
    .avatar-sobre { width: 70px !important; height: 70px !important; }
    .header-card-sobre { height: auto !important; gap: 1rem !important; margin-bottom: 1rem !important; }
    .header-card-sobre h3 { font-size: 1rem !important; }
    .badge-sobre { padding: 2px 8px !important; margin-top: 4px !important; }
    .badge-sobre span { font-size: 10px !important; }
}

/* --- ELEMENTOS QUE NÃO MUDAM (ANIMAÇÕES E FORMULÁRIOS) --- */
.pt-interna { padding-top: 120px !important; }
.pb-interna { padding-bottom: 80px !important; }
html { scroll-behavior: smooth; }
.animate-in { animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.select-dropdown-menu { position: absolute; z-index: 50; width: 100%; margin-top: 0.5rem; background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 0.75rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); max-height: 250px; overflow-y: auto; }
.select-item { padding: 0.75rem 1rem; font-size: 0.875rem; color: #334155; cursor: pointer; transition: all 0.2s; }
.select-item:hover { background-color: #f8fafc; color: #001f3f; padding-left: 1.25rem; }
.select-dropdown-menu::-webkit-scrollbar { width: 4px; }
.select-dropdown-menu::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
.checkbox-round-idle { border-color: #cbd5e1; border-radius: 6px; background-color: transparent; }
.checkbox-round-active { background-color: #22c55e !important; border-color: #22c55e !important; width: 20px !important; height: 20px !important; display: flex !important; align-items: center; justify-content: center; border-radius: 6px; margin-top: 4px !important; }
.checkbox-round-active svg { width: 14px !important; height: 14px !important; }
.shadow-glow { box-shadow: 0 10px 25px -5px rgba(47, 128, 237, 0.4); }
.shadow-elevated { box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05); }
input[type="date"] { min-height: 3rem; appearance: none; -webkit-appearance: none; }
.btn-success-spacing { margin-top: 22px !important; display: inline-flex !important; align-items: center; justify-content: center; min-width: 280px !important; }
.success-text-spacing { margin-bottom: 28px; line-height: 1.8 !important; }
.success-card-container { padding: 4rem 0 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.success-icon-wrapper { margin-bottom: 2rem !important; }
.custom-date-input { appearance: none; -webkit-appearance: none; cursor: pointer; color-scheme: light; }
.custom-date-input::-webkit-calendar-picker-indicator { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23001f3f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E"); background-position: center; background-size: contain; cursor: pointer; opacity: 0.5; transition: opacity 0.2s; }
.custom-date-input:focus::-webkit-calendar-picker-indicator { opacity: 1; }
[x-cloak] { display: none !important; }
.header-card-sobre { height: 96px; }
.img-fill-circle { width: 110% !important; height: 110% !important; object-fit: contain !important; transform: scale(1.4); transition: transform 0.5s ease; }
.group:hover .img-fill-circle { transform: scale(1.6); }