/* =========================================================
   IEPP — Iglesia Evangélica Peruana Presbiteriana
   Hoja de estilos general
   Sistema de diseño: celeste institucional + neutros cálidos
   ========================================================= */

/* -----------------------------
   1. VARIABLES / TOKENS
------------------------------ */
:root{
  /* Celestes — variantes */
  --primary:        #5FA9C2;   /* celeste medio, color de marca */
  --primary-dark:   #3A7E96;   /* celeste oscuro, hover/énfasis */
  --primary-light:  #CFEAF2;   /* celeste pastel */
  --primary-soft:   #EFF8FA;   /* celeste muy claro, fondos de sección */
  --accent:         #A9D8E4;   /* azul celeste, detalles */
  --secondary:      #5D7C87;   /* azul grisáceo, texto secundario sobre celeste */

  /* Neutros cálidos */
  --white:          #FFFFFF;
  --bg:             #FAFCFD;   /* fondo general */
  --sand:           #F1ECE3;   /* neutro cálido para respiro visual */
  --border:         #DDEAEE;
  --border-strong:  #C4DBE1;

  /* Texto */
  --ink:            #1F2E33;
  --ink-soft:       #4C5D63;
  --ink-faint:      #7A8A8F;

  /* Estados */
  --success:        #4C9A6A;
  --success-bg:      #E7F5EC;
  --error:           #C05C4E;
  --error-bg:        #FBEAE7;

  /* Sombra */
  --shadow-sm: 0 2px 10px rgba(46, 90, 105, 0.06);
  --shadow-md: 0 12px 32px rgba(46, 90, 105, 0.10);
  --shadow-lg: 0 24px 60px rgba(31, 62, 73, 0.16);

  /* Tipografía */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radios */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Layout */
  --container: 1180px;
  --header-h: 84px;
}

/* -----------------------------
   2. RESET
------------------------------ */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ list-style: none; margin: 0; padding: 0; }
button{ font-family: inherit; cursor: pointer; }
input, textarea, select{ font-family: inherit; font-size: 1rem; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.22;
  margin: 0;
  font-weight: 600;
}
p{ margin: 0; }

:focus-visible{
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* -----------------------------
   3. UTILIDADES DE LAYOUT
------------------------------ */
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section{ padding: 96px 0; }
.section--tight{ padding: 64px 0; }
.section--soft{ background: var(--primary-soft); }
.section--sand{ background: var(--sand); }

.section-head{
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head.center{ margin-left: auto; margin-right: auto; text-align: center; }
.section-kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.section-kicker::before{
  content: "";
  width: 28px;
  height: 2px;
  background: var(--primary-dark);
  display: inline-block;
}
.section-head.center .section-kicker::before{ display: none; }
.section-head h2{ font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-head p{ color: var(--ink-soft); margin-top: 14px; font-size: 1.05rem; }

.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); }

.visually-hidden{
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip-link{
  position: absolute; left: 12px; top: -60px;
  background: var(--primary-dark); color: var(--white);
  padding: 10px 18px; border-radius: var(--r-sm);
  z-index: 1000; transition: top 0.2s ease;
}
.skip-link:focus{ top: 12px; }

/* -----------------------------
   4. BOTONES
------------------------------ */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

.btn-primary{
  background: var(--primary-dark);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover{ background: #316B80; box-shadow: var(--shadow-md); }

.btn-secondary{
  background: var(--white);
  color: var(--primary-dark);
  border-color: var(--border-strong);
}
.btn-secondary:hover{ border-color: var(--primary-dark); background: var(--primary-soft); }

.btn-ghost{
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.btn-ghost:hover{ background: rgba(255,255,255,0.14); border-color: var(--white); }

.btn-block{ width: 100%; }
.btn-sm{ padding: 10px 20px; font-size: 0.9rem; }

.btn[disabled]{ opacity: 0.6; cursor: not-allowed; transform: none; }
.btn .spinner{ display: none; }
.btn.is-loading .spinner{ display: inline-block; }
.btn.is-loading .btn-label{ opacity: 0.7; }

.spinner{
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  animation: spin 0.7s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* -----------------------------
   5. BADGES
------------------------------ */
.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.badge-outline{
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--ink-soft);
}
.badge-dot::before{
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* -----------------------------
   6. HEADER / NAVEGACIÓN
------------------------------ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(250, 252, 253, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.site-header.is-scrolled{
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
  background: rgba(250, 252, 253, 0.97);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark{
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg{ width: 24px; height: 24px; }
.brand-text small{
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.main-nav{ flex: 1; display: flex; justify-content: center; }
.main-nav ul{ display: flex; align-items: center; gap: 4px; }
.main-nav a{
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--ink-soft);
  transition: background-color 0.18s ease, color 0.18s ease;
  position: relative;
}
.main-nav a:hover{ background: var(--primary-soft); color: var(--primary-dark); }
.main-nav a[aria-current="page"]{ color: var(--primary-dark); background: var(--primary-light); }

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

.nav-toggle{
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  flex-direction: column; gap: 4px;
}
.nav-toggle span{
  width: 20px; height: 2px; background: var(--ink); display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px){
  .main-nav{
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--white);
    display: block;
    padding: 20px 24px 32px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    overflow-y: auto;
  }
  .main-nav.is-open{ transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav ul{ flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a{ padding: 14px 18px; font-size: 1.05rem; }
  .nav-toggle{ display: inline-flex; }
  .header-actions .btn-primary span{ display: none; }
}

/* -----------------------------
   7. HERO
------------------------------ */
.hero{
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-media{
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-media img{
  width: 100%; height: 100%; object-fit: cover;
}
.hero-media::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(20, 42, 51, 0.86) 0%, rgba(31, 64, 78, 0.62) 48%, rgba(95, 169, 194, 0.35) 100%);
}
.hero-inner{
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 140px 0 100px;
}
.hero-verse{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.35);
  font-size: 0.88rem;
  margin-bottom: 26px;
}
.hero h1{
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--white);
  margin-bottom: 20px;
}
.hero-lead{
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  max-width: 520px;
  margin-bottom: 18px;
}
.hero-scripture{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 24px 0 34px;
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

.page-hero{
  position: relative;
  color: var(--white);
  padding: calc(var(--header-h) + 90px) 0 90px;
  overflow: hidden;
}
.page-hero .hero-media::after{
  background: linear-gradient(120deg, rgba(20, 42, 51, 0.88) 10%, rgba(58, 126, 150, 0.55) 100%);
}
.page-hero-inner{ position: relative; z-index: 1; max-width: 620px; }
.page-hero .badge{ background: rgba(255,255,255,0.16); color: var(--white); border: 1px solid rgba(255,255,255,0.35); }
.page-hero h1{ color: var(--white); font-size: clamp(2.1rem, 4vw, 2.9rem); margin: 16px 0; }
.page-hero p{ color: rgba(255,255,255,0.88); font-size: 1.08rem; max-width: 560px; }
.page-hero-crumbs{ display: flex; gap: 8px; align-items: center; font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-bottom: 18px; }
.page-hero-crumbs a:hover{ color: var(--white); }

/* -----------------------------
   8. TARJETAS
------------------------------ */
.card{
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 30px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.card-icon{
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg{ width: 26px; height: 26px; }
.card h3{ font-size: 1.15rem; margin-bottom: 10px; }
.card p{ color: var(--ink-soft); font-size: 0.97rem; }

/* Valores */
.value-card{ text-align: left; }

/* Presentación (quienes somos, historia, mision/vision) */
.presentation-grid{ grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 56px; }
.presentation-media{ position: relative; }
.presentation-media img{ border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.presentation-media::before{
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--primary-light);
  border-radius: var(--r-lg);
  z-index: -1;
}
.presentation-text h2{ margin-bottom: 18px; }
.presentation-text p + p{ margin-top: 14px; }
.presentation-text p{ color: var(--ink-soft); }
.mini-stats{ display: flex; gap: 34px; margin-top: 30px; }
.mini-stat b{ font-family: var(--font-display); font-size: 1.9rem; color: var(--primary-dark); display: block; }
.mini-stat span{ font-size: 0.88rem; color: var(--ink-faint); }

/* Eventos */
.event-card{
  display: flex;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.event-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-3px); }
.event-date{
  flex-shrink: 0;
  width: 74px; height: 74px;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-display);
}
.event-date b{ font-size: 1.5rem; line-height: 1; }
.event-date span{ font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.event-info h3{ font-size: 1.05rem; margin-bottom: 6px; }
.event-meta{ display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.87rem; color: var(--ink-faint); margin-bottom: 8px; }
.event-meta span{ display: inline-flex; align-items: center; gap: 5px; }
.event-info p{ color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 12px; }

/* CTA */
.cta-section{
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 70px 56px;
  color: var(--white);
  background: linear-gradient(125deg, var(--primary-dark), #274F5E 80%);
}
.cta-section::after{
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 70%);
}
.cta-section h2{ color: var(--white); font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 560px; }
.cta-section p{ color: rgba(255,255,255,0.85); margin-top: 14px; max-width: 500px; }
.cta-actions{ display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* -----------------------------
   9. TIMELINE (Historia)
------------------------------ */
.timeline{ position: relative; margin-top: 20px; }
.timeline::before{
  content: "";
  position: absolute; left: 27px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border-strong);
}
.timeline-item{
  position: relative;
  padding-left: 74px;
  padding-bottom: 44px;
}
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-marker{
  position: absolute; left: 0; top: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--primary);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.timeline-item h3{ font-size: 1.1rem; margin-bottom: 6px; }
.timeline-item span.timeline-year{ color: var(--primary-dark); font-weight: 600; font-size: 0.9rem; }
.timeline-item p{ color: var(--ink-soft); margin-top: 6px; font-size: 0.95rem; }

/* Doctrina / valores institucionales */
.doctrine-list{ display: grid; gap: 18px; }
.doctrine-item{
  display: flex; gap: 18px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.doctrine-item .card-icon{ margin-bottom: 0; flex-shrink: 0; }

/* -----------------------------
   10. EQUIPO
------------------------------ */
.team-card{
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.team-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-photo{ position: relative; aspect-ratio: 4/4.2; overflow: hidden; }
.team-photo img{ width: 100%; height: 100%; object-fit: cover; }
.team-body{ padding: 22px; }
.team-body h3{ font-size: 1.08rem; margin-bottom: 4px; }
.team-role{ color: var(--primary-dark); font-weight: 600; font-size: 0.88rem; margin-bottom: 10px; }
.team-body p{ color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 16px; }

.directory-table-wrap{ overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
table.directory-table{ width: 100%; border-collapse: collapse; min-width: 620px; background: var(--white); }
.directory-table th, .directory-table td{
  text-align: left; padding: 16px 20px; font-size: 0.94rem; border-bottom: 1px solid var(--border);
}
.directory-table th{ background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.directory-table tr:last-child td{ border-bottom: none; }

/* -----------------------------
   11. MINISTERIOS
------------------------------ */
.ministry-card{
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ministry-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ministry-media{ position: relative; aspect-ratio: 16/10; overflow: hidden; }
.ministry-media img{ width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ministry-card:hover .ministry-media img{ transform: scale(1.05); }
.ministry-icon{
  position: absolute; bottom: -22px; left: 22px;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--white); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark);
}
.ministry-body{ padding: 34px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.ministry-body h3{ font-size: 1.15rem; margin-bottom: 8px; }
.ministry-body p{ color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 14px; }
.ministry-tags{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ministry-body .btn{ margin-top: auto; align-self: flex-start; }

/* Galería */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-item{
  position: relative;
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 1/1;
  cursor: pointer;
}
.gallery-item img{ width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img{ transform: scale(1.08); }
.gallery-item::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,42,51,0.55), transparent 55%);
  opacity: 0; transition: opacity 0.25s ease;
}
.gallery-item:hover::after{ opacity: 1; }
.gallery-cap{
  position: absolute; left: 12px; bottom: 10px;
  color: var(--white); font-size: 0.82rem; font-weight: 600;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.gallery-item:hover .gallery-cap{ opacity: 1; transform: translateY(0); }

/* -----------------------------
   12. NOTICIAS
------------------------------ */
.news-toolbar{
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 36px;
}
.news-filters{ display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip{
  padding: 9px 18px; border-radius: var(--r-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--white); color: var(--ink-soft);
  font-size: 0.9rem; font-weight: 500;
  transition: all 0.18s ease;
}
.filter-chip:hover{ border-color: var(--primary-dark); color: var(--primary-dark); }
.filter-chip.is-active{ background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

.search-box{
  position: relative; min-width: 260px;
}
.search-box input{
  width: 100%; padding: 12px 16px 12px 42px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--white);
  font-size: 0.95rem;
}
.search-box input:focus{ border-color: var(--primary-dark); }
.search-box svg{
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-faint);
}

.news-card{
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-media{ position: relative; aspect-ratio: 16/10; overflow: hidden; }
.news-media img{ width: 100%; height: 100%; object-fit: cover; }
.news-media .badge{ position: absolute; top: 14px; left: 14px; background: var(--white); }
.news-body{ padding: 22px; flex: 1; display: flex; flex-direction: column; }
.news-date{ font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 8px; }
.news-body h3{ font-size: 1.08rem; margin-bottom: 10px; }
.news-body p{ color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 16px; }
.news-body .btn{ margin-top: auto; align-self: flex-start; }
.news-empty{ text-align: center; padding: 60px 20px; color: var(--ink-faint); display: none; }
.news-empty.is-visible{ display: block; }

/* Calendario */
.calendar-card{
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-sm);
}
.calendar-header{
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px;
}
.calendar-header h3{ font-size: 1.2rem; }
.calendar-nav{ display: flex; gap: 8px; }
.calendar-nav button{
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark); transition: background 0.18s ease;
}
.calendar-nav button:hover{ background: var(--primary-soft); }
.calendar-weekdays, .calendar-grid{
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.calendar-weekdays span{
  text-align: center; font-size: 0.78rem; color: var(--ink-faint); font-weight: 600; padding: 6px 0;
}
.calendar-day{
  position: relative;
  aspect-ratio: 1/0.85;
  border-radius: var(--r-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
}
.calendar-day.is-muted{ color: var(--ink-faint); opacity: 0.45; }
.calendar-day.has-event{
  background: var(--primary-soft); font-weight: 600; color: var(--primary-dark); cursor: pointer;
  border-color: var(--border);
}
.calendar-day.has-event:hover{ border-color: var(--primary-dark); }
.calendar-day.has-event::after{
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--primary-dark); margin-top: 3px;
}
.calendar-day.is-today{ border-color: var(--primary-dark); }
.calendar-events-panel{ margin-top: 22px; border-top: 1px solid var(--border); padding-top: 20px; }
.calendar-event-detail{ display: flex; gap: 16px; }
.calendar-event-detail .event-date{ width: 60px; height: 60px; }
.calendar-empty-hint{ color: var(--ink-faint); font-size: 0.92rem; }

/* -----------------------------
   13. RECURSOS
------------------------------ */
.resource-toolbar{
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 30px;
}
.resource-card{
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 22px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.resource-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-3px); }
.resource-icon{
  flex-shrink: 0; width: 50px; height: 50px; border-radius: var(--r-sm);
  background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
}
.resource-info{ flex: 1; min-width: 0; }
.resource-info h3{ font-size: 1.02rem; margin-bottom: 4px; }
.resource-meta{ font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.resource-info p{ color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 14px; }
.resource-actions{ display: flex; gap: 10px; flex-wrap: wrap; }
.resource-empty{ text-align: center; padding: 60px 20px; color: var(--ink-faint); display: none; }
.resource-empty.is-visible{ display: block; }

/* -----------------------------
   14. CONTACTO
------------------------------ */
.contact-grid{ grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact-info-list{ display: grid; gap: 22px; margin-top: 26px; }
.contact-info-item{ display: flex; gap: 16px; }
.contact-info-item h3{ font-size: 1rem; margin-bottom: 4px; }
.contact-info-item p{ color: var(--ink-soft); font-size: 0.94rem; }
.social-row{ display: flex; gap: 10px; margin-top: 26px; }
.social-link{
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.social-link:hover{ background: var(--primary-dark); color: var(--white); transform: translateY(-2px); }
.social-link svg{ width: 19px; height: 19px; }

.contact-map{ border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); margin-top: 40px; }
.contact-map iframe{ width: 100%; height: 340px; border: 0; display: block; }

.form-card{
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 38px; box-shadow: var(--shadow-sm);
}
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group{ margin-bottom: 20px; }
.form-group label{
  display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: var(--ink);
}
.form-control{
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--bg); font-size: 0.96rem; color: var(--ink);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.form-control:focus{ border-color: var(--primary-dark); background: var(--white); }
textarea.form-control{ min-height: 130px; resize: vertical; }
.form-error{
  display: none; align-items: center; gap: 6px;
  color: var(--error); font-size: 0.83rem; margin-top: 7px;
}
.form-group.has-error .form-control{ border-color: var(--error); background: var(--error-bg); }
.form-group.has-error .form-error{ display: flex; }

.form-status{
  display: none; align-items: center; gap: 10px;
  padding: 16px 18px; border-radius: var(--r-sm); margin-bottom: 20px;
  font-size: 0.93rem; font-weight: 500;
}
.form-status.is-success{ display: flex; background: var(--success-bg); color: var(--success); }
.form-status.is-error{ display: flex; background: var(--error-bg); color: var(--error); }

/* -----------------------------
   15. MODALES
------------------------------ */
.modal-overlay{
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 34, 40, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.is-open{ opacity: 1; pointer-events: auto; }
.modal-box{
  background: var(--white); border-radius: var(--r-lg);
  max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: 40px; position: relative;
  transform: translateY(16px) scale(0.98); opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.modal-overlay.is-open .modal-box{ transform: translateY(0) scale(1); opacity: 1; }
.modal-close{
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; border: none;
}
.modal-close:hover{ background: var(--primary-light); }
.modal-profile-head{ display: flex; gap: 20px; align-items: center; margin-bottom: 22px; }
.modal-profile-head img{ width: 92px; height: 92px; border-radius: 16px; object-fit: cover; }
.modal-profile-head h3{ font-size: 1.25rem; margin-bottom: 4px; }
.modal-section{ margin-top: 20px; }
.modal-section h4{ font-size: 0.95rem; color: var(--primary-dark); margin-bottom: 8px; }
.modal-section p{ color: var(--ink-soft); font-size: 0.94rem; }
.modal-section ul{ display: grid; gap: 6px; margin-top: 8px; }
.modal-section ul li{ color: var(--ink-soft); font-size: 0.92rem; padding-left: 18px; position: relative; }
.modal-section ul li::before{ content: "•"; color: var(--primary-dark); position: absolute; left: 0; }

/* Lightbox de galería */
.lightbox-overlay{
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(12, 22, 27, 0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.lightbox-overlay.is-open{ opacity: 1; pointer-events: auto; }
.lightbox-figure{ max-width: 900px; width: 92%; text-align: center; }
.lightbox-figure img{ max-height: 76vh; margin: 0 auto; border-radius: var(--r-sm); width: auto; }
.lightbox-caption{ color: rgba(255,255,255,0.85); margin-top: 16px; font-size: 0.95rem; }
.lightbox-close, .lightbox-prev, .lightbox-next{
  position: absolute; background: rgba(255,255,255,0.12); color: var(--white);
  border: 1px solid rgba(255,255,255,0.3); border-radius: 50%;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover{ background: rgba(255,255,255,0.24); }
.lightbox-close{ top: 24px; right: 24px; }
.lightbox-prev{ left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next{ right: 24px; top: 50%; transform: translateY(-50%); }

/* -----------------------------
   16. FOOTER
------------------------------ */
.site-footer{
  background: #1B2E36;
  color: rgba(255,255,255,0.78);
  padding-top: 72px;
}
.footer-grid{
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand{ color: var(--white); }
.footer-brand p{ margin-top: 16px; font-size: 0.92rem; line-height: 1.7; max-width: 300px; color: rgba(255,255,255,0.65); }
.footer-col h4{ color: var(--white); font-size: 0.98rem; margin-bottom: 18px; font-family: var(--font-body); font-weight: 600; }
.footer-col ul{ display: grid; gap: 12px; }
.footer-col a{ font-size: 0.92rem; color: rgba(255,255,255,0.68); transition: color 0.18s ease; }
.footer-col a:hover{ color: var(--accent); }
.footer-col .contact-info-item p, .footer-col .contact-info-item{ color: rgba(255,255,255,0.68); font-size: 0.92rem; }
.footer-social{ display: flex; gap: 10px; margin-top: 18px; }
.footer-social .social-link{ background: rgba(255,255,255,0.08); color: var(--white); }
.footer-social .social-link:hover{ background: var(--primary); }

.footer-bottom{
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 26px 0 32px;
  font-size: 0.86rem; color: rgba(255,255,255,0.55);
}
.footer-legal{ display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a:hover{ color: var(--white); }

/* -----------------------------
   17. BOTÓN VOLVER ARRIBA
------------------------------ */
.back-to-top{
  position: fixed; right: 24px; bottom: 24px; z-index: 400;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-dark); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); border: none;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.18s ease;
}
.back-to-top.is-visible{ opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover{ background: #316B80; }

/* -----------------------------
   18. ANIMACIONES AL APARECER
------------------------------ */
.reveal{ opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* -----------------------------
   19. RESPONSIVE
------------------------------ */
@media (max-width: 1080px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .gallery-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px){
  .grid-4{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: repeat(2, 1fr); }
  .presentation-grid{ grid-template-columns: 1fr; }
  .presentation-media{ order: -1; }
  .presentation-media::before{ display: none; }
  .contact-grid{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
  .hero-inner{ padding: 120px 0 70px; }
}

@media (max-width: 640px){
  :root{ --header-h: 72px; }
  .section{ padding: 64px 0; }
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .footer-grid{ grid-template-columns: 1fr; }
  .cta-section{ padding: 44px 26px; }
  .event-card{ flex-direction: column; }
  .news-toolbar, .resource-toolbar{ flex-direction: column; align-items: stretch; }
  .search-box{ min-width: 0; }
  .form-card{ padding: 26px; }
  .lightbox-prev, .lightbox-next{ width: 40px; height: 40px; }
  .directory-table-wrap{ margin: 0 -24px; border-radius: 0; border-left: 0; border-right: 0; width: calc(100% + 48px); }
}

@media (max-width: 400px){
  .hero-actions .btn, .cta-actions .btn{ width: 100%; }
}
