/*
===========================================
  1. VARIABLES DE TEMA (MODO OSCURO Y CLARO)
===========================================
*/

/* --- MODO OSCURO (Default / Primario) --- */
:root {
  --color-background-primary: #0a192f;   /* Azul oscuro */
  --color-background-secondary: #173a5e; /* Azul medio */
  --color-text-primary: #ccd6f6;         /* Texto claro */
  --color-text-heading: #ffffff;         /* Encabezados blancos */
  --color-accent: #e63946;               /* Rojo (se mantiene) */
  --color-border: #2a4a6e;               /* Borde oscuro */
  --color-header-bg: rgba(10, 25, 47, 0.8); /* Header oscuro "glass" */
  --color-footer-bg: #000;               /* Fondo de footer negro */
  --color-white: #ffffff;                /* Blanco puro (para hero) */
  --color-light-text: #ccd6f6;         /* Texto claro (para hero) */

  --map-filter: grayscale(0.9) invert(1) brightness(0.8); /* Filtro oscuro */
  --nav-height: 70px;
}

/* --- MODO CLARO (Secundario) --- */
body.light-mode {
  --color-background-primary: #f0f2f5;   /* Gris muy claro */
  --color-background-secondary: #ffffff; /* Blanco */
  --color-text-primary: #333333;         /* Texto oscuro */
  --color-text-heading: #000000;         /* Encabezados negros */
  --color-border: #dddddd;               /* Borde claro */
  --color-header-bg: rgba(255, 255, 255, 0.8); /* Header claro "glass" */
  --color-footer-bg: #111111;           /* Fondo de footer gris oscuro */
  --map-filter: grayscale(0);              /* Filtro normal para mapa */
}

/*
===========================================
  2. RESETEO GLOBAL Y ESTILOS BASE
===========================================
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--color-background-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

p {
  text-align: justify;
}

h1, h2, h3 {
  color: var(--color-text-heading);
  margin-bottom: 1rem;
  font-weight: 600;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.5rem auto 0;
}

section {
  padding: 4rem 5%;
}

a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--color-accent);
}

ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
}

/*
===========================================
  3. HEADER / NAVBAR (Con interruptor)
===========================================
*/
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar-left {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.logo {
  height: 95px; /* Tu altura personalizada */
  width: auto;
  margin-top: 19px; /* Tu margen personalizado */
  transform: translateX(-00px); /* Tu transform personalizado */
  transition: filter 0.3s ease;
}

.navbar-menu {
  display: flex;
  gap: 1.5rem;
}
.navbar-menu li {
  position: relative;
}
.navbar-menu a {
  font-weight: 600;
  padding: 0.5rem 0;
  color: var(--color-text-heading); 
}
.navbar-menu a.active {
  color: var(--color-accent);
}
.navbar-menu a:hover {
  color: var(--color-accent);
}

.dropdown {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-background-secondary);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 220px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border: 1px solid var(--color-border);
}
.dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu li {
  width: 100%;
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  width: 100%;
  font-weight: 400;
  color: var(--color-text-primary);
}
.dropdown-menu a:hover {
  background-color: var(--color-background-primary);
  color: var(--color-accent);
}

/* --- ESTILOS DEL INTERRUPTOR DE TEMA --- */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin: 0 1rem;
}
.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #555; /* Color del slider "OFF" (Oscuro) */
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}
/* Cuando está "ON" (Modo Claro) */
input:checked + .slider {
  background-color: #ccc; /* Color del slider "ON" (Claro) */
}
input:checked + .slider:before {
  transform: translateX(26px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* --- Menú Hamburguesa (Móvil) --- */
.menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.bar {
  width: 25px;
  height: 3px;
  background-color: var(--color-text-heading);
  transition: all 0.3s ease;
}
.menu-toggle.open .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/*
===========================================
  4. ESTILOS PÁGINA "INDEX"
===========================================
*/

/* --- Video Banner --- */
.video-banner {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  margin-top: 70px;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0; 
}
.video-banner video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.video-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.6); 
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  color: var(--color-white); /* Variable definida */
  max-width: 800px;
  padding: 0 1rem;
}
.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--color-white); /* Variable definida */
}
.hero-content h1 span {
  /* NOTA: --light-text es ahora --color-light-text */
  background: linear-gradient(90deg, var(--color-white), var(--color-light-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--color-light-text); /* Variable definida */
}
.cta-button {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.4);
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}
.cta-button:hover {
  background: #ff4757;
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(230, 57, 70, 0.7);
}

/* --- Sección Soluciones (Tarjetas) --- */
.soluciones {
  background: var(--color-background-primary);
}
.soluciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.solucion-item {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  
  /* Flexbox para alinear el botón al fondo */
  display: flex;
  flex-direction: column;
  height: 100%; 
}

.solucion-item img {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem auto; 
}

.solucion-item h3 {
  font-size: 1.3rem;
  color: var(--color-text-heading);
  text-transform: uppercase; 
  margin-bottom: 1rem;
  position: relative;
  transition: color 0.3s ease;
}

.solucion-item p {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  line-height: 1.6;
  flex-grow: 1; /* Empuja el botón hacia abajo */
}

.btn-solucion {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-top: 1.5rem; 
  transition: all 0.3s ease;
}

/* --- Efectos Hover Mejorados --- */
.solucion-item:hover {
  transform: translateY(-10px);
  border-color: var(--color-accent); 
  
  /* Sombra de Modo Oscuro */
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(230, 57, 70, 0.5);
}
/* Sombra para Modo Claro */
body.light-mode .solucion-item:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 20px rgba(230, 57, 70, 0.3);
}

.solucion-item:hover h3 {
  color: var(--color-accent); /* Título cambia a rojo */
}

.solucion-item:hover .btn-solucion {
  background-color: var(--color-accent);
  color: var(--color-white);
}

/* --- Por Qué Elegirnos --- */
.porque-elegirnos {
  padding: 0;
  background: var(--color-background-primary);
}
.porque-elegirnos img {
  width: 100%;
  display: block;
}

/* --- Certificaciones/Marcas (Index) --- */
.certificaciones {
  text-align: center;
  background-color: var(--color-background-secondary);
}
.certificaciones p {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
}

/* Marquesina de Logos */
.logo-slider {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 2rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logo-track {
  display: flex;
  width: max-content; 
  animation: scroll 40s linear infinite;
}
.logo-track:hover {
  animation-play-state: paused;
}
.logo-track img {
  height: 60px; /* Altura uniforme */
  width: auto;
  max-width: 250px; /* Ancho máximo */
  object-fit: contain;
  padding: 0 40px; /* Espacio entre logos */
}
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } 
}

/* --- Contacto (Index) --- */
.contacto-maps {
  background: var(--color-background-primary);
}
.contacto-contenido {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.contacto-mapa iframe {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  width: 100%;
  height: 450px;
  filter: var(--map-filter);
  transition: filter 0.3s ease;
}
.contacto-info h3 {
  color: var(--color-accent);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}
.contacto-info p {
  font-size: 1.1rem;
  color: var(--color-text-primary);
}

.btn-enviar {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  background-color: transparent;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-top: 1.5rem; 
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-enviar:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

/*
===========================================
  5. ESTILOS PÁGINAS INTERIORES
===========================================
*/

/* --- A. BANNERS (Genérico para todas las páginas) --- */
.banner-servicios, 
.banner-certificaciones,
.service-banner-visual {
  position: relative;
  margin-top: 70px;
  padding: 0;
  background-color: #ffffff;
  overflow: hidden;
}
.banner-servicios img, 
.banner-certificaciones img,
.service-banner-visual img {
  width: 100%;
  display: block;
  min-height: 30vh; 
  max-height: 40vh; /* Ajustado desde 55vh para unificar */
  object-fit: cover;
  z-index: 0;
  opacity: 0.7; /* Aplicado a todos los banners */
  transition: opacity 0.3s ease;
}
.banner-servicios::after, 
.banner-certificaciones::after,
.service-banner-visual::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.6); /* Overlay oscuro siempre */
  z-index: 1;
}
body.light-mode .service-banner-visual img {
  opacity: 1; /* Mantenemos tu excepción para light-mode */
}

/* Texto de banner (para servicios/certificaciones) */
.banner-texto {
  position: absolute;
  top: var(--nav-height);
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 2;
}
.banner-texto h1 {
  color: var(--color-white); /* Texto siempre blanco sobre overlay */
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); 
}

/* --- B. LAYOUT DE SERVICIO (Contenedor genérico) --- */
.service-layout {
  max-width: 70%; /* Ancho máximo para el contenido */
  margin: 0 auto;
  padding: 4rem 5%;
}

/* Título e Intro (Genérico para todas las páginas de servicio) */
.service-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  color: var(--color-text-heading);
}
.service-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.5rem auto 0;
}
.intro-text {
  font-size: 1.rem;
  line-height: 1.7;
  text-align: center;
  max-width: 100%;
  margin: 0 auto 4rem auto; /* Centrado y con espacio inferior */
  color: var(--color-text-primary);
}
.intro-servicios .intro-text{
  max-width: 80%;/* Centrado y con espacio inferior */
  text-align: justify;
  color: var(--color-text-primary);
}

/* --- C. COMPONENTE: SERVICE-GRID (Para Datacenter, etc.) --- */
/* Contenedor Grid */
.service-grid {
  display: grid;
  /* Más robusto: auto-fit con minmax */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch; /* Asegura que las tarjetas llenen la altura */
}

/* Tarjeta individual del Grid */
.service-card {
  display: flex;
  flex-direction: column; /* Apila icono y texto */
  align-items: center; /* Centra el icono */
  padding: 2rem 2rem;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; 
  text-align: center;
}

/* Icono de la tarjeta */
.service-card .section-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* Texto de la tarjeta */
.service-card h3 {
  font-size: 1.2rem;
  color: var(--color-accent); 
  text-align: center;
  margin-bottom: 1.2rem;
}

.service-card p {
  font-size: 0.8rem; 
  line-height: 1.6;
  color: var(--color-text-primary);
}

/* Hover de la tarjeta */
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(230, 57, 70, 0.5);
}


/* --- D. COMPONENTE: SERVICE-LIST (Para Desarrollo, etc.) --- */
/* Contenedor Lista */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem; /* Espacio entre filas */
  max-width: 1000px; /* Ancho ideal para una lista */
  margin: 0 auto; /* Centrar la lista */
}

/* Fila individual de la lista */
.service-row {
  display: flex;
  flex-direction: row; /* Imagen al lado de texto */
  align-items: center; 
  gap: 2.5rem; 
  
  padding: 2rem; 
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Icono/Imagen de la fila */
.service-row .section-icon {
  width: 100px; 
  height: 100px;
  flex-shrink: 0; 
  object-fit: contain;
  
}

/* Texto de la fila */
.service-row .section-text {
  flex-grow: 1; /* Ocupa el espacio restante */
  text-align: left;
}

.service-row h3 {
  font-size: 1.8rem; 
  color: var(--color-accent); 
  text-align: left;
  margin-bottom: 0.75rem;
}
.service-row p {
  font-size: 1rem; 
  line-height: 1.6;
  color: var(--color-text-primary);
}

/* Hover de la fila */
.service-row:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(230, 57, 70, 0.5);
}
/* Media Query para la fila (móvil) */
@media (max-width: 768px) {
  .service-row {
    flex-direction: column; 
    text-align: center;
  }
  .service-row .section-icon {
    width: 100px; 
    height: 100px;
    margin-bottom: 1.5rem;
  }
  .service-row .section-text {
    text-align: center;
  }
  .service-row h3 {
    text-align: center;
  }
}

/* --- E. PÁGINA: QUIÉNES SOMOS --- */
.about-content {
  max-width: 80%; /* Tu cambio */
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 5% 4rem;
  color: var(--color-text-primary);
}
.about-content h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  color: var(--color-text-heading);
}
.about-content h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.5rem auto 0;
}
.about-content > p { /* Párrafo de intro */
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* CAMBIO: De 'grid' a 'flex' */
.mision-vision-section {
  display: flex;
  width: 100%;
  height: 550px;
  gap: 2rem;
  margin-top: 3rem; 
  margin-bottom: 2rem;
}
.mision-vision-item {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem 2rem;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 250px;
  height: 100%;
  transition: all 0.3s ease;
  width: 50%; /* Añadido: para que cada item ocupe la mitad */
}
.mision-vision-item h2 {
  color: var(--color-accent);
  font-size: 1.7rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  background: none;
  width: 100%;
}
.mision-vision-item h2::after {
  display: none;
}
.mision-vision-item p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}
.mision-vision-item p:last-child {
  margin-bottom: 0;
}
.mision-vision-item:hover {
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
  transform: translateY(-5px);
}

/* Asegúrate de ELIMINAR la antigua regla de @media (max-width: 992px) para .mision-vision-grid */
.valores {
  background-color: var(--color-background-secondary);
  padding: 4rem 5%;
}
.grid-valores {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 2rem;
  max-width: 1400px;
  margin: 2rem auto 0;
}
.valor-item {
  background: var(--color-background-primary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}
.valor-item h3 {
  color: var(--color-accent);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.valor-item p {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  line-height: 1.6;
}
.valor-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(230, 57, 70, 0.5);
}


/* --- F. PÁGINA: CERTIFICACIONES --- */
.texto-certificaciones {
  max-width: 93%; 
  margin: 0 auto;
  padding: 0 0;
  color: var(--color-text-primary);
}
.texto-certificaciones p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 4rem;
}
.marcas{
  width: 100%;
  padding: 4rem 5%;
}

.grid-marcas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 2fr));
  gap: 2rem;
  width: 100%;;
  margin-top: 1rem;
}
.marca-item {
  background: var(--color-background-secondary); 
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.marca-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(230, 57, 70, 0.5);
}

.marca-item img {
  height: 80px;
  width: auto;
  max-width: 120px; 
  margin-bottom: 1rem;
  transition: filter 0.3s ease;
}

.marca-item p {
  font-size: 0.8rem;
  color: var(--color-text-primary);
  line-height: 1.2;
}
body.marca-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(230, 57, 70, 0.5);
}
/* --- G. PÁGINA: CONTACTO --- */
.contacto-pagina {
  padding: calc(var(--nav-height) + 4rem) 5% 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.contacto-pagina h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  color: var(--color-text-heading);
}
.contacto-pagina h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.5rem auto 0;
}
.subtitulo-contacto {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text-primary);
  margin-bottom: 3rem;
}
.contacto-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}
.form-wrapper label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}
.form-wrapper input,
.form-wrapper textarea {
  width: 100%;
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}
.form-wrapper input::placeholder,
.form-wrapper textarea::placeholder {
  color: var(--color-text-primary);
  opacity: 0.7;
}
.form-wrapper input:focus,
.form-wrapper textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
}

.info-wrapper {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
}
body.light-mode .info-wrapper {
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
body.dark-mode .info-wrapper {
  box-shadow: 0 0 20px rgba(23, 58, 94, 0.5);
}
.info-wrapper h2 {
  font-size: 1.3rem;
  color: var(--color-text-heading);
  margin-bottom: 1.5rem;
  line-height: 1.4;
  /* Estilos de h2 reseteados para esta tarjeta */
  text-align: left;
  margin-bottom: 1.5rem;
}
.info-wrapper h2::after {
  display: none;
}

.info-wrapper p {
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.info-wrapper p strong {
  color: var(--color-accent);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

/*
===========================================
  6. FOOTER
===========================================
*/
.footer {
  background: var(--color-footer-bg);
  color: var(--color-text-primary);
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--color-border);
}
.footer-links {
  margin-bottom: 1rem;
}
.footer-links a {
  margin: 0 1rem;
  font-size: 0.9rem;
}
.footer p {
  font-size: 0.9rem;
}

/*
===========================================
  7. MEDIA QUERIES (Globales)
===========================================
*/
@media (max-width: 1024px) {
  /* Grid de valores en tablet */
  .grid-valores {
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 992px) {
  /* Contacto en home */
  .contacto-contenido {
    grid-template-columns: 1fr;
  }
  .contacto-mapa { order: 2; }
  .contacto-info { order: 1; }
  
  /* Formulario de contacto */
  .contacto-grid {
    grid-template-columns: 1fr;
  }
  .info-wrapper { order: -1; }
  
  /* Misión/Visión */
  .mision-vision-section {
    flex-direction: column; /* Apila las tarjetas en móvil */
    gap: 1.5rem;
  }
  .mision-vision-item {
    width: 100%; /* Ocupa todo el ancho en móvil */
  }
}

@media (max-width: 768px) {
  h2 { font-size: 2rem; }
  
  .hero-content h1 { font-size: 2.5rem; }
  .hero-content p { font-size: 1rem; }
  
  .navbar { 
    padding: 0 1.5rem; 
  }
  .logo { 
    transform: translateX(0); 
    height: 80px; 
    margin-top: 10px;
  } 
  
  .theme-switch-wrapper {
    order: 1; /* Switch antes de la hamburguesa */
    margin-right: 1.5rem;
  }
  .menu-toggle {
    display: flex;
    z-index: 100;
    order: 2; /* Hamburguesa al final */
  }

  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-background-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  }
  .navbar-menu.active {
    right: 0;
  }
  .navbar-menu a { font-size: 1.5rem; }
  
  .dropdown-menu {
    display: none;
    position: static;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-top: 1rem;
    text-align: center;
    min-width: auto;
  }
  .dropdown-menu a {
    font-size: 1.1rem;
    color: var(--color-text-primary);
    padding: 0.5rem 0;
  }
  .dropdown-toggle::after {
    content: ' ▾';
  }
  
  /* Grids a 1 columna */
  .grid-valores {
    grid-template-columns: 1fr; 
  }
  
  /* Títulos de banner más pequeños */
  .banner-texto h1 { font-size: 2.2rem; }
  .about-content h1 { font-size: 2rem; }
  .contacto-pagina h1 { font-size: 2rem; }
  .service-title { font-size: 2rem; }
  .intro-text { font-size: 1rem; }
}

/*
===========================================
  8. ESTILOS PÁGINAS LEGALES (Aviso, Cookies, etc.)
===========================================
*/
.legal-container {
  max-width: 65%; /* Ancho cómodo para leer texto */
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 5% 4rem;
}

.legal-header h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  color: var(--color-text-heading);
}

.legal-header h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.5rem auto 0;
}

.ultima-actualizacion {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  opacity: 0.8;
  
}

.legal-card {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
}

.legal-card h2 {
  color: var(--color-accent);
  font-size: 1.7rem;
  margin-bottom: 1rem;
}

.legal-card h3 {
  color: var(--color-text-heading);
  font-size: 1.3rem;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.legal-card p {
  color: var(--color-text-primary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-card p:last-child {
  margin-bottom: 0;
}
