/* ==========================================================================
   AG Medios — Hoja de Estilos Premium (Rediseño Moderno)
   Paleta: Midnight Navy (Prestigio) + Electric Cyan/Teal (Acento Dinámico)
   Tipografía: Outfit (Títulos) + Inter (Cuerpo)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colores principales */
  --navy: #0B0F19;         /* Midnight Navy */
  --navy-light: #1E293B;   /* Slate Dark */
  --navy-muted: #475569;   /* Slate Muted */
  --teal: #0EA5E9;         /* Electric Sky Blue */
  --teal-dark: #0284C7;    /* Sky Blue Dark */
  --cyan: #06B6D4;         /* Cyan Vibrante */
  --ink: #0F172A;          /* Negro Azulado */
  --muted: #64748B;        /* Muted Slate */
  --line: #E2E8F0;         /* Border Light */
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;      /* Alabaster Suave */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(15, 23, 42, 0.06);
  --max: 1200px;
  
  /* Gradientes */
  --grad-primary: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
  --grad-dark: linear-gradient(180deg, #0B0F19 0%, #111827 100%);
  --grad-hero: linear-gradient(180deg, rgba(11, 15, 25, 0.6) 0%, rgba(11, 15, 25, 0.9) 100%);
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.25);
  
  /* Transiciones */
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset & Base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--navy-light);
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Header & Nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-smooth);
}

/* Cabecera transparente exclusiva para la página de inicio */
.home-page header.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, rgba(11, 15, 25, 0.6) 0%, rgba(11, 15, 25, 0) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

.home-page header.site-header .logo, 
.home-page header.site-header .logo span.accent,
.home-page header.site-header .logo-tagline {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.home-page header.site-header nav.main-nav a {
  color: #FFFFFF;
  opacity: 0.85;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.home-page header.site-header nav.main-nav a::after {
  background: #FFFFFF;
}

.home-page header.site-header nav.main-nav a:hover {
  color: #FFFFFF;
  opacity: 1;
}

.home-page header.site-header .btn-primary {
  background: #FFFFFF;
  color: var(--navy-light);
}

.home-page header.site-header .btn-primary:hover {
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 32px; /* Logo más grande y legible */
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--navy-light);
  display: flex;
  flex-direction: column;
  line-height: 0.95;
}

.logo span.accent {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--navy-light);
  opacity: 0.8;
  padding: 8px 0;
  position: relative;
}

nav.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  transition: var(--transition-smooth);
  border-radius: 2px;
}

nav.main-nav a:hover {
  opacity: 1;
  color: var(--teal);
}

nav.main-nav a:hover::after,
nav.main-nav a.active::after {
  width: 100%;
}

nav.main-nav a.active {
  opacity: 1;
  font-weight: 600;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--grad-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.btn-dark {
  background: var(--navy-light);
  color: #FFFFFF;
}

.btn-dark:hover {
  background: var(--navy);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost-light:hover {
  background: #FFFFFF;
  color: var(--navy);
  border-color: #FFFFFF;
}

.btn-ghost-dark {
  border-color: var(--line);
  color: var(--navy-light);
  background: transparent;
}

.btn-ghost-dark:hover {
  background: var(--bg-soft);
  border-color: var(--navy-muted);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 10px;
}

/* ---------- Hero Home ---------- */
.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  color: #FFFFFF;
  background: var(--grad-hero), var(--navy);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding: 100px 0 80px;
}

.home-page .hero {
  padding-top: 180px; /* Espacio para la cabecera absoluta */
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 24px;
  background: rgba(14, 165, 233, 0.1);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.hero .eyebrow {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 54px;
  line-height: 1.15;
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #FFFFFF;
  text-shadow: 0 4px 20px rgba(11, 15, 25, 0.6);
}

.hero p.lead {
  font-size: 19px;
  color: #E2E8F0;
  margin-bottom: 40px;
  max-width: 620px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(11, 15, 25, 0.5);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Heroes Páginas Interiores ---------- */
.page-hero {
  padding: 100px 0 60px;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.05), transparent 40%), var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--navy);
}

.page-hero p {
  color: var(--muted);
  max-width: 700px;
  font-size: 18px;
  line-height: 1.6;
}

/* Hero con imagen de fondo en Servicios */
.service-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  color: #FFFFFF;
  background: var(--grad-hero), var(--navy);
  background-size: cover;
  background-position: center;
}

.service-hero .container {
  padding: 60px 40px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.service-hero h1 {
  font-size: 42px;
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
}

.service-hero p {
  margin: 0;
  max-width: 650px;
  color: #E2E8F0;
  font-size: 18px;
}

/* ---------- Secciones ---------- */
section {
  padding: 100px 0;
}

section.tight {
  padding: 70px 0;
}

section.soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 700px;
  margin: 0 auto 60px;
  text-align: center;
}

.section-head.left {
  margin: 0 0 48px 0;
  text-align: left;
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-head p {
  color: var(--muted);
  font-size: 17px;
}

/* ---------- Grillas ---------- */
.grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-2 {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- Tarjetas de Servicios (Svc Card) ---------- */
.svc-card {
  background: #FFFFFF;
  padding: 36px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.svc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.2);
}

.svc-card .num {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 1px;
  margin-bottom: 20px;
  display: block;
}

.svc-card h3 {
  color: var(--navy);
  font-size: 22px;
  margin-bottom: 14px;
  font-weight: 700;
}

.svc-card p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 15px;
}

.svc-card a.more {
  font-weight: 600;
  font-size: 15px;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.svc-card a.more:hover {
  color: var(--teal-dark);
}

/* Tarjeta con Foto (Photo Card) */
.photo-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  display: block;
  background: var(--navy);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.photo-card:hover img {
  transform: scale(1.05);
  opacity: 0.75;
}

.photo-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0) 30%, rgba(11, 15, 25, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  z-index: 2;
}

.photo-card .overlay h3 {
  color: #FFFFFF;
  margin-bottom: 6px;
  font-size: 21px;
  font-weight: 700;
}

.photo-card .overlay span {
  color: #CBD5E1;
  font-size: 14px;
}

/* ---------- Chips e Industrias ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.chip {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.chip:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ---------- Layout de dos columnas ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.two-col.reverse {
  grid-template-columns: 1fr 1.2fr;
}

.two-col.reverse > *:first-child {
  order: 2;
}
.two-col.reverse > *:last-child {
  order: 1;
}

/* ---------- Listas numeradas y Procesos ---------- */
.numbered-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 36px;
}

.numbered-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
}

.numbered-list .n {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--navy-light);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.numbered-list li:hover .n {
  background: var(--grad-primary);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.numbered-list h3 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 19px;
  font-weight: 700;
}

.numbered-list p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Callouts y Destacados ---------- */
.callout {
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  padding: 30px 32px;
  color: var(--ink);
  font-size: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.callout::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-primary);
}

.callout strong {
  color: var(--navy);
  font-weight: 700;
}

/* ---------- Tabla de Cobertura ---------- */
table.coverage {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table.coverage th, table.coverage td {
  padding: 18px 24px;
  text-align: left;
  font-size: 15px;
}

table.coverage th {
  background: var(--bg-soft);
  color: var(--navy-muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
}

table.coverage td {
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
}

table.coverage tr:last-child td {
  border-bottom: none;
}

table.coverage td:first-child {
  color: var(--navy);
  font-weight: 600;
}

/* ---------- Banda de Llamado a la Acción (CTA) ---------- */
.cta-band {
  background: var(--navy);
  background-image: radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.15), transparent 45%),
                    radial-gradient(circle at top right, rgba(6, 182, 212, 0.1), transparent 45%);
  color: #FFFFFF;
  padding: 90px 40px;
  text-align: center;
  border-radius: 24px;
  margin: 0 40px;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 {
  margin-bottom: 16px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
}

.cta-band p {
  margin-bottom: 36px;
  color: #CBD5E1;
  font-size: 17px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Formularios ---------- */
form.contact-form {
  display: grid;
  gap: 24px;
  max-width: 560px;
  background: #FFFFFF;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy-light);
}

.form-row input, .form-row select, .form-row textarea {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-soft);
  color: var(--ink);
  transition: var(--transition-smooth);
}

.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.form-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy);
  color: #94A3B8;
  padding: 80px 0 40px;
  margin-top: 100px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-inner h4 {
  color: #FFFFFF;
  margin-bottom: 24px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.footer-inner li a {
  font-size: 15px;
  color: #94A3B8;
}

.footer-inner a:hover {
  color: var(--teal);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: #64748B;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cta-band {
    margin: 0 20px;
  }
}

@media (max-width: 860px) {
  .two-col, .two-col.reverse {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .two-col.reverse > *:first-child,
  .two-col.reverse > *:last-child {
    order: unset;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 38px;
  }
  
  .hero p.lead {
    font-size: 17px;
  }
  
  .hero {
    min-height: auto;
    padding: 60px 0;
  }
  
  nav.main-nav {
    display: none; /* TODO: implementar menú móvil si es necesario */
  }
  
  section {
    padding: 70px 0;
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
