/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  /* Colores de Marca */
  --brand: #051d40;       /* Azul Oscuro Profundo */
  --brand-light: #093563; /* Azul medio para hovers */
  --accent: #2f855a;      /* Verde para detalles de éxito */
  
  /* Colores Base */
  --bg: #ffffff;
  --soft: #f4f6f8;        /* Gris muy suave para secciones alternas */
  --border: #e2e8f0;      /* Gris claro para bordes */
  
  /* Texto */
  --text: #1a202c;        /* Casi negro */
  --muted: #4a5568;       /* Gris medio para textos secundarios */
  --inverse: #ffffff;     /* Texto sobre fondo oscuro */

  /* Espaciado y Formas */
  --radius: 8px;          /* Bordes ligeramente redondeados */
  --container-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
}

/* =========================================
   2. UTILIDADES DE LAYOUT
   ========================================= */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

section {
  padding: 80px 0;
}

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

/* Tipografía Utilitaria */
h1, h2, h3 { line-height: 1.2; margin-top: 0; font-weight: 800; }

h1 { font-size: 42px; margin-bottom: 20px; }
h2 { font-size: 32px; color: var(--brand); margin-bottom: 15px; }

p { margin: 0 0 20px 0; }

.kicker {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--brand-light);
  margin-bottom: 10px;
  display: block;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 800px;
}

.fine {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 10px;
}

/* =========================================
   3. HEADER & NAVEGACIÓN
   ========================================= */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================
   LOGO EN HEADER
   ========================================= */

.brand {
  display: flex;       /* Alinea imagen y texto en fila */
  align-items: center; /* Centrado vertical perfecto */
  gap: 12px;           /* Espacio entre el logo y el texto */
  
  font-weight: 900;
  font-size: 20px;
  color: var(--brand);
  letter-spacing: -0.02em;
  text-decoration: none; /* Quita el subrayado del enlace */
}

/* Regla para la imagen del logo */
.brand img {
  height: 40px; /* Altura fija para mantener consistencia */
  width: auto;  /* El ancho se ajusta solo */
  display: block;
}

/* Opcional: Ajuste para móvil si el logo es muy ancho */
@media (max-width: 768px) {
  .brand img {
    height: 32px; /* Un poco más pequeño en celulares */
  }
  .brand span {
    font-size: 18px; /* Texto un poco más pequeño */
  }
}

.navlinks {
  display: flex;
  gap: 25px;
}

.navlinks a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.navlinks a:hover { color: var(--brand); }

/* =========================================
   4. BOTONES & UI ELEMENTS
   ========================================= */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-align: center;
}

.btn.primary {
  background-color: var(--brand);
  color: #fff;
}
.btn.primary:hover {
  background-color: var(--brand-light);
  transform: translateY(-1px);
}

/* --- BOTÓN GHOST (Outline / Bordeado) --- */
.btn.ghost {
  background-color: transparent;
  color: var(--brand);            /* Texto Azul */
  border: 1px solid var(--brand); /* Borde Azul Visible siempre */
  font-weight: 700;
}

/* Al pasar el mouse: se llena de azul */
.btn.ghost:hover {
  background-color: var(--brand);
  color: #ffffff;                 /* Texto blanco */
  box-shadow: 0 4px 6px rgba(5, 29, 64, 0.2); /* Sombra suave */
}

/* --- EXCEPCIÓN PARA EL HERO (FONDO OSCURO) --- */
/* Cuando el botón ghost está sobre el fondo azul oscuro del Hero, 
   lo forzamos a ser blanco para que se vea bien */
.hero .btn.ghost {
  color: #ffffff;
  border-color: #ffffff;
}

.hero .btn.ghost:hover {
  background-color: #ffffff;
  color: var(--brand);
}

/* Pills (Etiquetas pequeñas) */
.pill {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  margin-right: 5px;
  border: 1px solid rgba(255,255,255,0.2);
}

/* Barra de acciones */
.bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

/* =========================================
   5. HERO SECTION (Unificado)
   ========================================= */
.hero {
  position: relative;
  color: #fff;
  padding: 120px 0;
  
  /* FONDO: Capa azul + Imagen */
  background: 
    linear-gradient(to right, rgba(5, 29, 64, 0.95) 0%, rgba(5, 29, 64, 0.8) 100%),
    url('../img/zentris-patron.png'); /* Asegúrate de que esta imagen exista */
  
  background-size: cover;
  background-position: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* Texto ancho | Tarjeta angosta */
  gap: 60px;
  align-items: center;
}

/* Textos del Hero */
.hero h1 { color: #fff; }

.hero .kicker { 
  color: #cbd5e0; 
  background: rgba(255,255,255,0.1); 
  padding: 4px 8px; 
  border-radius: 4px; 
  display: inline-block;
}

.hero .sub {
  font-size: 20px;
  color: #e2e8f0;
  max-width: 550px;
}

/* Tarjeta Flotante Lateral del Hero */
.hero aside.card {
  background: #fff;
  color: var(--text);
  padding: 30px;
  /* Combinación de estilos: Borde superior verde + Sombra fuerte */
  border: none;
  border-top: 5px solid var(--accent); 
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Listas (Checkmarks) */
.list { list-style: none; padding: 0; margin: 0; }
.list li { position: relative; padding-left: 25px; margin-bottom: 12px; }
.list li::before {
  content: "✔"; position: absolute; left: 0;
  color: var(--accent); font-weight: bold;
}

/* =========================================
   6. CARDS GENERALES
   ========================================= */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  height: 100%;
}

/* =========================================
   7. SECCIÓN UNIFICADA (Detalles)
   ========================================= */
.detail-block { padding: 40px 0; }

.block-header { margin-bottom: 40px; }
.block-header.text-center { text-align: center; }

/* Línea divisoria */
.divider {
  border: 0; height: 1px;
  background: #cbd5e0; margin: 40px 0; opacity: 0.5;
}

/* Tarjetas Limpias */
.card.clean {
  border: none; background: #fff; padding: 25px;
  border-left: 3px solid var(--brand);
}
.card.clean h3 { font-size: 18px; color: var(--brand); margin-bottom: 10px; }
.card.clean p { font-size: 15px; color: var(--muted); margin: 0; }

/* Grid dinámico */
.grid-2-dynamic { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }

/* Resultados (1, 2, 3) */
.result-item {
  background: #fff; padding: 30px 20px; text-align: center;
  border-radius: var(--radius); border: 1px solid transparent;
  transition: all 0.3s ease;
}
.result-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  border-color: var(--border);
}
.result-item .number {
  background: var(--brand-light); color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 18px; margin: 0 auto 15px auto;
}

/* =========================================
   8. CONTACTO (Imagen de Fondo)
   ========================================= */
#contacto {
  position: relative;
  color: #fff;
  padding: 120px 0;
  background: 
    linear-gradient(to bottom right, rgba(5, 29, 64, 0.9), rgba(5, 29, 64, 0.8)),
    url('../img/zentris-patron.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Formulario */
form { display: grid; gap: 20px; margin-top: 30px; }
label { display: block; }
label span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--brand); }

/* Ajuste específico para tarjeta de contacto sobre fondo oscuro */
#contacto .card {
  border: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35); 
  position: relative; z-index: 2;
}
#contacto .card .kicker { color: var(--brand-light); }

input, select, textarea {
  width: 100%; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 16px; background: #fff;
  transition: border 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(5, 29, 64, 0.1);
}
textarea { resize: vertical; }

/* =========================================
   9. FOOTER
   ========================================= */
footer {
  background: var(--brand);
  color: rgba(255,255,255,0.6);
  padding: 30px 0;
  font-size: 14px; text-align: center;
}

/* =========================================
   10. RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
  /* Ocultamos links centrales, pero dejamos los CTAs si caben, 
     o el usuario usará el botón principal del Hero */
  .navlinks { display: none; } 
  
  .hero-grid, .grid-3, .grid-2-dynamic {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  h1 { font-size: 32px; }
  
  .bar { flex-direction: column; align-items: stretch; }
  .bar .btn { width: 100%; }
  
  .hero, #contacto { padding: 80px 0; } /* Menos padding vertical en móvil */
}

/* --- MENÚ HAMBURGUESA --- */

/* Por defecto (PC): Ocultamos el botón toggle y los botones móviles internos */
.menu-toggle { display: none; }
.mobile-buttons { display: none; }
.desktop-buttons { display: flex; gap: 10px; }

@media (max-width: 900px) {
  
  /* 1. Mostrar el botón hamburguesa */
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--brand);
    cursor: pointer;
    padding: 0;
  }

  /* 2. Ocultar botones de escritorio (para que no se amontonen) */
  .desktop-buttons { display: none; }

  /* 3. Estilo del Menú Desplegable */
  .navlinks.mobile-menu {
    position: absolute;
    top: 100%; /* Justo debajo del header */
    left: 0;
    width: 100%;
    background: #ffffff;
    
    flex-direction: column; /* Lista vertical */
    align-items: center;
    gap: 0;
    
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    padding: 0;
    
    /* Animación de ocultar/mostrar */
    display: none; 
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  /* Clase activa (cuando JS la activa) */
  .navlinks.mobile-menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  /* Estilo de los enlaces en móvil */
  .navlinks a {
    width: 100%;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid var(--soft);
    margin: 0; /* Quita márgenes laterales */
  }

  /* 4. Mostrar botones dentro del menú móvil */
  .mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    width: 100%;
    background: var(--soft); /* Fondo gris para diferenciar */
  }
  
  .mobile-buttons .btn { width: 100%; display: block; }
}

/* --- GRID PARA FORMULARIO (Nombre / Empresa juntos) --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 20px; /* Espacio entre ellas */
}

/* En celular, que vuelvan a ser una sola columna */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA CONTACTO
   ========================================= */

/* Header de página simple (diferente al Hero gigante) */
.hero-page {
  background-color: var(--soft);
  padding: 80px 0 60px;
  text-align: center;
}
.hero-page h1 { margin-bottom: 10px; color: var(--brand); }

/* Layout de 2 columnas: Info (izquierda) y Form (derecha) */
.contact-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Info más angosta, Form más ancho */
  gap: 40px;
  align-items: start;
  margin-top: -40px; /* Para que suba un poco sobre el hero si quisieras, o margen normal */
}

/* Tarjeta de Información (Izquierda) */
.contact-info-card {
  background: var(--brand);
  color: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-info-card h3 { color: #fff; margin-top: 0; }
.contact-info-card .sub-text { opacity: 0.8; margin-bottom: 30px; }

.contact-info-card a { color: #fff; text-decoration: underline; }
.contact-info-card .info-item { margin-bottom: 25px; }
.contact-info-card .info-item strong {
  display: block;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-bottom: 5px;
}
.contact-info-card .info-item p { margin: 0; font-size: 15px; }

/* Ajustes Responsivos */
@media (max-width: 800px) {
  .contact-grid-layout {
    grid-template-columns: 1fr; /* Una sola columna en móvil */
  }
  .contact-info-card {
    order: 2; /* Poner la info debajo del formulario en móvil */
  }
}

/* =========================================
   HERO CONTACTO CON IMAGEN DE FONDO
   ========================================= */

.hero-page {
  position: relative;
  /* Cambiamos el texto a blanco para que contraste con el fondo oscuro */
  color: #ffffff; 
  padding: 100px 0 80px; /* Un poco más alto para lucir la imagen */
  text-align: center;

  /* --- FONDO --- */
  /* Capa 1: Degradado Azul Marca (Oscuro a un poco más claro) */
  /* Capa 2: Imagen de fondo (Reemplaza la URL por tu imagen local) */
  background: 
    linear-gradient(to bottom, rgba(5, 29, 64, 0.9), rgba(5, 29, 64, 0.8)),
    url('../img/zentris-patron.png');
  
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Ajustes de tipografía para fondo oscuro */
.hero-page h1 { 
  margin-bottom: 15px; 
  color: #ffffff; /* Forzamos blanco */
}

.hero-page .kicker {
  color: #a0aec0; /* Gris claro para el texto pequeño de arriba */
  background: rgba(255,255,255,0.1); /* Pill sutil */
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 15px;
}

.hero-page .lead {
  color: #e2e8f0; /* Blanco hueso para el subtítulo */
  margin: 0 auto;
  max-width: 600px; /* Limitamos el ancho para que sea fácil de leer */
}

/* =========================================
   1. SMOOTH SCROLL (Desplazamiento Suave)
   ========================================= */
html {
  scroll-behavior: smooth; /* Magia pura: hace que los links # ancla se deslicen */
}

/* =========================================
   2. SCROLL REVEAL (Animaciones al bajar)
   ========================================= */

/* Estado inicial (Invisible y desplazado hacia abajo) */
.reveal {
  opacity: 0;
  transform: translateY(50px); /* Empieza 50px más abajo */
  transition: all 0.8s ease-out; /* Tarda 0.8s en subir suavemente */
}

/* Estado activo (Visible y en su lugar) - JS agregará esta clase */
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- OPCIONAL: RETRASOS (STAGGER) --- */
/* Si tienes 3 tarjetas, usa estas clases para que aparezcan una tras otra */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }