/* =============================================================
   UNIBIT — dark-mode.css
   Overrides completos para [data-theme="dark"]
   ============================================================= */

[data-theme="dark"] {
  --bg-primary:   #0D0D14;
  --bg-secondary: #16161F;
  --bg-card:      #1C1C28;
  --text-primary: #F1F1F3;
  --text-muted:   #9CA3AF;
  --color-border: #2A2A3A;
}

/* Body */
[data-theme="dark"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Navbar — fondo completamente opaco, sin blur ni borde */
[data-theme="dark"] .site-header,
[data-theme="dark"] #masthead,
[data-theme="dark"] .ast-primary-header-bar,
[data-theme="dark"] .ast-main-header-wrap,
[data-theme="dark"] .main-header-bar-wrap,
[data-theme="dark"] #ast-desktop-header,
[data-theme="dark"] #ast-mobile-header {
  background: var(--bg-primary) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Cards */
[data-theme="dark"] .card,
[data-theme="dark"] .card-area-big,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .unibit-ghl-form,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .por-que-item,
[data-theme="dark"] .card-testimonio {
  background: var(--bg-card);
  border-color: var(--color-border);
}

/* Separadores */
[data-theme="dark"] .section-stats {
  border-color: var(--color-border);
}

[data-theme="dark"] .stats-grid .stat-item {
  border-color: var(--color-border);
}

/* Textos */
[data-theme="dark"] .section-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text-primary);
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] .section-subtitle {
  color: var(--text-muted);
}

/* Botón secundario */
[data-theme="dark"] .btn-secondary {
  color: var(--text-primary);
  border-color: var(--color-border);
}

[data-theme="dark"] .btn-secondary:hover {
  border-color: var(--color-area, var(--color-desarrollo));
  color: var(--color-area, var(--color-desarrollo));
}

/* Sección secundaria */
[data-theme="dark"] .section-testimonios,
[data-theme="dark"] .section-por-que,
[data-theme="dark"] .section-blog {
  background: var(--bg-secondary);
}

/* FAQ */
[data-theme="dark"] .faq-question {
  color: var(--text-primary);
}

[data-theme="dark"] .faq-question .faq-icon {
  background: var(--bg-secondary);
  color: var(--text-muted);
}

[data-theme="dark"] .faq-answer p {
  color: var(--text-muted);
}

/* Nav links */
[data-theme="dark"] .unibit-nav .nav-links a {
  color: var(--text-muted);
}

[data-theme="dark"] .unibit-nav .nav-links a:hover,
[data-theme="dark"] .unibit-nav .nav-links .current-menu-item > a {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

[data-theme="dark"] .nav-dark-toggle {
  border-color: var(--color-border);
  color: var(--text-muted);
}

[data-theme="dark"] .nav-dark-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Hero */
[data-theme="dark"] .hero-home {
  background: var(--bg-primary);
}

[data-theme="dark"] .hero-area {
  background: var(--bg-secondary);
}

[data-theme="dark"] .hero-badge {
  background: var(--bg-secondary);
  border-color: var(--color-border);
  color: var(--text-muted);
}

/* Blog card texto */
[data-theme="dark"] .blog-card h3 a {
  color: var(--text-primary);
}

[data-theme="dark"] .blog-card .blog-excerpt,
[data-theme="dark"] .blog-card .blog-meta {
  color: var(--text-muted);
}

/* Proceso */
[data-theme="dark"] .proceso-step .step-content h4 {
  color: var(--text-primary);
}

/* Por qué item */
[data-theme="dark"] .por-que-item h4 {
  color: var(--text-primary);
}

/* Pill neutral */
[data-theme="dark"] .pill-neutral {
  background: var(--bg-secondary);
  border-color: var(--color-border);
  color: var(--text-muted);
}

/* Inputs en dark */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--bg-card);
  border-color: var(--color-border);
  color: var(--text-primary);
}

/* Toggle icon */
.dark-icon-moon  { display: block; }
.dark-icon-sun   { display: none; }

[data-theme="dark"] .dark-icon-moon { display: none; }
[data-theme="dark"] .dark-icon-sun  { display: block; }

/* ============================================================
   DARK MODE — ASTRA OVERRIDES
   ============================================================ */

/* Nav links en dark mode */
[data-theme="dark"] #masthead .main-header-menu .menu-link,
[data-theme="dark"] .ast-primary-header-bar .menu-link,
[data-theme="dark"] .main-header-menu > li > a,
[data-theme="dark"] .ast-nav-menu > li > a {
  color: var(--text-primary) !important;
}
[data-theme="dark"] #masthead .main-header-menu .menu-link:hover,
[data-theme="dark"] .main-header-menu > li > a:hover,
[data-theme="dark"] .ast-nav-menu > li > a:hover {
  color: var(--color-desarrollo) !important;
}

/* ast-primary-header-bar ya cubierto arriba */

/* Footer custom en dark mode */
[data-theme="dark"] .site-footer-custom,
[data-theme="dark"] .site-footer-custom .footer-bottom {
  background: #0D0D14 !important;
  border-top: none !important;
}

/* Body completo en dark mode para evitar franjas */
[data-theme="dark"] html,
[data-theme="dark"] body,
[data-theme="dark"] #page,
[data-theme="dark"] #content,
[data-theme="dark"] #primary,
[data-theme="dark"] .site-main {
  background: var(--bg-primary) !important;
}

/* Mobile menu en dark mode */
[data-theme="dark"] .main-header-bar-navigation.toggle-on .main-header-menu,
[data-theme="dark"] .main-header-bar-navigation.toggle-on .ast-nav-menu {
  background: #16161F !important;
  border-top-color: rgba(255, 255, 255, .1) !important;
}
[data-theme="dark"] .main-header-bar-navigation.toggle-on .menu-item {
  border-bottom-color: rgba(255, 255, 255, .07) !important;
}
[data-theme="dark"] .main-header-bar-navigation.toggle-on .menu-item a {
  color: #E5E7EB !important;
}
[data-theme="dark"] .main-header-bar-navigation.toggle-on .menu-item a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .05) !important;
}

/* Switch toggle en dark mode: sin bordes */
[data-theme="dark"] .dark-toggle,
[data-theme="dark"] .theme-switch {
  background: none !important;
  border: none !important;
}

/* ============================================================
   MOBILE MENU — dark mode (Astra pone background:#f9f9f9)
   ============================================================ */
[data-theme="dark"] #ast-mobile-header,
[data-theme="dark"] #ast-mobile-header .ast-primary-header-bar,
[data-theme="dark"] .ast-mobile-header-wrap,
[data-theme="dark"] .ast-mobile-header-content,
[data-theme="dark"] .ast-builder-menu-mobile,
[data-theme="dark"] .ast-builder-menu-mobile .main-header-bar-navigation,
[data-theme="dark"] .ast-builder-menu-mobile .ast-main-header-bar-alignment,
[data-theme="dark"] .ast-builder-menu-mobile nav,
[data-theme="dark"] .ast-header-break-point .main-header-menu,
[data-theme="dark"] .ast-header-break-point .main-header-menu .sub-menu,
[data-theme="dark"] .main-header-bar-navigation .main-header-menu,
[data-theme="dark"] .main-header-bar-navigation .ast-nav-menu {
  background: var(--bg-primary) !important;
  background-color: var(--bg-primary) !important;
}

[data-theme="dark"] #ast-mobile-header .menu-item,
[data-theme="dark"] #ast-mobile-header .menu-item > a,
[data-theme="dark"] #ast-mobile-header .menu-item > .menu-link,
[data-theme="dark"] .ast-mobile-header-content .menu-item,
[data-theme="dark"] .ast-mobile-header-content .menu-item > a,
[data-theme="dark"] .ast-mobile-header-content .menu-item > .menu-link,
[data-theme="dark"] .main-header-bar-navigation .menu-item,
[data-theme="dark"] .main-header-bar-navigation .menu-item > a,
[data-theme="dark"] .main-header-bar-navigation .menu-item > .menu-link {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--text-primary) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] #ast-mobile-header .menu-item > a:hover,
[data-theme="dark"] #ast-mobile-header .menu-item > .menu-link:hover,
[data-theme="dark"] .ast-mobile-header-content .menu-item > a:hover,
[data-theme="dark"] .ast-mobile-header-content .menu-item > .menu-link:hover {
  background: rgba(255,255,255,0.05) !important;
  color: #fff !important;
}

/* Ultimo item (Contacto) mantiene estilo azul */
[data-theme="dark"] #ast-mobile-header .menu-item:last-child > a,
[data-theme="dark"] #ast-mobile-header .menu-item:last-child > .menu-link,
[data-theme="dark"] .ast-mobile-header-content .menu-item:last-child > a {
  background: var(--color-desarrollo) !important;
  color: #fff !important;
}
