/* ==========================================================================
   STYLE.CSS - Electric Lights
   Rediseño Premium inspirado en Referencia de Diseño Industrial
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* 1. Declaración de Fuentes Corporativas */
@font-face {
  font-family: 'Celane';
  src: url('./assets/fonts/Cellane.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MyriadPro';
  src: url('./assets/fonts/MyriadPro-Regular_0.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 2. Variables de Diseño (CSS Tokens) */
:root {
  /* Escala de Espaciado (8px Rhythm) */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  --space-huge: 96px;

  /* Tipografías */
  --font-display: 'Celane', sans-serif;
  --font-body: 'MyriadPro', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores Comunes */
  --color-success: #2ED573;
  --color-error: #FF4757;
  --color-warning: #FFA502;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius-lg: 32px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;

  /* TEMA CLARO (Predeterminado) */
  --bg-primary: #F4F1EA;                /* Off White / Bone */
  --bg-surface: #FFFFFF;                /* Blanco */
  --bg-surface-secondary: #EBE8E0;      /* Hueso medio */
  --text-primary: #0C0C0C;              /* Tech Black */
  --text-secondary: #5C5C5E;            /* Gris oscuro */
  --color-accent: #0033A0;              /* Deep Electric Blue */
  --color-accent-hover: #002270;
  --color-accent-light: #E6ECFA;
  --color-glow: rgba(0, 51, 160, 0.1);
  --border-color: #E2DFD7;
  --switch-bg: #D3D0C9;
  --circuit-color: rgba(0, 51, 160, 0.08);
  --logo-text-color: #0033A0;
  
  --color-electric-green: #A8F000;
  --color-steel-blue: #6F8FAF;
}

/* TEMA OSCURO */
body.dark-theme {
  --bg-primary: #0C0C0C;                /* Tech Black */
  --bg-surface: #1C1C1E;                /* Gris muy oscuro */
  --bg-surface-secondary: #2C2C2E;      /* Gris intermedio */
  --text-primary: #F4F1EA;              /* Off White / Bone */
  --text-secondary: #A0A0A5;            /* Gris claro */
  --color-accent: #A8F000;              /* Electric Green */
  --color-accent-hover: #C2FF3D;
  --color-accent-light: #2C3E02;
  --border-color: #2C2C2E;
  --switch-bg: #2C2C2E;
  --circuit-color: rgba(168, 240, 0, 0.06);
  --logo-text-color: #FFFFFF;
}

/* Especificidad del Tema Oscuro para evitar fusiones de color */
body.dark-theme .simulator-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
}

body.dark-theme .footer-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
}

body.dark-theme .footer-cta-row {
  border-bottom-color: var(--border-color);
}

body.dark-theme .footer-bottom-bar {
  border-top-color: var(--border-color);
}

/* Contraste del placeholder en inputs */
.form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.65;
}

/* 3. Reseteo y Estilos Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

p {
  color: var(--text-secondary);
  font-size: 1.02rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
}

/* 4. Componentes y Botones Comunes */
.container {
  width: 90%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0;
}

/* Botón estilo Píldora (Inspirado en la Referencia) */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  padding-left: var(--space-md);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: var(--transition-smooth);
}

.btn-pill-icon {
  width: 36px;
  height: 36px;
  background-color: var(--color-accent);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.btn-pill:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  box-shadow: 0 6px 15px var(--color-glow);
}

.btn-pill:hover .btn-pill-icon {
  transform: rotate(45deg);
}

/* Botón Primario Estándar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px var(--color-glow);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--color-glow);
}

.badge {
  display: inline-block;
  padding: var(--space-xxs) var(--space-xs);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 50px;
  margin-bottom: var(--space-sm);
}

/* Lienzo de Fondo */
#spark-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -5;
  pointer-events: none;
  opacity: 0.9;
}

/* 5. Cabecera (Navbar) */
header {
  position: fixed;
  top: 40px; /* Aligned with top of hero card */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1600px;
  z-index: 100;
  background-color: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-radius: 0;
  transition: background-color 0.3s ease, border 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, top 0.3s ease, border-radius 0.3s ease;
  padding: var(--space-xs) var(--space-xl); /* Matches hero card horizontal padding */
}

header.scrolled {
  top: 10px; /* Floats slightly above */
  background-color: rgba(244, 241, 234, 0.85);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  padding: var(--space-xs) var(--space-lg);
  border-radius: 50px; /* Pill shaped floating header */
}

body.dark-theme header.scrolled {
  background-color: rgba(12, 12, 12, 0.85);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.brand-logo {
  height: 38px;
  width: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Force logo white filter when transparent header is over dark hero card in light theme */
body:not(.dark-theme) header:not(.scrolled) .brand-logo {
  filter: brightness(0) invert(1);
}

.brand:hover .brand-logo {
  transform: scale(1.05) rotate(5deg);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--logo-text-color);
  text-transform: uppercase;
  transition: color 0.3s ease;
}

header:not(.scrolled) .brand-name {
  color: #FFFFFF !important;
}

/* Navegación Desktop */
.desktop-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.desktop-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-sm);
}

.desktop-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: var(--space-xxs) var(--space-sm);
  border-radius: 50px;
  transition: var(--transition-smooth);
}

header:not(.scrolled) .desktop-nav a {
  color: rgba(255, 255, 255, 0.75);
}

.desktop-nav a:hover, .desktop-nav a.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-secondary);
}

header:not(.scrolled) .desktop-nav a:hover, header:not(.scrolled) .desktop-nav a.active {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.15);
}

/* Navegación Móvil — Sidebar que vive fuera del header */
/* --- Navegación Móvil Fullscreen (Overlay Glassmorphism) --- */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(244, 241, 234, 0.85); /* Tema Claro por defecto */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s;
}

body.dark-theme .mobile-overlay {
  background-color: rgba(12, 12, 12, 0.85);
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px var(--space-md);
  width: 100%;
}

.menu-close {
  background: none;
  border: none;
  font-size: 3rem;
  line-height: 1;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0 10px;
  transition: transform 0.3s ease;
}

.menu-close:hover {
  transform: scale(1.1);
}

.mobile-overlay-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 80px; /* Offset for header */
}

.mobile-overlay-nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style: none;
  gap: var(--space-lg);
  padding: 0;
  margin: 0;
}

.mobile-overlay-nav ul li {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-overlay.open .mobile-overlay-nav ul li {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for links */
.mobile-overlay.open .mobile-overlay-nav ul li:nth-child(1) { transition-delay: 0.1s; }
.mobile-overlay.open .mobile-overlay-nav ul li:nth-child(2) { transition-delay: 0.15s; }
.mobile-overlay.open .mobile-overlay-nav ul li:nth-child(3) { transition-delay: 0.2s; }
.mobile-overlay.open .mobile-overlay-nav ul li:nth-child(4) { transition-delay: 0.25s; }

.mobile-overlay-nav ul li a {
  font-family: var(--font-body);
  font-size: 1.4rem;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-overlay-nav ul li a:hover {
  color: var(--color-accent);
}

/* Theme Switch Toggle */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--switch-bg);
  transition: 0.3s;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-primary);
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-accent-light);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: var(--color-accent);
}

.toggle-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* 6. Sección Hero (Inspirada en el mockup) */
.hero-section {
  padding: 20px 0 50px;
  position: relative;
}

.hero-section .container {
  position: relative;
}

.hero-card {
  position: relative;
  width: 100%;
  min-height: 640px; /* Taller hero card */
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 190px var(--space-xl) var(--space-xl); /* Increased top padding so header breathes! */
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

.hero-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('./assets/images/6.jpg');
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.hero-card:hover .hero-card-bg {
  transform: scale(1.02);
}

.hero-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to bottom, rgba(12, 12, 12, 0.8) 0%, rgba(12, 12, 12, 0) 35%),
    linear-gradient(to right, rgba(12, 12, 12, 0.95) 20%, rgba(12, 12, 12, 0.6) 60%, rgba(12, 12, 12, 0.2) 100%);
}

.hero-card-content {
  position: relative;
  z-index: 5;
  max-width: 600px;
  color: #F4F1EA;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(255,255,255,0.08);
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-electric-green);
  font-weight: bold;
}

.version-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #FFFFFF;
}

.hero-title {
  font-size: 3.2rem;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero-desc {
  font-size: 1.05rem;
  color: #A0A0A5;
  margin-bottom: var(--space-lg);
  max-width: 480px;
}


/* Insignia Rotativa Flotante */
.rotating-badge-wrapper {
  position: absolute;
  right: var(--space-xl);
  bottom: calc(-1 * var(--space-lg));
  width: 90px;
  height: 90px;
  background-color: var(--text-primary);
  border-radius: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

body.dark-theme .rotating-badge-wrapper {
  background-color: var(--color-accent);
}

.rotating-badge-wrapper:hover {
  transform: scale(1.05);
}

.rotating-badge-svg {
  width: 100%;
  height: 100%;
  animation: rotate-badge 12s linear infinite;
}

.rotating-badge-text {
  font-family: var(--font-mono);
  font-size: 9.8px;
  font-weight: bold;
  text-transform: uppercase;
  fill: var(--bg-primary);
}

body.dark-theme .rotating-badge-text {
  fill: #0C0C0C;
}

.rotating-badge-arrow {
  position: absolute;
  font-size: 1.4rem;
  color: var(--bg-primary);
}

body.dark-theme .rotating-badge-arrow {
  color: #0C0C0C;
}

@keyframes rotate-badge {
  to {
    transform: rotate(360deg);
  }
}

/* 7. Sección de Estadísticas */
.stats-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.stat-col {
  padding-right: var(--space-md);
  border-right: 1px solid var(--border-color);
}

.stat-col:last-child {
  border-right: none;
  padding-right: 0;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.stat-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 220px;
}

/* Encabezados de Sección con Estilo Referencia */
.section-header-styled {
  text-align: center;
  max-width: 650px;
  margin: 0 auto var(--space-xxl);
}

.section-header-styled h2 {
  font-size: 2.1rem;
  text-transform: uppercase;
  margin: var(--space-xs) 0 var(--space-sm);
  color: var(--text-primary);
}

/* 8. Sección "Lo que Conectamos" */
.what-we-build-section {
  padding: 100px 0;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* 8b. Banners de Luxometría y Evaluación (Split Cards) */
.banners-section {
  padding: 20px 0 var(--space-xl);
  width: 100%;
}

.banners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.banner-card {
  background-color: #0C0C0C;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s ease, border-color 0.3s ease;
  min-height: 260px;
}

body.dark-theme .banner-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.banner-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-electric-green);
}

.banner-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #FFFFFF;
}

.banner-content h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.25;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.banner-content p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

.banner-image-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.banner-img-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.banner-card:hover .banner-img-element {
  transform: scale(1.05);
}

/* Responsividad para Banners */
@media (max-width: 991px) {
  .banners-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 576px) {
  .banner-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .banner-image-container {
    height: 180px;
  }
  
  .banner-content {
    padding: var(--space-md);
  }
}

.build-card {
  position: relative;
  height: 400px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.build-card-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.5s ease;
}

.build-card:hover .build-card-img {
  transform: scale(1.04);
}

.build-card-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  background: linear-gradient(to top, rgba(12, 12, 12, 0.9) 25%, rgba(12, 12, 12, 0.2) 60%, transparent);
}

.build-card-tag {
  position: relative;
  z-index: 3;
  align-self: flex-start;
  background-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #FFFFFF;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.08);
}

.build-card-content {
  position: relative;
  z-index: 3;
  color: #FFFFFF;
}

.build-card-content h3 {
  font-size: 1.25rem;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.build-card-content p {
  font-size: 0.85rem;
  color: #A0A0A5;
}

/* 9. Sección de Rejilla de Servicios */
.services-features-section {
  padding: 100px 0 60px;
  background-color: var(--bg-surface-secondary);
  transition: background-color 0.4s ease;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--border-radius-md);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

body.dark-theme .feature-card {
  background: rgba(28, 28, 30, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 51, 160, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

body.dark-theme .feature-card::before {
  background: linear-gradient(135deg, rgba(168, 240, 0, 0.15) 0%, transparent 50%);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  box-shadow: 0 12px 30px rgba(0, 51, 160, 0.12); /* Blue shadow for light mode */
}

body.dark-theme .feature-card:hover {
  box-shadow: 0 12px 30px rgba(168, 240, 0, 0.15); /* Green shadow for dark mode */
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-num {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--text-secondary);
  opacity: 0.15;
  transition: opacity 0.4s ease, color 0.4s ease;
  z-index: 1;
}

.feature-card:hover .feature-card-num {
  opacity: 0.6;
  color: var(--color-accent);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%; /* Returned to circle */
  margin-bottom: var(--space-md);
  font-size: 1.15rem;
  transition: transform 0.4s ease;
  position: relative;
  z-index: 2;
}

.feature-card:hover .feature-icon {
  transform: scale(1.08);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

.feature-card:hover h3 {
  color: var(--color-accent);
}

body.dark-theme .feature-card:hover h3 {
  color: #FFFFFF;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

/* 10. Sección de Video CTA (Full Width sin bordes redondeados) */
.video-cta-section {
  position: relative;
  width: 100%;
  height: 580px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0; /* Removed spaces at top and bottom */
}

.cta-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 1;
  object-fit: cover;
}

.cta-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(5, 10, 18, 0.5) 0%, rgba(5, 10, 18, 0.1) 100%, transparent 30%), linear-gradient(to top, rgba(5, 10, 18, 0.95) 0%, rgba(5, 10, 18, 0.85) 15%, rgba(5, 10, 18, 0.5) 35%, transparent 55%);%),
              linear-gradient(to bottom, rgba(5, 10, 18, 0.5) 0%, rgba(5, 10, 18, 0.1) 100%, transparent 30%), linear-gradient(to top, rgba(5, 10, 18, 0.95) 0%, rgba(5, 10, 18, 0.85) 15%, rgba(5, 10, 18, 0.5) 35%, transparent 55%);
  z-index: 2;
}

.cta-video-content {
  position: relative;
  z-index: 3;
  color: #FFFFFF;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align text and elements to the left */
  justify-content: center;
  text-align: left; /* Align text to the left */
}

.cta-video-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1.15;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);

}

.cta-video-desc {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cta-video-actions {
  display: flex;
  justify-content: flex-start; /* Align button to the left */
  width: 100%;
}

/* 12. Galería de Identidad */
.gallery {
  padding: 100px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.gallery-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(12, 12, 12, 0.95));
  color: #F4F1EA;
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: flex-end;
}

.gallery-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: bold;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* 13. Formulario de Contacto */
.contact {
  padding: 100px 0;
  background-color: var(--bg-surface-secondary);
  transition: background-color 0.4s ease;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info h2 {
  font-size: 2.3rem;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.contact-details {
  margin: var(--space-lg) 0;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.detail-icon {
  width: 40px;
  height: 40px;
  background-color: var(--bg-surface);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.contact-form-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: var(--space-xl);
  border-radius: var(--border-radius-md);
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-control {
  padding: var(--space-sm);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 8px var(--color-glow);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* 11. Sección Testimoniales (Marquee Infinito de Ancho Completo) */
.testimonials-section {
  padding: 80px 0;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.testimonials-marquee-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  position: relative;
}

.marquee-row {
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  padding: 10px 0;
}

/* Difuminado suave a los lados para dar sensación de desvanecimiento (Fade) */
.testimonials-marquee-wrapper::before,
.testimonials-marquee-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 15%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.testimonials-marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary) 0%, rgba(244, 241, 234, 0) 100%);
}

body.dark-theme .testimonials-marquee-wrapper::before {
  background: linear-gradient(to right, var(--bg-primary) 0%, rgba(12, 12, 12, 0) 100%);
}

.testimonials-marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary) 0%, rgba(244, 241, 234, 0) 100%);
}

body.dark-theme .testimonials-marquee-wrapper::after {
  background: linear-gradient(to left, var(--bg-primary) 0%, rgba(12, 12, 12, 0) 100%);
}

.marquee-track {
  display: flex;
  gap: var(--space-md);
  width: max-content;
  will-change: transform;
}

.marquee-left .marquee-track {
  animation: scroll-marquee-left 45s linear infinite;
}

.marquee-right .marquee-track {
  animation: scroll-marquee-right 45s linear infinite;
}

/* Pause scroll when user hovers cards to allow reading comfortably */
.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}

.testimonial-card {
  width: 320px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s ease, border-color 0.3s ease;
  user-select: none;
}

body.dark-theme .testimonial-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-electric-green);
}

.testimonial-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.testimonial-user-info h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.testimonial-user-info span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.testimonial-rating {
  display: flex;
  gap: 2px;
  color: #FFB800; /* Star yellow color */
}

.testimonial-rating svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.testimonial-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-style: italic;
}

@keyframes scroll-marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scroll-marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* 14. Pie de Página (Footer con diseño de tarjeta) */
footer {
  padding: 60px 0 var(--space-xl);
}

.footer-card {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xxl) var(--space-xl) var(--space-md);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.footer-cta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1C1C1E;
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xxl);
  position: relative;
  z-index: 2;
}

.footer-cta-row h2 {
  font-size: 2rem;
  text-transform: uppercase;
  max-width: 500px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xxl);
  margin-bottom: var(--space-huge);
  position: relative;
  z-index: 2;
}

.footer-col-main h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.footer-col-main p {
  color: #8C8C90;
  font-size: 0.88rem;
  max-width: 320px;
  margin-bottom: var(--space-md);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-accent);
  font-weight: bold;
}

.footer-col-links h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.footer-col-links ul {
  list-style: none;
}

.footer-col-links li {
  margin-bottom: var(--space-xs);
}

.footer-col-links a {
  color: #8C8C90;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.footer-col-links a:hover {
  color: var(--color-electric-green);
  padding-left: var(--space-xxs);
}

/* Giant brand text background decoration */
.footer-giant-text {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-size: 7.2rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0.04;
  pointer-events: none;
  letter-spacing: 0.05em;
  user-select: none;
  z-index: 1;
}

.footer-bottom-bar {
  border-top: 1px solid #1C1C1E;
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: #5C5C5E;
  position: relative;
  z-index: 2;
}

/* 15. Estilos Responsivos */

/* Opciones de Cabecera Comunes */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: var(--transition-smooth);
}

.hamburger line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 1200px) {
  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 992px) {
  .hero-card {
    min-height: 520px;
    padding: 160px var(--space-xl) var(--space-xl);
  }
  
  .hero-title {
    font-size: 2.4rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
  
  .stat-col {
    border-right: none;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
  }
  
  .stat-col:nth-child(even) {
    border-bottom: 1px solid var(--border-color);
  }
  
  .stat-col:nth-last-child(-n+2) {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .build-grid, .features-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-columns {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .footer-giant-text {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  h2, .hero-title, .cta-video-title {
    font-size: 1.5rem !important;
  }

  .brand-name {
    display: none;
  }
  
  .theme-switch-wrapper .toggle-label {
    display: none !important;
  }
  
  .header-actions {
    gap: var(--space-sm);
  }
  
  /* --- HEADER MOBILE: always pill, always centered --- */
  header {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 88%;
    padding: 0 24px;
    border-radius: 50px;
    background-color: rgba(12, 12, 12, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  
  header.scrolled {
    top: 8px;
    width: 88%;
    padding: 0 24px;
    border-radius: 50px;
  }
  
  body:not(.dark-theme) header:not(.scrolled) {
    background-color: rgba(12, 12, 12, 0.5);
  }

  .header-container {
    height: 52px;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .brand {
    padding: 0;
    margin: 0;
  }

  /* Hide desktop nav on mobile */
  .desktop-nav {
    display: none !important;
  }

  /* Show mobile overlay if needed, handled by default styles */

  /* White hamburger and toggle on both states (dark pill background) */
  header:not(.scrolled) .menu-toggle {
    color: #FFFFFF;
  }
  
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
  }

  /* Hamburger → X animation */
  .menu-toggle.active .line-mid {
    opacity: 0;
  }
  
  .menu-toggle.active .line-top {
    transform: translateY(6px) rotate(45deg);
    transform-origin: center;
  }
  
  .menu-toggle.active .line-bot {
    transform: translateY(-6px) rotate(-45deg);
    transform-origin: center;
  }
  
  .hero-title {
    font-size: 2.1rem;
    line-height: 1.15;
  }
  
  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .form-group-row {
    grid-template-columns: 1fr;
  }
  
  .footer-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .rotating-badge-wrapper {
    width: 70px;
    height: 70px;
    bottom: -35px;
    right: var(--space-md);
  }
  
  .cta-video-title {
    font-size: 2.2rem;
  }
  
  .cta-video-desc {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .hero-card {
    min-height: 480px;
    padding: 130px var(--space-md) var(--space-lg);
  }
  
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.15;
  }
  
  .hero-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: var(--space-md);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-col {
    border-bottom: 1px solid var(--border-color);
  }
  
  .stat-col:last-child {
    border-bottom: none;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-giant-text {
    font-size: 2.8rem;
  }
  
  .cta-video-title {
    font-size: 1.8rem;
  }
  
  .cta-video-desc {
    font-size: 0.88rem;
  }
}
