:root {
  --ink: #183d38;
  --deep: #10332f;
  --paper: #f4f6f1;
  --yellow: #f5c451;
  --yellow-light: #fef3c7;
  --muted: #5d6d66;
  --line: #d5ded6;
  --white: #ffffff;
  --card-bg: #ffffff;
  --shadow: 0 4px 20px rgba(24, 61, 56, 0.08);
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, serif;
  font-weight: normal;
  line-height: 1.15;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  letter-spacing: -1.5px;
  color: var(--ink);
}

h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -1px;
  color: var(--ink);
}

h3 {
  font-size: 22px;
  color: var(--deep);
}

.shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

/* Header & Brand */
.top-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brandmark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--yellow);
  font: 26px Georgia, serif;
  border-radius: 50%;
  flex: 0 0 38px;
}

.brand-text {
  min-width: 0;
  line-height: 1;
  white-space: nowrap;
}

.brand-text span {
  display: block;
  white-space: nowrap;
}

.brand-text small {
  display: none !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  flex-shrink: 0;
}

.nav-cta-short {
  display: none;
}

.nav-cta-long {
  display: inline;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: #25554d;
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
  box-shadow: 0 2px 10px rgba(245, 196, 81, 0.3);
}

.btn-gold:hover {
  background: #f3b72b;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: #eaf0e8;
}

/* Hero */
.hero {
  padding: 60px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
  padding: 48px;
  align-self: center;
}

.eyebrow {
  display: inline-block;
  max-width: 100%;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.4;
  color: #8c5d08;
  background: var(--yellow-light);
  padding: 5px 12px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.hero p.lead {
  font-size: 19px;
  margin: 20px 0 28px;
  color: #273430;
}

.vecis-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  background: #edf4e7;
  padding: 14px 18px;
  border-left: 4px solid var(--ink);
  border-radius: 4px;
  margin-bottom: 28px;
}

.vecis-badge > div {
  min-width: 0;
}

.vecis-badge span {
  font-size: 13px;
  color: var(--muted);
  display: block;
}

.vecis-badge strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
}

.hero-image {
  position: relative;
  min-width: 0;
  min-height: 480px;
  background: var(--ink);
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: calc(100% - 40px);
  background: rgba(16, 51, 47, 0.92);
  color: var(--white);
  padding: 16px 20px;
  border-left: 4px solid var(--yellow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-caption strong {
  font-family: Georgia, serif;
  font-size: 20px;
  display: block;
}

/* Quick Facts */
.facts-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fact-item {
  min-width: 0;
}

.fact-item b {
  display: block;
  font-size: clamp(22px, 2.3vw, 28px);
  line-height: 1.15;
  font-family: Georgia, serif;
  color: var(--ink);
  overflow-wrap: break-word;
}

.fact-item span {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-head h2 {
  margin-bottom: 14px;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
}

.history-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.history-card h3 {
  margin-bottom: 16px;
}

.history-card p {
  margin-bottom: 16px;
}

.history-highlight {
  margin-top: 24px;
  padding: 20px;
  background: #fdfbf7;
  border-left: 4px solid var(--yellow);
  border-radius: 4px;
  font-style: italic;
}

/* Landmarks */
.landmarks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.landmark-card {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.landmark-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(24, 61, 56, 0.12);
}

.landmark-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.landmark-card h3 {
  margin-bottom: 14px;
}

.landmark-card p {
  color: #273430;
  font-size: 16px;
  flex-grow: 1;
}

/* Gimkana */
.gimkana-callout {
  min-width: 0;
  background: linear-gradient(135deg, var(--deep) 0%, #1e4d46 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 56px 48px;
  margin: 60px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 36px;
  align-items: center;
  box-shadow: 0 10px 40px rgba(16, 51, 47, 0.25);
}

.gimkana-callout > div {
  min-width: 0;
}

.gimkana-callout h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.gimkana-callout p {
  color: #d1e2db;
  font-size: 18px;
  margin-bottom: 24px;
}

.gimkana-features {
  list-style: none;
  margin-bottom: 28px;
}

.gimkana-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #e6f0ec;
}

.gimkana-features li::before {
  content: "✓";
  flex: 0 0 auto;
  color: var(--yellow);
  font-weight: bold;
}

.gimkana-box {
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gimkana-box h3 {
  color: var(--yellow);
  margin-bottom: 12px;
  font-size: 24px;
}

.gimkana-box p {
  font-size: 15px;
  margin-bottom: 20px;
  color: #e6f0ec;
}

/* Community */
.community-section {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
  margin-bottom: 60px;
  overflow: hidden;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
  min-width: 0;
}

.community-info,
.community-card {
  min-width: 0;
}

.community-info h2 {
  margin-bottom: 16px;
}

.community-info p {
  margin-bottom: 16px;
  color: #273430;
}

.community-card {
  background: var(--paper);
  padding: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.community-card li > span:last-child {
  min-width: 0;
}

/* Footer */
.footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  margin-top: 60px;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  min-width: 0;
}

.footer-brand {
  font-weight: 700;
  color: var(--ink);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--ink);
}

/* =====================
   RESPONSIVE SYSTEM
   All overrides remain after base rules so the cascade is predictable.
   ===================== */

/* Intermediate desktop / tablet */
@media (max-width: 1080px) {
  .nav-actions {
    gap: 8px;
  }

  .nav-link,
  .nav-cta {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-copy {
    padding: 38px 32px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .hero {
    padding: 36px 0 24px;
  }

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

  .hero-copy {
    padding: 32px 24px;
  }

  .hero-image {
    min-height: 340px;
    aspect-ratio: 16 / 9;
    order: -1;
  }

  .hero p.lead {
    font-size: 17px;
  }

  .facts-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 44px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .gimkana-callout {
    grid-template-columns: 1fr;
    padding: 36px 28px;
    gap: 24px;
  }

  .community-section {
    padding: 36px 28px;
  }

  .community-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .history-card {
    padding: 28px 24px;
  }
}

/* Compact header before phone layout */
@media (max-width: 760px) {
  .nav-link {
    display: none;
  }

  .nav-cta-long {
    display: none;
  }

  .nav-cta-short {
    display: inline;
  }

  .nav-cta {
    width: auto;
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* Mobile */
@media (max-width: 640px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    font-size: 16px;
  }

  .shell {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .top-nav-inner {
    padding: 6px max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left));
    gap: 8px;
  }

  .brand {
    gap: 8px;
    font-size: 14px;
    letter-spacing: 1.2px;
  }

  .brandmark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 20px;
  }

  .brand-text small {
    display: none !important;
  }

  h1 {
    font-size: clamp(31px, 9.2vw, 43px);
    letter-spacing: -1px;
  }

  h2 {
    font-size: clamp(25px, 7.5vw, 35px);
  }

  h3 {
    font-size: 19px;
  }

  .hero {
    padding: 18px 0 14px;
  }

  .hero-grid {
    gap: 0;
  }

  .hero-copy {
    padding: 24px 16px;
  }

  .hero-copy h1 br {
    display: none;
  }

  .hero-image {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .image-caption {
    bottom: 10px;
    left: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    padding: 10px 12px;
  }

  .image-caption strong {
    font-size: 16px;
  }

  .image-caption span {
    display: block;
    font-size: 12px;
    line-height: 1.35;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.2px;
    padding: 5px 10px;
    margin-bottom: 15px;
  }

  .hero p.lead {
    font-size: 16px;
    margin: 16px 0 20px;
  }

  .vecis-badge {
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
  }

  .vecis-badge .icon {
    font-size: 22px;
    line-height: 1;
    flex: 0 0 auto;
  }

  .hero-copy .btn-gold,
  .hero-copy .btn-primary,
  .hero-copy .btn-secondary {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
  }

  .hero-copy > div[style] {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .facts-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
    margin: 16px 0;
  }

  .fact-item b {
    font-size: 21px;
  }

  .fact-item span {
    font-size: 13px;
    line-height: 1.45;
  }

  .section {
    padding: 32px 0;
  }

  .section-head {
    margin-bottom: 24px;
    text-align: left;
  }

  .section-head p {
    font-size: 16px;
  }

  .history-card {
    padding: 20px 16px;
  }

  .history-highlight {
    padding: 14px 16px;
    font-size: 15px;
  }

  .landmarks-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .landmark-card {
    padding: 20px 18px;
  }

  .landmark-card p {
    font-size: 15px;
  }

  .gimkana-callout {
    padding: 28px 16px;
    margin: 32px 0;
    border-radius: 6px;
  }

  .gimkana-callout h2 {
    font-size: clamp(24px, 7.2vw, 32px);
  }

  .gimkana-callout p {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .gimkana-features li {
    font-size: 14px;
  }

  .gimkana-callout > div:first-child > .btn-gold {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  .gimkana-box {
    padding: 20px 16px;
  }

  .gimkana-box h3 {
    font-size: 20px;
  }

  .community-section {
    padding: 20px 16px;
    margin-bottom: 32px;
  }

  .community-card {
    padding: 20px 16px;
  }

  .community-card li {
    align-items: flex-start;
  }

  .footer {
    padding-top: 28px;
    margin-top: 40px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* Narrow phones */
@media (max-width: 430px) {
  .top-nav-inner {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brandmark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 24px;
  }

  .brand-text span {
    font-size: 14px;
    letter-spacing: 1.1px;
  }

  .nav-cta {
    padding: 9px 11px;
    font-size: 12px;
  }

  .image-caption span {
    display: none;
  }

  .facts-bar {
    grid-template-columns: 1fr;
  }

  .fact-item {
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
  }

  .fact-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

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

/* Very narrow devices */
@media (max-width: 350px) {
  .shell {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .top-nav-inner {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .brandmark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .brand-text span {
    font-size: 13px;
  }

  .nav-cta {
    padding: 8px 9px;
    font-size: 11px;
  }

  h1 {
    font-size: 30px;
  }

  .hero-copy,
  .history-card,
  .community-section,
  .community-card,
  .gimkana-callout,
  .gimkana-box {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* EVENTOS Y GALERÍAS */
.hero.event-hero {
  padding-bottom: 30px;
}

.hero-copy.full-width {
  max-width: 800px;
}

.event-badge.halloween-badge {
  background: #fef3c7;
  color: #92400e;
}

.event-badge.xmas-badge {
  background: #dbeafe;
  color: #1e40af;
}

/* Botones secundarios en fondos oscuros (gimkana-callout, event-hero) */
.gimkana-callout .btn-secondary,
.halloween-callout .btn-secondary,
.xmas-callout .btn-secondary,
.event-hero .btn-secondary {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.gimkana-callout .btn-secondary:hover,
.halloween-callout .btn-secondary:hover,
.xmas-callout .btn-secondary:hover,
.event-hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.event-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(24, 61, 56, 0.12);
}

.event-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.event-tag.halloween-tag {
  background: #fef3c7;
  color: #92400e;
}

.event-tag.xmas-tag {
  background: #dbeafe;
  color: #1e40af;
}

.event-desc {
  color: var(--muted);
  font-size: 16px;
  margin: 12px 0 24px;
  line-height: 1.6;
}

.event-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.gallery-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 0;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.gallery-empty-card {
  grid-column: 1 / -1;
  background: var(--white);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

.gallery-empty-card h3 {
  margin-bottom: 8px;
}

.lightbox-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  background: rgba(0, 0, 0, 0.9);
  max-width: 95vw;
  max-height: 95vh;
}

.lightbox-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.lightbox-content {
  position: relative;
  text-align: center;
  padding: 24px;
  max-width: 1000px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  margin: 0 auto;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ffffff;
  color: #000000;
  border: none;
  font-size: 18px;
  font-weight: bold;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.lightbox-caption {
  color: #ffffff;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 500;
}

