/* ============================================================
   Fundación conVIVE — Sistema visual
   Tipografía: Bricolage Grotesque (titulares) + Work Sans (texto)
   Paleta: morado (justicia/mujer) · verde (ambiente/vida) · naranja (niñez/calidez)
   Sistema de forma: esquinas rectas por defecto; círculo solo en fotos/íconos;
   píldora solo en botones y etiquetas. Sin gradientes ni formas decorativas.
   ============================================================ */

:root {
  /* Colores extraídos directamente del logo oficial */
  --morado: #6724A4;
  --morado-dark: #3A1559;
  --morado-light: #F1E7FA;
  --verde: #28B675;
  --verde-dark: #197B4F;
  --verde-light: #E4F8EE;
  --naranja: #ED6D07;
  --naranja-dark: #B25205;
  --naranja-light: #FDECDA;

  --ink: #241A33;
  --text: #4A3F58;
  --text-soft: #6B5F7A;
  --bg: #FBF7FD;
  --bg-alt: #F1E7FA;
  --bg-verde: #E4F8EE;
  --bg-naranja: #FDECDA;
  --border: #D6C2EC;
  --white: #FFFFFF;

  --font-head: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --font-body: 'Work Sans', 'Segoe UI', sans-serif;

  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 3px rgba(28, 22, 32, 0.08);
  --shadow-md: 0 10px 28px rgba(28, 22, 32, 0.12);
  --shadow-lg: 0 24px 60px rgba(28, 22, 32, 0.20);

  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.05;
  margin: 0 0 0.45em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 600; }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }

p { line-height: 1.65; margin: 0 0 1em; }

a { color: var(--morado); text-decoration: none; cursor: pointer; }
a:hover { color: var(--verde); }

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

section { padding: clamp(52px, 8vw, 108px) 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-verde { background: var(--bg-verde); }
.section-naranja { background: var(--bg-naranja); }
.section-morado { background: var(--morado-dark); color: #E4D7EE; }
.section-morado h2, .section-morado h3 { color: #fff; }
.section-morado p { color: #C3AFD3; }

/* Etiqueta pequeña, uso restringido a un máximo de una por cada tres secciones */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--naranja-dark);
  margin-bottom: 10px;
}
.section-morado .eyebrow { color: #F0B685; }

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  color: var(--text-soft);
  max-width: 60ch;
}

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Botones (única familia con esquina en píldora) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  min-height: 48px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--morado); color: #fff; }
.btn-primary:hover { background: var(--naranja-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--morado); border-color: var(--morado); }
.btn-outline:hover { background: var(--morado-light); }
.section-morado .btn-outline,
.hero .btn-outline { border-color: rgba(255,255,255,0.6); color: #fff; background: rgba(20,14,26,0.28); }
.section-morado .btn-outline:hover,
.hero .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.16); }
.section-morado .btn-primary,
.hero .btn-primary { background: var(--naranja-dark); }
.section-morado .btn-primary:hover,
.hero .btn-primary:hover { background: #fff; color: var(--morado-dark); }
.btn-sm { padding: 10px 20px; min-height: 40px; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { height: 60px; width: auto; }
.brand .brand-word { font-family: var(--font-head); font-weight: 600; font-size: 1.55rem; color: var(--ink); }
.brand .brand-word span { color: var(--naranja-dark); }

.nav-main { display: flex; align-items: center; gap: 2px; }
.nav-main a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.nav-main a:hover, .nav-main a.active { background: var(--bg-alt); color: var(--ink); }
.nav-cta-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span::after { transform: translateY(-6px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; background: var(--morado-dark); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  transform: scale(1);
  animation: heroZoom 16s ease-in-out infinite alternate;
}
.hero-slide:nth-child(2n) img { animation-direction: alternate-reverse; }
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,10,20,0.18) 0%, rgba(15,10,20,0.3) 28%, rgba(15,10,20,0.62) 52%, rgba(15,10,20,0.88) 74%, rgba(15,10,20,0.96) 100%);
}
.hero-content { position: relative; z-index: 1; padding-bottom: 80px; width: 100%; max-width: 900px; }
.hero-content .eyebrow { color: #E8A468; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: rgba(255,255,255,0.82); max-width: 54ch; font-size: clamp(1.05rem, 1.6vw, 1.28rem); }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* ============ CARDS ============ */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 11px; border-radius: 999px; background: var(--verde-light); color: var(--verde-dark);
}
.card-body h3 { margin-bottom: 2px; font-size: 1.2rem; }
.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--verde); }
.card-date { font-size: 0.82rem; color: var(--text-soft); font-weight: 500; }
.card-foot { margin-top: auto; padding-top: 6px; }
.card-link { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; border-bottom: 1.5px solid var(--border); padding-bottom: 2px; }
.card-link:hover { color: var(--naranja-dark); border-color: var(--naranja-dark); }
.card-link::after { content: '→'; transition: transform 0.2s; }
.card-link:hover::after { transform: translateX(3px); }

/* ---------- Encuadre de imagen destacada (sobria, sin blobs) ---------- */
.feature-photo {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.feature-photo img { width: 100%; height: 100%; object-fit: cover; }
.feature-badge {
  position: absolute; z-index: 2; left: 20px; bottom: 20px;
  background: #fff; border-radius: var(--radius-sm);
  padding: 13px 18px;
  display: flex; align-items: center; gap: 11px;
  font-weight: 600; color: var(--ink); font-size: 0.88rem;
  max-width: 240px;
  box-shadow: var(--shadow-md);
}
.feature-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--naranja);
}
.feature-photo.accent-verde ~ .feature-badge .dot,
.feature-badge.accent-verde .dot { background: var(--verde); }

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

/* ============ STATS / CONTADORES ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat-block { position: relative; padding: 4px 26px 4px 0; border-left: 1px solid rgba(255,255,255,0.16); padding-left: 26px; }
.stat-block:first-child { border-left: none; padding-left: 0; }
.stat-num {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  color: #fff;
  line-height: 1;
}
.stat-label { font-size: 0.9rem; color: #C3AFD3; margin-top: 8px; }

/* ============ VALORES ============ */
.valor-card { padding: 30px 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); height: 100%; border-top: 3px solid var(--naranja-dark); }
.valor-num { font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; color: var(--naranja-dark); margin-bottom: 14px; display: block; }
.grid-3 .valor-card:nth-child(3n+2), .grid-4 .valor-card:nth-child(3n+2) { border-top-color: var(--verde); }
.grid-3 .valor-card:nth-child(3n+2) .valor-num, .grid-4 .valor-card:nth-child(3n+2) .valor-num { color: var(--verde); }
.grid-3 .valor-card:nth-child(3n), .grid-4 .valor-card:nth-child(3n) { border-top-color: var(--morado); }
.grid-3 .valor-card:nth-child(3n) .valor-num, .grid-4 .valor-card:nth-child(3n) .valor-num { color: var(--morado); }

/* ============ EQUIPO ============ */
.team-card { text-align: left; }
.team-photo {
  width: 100%; max-width: 220px; aspect-ratio: 1/1; border-radius: 50%;
  overflow: hidden; margin-bottom: 20px; background: var(--bg-alt);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--naranja-dark);
}
.team-card:nth-child(4n+2) .team-photo { box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--verde); }
.team-card:nth-child(4n+3) .team-photo { box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--morado); }
.team-card:nth-child(4n) .team-photo { box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--naranja-dark); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin-bottom: 3px; }
.team-role { color: var(--naranja-dark); font-weight: 500; font-size: 0.86rem; margin-bottom: 12px; }
.team-card:nth-child(4n+2) .team-role { color: var(--verde); }
.team-card:nth-child(4n+3) .team-role { color: var(--morado); }
.team-bio { font-size: 0.92rem; color: var(--text-soft); }
.team-bio.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.team-more { font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-top: 8px; display: inline-block; border-bottom: 1.5px solid var(--border); }

/* ============ LÍNEAS DE TRABAJO ============ */
.line-list { display: flex; flex-direction: column; }
.line-item {
  display: grid; grid-template-columns: 90px 1fr; gap: 26px;
  padding: 32px 0; border-top: 1px solid var(--border);
}
.line-item:last-child { border-bottom: 1px solid var(--border); }
.line-num {
  font-family: var(--font-head); font-weight: 600; font-size: 1.7rem;
  color: var(--morado);
}
.line-item:nth-child(2) .line-num { color: var(--verde); }
.line-item:nth-child(3) .line-num { color: var(--naranja-dark); }

/* ============ GALERÍA DE IMPACTO ============ */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery .g-item {
  overflow: hidden; position: relative; display: block;
  width: 100%; aspect-ratio: 4/3; padding: 0; border: 0; background: var(--bg-alt); cursor: pointer;
  border-radius: var(--radius-sm);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s ease; filter: grayscale(0.3); }
.gallery .g-item:hover img, .gallery .g-item:focus-visible img { transform: scale(1.05); filter: grayscale(0); }
.gallery .g-item:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.gallery .g-tall { grid-row: span 2; }
.gallery .g-wide { grid-column: span 2; }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15,10,20,0.94);
  display: none; align-items: center; justify-content: center;
  padding: 60px 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.24); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.24); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
@media (max-width: 640px) {
  .lightbox { padding: 90px 16px; }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ============ FOOTER ============ */
.site-footer { background: var(--morado-dark); color: #C3AFD3; padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.footer-brand img { height: 58px; }
.footer-brand span { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; color: #fff; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 0.88rem; margin-bottom: 16px; }
.site-footer a { color: #C3AFD3; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 0.93rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.84rem; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; transition: background 0.2s, border-color 0.2s;
}
.social-row a:hover { background: var(--naranja-dark); border-color: var(--naranja-dark); }
.social-row svg { width: 16px; height: 16px; }

/* ============ ENCABEZADO DE PÁGINA INTERNA ============ */
.page-hero {
  position: relative;
  padding: 150px 0 72px;
  background: var(--morado-dark);
  color: #fff;
  overflow: hidden;
}
.page-hero-media { position: absolute; inset: 0; z-index: 0; }
.page-hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  animation: heroZoom 18s ease-in-out infinite alternate;
}
.page-hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(58,21,89,0.90) 0%, rgba(58,21,89,0.80) 45%, rgba(20,10,32,0.88) 100%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 18ch; }
.page-hero .lead { color: #C3AFD3; }

.page-hero-quienes .page-hero-media img { object-position: center 22%; }
.page-hero-que-hacemos .page-hero-media img { object-position: center 30%; }
.page-hero-proyectos .page-hero-media img { object-position: center 35%; }
.page-hero-publicaciones .page-hero-media img { object-position: center 28%; }
.page-hero-transparencia .page-hero-media img { object-position: center 32%; }
.page-hero-contacto .page-hero-media img { object-position: 38% 25%; }
.breadcrumb { font-size: 0.84rem; color: #9E86AF; margin-bottom: 16px; }
.breadcrumb a { color: #9E86AF; }
.breadcrumb a:hover { color: #fff; }

/* ============ FORMULARIOS ============ */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--ink); margin-bottom: 7px; }
.form-control {
  width: 100%; padding: 13px 15px; min-height: 48px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.form-control { min-height: 140px; resize: vertical; }
.form-control:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg-alt); }
.form-hint { font-size: 0.8rem; color: var(--text-soft); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.alert { padding: 15px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-weight: 500; font-size: 0.94rem; }
.alert-success { background: var(--verde-light); color: var(--verde-dark); border: 1px solid #BFE0C8; }
.alert-error { background: #FBEAE8; color: #A6321F; border: 1px solid #F0C4BE; }
.alert-info { background: var(--morado-light); color: var(--morado-dark); border: 1px solid #DACBE6; }

/* ============ TRANSPARENCIA / DOCUMENTOS ============ */
.doc-list { display: flex; flex-direction: column; }
.doc-item {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 4px; border-bottom: 1px solid var(--border);
}
.doc-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--ink);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.doc-icon svg { width: 20px; height: 20px; }
.doc-title { font-weight: 600; color: var(--ink); }
.doc-meta { font-size: 0.82rem; color: var(--text-soft); }
.doc-item .btn { margin-left: auto; flex-shrink: 0; }
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-soft); }

/* ============ ANIMACIONES ============ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1.in-view { transition-delay: 0.06s; }
.reveal-delay-2.in-view { transition-delay: 0.12s; }
.reveal-delay-3.in-view { transition-delay: 0.18s; }
.reveal-delay-4.in-view { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .stat-block:nth-child(3) { border-left: none; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-main { display: none; }
  .nav-toggle { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: 1fr; gap: 8px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }

  .site-header .container { height: 72px; }
  .brand img { height: 42px; }
  .brand .brand-word { font-size: 1.15rem; }
  .header-actions .btn { display: none; }

  .nav-main.mobile-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 10px 20px 22px; box-shadow: var(--shadow-md); gap: 2px;
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .nav-main.mobile-open a { padding: 13px 14px; }
  .nav-main.mobile-open .nav-cta-mobile {
    display: block; margin-top: 10px; text-align: center;
    background: var(--morado); color: #fff; font-weight: 600; padding: 13px 14px;
  }
  .nav-main.mobile-open .nav-cta-mobile:hover { background: var(--naranja-dark); color: #fff; }

  .hero { min-height: 74dvh; align-items: center; }
  .hero-content { padding-bottom: 0; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); max-width: 12ch; }
  .hero .lead { font-size: 1rem; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .btn { flex: 1 1 auto; min-width: 0; }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(15,10,20,0.34) 0%, rgba(15,10,20,0.46) 30%, rgba(15,10,20,0.72) 58%, rgba(15,10,20,0.92) 80%, rgba(15,10,20,0.97) 100%);
  }
  .hero-slide img { animation-duration: 20s; object-position: 50% 22%; }
  .hero-slide:nth-child(1) img { object-position: 62% 18%; }
  .hero-slide:nth-child(2) img { object-position: 28% 24%; }
  .hero-slide:nth-child(3) img { object-position: 74% 28%; }
  .hero-slide:nth-child(4) img { object-position: 50% 20%; }
  @keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.06); } }

  .page-hero { padding: 118px 0 56px; }
  .page-hero-media::after {
    background: linear-gradient(180deg, rgba(58,21,89,0.82) 0%, rgba(30,12,48,0.9) 100%);
  }
  .page-hero-quienes .page-hero-media img { object-position: 55% 20%; }
  .page-hero-que-hacemos .page-hero-media img { object-position: 42% 25%; }
  .page-hero-proyectos .page-hero-media img { object-position: 55% 30%; }
  .page-hero-publicaciones .page-hero-media img { object-position: 40% 25%; }
  .page-hero-transparencia .page-hero-media img { object-position: 48% 28%; }
  .page-hero-contacto .page-hero-media img { object-position: 25% 20%; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 420px) {
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}

/* ============ ADMIN ============ */
.admin-body { background: var(--bg-alt); min-height: 100vh; font-family: var(--font-body); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #C7BDCF; padding: 28px 20px; }
.admin-side .brand-word { color: #fff; }
.admin-side nav { margin-top: 36px; display: flex; flex-direction: column; gap: 2px; }
.admin-side nav a { color: #C7BDCF; padding: 11px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.93rem; }
.admin-side nav a:hover, .admin-side nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { padding: 38px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.admin-card { background: #fff; border-radius: var(--radius-md); padding: 28px; border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.admin-table th { font-size: 0.78rem; font-weight: 600; color: var(--text-soft); }
.admin-table tr:hover { background: var(--bg-alt); }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-pub { background: var(--verde-light); color: var(--verde-dark); }
.badge-draft { background: #EFE7D4; color: #8A6A1E; }
.admin-actions { display: flex; gap: 10px; }
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--morado-dark); padding: 20px; }
.login-card { background: #fff; border-radius: var(--radius-md); padding: 44px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.stat-mini { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; }
.stat-mini .num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 600; color: var(--ink); }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
  .admin-side nav { flex-direction: row; margin: 0; flex-wrap: wrap; }
  .admin-main { padding: 22px 18px; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
