/* vida-escolar — page-specific styles
   (Global chrome lives in css/global.css)
*/

/* ============================================================
   COLEGIO MARCELINA — VIDA ESCOLAR
   main.css · Tipografía global + estilos de página
   Dependencias: variables.css, animations.css, components.css, responsive.css
   ============================================================ */


/* ──────────────────────────────────────────
   TIPOGRAFÍA — Fuentes premium
────────────────────────────────────────── */
:root {
  --serif: "Fraunces", "Playfair Display", Georgia, serif;
  --sans:  "Manrope", "Inter", system-ui, -apple-system, sans-serif;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ──────────────────────────────────────────
   HERO — Gradient blue/indigo
────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(118deg, #2D2A8F 0%, #3835B8 35%, #2D67FF 100%);
  color: white;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 116px);
  padding-inline: clamp(20px, 5vw, 72px);
}
/* Subtle atmospheric glow */
.hero::before {
  content: '';
  position: absolute;
  width: 880px;
  height: 880px;
  right: -200px;
  top: -380px;
  background: radial-gradient(circle, rgba(26,114,255,.45), transparent 60%);
  pointer-events: none;
  animation: heroPulse 14s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  left: -200px;
  bottom: -240px;
  background: radial-gradient(circle, rgba(76,72,200,.35), transparent 60%);
  pointer-events: none;
}
@keyframes heroPulse {
  0%, 100% { opacity: .55; transform: translate(0,0); }
  50%      { opacity: .85; transform: translate(-30px, 20px); }
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
}
.crumbs {
  font-size: 12.5px;
  color: rgba(255,255,255,0.62);
  margin-bottom: 22px;
  letter-spacing: .01em;
}
.crumbs a {
  transition: color .15s ease;
}
.crumbs a:hover { color: white; }
.crumbs .sep { margin: 0 8px; opacity: .55; }
.crumbs .here { color: rgba(255,255,255,0.85); }

.hero .eyebrow-hero {
  display: inline-block;
  color: var(--color-lima);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.7vw, 4.2rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  max-width: 1280px;
}
.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,0.78);
}

.hero-lead {
  font-size: clamp(15px, 1.15vw, 17px);
  color: rgba(255,255,255,0.78);
  max-width: 580px;
  line-height: 1.55;
  margin: 0;
}

/* ──────────────────────────────────────────
   SECCIÓN GALERÍA
────────────────────────────────────────── */
.sec-galeria {
  background: var(--bg-off);
  padding-block: clamp(56px, 7vw, 96px);
  padding-inline: clamp(20px, 5vw, 72px);
}
.sec-galeria-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.gal-hdr {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 26px;
}
.gal-hdr .left .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--color-indigo);
  margin-bottom: 10px;
  display: block;
}
.gal-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  font-weight: 900;
  color: var(--color-indigo-deeper);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.gal-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--color-indigo);
  margin-left: 6px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  background: white;
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  gap: 12px;
  border: 1px solid rgba(76,72,200,0.10);
  box-shadow: 0 2px 14px rgba(15,14,36,0.04);
}
.social-pill > span {
  font-size: 13.5px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.social-pill .ico {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: white;
  transition: transform .2s var(--ease-smooth), box-shadow .2s ease;
}
.social-pill .ico.fb { background: #1877F2; }
.social-pill .ico.ig {
  background: linear-gradient(135deg, #FEDA77 0%, #F58529 25%, #DD2A7B 50%, #8134AF 75%, #515BD4 100%);
}
.social-pill .ico:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }

.filter-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid rgba(76,72,200,0.20);
  border-radius: 999px;
  color: var(--color-text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .22s var(--ease-smooth),
              color .22s var(--ease-smooth),
              border-color .22s var(--ease-smooth),
              transform .22s var(--ease-smooth);
}
.filter-pill:hover {
  border-color: var(--color-indigo);
  color: var(--color-indigo);
}
.filter-pill.active {
  background: var(--color-indigo);
  border-color: var(--color-indigo);
  color: white;
  box-shadow: 0 6px 18px rgba(76,72,200,0.28);
}
.filter-pill:active { transform: scale(0.97); }

/* Grid — 3 columnas, 4 filas con alturas variadas */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows:
    clamp(220px, 22vw, 320px)
    clamp(150px, 13.5vw, 200px)
    clamp(110px, 9.5vw, 140px)
    clamp(150px, 13vw, 200px);
  gap: 12px;
}
.gal-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e6e8f0;
  cursor: pointer;
  transition: transform .35s var(--ease-smooth), box-shadow .35s var(--ease-smooth);
  /* Used for filter transitions */
  opacity: 1;
  pointer-events: auto;
}
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease-smooth), filter .35s ease;
}
.gal-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13,11,43,0.55) 100%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.gal-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15,14,36,0.18);
}
.gal-item:hover img { transform: scale(1.06); }
.gal-item:hover::after { opacity: 1; }

.gal-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: white;
  background: rgba(76,72,200,0.85);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s var(--ease-smooth);
}
.gal-item:hover .gal-tag {
  opacity: 1;
  transform: translateY(0);
}

/* Hiding via filter */
.gal-item.is-hidden {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* ──────────────────────────────────────────
   SECCIÓN EVENTOS DESTACADOS — Dark navy
────────────────────────────────────────── */
.sec-eventos {
  position: relative;
  background: #1F2D7A;
  color: white;
  padding-block: clamp(56px, 7vw, 96px);
  padding-inline: clamp(20px, 5vw, 72px);
  overflow: hidden;
}
.sec-eventos::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  right: -200px;
  top: 200px;
  background: radial-gradient(circle, rgba(76,72,200,0.5), transparent 60%);
  pointer-events: none;
}
.sec-eventos-inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
}
.ev-hdr {
  margin-bottom: 32px;
}
.ev-hdr .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--color-lima);
  margin-bottom: 12px;
  display: block;
}
.ev-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  font-weight: 900;
  color: white;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.ev-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--color-lima);
  margin-left: 10px;
}

/* Featured event */
.ev-featured {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  padding: 16px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  margin-bottom: 18px;
  align-items: stretch;
  transition: background .3s ease, border-color .3s ease, transform .35s var(--ease-smooth);
}
.ev-featured:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}
.ev-featured-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/10.5;
  background: #0F0E24;
}
.ev-featured-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-smooth);
}
.ev-featured:hover .ev-featured-media img { transform: scale(1.04); }
.ev-featured-body {
  padding: 14px 18px 14px 4px;
  display: flex;
  flex-direction: column;
}
.ev-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.ev-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: white;
  border-radius: 6px;
}
.ev-badge.prepa     { background: var(--color-nivel-preparatoria); }
.ev-badge.pre       { background: var(--color-nivel-preescolar); }
.ev-badge.primaria  { background: var(--color-nivel-primaria); }
.ev-badge.sec       { background: var(--color-nivel-secundaria); }

.ev-date {
  font-size: 13px;
  color: rgba(255,255,255,0.68);
  font-weight: 500;
}
.ev-name {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.85vw, 1.7rem);
  font-weight: 800;
  color: white;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.ev-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin: 0 0 16px;
  max-width: 580px;
}
.ev-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(132,204,22,0.13);
  border: 1px solid rgba(132,204,22,0.3);
  color: var(--color-lima);
  border-radius: 999px;
  align-self: flex-start;
}
.ev-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-lima);
  animation: pulseDot 2s ease infinite;
}

/* Event mini-cards row */
.ev-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ev-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: background .3s ease, border-color .3s ease, transform .35s var(--ease-smooth);
}
.ev-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.20);
  transform: translateY(-5px);
}
.ev-card-media {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #0F0E24;
  margin-bottom: 14px;
}
.ev-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-smooth);
}
.ev-card:hover .ev-card-media img { transform: scale(1.04); }
.ev-card .ev-meta { margin-bottom: 8px; }
.ev-card .ev-name {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.ev-card .ev-desc { font-size: 13px; margin-bottom: 0; }

/* ──────────────────────────────────────────
   CTA — Fondo morado claro
────────────────────────────────────────── */
.sec-cta {
  position: relative;
  background: linear-gradient(135deg, #6864E8 0%, #5852D8 60%, #4844B8 100%);
  color: white;
  padding-block: clamp(56px, 7vw, 96px);
  padding-inline: clamp(20px, 5vw, 72px);
  overflow: hidden;
}
.sec-cta::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  right: -260px; bottom: -380px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
}
.sec-cta::after {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  right: -140px; bottom: -260px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.10);
}
.cta-inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.cta-title {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.1vw, 2.6rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.cta-title em {
  display: block;
  font-style: italic;
  font-weight: 300;
  color: var(--color-lima);
  margin-top: 4px;
}
.cta-lead {
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  margin: 0 0 30px;
}

/* ──────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────── */
@media (max-width: 1024px) {
  .foot-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  /* Keep red CTA visible on mobile but compact, per design */
  .nav-cta {
    font-size: 12.5px;
    padding: 9px 16px;
  }

  .ev-featured {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ev-featured-media { aspect-ratio: 16/10; }
  .ev-featured-body  { padding: 6px 6px 12px; }
}
@media (max-width: 480px) {
  .nav-inner { gap: 10px; padding-inline: 14px; }
  .nav-cta { font-size: 11.5px; padding: 8px 12px; }
  .nav-cta span { display: none; } /* hide arrow on smallest screens */
}
@media (max-width: 768px) {
  .gal-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gal-grid .gal-item { aspect-ratio: 16/10; }

  .ev-row { grid-template-columns: 1fr; }

  .gal-hdr { flex-direction: column; align-items: flex-start; }

  .foot-inner { grid-template-columns: 1fr; }
  .foot-bot { justify-content: flex-start; flex-direction: column; align-items: flex-start; }
  .foot-bot div a { margin-left: 0; margin-right: 22px; }
}

@media (max-width: 480px) {
  .nav-brand img { height: 36px; }
  .hero-title { line-height: 1.05; }
  .crumbs { font-size: 11.5px; }
  .social-pill { padding: 4px 4px 4px 16px; }
  .social-pill > span { font-size: 12px; }
  .social-pill .ico { width: 30px; height: 30px; }
}

/* ──────────────────────────────────────────
   Reduced motion
────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
