/* ==========================================================================
   HOJA DE ESTILOS GLOBAL (CORE)
   ==========================================================================
   Este archivo controla el diseño base de todo el sitio web.
   Cambios aquí afectarán a TODAS las páginas (Inicio, Servicios, Cursos, etc).
   ========================================================================== */

/* 1. CONFIGURACIÓN DE COLORES Y FUENTES (VARIABLES) */
:root {
  /* --- PALETA DE COLORES --- */
  /* Cambia estos códigos Hex para modificar la identidad de la marca */
  --bg-dark: #020617; /* Fondo principal (Tema Oscuro) - Azul Noche */
  --accent-cyan: #38bdf8; /* Color de acento principal (Botones, Iconos) */
  --white: #ffffff; /* Color para textos sobre fondo oscuro */
  --text-dim: #94a3b8; /* Color para textos secundarios (gris suave) */
  --text-dark: #0f172a; /* Color para textos sobre fondo claro (Tema Light) */

  /* --- FONDOS DE CABECERA (TRANSLÚCIDOS) --- */
  --header-bg-dark: rgba(2, 6, 23, 0.9); /* Fondo header oscuro */
  --header-bg-light: rgba(255, 255, 255, 0.95); /* Fondo header claro */

  /* --- CONFIGURACIÓN UI --- */
  --transicion: all 0.3s ease; /* Velocidad de animaciones */
  --font-main: "Inter", sans-serif; /* Tipografía principal */
}

/* 2. RESET BÁSICO (Limpieza de estilos por defecto del navegador) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Mantiene el tamaño real de los elementos */
}

body {
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden; /* Evita desplazamiento lateral indeseado */
  display: flex;
  flex-direction: column; /* Estructura vertical (Header -> Main -> Footer) */
}

/* ==========================================================================
   3. SISTEMA DE TEMAS (OSCURO / CLARO)
   ========================================================================== */

/* --- TEMA OSCURO (Por defecto) --- */
/* Se usa en: Inicio, Cursos, Blog Detalle */
body.theme-dark {
  background-color: var(--bg-dark);
  color: var(--white);
  /* Fondo con efecto de luz ambiental ("Glow") */
  background-image:
    radial-gradient(
      circle at 15% 10%,
      rgba(56, 189, 248, 0.08) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 90%,
      rgba(6, 182, 212, 0.05) 0%,
      transparent 40%
    );
}

/* --- TEMA CLARO --- */
/* Se usa en: Servicios, Nosotros, Blog Principal */
body.theme-light {
  background-color: #f8fafc;
  color: var(--text-dark);
  /* Gradiente suave de Blanco a Gris */
  background-image: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 400px);
  background-attachment: fixed; /* Fondo fijo al hacer scroll */
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* Ajustes específicos para el Header en Tema Claro */
body.theme-light header {
  background: var(--header-bg-light);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
body.theme-light .nav-links a {
  color: var(--text-dark);
  opacity: 0.7;
}
body.theme-light .nav-links a:hover,
body.theme-light .nav-links a.active {
  color: #0284c7;
  opacity: 1;
}
body.theme-light .logo {
  color: var(--text-dark);
}

/* ==========================================================================
   4. CABECERA (HEADER) Y NAVEGACIÓN
   ========================================================================== */
header {
  backdrop-filter: blur(12px); /* Efecto vidrio esmerilado */
  -webkit-backdrop-filter: blur(12px);
  position: fixed; /* Siempre visible arriba */
  top: 0;
  width: 100%;
  height: 80px;
  z-index: 1000; /* Capa superior */
  display: flex;
  align-items: center;
  transition: 0.3s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo y Menú Izquierdo */
.nav-left {
  display: flex;
  align-items: center;
  gap: 50px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
}
.logo img {
  height: auto;
  max-height: 85px;
  width: auto;
  object-fit: contain;
}
.logo span {
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Enlaces de Navegación (Desktop) */
.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}
.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.7;
  transition: var(--transicion);
}
.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--accent-cyan);
}

/* Botón de Acción Header (Contactar) */
.btn-header {
  text-decoration: none;
  background: linear-gradient(
    135deg,
    #22d3ee 0%,
    #0ea5e9 100%
  ); /* Gradiente Cyan */
  color: #020617;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.4); /* Glow */
}
.btn-header:hover {
  background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 100%);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.6);
}
body.theme-light .btn-header {
  box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

/* ==========================================================================
   5. COMPONENTES Y UTILIDADES
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
main {
  flex: 1;
} /* Empuja el footer hacia abajo */

.btn-primary {
  background: var(--accent-cyan);
  color: #020617;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transicion);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   6. PIE DE PÁGINA (FOOTER)
   ========================================================================== */
.main-footer {
  background: #061e44; /* Azul corporativo oscuro */
  color: white;
  padding: 80px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-col h3 {
  color: var(--accent-cyan);
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 25px;
  font-weight: 800;
  letter-spacing: 1px;
}
.footer-col p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 320px;
}

/* Enlaces Footer */
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  text-decoration: none;
  color: #cbd5e1;
  transition: 0.3s;
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}

.footer-contact-info a {
  color: #cbd5e1;
  text-decoration: none;
}

/* Redes Sociales (Botones Circulares) */
.social-row {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}
.social-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: 0.3s;
  font-size: 1.2rem;
}
.social-btn:hover {
  background: var(--accent-cyan);
  color: #020617;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ==========================================================================
   7. BOTÓN FLOTANTE WHATSAPP
   ========================================================================== */
.wa-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.wa-float img {
  width: 65px;
  height: 65px;
  display: block;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}
.wa-float:hover {
  transform: scale(1.1) rotate(-5deg);
}

/* ==========================================================================
   8. RESPONSIVE DESIGN (Móvil y Tablet)
   ========================================================================== */
.menu-toggle {
  display: none; /* Oculto en PC */
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--white);
  transition: 0.3s;
}
body.theme-light .menu-toggle {
  color: var(--text-dark);
}

/* Menú Móvil Desplegable */
.mobile-menu {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: 0;
  background: rgba(2, 6, 23, 0.98);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu.active {
  height: calc(100vh - 80px);
}

/* Links Móviles */
.mobile-links {
  list-style: none;
  text-align: center;
  margin-bottom: 40px;
}
.mobile-links li {
  margin: 25px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.4s;
}
.mobile-menu.active .mobile-links li {
  opacity: 1;
  transform: translateY(0);
}
.mobile-links a {
  text-decoration: none;
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 800;
  transition: 0.3s;
}
.mobile-links a:hover {
  color: var(--accent-cyan);
}

.btn-mobile-contact {
  background: var(--accent-cyan);
  color: #020617;
  padding: 16px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: 0.5s;
}
.mobile-menu.active .btn-mobile-contact {
  opacity: 1;
}

/* Breakpoint 900px */
@media (max-width: 900px) {
  .nav-links,
  .desktop-only {
    display: none;
  } /* Ocultar elementos PC */
  .menu-toggle {
    display: block;
  } /* Mostrar botón menú móvil */
  .nav-left {
    gap: 15px;
  }
  .logo img {
    max-height: 40px;
  }
  header {
    padding: 0 10px;
  }

  /* Footer a 1 columna */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .footer-col p {
    margin: 0 auto 15px;
  }
  .social-row {
    justify-content: center;
  }
}
