/* css/style.css */

/* Custom CSS Variables & Theme Definitions */
:root {
  /* Brand color palette */
  --color-brand-50:  #f0f5fb;
  --color-brand-100: #d9e6f3;
  --color-brand-200: #b3cce7;
  --color-brand-300: #7aaac9;
  --color-brand-400: #4480a8;
  --color-brand-500: #2c628a;
  --color-brand-600: #1e4d7b;
  --color-brand-700: #193f65;
  --color-brand-800: #132f4c;
  --color-brand-900: #0e2038;
  --color-brand-950: #070f1c;

  --color-gold-100:  #fdf6e3;
  --color-gold-200:  #f7e3b0;
  --color-gold-300:  #e8c870;
  --color-gold-400:  #d4a940;
  --color-gold-500:  #b7933a;
  --color-gold-600:  #9a7a2e;
  --color-gold-700:  #7d6024;

  /* Theme Semantic Variables - LIGHT MODE (Cream background, no texture) */
  --bg-page: #faf8f0;
  --text-page: #0f172a;           /* slate-900 */
  --text-muted: #475569;          /* slate-600 */
  --text-muted-more: #64748b;     /* slate-500 */
  --text-brand: #193f65;          /* brand-700 */
  --text-brand-title: #0e2038;    /* brand-900 */

  /* Components & Cards */
  --bg-card: #ffffff;
  --border-card: rgba(25, 63, 101, 0.12);
  --bg-glass: rgba(255, 253, 240, 0.75);
  --border-glass: rgba(255, 255, 255, 0.3);
  --shadow-glass: rgba(0, 0, 0, 0.08);

  /* Navigation Bar */
  --bg-nav: rgba(250, 248, 240, 0.60);
  --bg-nav-scrolled: rgba(250, 248, 240, 0.88);
  --border-nav: rgba(255, 255, 255, 0.2);
  --border-nav-scrolled: rgba(212, 169, 64, 0.3);
  --text-nav-hover: var(--color-gold-600);

  /* Hero Gradients Overlays */
  --hero-overlay-start: rgba(250, 248, 240, 0.85);
  --hero-overlay-mid: rgba(250, 248, 240, 0.20);
  --hero-overlay-bottom-start: rgba(250, 248, 240, 0.45);
  --hero-overlay-bottom-end: rgba(250, 248, 240, 0.80);
  --hero-overlay-faq-start: rgba(250, 248, 240, 0.55);
  --hero-overlay-faq-end: rgba(250, 248, 240, 0.90);
  --hero-overlay-calendar-start: rgba(250, 248, 240, 0.50);
  --hero-overlay-calendar-end: rgba(250, 248, 240, 0.85);

  /* Specific Badges & Headings */
  --bg-badge-history: rgba(212, 169, 64, 0.15);
  --border-badge-history: rgba(212, 169, 64, 0.35);
  --text-badge-history: #7d6024;
  --bg-badge-founders: #ffffff;
  --border-badge-founders: #e8c870;
  --text-legado-honor: #9a7a2e;

  /* Premium Gold Transparent Buttons */
  --bg-btn-gold-trans: rgba(183, 147, 58, 0.12);
  --border-btn-gold-trans: rgba(183, 147, 58, 0.35);
  --text-btn-gold-trans: #7d6024;
  --bg-btn-gold-trans-hover: rgba(183, 147, 58, 0.22);
  --border-btn-gold-trans-hover: rgba(183, 147, 58, 0.6);
  --text-btn-gold-trans-hover: #60491b;
  --shadow-btn-gold-trans: rgba(183, 147, 58, 0.3);

  /* Board of Directors / Officers cards */
  --bg-officer-card: #ffffff;
  --bg-officer-president-card: rgba(212, 169, 64, 0.05);
  --border-officer-card: rgba(25, 63, 101, 0.12);

  /* Inputs, Textareas, Selects */
  --bg-input: #ffffff;
  --text-input: #0f172a;
  --border-input: #cbd5e1;
  --placeholder-input: #64748b;

  /* Admin Dashboard Layout & Sidebar */
  --bg-admin-sidebar: #ffffff;
  --border-admin-sidebar: rgba(25, 63, 101, 0.12);
  --bg-admin-main: #ffffff;
  --border-admin-main: rgba(25, 63, 101, 0.12);
  --text-tab-inactive: #475569;
  --bg-tab-inactive-hover: #f1f5f9;
  --text-tab-inactive-hover: #0f172a;
  --bg-tab-active: #193f65;
  --text-tab-active: #ffffff;
  --shadow-tab-active: transparent;

  /* Alerts feedback boxes */
  --bg-alert-error: rgba(254, 226, 226, 0.9);
  --text-alert-error: #991b1b;
  --border-alert-error: rgba(248, 113, 113, 0.4);
  --bg-alert-success: rgba(209, 250, 229, 0.9);
  --text-alert-success: #065f46;
  --border-alert-success: rgba(52, 211, 153, 0.4);

  /* Home Page CTA Box Theme Variables (Light mode) */
  --bg-home-cta: #ffffff;
  --border-home-cta: rgba(212, 169, 64, 0.35);
  --text-home-cta-title: #0e2038;
  --text-home-cta-desc: #193f65;
  --bg-home-cta-btn: #d4a940;
  --text-home-cta-btn: #0e2038;
  --shadow-home-cta-btn: rgba(212, 169, 64, 0.3);
}

/* Theme Semantic Variables - DARK MODE overrides */
html.dark {
  --bg-page: #020617;             /* slate-950 */
  --text-page: #f1f5f9;           /* slate-100 */
  --text-muted: #cbd5e1;          /* slate-300 */
  --text-muted-more: #94a3b8;     /* slate-400 */
  --text-brand: #f1f5f9;          /* slate-100 */
  --text-brand-title: #ffffff;    /* white */

  /* Components & Cards */
  --bg-card: rgba(14, 32, 56, 0.4);
  --border-card: rgba(25, 63, 101, 0.3);
  --bg-glass: rgba(14, 32, 56, 0.75);
  --border-glass: rgba(25, 63, 101, 0.4);
  --shadow-glass: rgba(0, 0, 0, 0.4);

  /* Navigation Bar */
  --bg-nav: rgba(14, 32, 56, 0.60);
  --bg-nav-scrolled: rgba(14, 32, 56, 0.88);
  --border-nav: rgba(25, 63, 101, 0.2);
  --border-nav-scrolled: rgba(25, 63, 101, 0.5);
  --text-nav-hover: var(--color-gold-400);

  /* Hero Gradients Overlays */
  --hero-overlay-start: rgba(2, 6, 23, 0.80);
  --hero-overlay-mid: rgba(2, 6, 23, 0.20);
  --hero-overlay-bottom-start: rgba(2, 6, 23, 0.55);
  --hero-overlay-bottom-end: rgba(2, 6, 23, 0.75);
  --hero-overlay-faq-start: rgba(14, 32, 56, 0.75);
  --hero-overlay-faq-end: rgba(2, 6, 23, 0.92);
  --hero-overlay-calendar-start: rgba(2, 6, 23, 0.60);
  --hero-overlay-calendar-end: rgba(2, 6, 23, 0.82);

  /* Specific Badges & Headings */
  --bg-badge-history: rgba(183, 147, 58, 0.15);
  --border-badge-history: rgba(183, 147, 58, 0.35);
  --text-badge-history: #e8c870;
  --bg-badge-founders: #0e2038;
  --border-badge-founders: #9a7a2e;
  --text-legado-honor: #d4a940;

  /* Premium Gold Transparent Buttons */
  --bg-btn-gold-trans: rgba(212, 169, 64, 0.12);
  --border-btn-gold-trans: rgba(212, 169, 64, 0.35);
  --text-btn-gold-trans: #d4a940;
  --bg-btn-gold-trans-hover: rgba(212, 169, 64, 0.22);
  --border-btn-gold-trans-hover: rgba(212, 169, 64, 0.6);
  --text-btn-gold-trans-hover: #e8c870;
  --shadow-btn-gold-trans: rgba(212, 169, 64, 0.4);

  /* Board of Directors / Officers cards */
  --bg-officer-card: #081328;     /* #081328 dark blue admin layout cards */
  --bg-officer-president-card: #081328;
  --border-officer-card: rgba(25, 63, 101, 0.3);

  /* Inputs, Textareas, Selects */
  --bg-input: #0e1829;
  --text-input: #f1f5f9;
  --border-input: rgba(25, 63, 101, 0.3);
  --placeholder-input: #64748b;

  /* Admin Dashboard Layout & Sidebar */
  --bg-admin-sidebar: rgba(14, 32, 56, 0.4);
  --border-admin-sidebar: rgba(25, 63, 101, 0.3);
  --bg-admin-main: rgba(14, 32, 56, 0.4);
  --border-admin-main: rgba(25, 63, 101, 0.3);
  --text-tab-inactive: #b3cce7;
  --bg-tab-inactive-hover: rgba(25, 63, 101, 0.25);
  --text-tab-inactive-hover: #ffffff;
  --bg-tab-active: #d4a940;
  --text-tab-active: #0e2038;
  --shadow-tab-active: 0 4px 14px 0 rgba(212, 169, 64, 0.3);

  /* Alerts feedback boxes */
  --bg-alert-error: rgba(153, 27, 27, 0.2);
  --text-alert-error: #f87171;
  --border-alert-error: rgba(153, 27, 27, 0.3);
  --bg-alert-success: rgba(16, 185, 129, 0.2);
  --text-alert-success: #34d399;
  --border-alert-success: rgba(16, 185, 129, 0.3);

  /* Home Page CTA Box Theme Variables (Dark mode) */
  --bg-home-cta: #0e2038;
  --border-home-cta: #d4a940;
  --text-home-cta-title: #ffffff;
  --text-home-cta-desc: #b3cce7;
  --bg-home-cta-btn: #d4a940;
  --text-home-cta-btn: #0e2038;
  --shadow-home-cta-btn: rgba(212, 169, 64, 0.4);
}

/* Global Transition */
html {
  transition: background-color 0.4s ease, color 0.4s ease;
  scroll-behavior: smooth;
}

/* Global Page Base styles using Theme Variables */
body {
  color: var(--text-page);
  background-color: var(--bg-page);
  font-family: "Inter", "Outfit", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Global Input / Textarea styles */
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
textarea,
select,
.cms-input {
  background-color: var(--bg-input) !important;
  color: var(--text-input) !important;
  border-color: var(--border-input) !important;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder-input) !important;
}

/* Custom Components */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 40px var(--shadow-glass);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-wrapper {
  transition: background-color 0.4s ease, color 0.4s ease;
}

.gold-bar {
  height: 4px;
  width: 64px;
  background: #d4a940; /* gold-400 */
  border-radius: 9999px;
}

/* Mobile optimizations */
button, a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* Accordion animations transition helper */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.accordion-content.open {
  max-height: 500px;
}

/* --- Theme Toggle Responsive Classes --- */
.glass-nav {
  background: var(--bg-nav);
  border-color: var(--border-nav);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.glass-nav.scrolled {
  background: var(--bg-nav-scrolled);
  border-color: var(--border-nav-scrolled);
}

/* Responsive Hero Overlays */
.hero-overlay {
  background: linear-gradient(to top, var(--hero-overlay-start) 0%, var(--hero-overlay-mid) 60%, transparent 100%);
  transition: background 0.4s ease;
}

.hero-overlay-bottom {
  background: linear-gradient(to bottom, var(--hero-overlay-bottom-start) 0%, var(--hero-overlay-bottom-end) 100%);
  transition: background 0.4s ease;
}

.hero-overlay-faq {
  background: linear-gradient(to bottom, var(--hero-overlay-faq-start) 0%, var(--hero-overlay-faq-end) 100%);
  transition: background 0.4s ease;
}

.hero-overlay-calendar {
  background: linear-gradient(to bottom, var(--hero-overlay-calendar-start) 0%, var(--hero-overlay-calendar-end) 100%);
  transition: background 0.4s ease;
}

/* Navigation Menu Hovers */
#main-nav nav a {
  transition: color 0.25s ease-in-out !important;
}

#main-nav nav a:hover {
  color: var(--text-nav-hover) !important;
}

/* Línea de Selección del Menú */
.nav-underline {
  background-color: #d4a940 !important; /* gold-400 */
  height: 2px !important;
  bottom: -2px !important;
}

/* Badge Sociedad Benéfica Histórica */
.badge-history {
  background-color: var(--bg-badge-history) !important;
  border: 1px solid var(--border-badge-history) !important;
  color: var(--text-badge-history) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Iconos de Características (Features) */
.feature-icon-container {
  background-color: var(--bg-card) !important;
  color: #193f65 !important;
  transition: background-color 0.25s ease-in-out, color 0.25s ease-in-out !important;
}

html.dark .feature-icon-container {
  color: #d4a940 !important; /* gold-400 */
}

.group:hover .feature-icon-container {
  background-color: #193f65 !important; /* brand-700 */
  color: #ffffff !important;
}

html.dark .group:hover .feature-icon-container {
  background-color: #b7933a !important; /* gold-500 */
  color: #ffffff !important;
}

/* Marco de fotos en Oro */
.photo-frame-gold {
  border-color: #d4a940 !important; /* gold-400 */
}

html.dark .photo-frame-gold {
  border-color: #b7933a !important; /* gold-500 */
}

/* Badge de Fundadores en el Home */
.badge-founders {
  background-color: var(--bg-badge-founders) !important;
  border-color: var(--border-badge-founders) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.text-legado-honor {
  color: var(--text-legado-honor) !important;
  transition: color 0.3s ease;
}

/* Botones Oro Transparentes Premium */
.btn-gold-transparent {
  background-color: var(--bg-btn-gold-trans) !important;
  border: 1.5px solid var(--border-btn-gold-trans) !important;
  color: var(--text-btn-gold-trans) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transition: all 0.25s ease-in-out !important;
}

.btn-gold-transparent:hover {
  background-color: var(--bg-btn-gold-trans-hover) !important;
  border-color: var(--border-btn-gold-trans-hover) !important;
  color: var(--text-btn-gold-trans-hover) !important;
  box-shadow: 0 10px 20px -10px var(--shadow-btn-gold-trans) !important;
}

/* Tarjetas de Oficiales en la Directiva */
.officer-card {
  background-color: var(--bg-officer-card) !important;
  border: 1px solid var(--border-officer-card) !important;
  transition: all 0.3s ease-in-out !important;
}

.officer-card.president-card {
  background-color: var(--bg-officer-president-card) !important;
  border: 2px solid #d4a940 !important; /* gold-400 */
}

.officer-card:hover {
  border-color: rgba(212, 169, 64, 0.5) !important;
}

/* --- Section backgrounds adaptivity --- */
section:not(.bg-brand-900):not(.home-cta-box) {
  background-color: var(--bg-page) !important;
  transition: background-color 0.4s ease;
}

html.dark .document-card,
html.dark .event-card,
html.dark .vocal-card,
html.dark .service-card:not(.bg-brand-900) {
  background-color: var(--bg-card) !important;
  border-color: var(--border-card) !important;
}

html.dark .contact-form-container {
  background-color: rgba(14, 32, 56, 0.3) !important;
  border-color: var(--border-card) !important;
}

html.dark .category-btn {
  background-color: rgba(14, 32, 56, 0.5) !important;
  border-color: var(--border-card) !important;
  color: #b3cce7 !important;
}

html.dark .faq-toggle-btn {
  background-color: rgba(14, 32, 56, 0.5) !important;
  color: #ffffff !important;
}

html.dark .bg-brand-50,
html.dark [class*="bg-brand-50"] {
  background-color: rgba(14, 32, 56, 0.4) !important;
  color: #f1f5f9 !important;
}

html.dark .bg-gold-100,
html.dark [class*="bg-gold-100"] {
  background-color: rgba(14, 32, 56, 0.3) !important;
  border-color: var(--border-card) !important;
}

html.dark #mobile-dropdown {
  background-color: rgba(14, 32, 56, 0.95) !important;
  border-color: rgba(25, 63, 101, 0.5) !important;
}

html.dark .faq-content > div {
  background-color: rgba(19, 47, 76, 0.8) !important;
  border-color: rgba(25, 63, 101, 0.5) !important;
  color: #f1f5f9 !important;
}

html.dark .bg-brand-100,
html.dark [class*="bg-brand-100"] {
  background-color: #132f4c !important;
  color: #b3cce7 !important;
}

html.dark .bg-emerald-100, html.dark [class*="bg-emerald-100"] { background-color: rgba(16, 185, 129, 0.2) !important; color: #34d399 !important; }
html.dark .bg-blue-100, html.dark [class*="bg-blue-100"] { background-color: rgba(59, 130, 246, 0.2) !important; color: #60a5fa !important; }
html.dark .bg-purple-100, html.dark [class*="bg-purple-100"] { background-color: rgba(139, 92, 246, 0.2) !important; color: #c084fc !important; }
html.dark .bg-amber-100, html.dark [class*="bg-amber-100"] { background-color: rgba(245, 158, 11, 0.2) !important; color: #fcd34d !important; }
html.dark .bg-rose-100, html.dark [class*="bg-rose-100"] { background-color: rgba(244, 63, 94, 0.2) !important; color: #f43f5e !important; }

html.dark .border-brand-100,
html.dark .border-brand-200,
html.dark .border-slate-50,
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark [class*="border-brand-100"],
html.dark [class*="border-brand-200"],
html.dark [class*="border-slate-100"],
html.dark [class*="border-slate-200"] {
  border-color: var(--border-card) !important;
}

html.dark section .text-slate-600,
html.dark section .text-slate-700,
html.dark section .text-brand-700,
html.dark .page-wrapper .text-slate-600,
html.dark .page-wrapper .text-slate-700,
html.dark .page-wrapper .text-brand-700 {
  color: var(--text-muted) !important;
}

html.dark section .text-slate-500,
html.dark section .text-brand-600,
html.dark .page-wrapper .text-slate-500,
html.dark .page-wrapper .text-brand-600 {
  color: var(--text-muted-more) !important;
}

html.dark section .text-brand-900,
html.dark .page-wrapper .text-brand-900,
html.dark .text-brand-900:not(#main-nav nav a) {
  color: var(--text-muted) !important;
}

html.dark section .text-slate-900,
html.dark .page-wrapper .text-slate-900 {
  color: var(--text-brand-title) !important;
}

html.dark section .text-gold-600,
html.dark .page-wrapper .text-gold-600 {
  color: #d4a940 !important;
}

html.dark body.bg-slate-50,
html.dark .bg-slate-50,
html.dark [class*="bg-slate-50"] {
  background-color: var(--bg-page) !important;
}

html.dark .bg-slate-100,
html.dark [class*="bg-slate-100"] {
  background-color: rgba(14, 32, 56, 0.4) !important;
}

html.dark .bg-slate-200,
html.dark [class*="bg-slate-200"] {
  background-color: rgba(14, 32, 56, 0.6) !important;
}

/* Alert Boxes Dynamic colors (Errors and Success) */
.bg-red-50, [class*="bg-red-50"] {
  background-color: var(--bg-alert-error) !important;
  color: var(--text-alert-error) !important;
  border-color: var(--border-alert-error) !important;
  transition: all 0.3s ease;
}
.bg-emerald-50, [class*="bg-emerald-50"] {
  background-color: var(--bg-alert-success) !important;
  color: var(--text-alert-success) !important;
  border-color: var(--border-alert-success) !important;
  transition: all 0.3s ease;
}

/* --- Admin Panel Dashboard Layout --- */
aside > div,
aside .bg-white {
  background-color: var(--bg-admin-sidebar) !important;
  border-color: var(--border-admin-sidebar) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

main section,
main section.bg-white {
  background-color: var(--bg-admin-main) !important;
  border-color: var(--border-admin-main) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

header.bg-white\/80 {
  background-color: var(--bg-glass) !important;
  border-color: var(--border-glass) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Dashboard Menu Tabs */
.tab-btn {
  color: var(--text-tab-inactive) !important;
  background-color: transparent !important;
  transition: all 0.2s ease-in-out !important;
}

.tab-btn:hover {
  background-color: var(--bg-tab-inactive-hover) !important;
  color: var(--text-tab-inactive-hover) !important;
}

.tab-btn.bg-brand-700,
.tab-btn[class*="bg-brand-700"],
.tab-btn.bg-gold-500,
.tab-btn[class*="bg-gold-500"] {
  background-color: var(--bg-tab-active) !important;
  color: var(--text-tab-active) !important;
  box-shadow: var(--shadow-tab-active) !important;
}

/* --- Specific Custom Adjustments for About & Services Pages --- */

/* Force Gold text on text-gold-400 in Dark Mode (e.g. "Amor y Dignidad") */
html.dark .text-gold-400,
html.dark [class*="text-gold-400"] {
  color: #d4a940 !important;
}

/* Tarjeta de Años de Vida en Sobre Nosotros */
.about-years-card {
  transition: all 0.3s ease;
}
html.dark .about-years-card {
  background-color: #0e2038 !important;
  border-color: #d4a940 !important;
}
html.dark .about-years-card p:first-child,
html.dark .about-years-card p[class*="text-gold-"] {
  color: #d4a940 !important;
}
html.dark .about-years-card p:last-child,
html.dark .about-years-card p[class*="text-brand-"] {
  color: #ffffff !important;
}

/* Cajas de Fundadores en Sobre Nosotros */
.founder-card:not(.bg-gold-400) {
  background-color: #ffffff !important;
  border-color: rgba(25, 63, 101, 0.12) !important;
  color: #1e4d7b !important;
  transition: all 0.3s ease-in-out !important;
}
.founder-card:not(.bg-gold-400):hover {
  background-color: rgba(183, 147, 58, 0.12) !important;
  border-color: rgba(183, 147, 58, 0.6) !important;
  color: #7d6024 !important;
}

html.dark .founder-card:not(.bg-gold-400) {
  background-color: #0e2038 !important;
  border-color: rgba(25, 63, 101, 0.5) !important;
  color: #b3cce7 !important;
}
html.dark .founder-card:not(.bg-gold-400):hover {
  background-color: rgba(212, 169, 64, 0.12) !important;
  border-color: #d4a940 !important;
  color: #e8c870 !important;
}

/* Cajas de Servicios con estilo Directiva */
.service-card:not(.bg-brand-900) {
  background-color: var(--bg-officer-card) !important;
  border: 1px solid var(--border-officer-card) !important;
  transition: all 0.3s ease-in-out !important;
}
.service-card:not(.bg-brand-900):hover {
  border-color: rgba(212, 169, 64, 0.5) !important;
  box-shadow: 0 20px 40px var(--shadow-glass) !important;
}

/* --- Navigation Links Color Fixes --- */
#main-nav nav a {
  color: #193f65 !important; /* brand-700 / azul de marca */
  transition: color 0.25s ease-in-out !important;
}

html.dark #main-nav nav a {
  color: #cbd5e1 !important; /* slate-300 */
}

/* Active navigation link */
#main-nav nav a.text-brand-900 {
  color: #0e2038 !important; /* brand-900 / azul oscuro en modo claro */
  font-weight: 800 !important;
}

html.dark #main-nav nav a.text-brand-900 {
  color: #d4a940 !important; /* oro en modo oscuro */
}

#main-nav nav a:hover {
  color: var(--text-nav-hover) !important;
}

/* --- Home Page CTA Box (Membership Invitation) --- */
.home-cta-box {
  background-color: var(--bg-home-cta) !important;
  border: 2.5px solid var(--border-home-cta) !important;
  color: var(--text-home-cta-title) !important;
  transition: all 0.4s ease;
}

.home-cta-box h2,
.home-cta-box h3 {
  color: var(--text-home-cta-title) !important;
}

.home-cta-box p {
  color: var(--text-home-cta-desc) !important;
}

.home-cta-box a {
  background-color: var(--bg-home-cta-btn) !important;
  color: var(--text-home-cta-btn) !important;
  transition: all 0.3s ease !important;
}

/* --- Contact Info Card (Adaptive Office Details) --- */
.contact-info-card {
  background-color: var(--bg-home-cta) !important;
  border: 2.5px solid var(--border-home-cta) !important;
  color: var(--text-home-cta-title) !important;
  transition: all 0.4s ease;
}

.contact-info-card h3 {
  color: var(--text-home-cta-title) !important;
}

.contact-info-card p,
.contact-info-card dd p,
.contact-info-card dd a {
  color: var(--text-home-cta-desc) !important;
  transition: color 0.3s ease;
}

.contact-info-card .icon-container {
  background-color: var(--bg-btn-gold-trans) !important;
  color: var(--text-btn-gold-trans) !important;
  transition: all 0.3s ease;
}

.contact-info-card .group:hover .icon-container {
  background-color: #d4a940 !important;
  color: #0e2038 !important;
}

.contact-info-card .group:hover dd a {
  color: #d4a940 !important;
}

.home-cta-box a:hover {
  background-color: #b7933a !important; /* gold-500 */
  color: #ffffff !important;
  box-shadow: 0 10px 20px -5px var(--shadow-home-cta-btn) !important;
  transform: scale(1.05) !important;
}

/* --- Footer Layout Colors --- */
footer.bg-brand-900 {
  background-color: #0e2038 !important; /* brand-900 / azul oscuro */
  color: #ffffff !important;
  border-top-color: #d4a940 !important;
}

footer.bg-brand-900 a {
  color: #b3cce7 !important; /* brand-200 / azul claro */
  transition: color 0.25s ease-in-out !important;
}

footer.bg-brand-900 a:hover {
  color: #e8c870 !important; /* gold-300 */
}

footer.bg-brand-900 h3 {
  color: #d4a940 !important; /* gold-400 */
}

footer.bg-brand-900 p {
  color: #cbd5e1 !important; /* slate-300 */
}

footer.bg-brand-900 span.text-brand-400,
footer.bg-brand-900 p.text-brand-400,
footer.bg-brand-900 div.text-brand-400 {
  color: #94a3b8 !important; /* slate-400 */
}

/* --- Force Light Text to Brand/Dark Blue in Light Mode (except on Dark Backgrounds) --- */
html:not(.dark) .page-wrapper .text-brand-100:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-brand-200:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-brand-300:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-slate-100:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-slate-200:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-slate-300:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-slate-400:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *) {
  color: #193f65 !important; /* brand-700 / azul de marca */
}

html:not(.dark) .page-wrapper .text-white:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.about-years-card *):not(.founder-card.bg-gold-400 *):not(.photo-frame-gold *):not(button):not(button *),
html:not(.dark) .page-wrapper [class*="text-white"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.about-years-card *):not(.founder-card.bg-gold-400 *):not(.photo-frame-gold *):not(button):not(button *),
html:not(.dark) .page-wrapper .dark\:text-white:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.about-years-card *):not(.founder-card.bg-gold-400 *):not(.photo-frame-gold *):not(button):not(button *),
html:not(.dark) .page-wrapper [class*="dark:text-white"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.about-years-card *):not(.founder-card.bg-gold-400 *):not(.photo-frame-gold *):not(button):not(button *) {
  color: #0e2038 !important; /* brand-900 / azul oscuro */
}

/* Forzar que textos mutados o secundarios no sean claros en modo claro si tienen clases dark: de Tailwind */
html:not(.dark) .page-wrapper .dark\:text-slate-300:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper [class*="dark:text-slate-300"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-slate-300:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper [class*="text-slate-300"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *) {
  color: #334155 !important; /* slate-700 / gris oscuro */
}

html:not(.dark) .page-wrapper .dark\:text-slate-400:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper [class*="dark:text-slate-400"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-slate-400:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper [class*="text-slate-400"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *) {
  color: #475569 !important; /* slate-600 */
}

html:not(.dark) .page-wrapper .dark\:text-brand-200:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper [class*="dark:text-brand-200"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper .text-brand-200:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *),
html:not(.dark) .page-wrapper [class*="text-brand-200"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *) {
  color: #193f65 !important; /* brand-700 / azul de marca */
}

/* Anulaciones para slate-200, slate-100 y brand-100/300 */
html:not(.dark) .page-wrapper .dark\:text-slate-200:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper [class*="dark:text-slate-200"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper .text-slate-200:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *) {
  color: #334155 !important; /* slate-700 / gris oscuro */
}

html:not(.dark) .page-wrapper .dark\:text-slate-100:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper [class*="dark:text-slate-100"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper .text-slate-100:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *) {
  color: #0e2038 !important; /* brand-900 / azul oscuro */
}

html:not(.dark) .page-wrapper .dark\:text-brand-100:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper [class*="dark:text-brand-100"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper .text-brand-100:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *) {
  color: #193f65 !important; /* brand-700 / azul de marca */
}

html:not(.dark) .page-wrapper .dark\:text-brand-300:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper [class*="dark:text-brand-300"]:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *),
html:not(.dark) .page-wrapper .text-brand-300:not(.bg-brand-900 *):not(.home-cta-box *):not(footer *):not(.contact-info-card *) {
  color: #1e4d7b !important; /* brand-600 */
}



