/* ============================================================
   Modo oscuro — adaptación institucional (verde + naranja) del
   dark-style.scss original del template Turacos. Se activa con la
   clase .theme-dark en <html> (mecanismo ya existente en
   assets/js/main.js: setTheme()/toggleTheme(), persistido en
   localStorage bajo la key "turacos_theme"). Este archivo NO porta
   los selectores del template que este proyecto no usa (páginas de
   e-commerce, blog, "digital solutions", etc.) — solo cubre los
   componentes reales del portal.

   Estrategia: 1) redefinir los tokens --inst-* para que todo lo que
   ya usa variables se adapte solo; 2) overrides explícitos para las
   superficies con blanco fijo (#FFFFFF) detectadas en el resto de
   hojas de estilo, que no reaccionan a las variables.
   ============================================================ */

.theme-dark {
    /* ---------- Tokens institucionales oscuros ---------- */
    --inst-primary: #4CA06B;
    --inst-primary-dark: #14532D;
    --inst-secondary: #6BBE8A;
    --inst-secondary-light: #8FD4A8;
    --inst-accent: #F0954A;
    --inst-accent-hover: #FFA85C;

    --inst-white: #1A2420;
    --inst-surface: #1A2420;
    --inst-surface-alt: #10160F;
    --inst-bg-light: #16201A;
    --inst-bg-subtle: #141E18;

    --inst-text: #E6EFE9;
    --inst-heading: #FFFFFF;
    --inst-text-light: #9FB3A8;
    --inst-muted: #23302A;
    --inst-muted-fg: #9FB3A8;
    --inst-border: #2B3A33;

    --inst-primary-50: #16201A;
    --inst-primary-100: #1B2822;
    --inst-primary-200: #223327;
    --inst-accent-light: #C97A3D;
    --inst-accent-soft: #2A2115;
    --inst-shadow-sm: rgba(0, 0, 0, 0.30);
    --inst-shadow-md: rgba(0, 0, 0, 0.45);

    color-scheme: dark;
}

/* ---------- Base ---------- */
.theme-dark body {
    background-color: var(--inst-surface-alt);
    color: var(--inst-text);
}

.theme-dark .bg-fbf9f8,
.theme-dark .bg-f9f9f9,
.theme-dark .bg-f3f0e8 {
    background-color: var(--inst-bg-subtle) !important;
}

.theme-dark .form-control,
.theme-dark .form-select {
    background-color: var(--inst-surface);
    border-color: var(--inst-border);
    color: var(--inst-text);
}

.theme-dark .form-control::placeholder {
    color: var(--inst-muted-fg);
}

.theme-dark .form-control:focus,
.theme-dark .form-select:focus {
    background-color: var(--inst-surface);
    color: var(--inst-text);
}

/* ---------- Header / navbar / dropdown ---------- */
.theme-dark .navbar {
    background: var(--inst-surface) !important;
    border-bottom-color: var(--inst-border);
}

.theme-dark .navbar-light .navbar-nav .nav-link,
.theme-dark .navbar-light .navbar-brand {
    color: var(--inst-text);
}

.theme-dark .dropdown-menu {
    background-color: var(--inst-surface);
    border-color: var(--inst-border);
}

.theme-dark .dropdown-item {
    color: var(--inst-text);
}

.theme-dark .dropdown-item:hover,
.theme-dark .dropdown-item:focus,
.theme-dark .dropdown-item.active,
.theme-dark .dropdown-item:active {
    background-color: var(--inst-muted);
    color: var(--inst-primary);
}

.theme-dark .navbar-quick-toggle {
    background: var(--inst-muted);
}

/* Modal lateral de contacto rápido */
.theme-dark .sidebarModal .modal-content {
    background-color: var(--inst-surface);
}

.theme-dark .sidebarModal .close {
    color: var(--inst-text);
}

/* ---------- Footer ---------- */
.theme-dark .footer-area {
    background-color: var(--inst-surface-alt);
}

.theme-dark .single-footer-widget .contact-list li,
.theme-dark .single-footer-widget p {
    color: var(--inst-text-light);
}

.theme-dark .copyright-area {
    background: var(--inst-primary-dark);
}

.theme-dark .go-top {
    background: var(--inst-primary);
}

/* ---------- Testimonios (carrusel compartido) ---------- */
.theme-dark .single-feedback {
    background: var(--inst-surface);
    border-color: var(--inst-border);
}

.theme-dark .single-feedback .client-info span {
    color: var(--inst-muted-fg);
}

/* ---------- Superficies con blanco fijo detectadas en los módulos
   (no reaccionan a las variables porque usan #FFFFFF directo) ---------- */
.theme-dark .ay-faq-item,
.theme-dark .ay-branch-card,
.theme-dark .ay-faq-search input,
.theme-dark .ay-category-pill,
.theme-dark .ay-branch-mini,
.theme-dark .ay-form-card,
.theme-dark .ct-toolbar,
.theme-dark .ct-search-box input,
.theme-dark .ct-category-sidebar,
.theme-dark .ct-page-btn,
.theme-dark .ct-compare-modal,
.theme-dark .ct-wizard-card,
.theme-dark .ct-calc-modes,
.theme-dark .ct-summary-card,
.theme-dark .ct-schedule-wrap,
.theme-dark .cn-team-header,
.theme-dark .cn-doc-card,
.theme-dark .ev-calendar-card,
.theme-dark .ev-calendar-nav button,
.theme-dark .ev-upcoming-card,
.theme-dark .ev-modal,
.theme-dark .fb-nav-btn,
.theme-dark .hm-quick-action,
.theme-dark .hm-stats-card,
.theme-dark .hm-value-card,
.theme-dark .hm-step,
.theme-dark .np-search-box input,
.theme-dark .np-lightbox-content,
.theme-dark .pr-switch,
.theme-dark .pr-card,
.theme-dark .pr-benefit-item,
.theme-dark .pr-calc-card,
.theme-dark .pr-sticky-cta,
.theme-dark .tp-toc,
.theme-dark .tp-content,
.theme-dark .tp-alert-card {
    background: var(--inst-surface);
}

.theme-dark .fb-nav-btn:disabled {
    background: var(--inst-surface);
}

/* Encabezado fijo de la tabla de amortización: mantiene su propio
   contraste (fondo --inst-primary + texto blanco), no requiere cambio. */

@media (max-width: 991px) {
    .theme-dark .bg-light {
        background-color: var(--inst-surface) !important;
        border-color: var(--inst-border);
    }
}
