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

:root {
  --navy: #16223d;
  --blue: #3b5c93;
  --blue-light: #5b7fb5;
  --blue-pale: #eaeff7;
  --steel: #64708a;
  --bg: #f6f7f9;
  --white: #ffffff;
  --ink: #1a1f2b;
  --border: #e2e5ea;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
  color: var(--navy);
}

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.6rem;
  display: block;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 2.5rem;
  gap: 2rem;
}

.site-header .logo img { height: 38px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--steel);
  letter-spacing: 0.01em;
  transition: color 0.15s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue);
}

.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.6rem 1.3rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-cta:hover { background: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46vh;
  padding: 4rem 2.5rem;
  background: linear-gradient(120deg, rgba(22,34,61,0.88), rgba(59,92,147,0.72)), var(--hero-img, none);
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.hero-inner { max-width: 640px; }
.hero .eyebrow { color: #bcd0ee; }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 4vw, 3.2rem); margin-bottom: 1rem; }
.hero p { font-size: 1.05rem; color: #dbe3f0; max-width: 560px; }
.hero-home { min-height: 78vh; }
.hero-home h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

.hero-actions { display: flex; gap: 0.9rem; margin-top: 1.8rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.8rem 1.6rem;
  border-radius: 3px;
  letter-spacing: 0.01em;
  transition: all 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--navy); }
.btn-outline { border: 1.5px solid rgba(255,255,255,0.6); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 2.5rem; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-head { max-width: 640px; margin-bottom: 2.8rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.8rem; }
.section-head p { color: var(--steel); font-size: 1rem; }
.section-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Card grids ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.8rem;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(22,34,61,0.08); transform: translateY(-2px); }
.card img { border-radius: 3px; margin-bottom: 1.1rem; aspect-ratio: 4/3; object-fit: cover; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card p { color: var(--steel); font-size: 0.92rem; }
.card-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  margin-top: 0.9rem;
}

.icon-box {
  width: 46px; height: 46px;
  border: 1.5px solid var(--blue);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
}
.icon-box svg { width: 22px; height: 22px; stroke: var(--blue); fill: none; stroke-width: 1.6; }
.card .icon-box img {
  max-width: calc(100% - 10px); max-height: calc(100% - 10px);
  object-fit: contain; aspect-ratio: auto;
  margin-bottom: 0; border-radius: 0;
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 1rem; }
.stat { background: var(--white); padding: 1.8rem; text-align: center; }
.stat b { display: block; font-family: var(--font-head); font-size: 2.2rem; color: var(--blue); }
.stat span { font-size: 0.82rem; color: var(--steel); letter-spacing: 0.02em; }

/* ---------- Logo strip (partners) ---------- */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem; justify-content: space-between; }
.logo-strip .placeholder-logo {
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--steel);
  border: 1px dashed var(--border); padding: 1rem 1.6rem; border-radius: 3px; text-align: center; flex: 1; min-width: 140px;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--steel); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 3px; padding: 0.7rem 0.9rem;
  font-family: var(--font-body); font-size: 0.95rem; background: var(--white); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.contact-info .item { display: flex; gap: 0.9rem; margin-bottom: 1.4rem; }
.contact-info .item svg { width: 18px; height: 18px; stroke: var(--blue); fill: none; stroke-width: 1.6; flex-shrink: 0; margin-top: 3px; }
.contact-info .item strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--steel); margin-bottom: 0.15rem; }

/* ---------- Resources (PDF / video) ---------- */
.resource-tabs { display: flex; gap: 0.6rem; margin-bottom: 2.2rem; }
.resource-tabs button {
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.03em;
  padding: 0.6rem 1.3rem; border: 1px solid var(--border); background: var(--white); color: var(--steel);
  border-radius: 3px; cursor: pointer; transition: all 0.15s;
}
.resource-tabs button.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.video-grid { display: flex; flex-direction: column; align-items: center; gap: 2.5rem; }
.video-grid .card { width: 100%; max-width: 860px; }
.video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: 4px; overflow: hidden; background: var(--navy); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; background: var(--white); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 0.8rem; }
.pdf-row .name { font-weight: 600; font-size: 0.95rem; }
.pdf-row .meta { font-size: 0.8rem; color: var(--steel); }
.pdf-row a { font-size: 0.82rem; font-weight: 600; color: var(--blue); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--blue); color: var(--white); }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; padding: 2.2rem 2.5rem; }
.footer-top img { height: 58px; }
footer.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 1rem 2.5rem; font-size: 0.78rem; color: #b9c8e4;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}

/* ---------- Ajustes puntuales: pagina Acerca de EICP ---------- */
.hero h1.titulo-acerca-de { font-size: clamp(2.5rem, 4.6vw, 3.7rem); margin-bottom: 0.15rem; }
.intro-acerca-de { font-style: italic; }

/* ---------- Productos: la foto se ve COMPLETA, sin recortar (a diferencia
   de .card img generico, que recorta -- correcto para fotos de ambiente,
   incorrecto para fotos de producto) ---------- */
.producto-imagen {
  aspect-ratio: 4/3; background: var(--bg); border-radius: 3px;
  margin-bottom: 1.1rem; display: flex; align-items: center; justify-content: center;
  padding: 0.8rem;
}
.producto-imagen img { max-width: 100%; max-height: 100%; object-fit: contain; margin-bottom: 0; border-radius: 0; }

/* ---------- Aplicaciones: ficha visual, imagen + descripcion chica ---------- */
.grid-aplicaciones { grid-template-columns: repeat(2, 1fr); }
.grid-aplicaciones .card img { aspect-ratio: 16/10; }
.aplicacion-caption { font-size: 0.82rem; color: var(--steel); line-height: 1.5; }

@media (max-width: 700px) {
  .grid-aplicaciones { grid-template-columns: 1fr; }
}

/* ---------- Auth ---------- */
.auth-wrap { max-width: 420px; margin: 3.5rem auto; padding: 0 1.5rem; }
.auth-wrap h1 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.auth-wrap p.sub { color: var(--steel); font-size: 0.9rem; margin-bottom: 1.6rem; }
.flash { padding: 0.8rem 1rem; border-radius: 3px; font-size: 0.88rem; margin-bottom: 1rem; }
.flash-error { background: #fdeceb; color: #a3312a; border: 1px solid #f3c6c2; }
.flash-success { background: #eaf6ee; color: #1e6b3a; border: 1px solid #c3e7cf; }
.auth-switch { margin-top: 1.2rem; font-size: 0.88rem; color: var(--steel); text-align: center; }
.auth-switch a { color: var(--blue); font-weight: 600; }

/* ---------- Mobile nav ---------- */
.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.hamburger span { width: 22px; height: 2px; background: var(--navy); display: block; }

@media (max-width: 980px) {
  .main-nav { display: none; position: fixed; top: 62px; left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; align-items: flex-start; padding: 2rem; gap: 1.4rem; overflow-y: auto; }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: 1.05rem; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
}

@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
