:root {
  --azul-profundo: #201a82;
  --azul-nocturno: #0d0c53;
  --amarillo-solar: #ffd019;
  --rojo-historico: #ef3f31;
  --oro: #f8b900;
  --tierra: #4b1408;
  --negro: #090909;
  --crema: #fff6cf;
  --humo: #f6f2e6;
  --blanco-calido: #fffdf4;
  --mar: #0d7b8d;
  --verde: #2d7a46;
  --texto: #141414;
  --muted: #666050;
  --linea: rgba(13, 12, 83, 0.16);
  --shadow: 0 24px 70px rgba(9, 9, 9, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--humo);
}

body {
  margin: 0;
  color: var(--texto);
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 246, 207, 0.72), transparent 520px),
    var(--humo);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

.site {
  min-height: 100vh;
}

.topline {
  display: flex;
  justify-content: center;
  padding: 8px 16px;
  color: var(--crema);
  background: var(--azul-nocturno);
  font-size: 13px;
  font-weight: 800;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(13, 12, 83, 0.12);
  background: rgba(255, 253, 244, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 42px);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}

.brand img {
  width: 68px;
  height: auto;
  display: block;
}

.brand strong {
  display: block;
  color: var(--azul-nocturno);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.nav a {
  min-height: 38px;
  border-radius: 999px;
  padding: 10px 12px;
  color: var(--azul-nocturno);
  font-size: 14px;
  font-weight: 800;
}

.nav a:hover,
.nav a.active {
  color: white;
  background: var(--azul-profundo);
}

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

.btn {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  background: var(--azul-profundo);
  box-shadow: 0 12px 26px rgba(32, 26, 130, 0.18);
  font-weight: 900;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.secondary {
  color: var(--azul-nocturno);
  background: var(--blanco-calido);
  border: 1px solid var(--linea);
  box-shadow: none;
}

.btn.red {
  background: var(--rojo-historico);
}

.btn.gold {
  color: var(--azul-nocturno);
  background: var(--amarillo-solar);
}

.btn.ghost {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.menu-btn {
  display: none;
}

.hero {
  position: relative;
  min-height: clamp(600px, 86vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(9, 9, 9, 0.86), rgba(13, 12, 83, 0.68) 48%, rgba(9, 9, 9, 0.28)),
    url("../Elementos.png") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 0%, rgba(13, 12, 83, 0.34) 45%, rgba(9, 9, 9, 0.88) 100%),
    radial-gradient(circle at 78% 20%, rgba(255, 208, 25, 0.22), transparent 24rem);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 88px;
  height: 12px;
  background: linear-gradient(90deg, transparent 0%, var(--amarillo-solar) 20%, var(--oro) 66%, transparent 100%);
  opacity: 0.92;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(58px, 8vw, 112px) clamp(18px, 5vw, 70px) 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(28px, 5vw, 70px);
  align-items: end;
}

.hero-copy {
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amarillo-solar);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 920px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 7vw, 98px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(13, 12, 83, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 96px;
  height: auto;
  display: block;
  margin-bottom: 12px;
}

.hero-panel h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.hero-panel ul,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-panel li,
.plain-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-panel li:last-child,
.plain-list li:last-child {
  border-bottom: 0;
}

.section {
  padding: clamp(52px, 8vw, 92px) clamp(18px, 5vw, 70px);
}

.section.alt {
  background: var(--blanco-calido);
}

.section.dark {
  color: white;
  background:
    linear-gradient(135deg, var(--azul-nocturno), var(--azul-profundo));
}

.wrap {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  max-width: 760px;
  color: var(--azul-nocturno);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1;
}

.dark .section-head h2 {
  color: white;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dark .section-head p {
  color: rgba(255, 255, 255, 0.74);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card,
.feature,
.event,
.news,
.rule,
.contact-card,
.cms-panel {
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  background: rgba(255, 253, 244, 0.92);
  box-shadow: 0 14px 34px rgba(13, 12, 83, 0.07);
}

.card,
.feature,
.event,
.news,
.rule,
.contact-card {
  padding: 18px;
}

.dark .card,
.dark .feature {
  border-color: rgba(255, 255, 255, 0.16);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.feature h3,
.card h3,
.event h3,
.news h3,
.rule h3,
.contact-card h3,
.cms-panel h2 {
  margin: 0 0 10px;
  color: var(--azul-nocturno);
  font-size: 20px;
}

.dark .feature h3,
.dark .card h3 {
  color: white;
}

.feature p,
.card p,
.event p,
.news p,
.rule p,
.contact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dark .feature p,
.dark .card p {
  color: rgba(255, 255, 255, 0.74);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.stat {
  min-height: 120px;
  border-left: 5px solid var(--amarillo-solar);
  border-radius: var(--radius);
  padding: 18px;
  color: white;
  background: var(--azul-nocturno);
}

.stat strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.image-band {
  min-height: 100%;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(13, 12, 83, 0.06), rgba(13, 12, 83, 0.24)),
    url("../diana.png") center / contain no-repeat,
    var(--crema);
  border: 1px solid var(--linea);
}

.program {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 190px;
}

.program-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--azul-nocturno);
  background: var(--amarillo-solar);
  font-size: 24px;
  font-weight: 900;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--azul-nocturno);
  background: rgba(255, 208, 25, 0.32);
  font-size: 12px;
  font-weight: 900;
}

.event {
  display: grid;
  gap: 12px;
}

.event-date {
  width: 76px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--linea);
  text-align: center;
}

.event-date span {
  display: block;
  padding: 4px;
  color: white;
  background: var(--rojo-historico);
  font-size: 12px;
  font-weight: 900;
}

.event-date strong {
  display: block;
  padding: 9px;
  color: var(--azul-nocturno);
  background: var(--crema);
  font-size: 22px;
}

.event-top {
  display: flex;
  gap: 14px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.timeline-item {
  border-left: 5px solid var(--amarillo-solar);
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 253, 244, 0.9);
}

.timeline-item strong {
  display: block;
  color: var(--azul-nocturno);
}

.timeline-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.rule {
  border-top: 5px solid var(--azul-profundo);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1.28fr);
  gap: 18px;
}

.map-panel {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(13, 12, 83, 0.88), rgba(15, 123, 141, 0.7)),
    url("../Elementos.png") center / cover no-repeat;
  color: white;
}

.map-panel::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 28%;
  height: 10px;
  background: var(--amarillo-solar);
  transform: rotate(-4deg);
}

.map-content {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.map-content h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
}

.footer {
  padding: 36px clamp(18px, 5vw, 70px);
  color: white;
  background: var(--negro);
}

.footer-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.footer img {
  width: 76px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  background: var(--blanco-calido);
  color: var(--texto);
  outline: none;
  padding: 12px;
}

.textarea {
  min-height: 112px;
  resize: vertical;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.field span {
  color: var(--azul-nocturno);
  font-size: 13px;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.full {
  grid-column: 1 / -1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 9, 9, 0.62);
}

.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--humo);
  box-shadow: var(--shadow);
}

.modal.wide {
  width: min(1080px, 100%);
}

body.event-modal-open { overflow: hidden; }

.event-dialog { width: min(680px, 100%); }
.event-dialog .modal-head { align-items: flex-start; }
.event-dialog .modal-head h2 { font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.event-dialog .eyebrow { color: var(--rojo-historico); }
.event-dialog .close { flex: 0 0 40px; }
.event-image-trigger { border: 0; padding: 0; cursor: zoom-in; border-radius: 4px; }
.event-image-trigger:focus-visible { outline: 3px solid var(--rojo-historico); outline-offset: 3px; }
.event-poster { display: block; width: 100%; background: #f0f1f2; padding: 12px; }
.event-poster img { display: block; width: 100%; height: 240px; object-fit: contain; }
.event-image-dialog { width: min(1100px, 100%); overflow: hidden; display: flex; flex-direction: column; }
.event-image-dialog .modal-head { flex: 0 0 auto; }
.event-image-view { min-height: 0; overflow: auto; background: #f0f1f2; overscroll-behavior: contain; }
.event-image-view img { display: block; width: 100%; min-width: 720px; height: auto; }
.event-announcement-text { padding: 0 18px; line-height: 1.5; }
.event-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; position: sticky; bottom: 0; padding: 16px 18px; background: var(--humo); border-top: 1px solid var(--linea); }
.event-consent { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; font-size: 14px; line-height: 1.4; }
.event-consent input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }
.event-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.event-form-error { color: #b32922; font-size: 14px; line-height: 1.4; }
.event-card-image { display: block; width: 100%; height: 150px; margin-bottom: 14px; background: #f0f1f2; }
.event-card-image img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 600px) {
  .event-dialog .modal-head h2 { font-size: 21px; }
  .event-poster img { height: 190px; }
  .event-dialog-actions { justify-content: stretch; }
  .event-dialog-actions .btn { flex: 1; }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--linea);
}

.modal-head h2 {
  margin: 0;
  color: var(--azul-nocturno);
  font-family: Georgia, "Times New Roman", serif;
}

.modal-body {
  padding: 18px;
}

.close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  background: var(--blanco-calido);
  color: var(--azul-nocturno);
  font-size: 23px;
}

.cms-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.cms-tab {
  min-height: 36px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--azul-nocturno);
  background: var(--blanco-calido);
  font-weight: 900;
}

.cms-tab.active {
  color: white;
  border-color: var(--azul-profundo);
  background: var(--azul-profundo);
}

.cms-panel {
  padding: 16px;
}

.private-note {
  margin: 12px 0 0;
  padding: 12px;
  border-left: 5px solid var(--rojo-historico);
  border-radius: var(--radius);
  background: rgba(239, 63, 49, 0.08);
  color: var(--muted);
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  width: min(380px, calc(100vw - 36px));
  border-left: 5px solid var(--amarillo-solar);
  border-radius: var(--radius);
  padding: 13px 14px;
  background: var(--blanco-calido);
  box-shadow: var(--shadow);
}

.toast strong {
  display: block;
  color: var(--azul-nocturno);
}

.toast span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 98px;
    display: none;
    padding: 10px;
    border: 1px solid var(--linea);
    border-radius: var(--radius);
    background: var(--blanco-calido);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-btn {
    display: inline-flex;
  }

  .brand {
    flex: 1;
  }

  .hero-inner,
  .grid-2,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topline {
    text-align: center;
  }

  .nav-shell {
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 58px;
  }

  .actions {
    width: 100%;
  }

  .actions .btn {
    flex: 1;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 44px;
  }

  .hero-panel {
    margin-bottom: 22px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 12px;
  }

  .grid-3,
  .grid-4,
  .stat-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .program {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: grid;
  }
}
.gallery-section { background: #f3f5f5; }
.contact-grid > * { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 1121px) and (max-width: 1279px) {
  .nav { position: fixed; left: 16px; right: 16px; top: 98px; display: none; padding: 10px; border: 1px solid var(--linea); border-radius: var(--radius); background: var(--blanco-calido); box-shadow: var(--shadow); }
  .nav.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-btn { display: inline-flex; }
  .brand { flex: 1; }
}
.gallery-event-filter { display: grid; gap: 6px; min-width: 200px; max-width: 100%; font-size: 14px; }
.gallery-event-filter select { padding: 10px 12px; border: 1px solid #cad0d1; border-radius: 4px; background: white; color: #253334; max-width: 100%; }
.public-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.public-gallery-grid figure { margin: 0; min-width: 0; }
.gallery-image-button { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: #dfe5e3; cursor: zoom-in; }
.gallery-image-button img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery-image-button:hover img { transform: scale(1.03); }
.public-gallery-grid figcaption { display: grid; gap: 5px; padding-top: 12px; overflow-wrap: anywhere; }
.public-gallery-grid figcaption span { font-size: 14px; color: #586263; }
.gallery-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 24px 0; }
.gallery-lightbox { width: min(1100px, 100%); display: flex; flex-direction: column; overflow: hidden; }
.gallery-lightbox h2 { font-size: 20px; overflow-wrap: anywhere; }
.gallery-lightbox-image { min-height: 0; overflow: auto; background: #181d1b; display: grid; place-items: center; }
.gallery-lightbox-image img { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; object-fit: contain; }
.gallery-lightbox-footer { display: flex; align-items: center; gap: 15px; padding: 14px; }
.gallery-lightbox-footer p { flex: 1; margin: 0; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 900px) { .public-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .public-gallery-grid { grid-template-columns: 1fr; gap: 20px; } .gallery-event-filter { width: 100%; } .gallery-section .section-head { display: grid; gap: 18px; } .gallery-lightbox-footer { gap: 8px; } }
