/* === Layout app-shell === */

body.has-bottombar {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

body.has-bottombar .footer.slim {
  margin-bottom: 0;
}

/* Topbar slim — solo logo + título de la página */
.topbar.slim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem clamp(0.9rem, 4vw, 1.6rem);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 239, 217, 0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar.slim nav { display: none; }

.topbar.slim .mark {
  gap: 0.6rem;
  text-decoration: none;
  font: 800 0.78rem/1.1 Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.topbar.slim .mark img { width: 2rem; height: 2rem; flex-shrink: 0; }
.topbar.slim .mark span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.back-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
  color: var(--ink);
  text-decoration: none;
  font: 800 1.2rem/1 Arial, sans-serif;
  border-radius: 50%;
}

/* Bottom navigation — app style */
.bottombar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(33, 25, 16, 0.96);
  border-top: 2px solid var(--gold);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 20px rgba(33, 25, 16, 0.32);
}

.bn-item {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 0.55rem 0.2rem 0.6rem;
  background: transparent;
  border: 0;
  color: var(--paper-light);
  text-decoration: none;
  font: 800 0.62rem/1 Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
}

.bn-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--red);
}

.bn-emoji {
  font-size: 1.4rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
  filter: saturate(0.92);
}

.bn-item.active .bn-label { color: var(--paper-light); }
.bn-item:not(.active) .bn-label { color: rgba(248, 239, 217, 0.66); }

/* Sheet (overlay del botón Más) */
.bn-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(33, 25, 16, 0.66);
  display: grid;
  align-items: end;
}

.bn-sheet[hidden] { display: none; }

.bn-sheet-card {
  background: var(--paper-light);
  border-top: 4px solid var(--ink);
  padding: 0.6rem 0.6rem calc(0.6rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.32);
  display: grid;
  gap: 0.3rem;
}

.bn-sheet-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  font: 800 0.86rem/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bn-sheet-item span { font-size: 1.4rem; }

.bn-sheet-close {
  margin-top: 0.4rem;
  padding: 0.85rem;
  background: var(--ink);
  color: var(--paper-light);
  border: 0;
  font: 900 0.78rem/1 Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* === FAB de contacto: WhatsApp + Teléfono === */
.contact-fab {
  position: fixed;
  right: clamp(0.8rem, 2vw, 1.6rem);
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 35;
  display: inline-flex;
  align-items: center;
  background: var(--paper-light);
  border: 1px solid var(--ink);
  box-shadow:
    0 8px 18px rgba(33, 25, 16, 0.28),
    0 2px 6px rgba(33, 25, 16, 0.18);
  font-family: Arial, sans-serif;
  overflow: visible;
  transform: rotate(-1deg);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.contact-fab:hover { transform: rotate(0deg) translateY(-2px); }

/* En páginas con bottombar el FAB se eleva sobre la barra */
body.has-bottombar .contact-fab {
  bottom: calc(86px + env(safe-area-inset-bottom));
}
@media (min-width: 1100px) {
  body.has-bottombar .contact-fab {
    bottom: calc(110px + env(safe-area-inset-bottom));
  }
}

.contact-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.85rem;
  text-decoration: none;
  color: var(--ink);
  font: 800 0.78rem/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--paper-light);
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.contact-fab-btn:hover { background: var(--paper); }
.contact-fab-btn.whatsapp:hover { color: #128c7e; }
.contact-fab-btn.phone:hover { color: var(--blue); }

.contact-fab-emoji {
  font-size: 1.15rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
  filter: saturate(0.92);
}

.contact-fab-sep {
  width: 1px;
  align-self: stretch;
  margin: 0.2rem 0;
  background: var(--line);
}

.contact-fab-hours {
  position: absolute;
  bottom: -1.45rem;
  right: 0;
  font: 800 0.62rem/1 Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.2rem 0.4rem;
  background: rgba(248, 239, 217, 0.85);
  border: 1px solid var(--line);
  pointer-events: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

/* Estado "cerrado" fuera de horario */
.contact-fab.is-closed {
  opacity: 0.85;
}
.contact-fab.is-closed .contact-fab-btn {
  cursor: not-allowed;
  color: rgba(33, 25, 16, 0.45);
  background: rgba(214, 193, 156, 0.45);
}
.contact-fab.is-closed .contact-fab-btn:hover { color: rgba(33, 25, 16, 0.45); }
.contact-fab.is-closed .contact-fab-emoji { filter: grayscale(0.85); }
.contact-fab.is-closed .contact-fab-hours {
  background: var(--red);
  color: var(--paper-light);
  border-color: var(--red);
}
.contact-fab-hours.flash {
  animation: fab-flash 0.6s ease 3;
  transform: scale(1.06);
}
@keyframes fab-flash {
  0%, 100% { background: var(--red); }
  50% { background: var(--ink); }
}

/* Móvil: simplificar */
@media (max-width: 680px) {
  .contact-fab { transform: rotate(-2deg); }
  .contact-fab-btn { padding: 0.55rem 0.7rem; }
  .contact-fab-label { display: none; }
  .contact-fab-emoji { font-size: 1.4rem; }
  .contact-fab-hours { font-size: 0.55rem; padding: 0.18rem 0.32rem; }
}

/* Banner de "vista previa" sobre la home cuando se accede a /preview */
.preview-banner {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--gold);
  color: var(--ink);
  padding: 0.65rem 1rem;
  font: 700 0.86rem/1.4 Arial, sans-serif;
  text-align: center;
  border-bottom: 1px solid rgba(33, 25, 16, 0.25);
  box-shadow: 0 2px 6px rgba(33, 25, 16, 0.15);
}
.preview-banner strong {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-right: 0.4rem;
}
.preview-banner .inline-link {
  margin-left: 0.4rem;
  color: var(--ink);
  text-decoration: underline;
}

/* === Modo mantenimiento === */
body.maintenance-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
body.maintenance-page::before { display: none; }

.maintenance-card {
  position: relative;
  max-width: 38rem;
  width: 100%;
  background: var(--paper-light);
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1.2rem, 4vw, 2.4rem) clamp(1.6rem, 4vw, 2.6rem);
  box-shadow: 14px 14px 0 rgba(33, 25, 16, 0.16);
  display: grid;
  gap: 1rem;
  text-align: left;
}

.maintenance-card .crest-photo {
  margin: 0 auto;
  max-width: 13rem;
  transform: rotate(-2deg);
}

.maintenance-stamp {
  position: absolute;
  top: 1.4rem;
  right: 0;
  transform: rotate(8deg);
  padding: 0.45rem 1.2rem;
  border: 3px double var(--red);
  color: var(--red);
  background: rgba(200, 32, 24, 0.05);
  font: 900 0.95rem/1 Arial, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
}

.maintenance-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.05;
}

.maintenance-card p {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.55;
}

.maintenance-card p.muted {
  color: var(--ink-soft);
  font-size: 0.94rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.9rem;
}

.maintenance-card a {
  color: var(--red);
  font-weight: 700;
}

/* Escudo en hero: sin cinta adhesiva y fondo claro para que respire el azul del club */
.crest-photo::before { display: none !important; }

.crest-photo img {
  background:
    linear-gradient(90deg, rgba(33, 25, 16, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(33, 25, 16, 0.06) 1px, transparent 1px),
    var(--paper) !important;
  background-size: 38px 38px, 38px 38px, auto !important;
  padding: 1.5rem !important;
}

/* Hero (clasico, con escudo tipo foto pegada) — sobreescribe lo de styles.css */
.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 22rem);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 5rem);
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 6vw, 4rem) clamp(1.2rem, 4vw, 2.5rem);
}

.hero h1 {
  font-size: clamp(3.4rem, 13vw, 9rem);
  line-height: 0.86;
}

.hero-copy p:not(.overline) {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  margin: 1rem 0 0;
  max-width: 36rem;
}

/* Hero compact (alias por si lo siguen usando otras vistas) */
.hero.compact { padding-bottom: 1rem; }
.hero.compact h1 { font-size: clamp(3rem, 12vw, 7rem); }

/* Sección "Sobre el club" */
.section-about .about-lead {
  margin: 0 0 1.4rem;
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  max-width: 64ch;
  color: var(--ink);
}

.section-about .about-lead strong { color: var(--red); }

.section-about .about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.8rem;
  margin: 0 0 1.6rem;
}

.section-about .about-features article {
  border: 1px solid var(--line);
  background: rgba(248, 239, 217, 0.78);
  padding: 0.95rem 1rem 1.1rem;
  box-shadow: 4px 4px 0 rgba(33, 25, 16, 0.06);
}

.section-about .about-features h3 {
  margin: 0 0 0.45rem;
  font: 900 0.74rem/1 Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.section-about .about-features p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--ink);
}

.section-about .about-features a {
  color: var(--red);
  font-weight: 700;
}

.section-about .about-coda {
  margin: 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--red);
  background: rgba(200, 32, 24, 0.06);
  font-style: italic;
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 64ch;
}

/* Patrocinadores grandes en home */
.sponsors-strip.big {
  padding: 1.4rem;
  gap: 1.6rem;
}

.sponsors-strip.big li { font-size: 0.9rem; }
.sponsors-strip.big img { max-height: 56px; padding: 0.4rem 0.6rem; }

/* === Footer sitemap === */
.footer.sitemap {
  display: grid;
  gap: 1.4rem;
  padding: 2rem clamp(1rem, 5vw, 3rem) 2.4rem;
  background: var(--ink);
  color: var(--paper-light);
  margin-bottom: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(248, 239, 217, 0.18);
}

.footer-brand img {
  width: 3rem;
  height: 3rem;
  background: var(--paper-light);
  padding: 0.25rem;
}

.footer-brand strong {
  display: block;
  font: 800 1rem/1.2 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-brand span {
  display: block;
  color: rgba(248, 239, 217, 0.6);
  font-size: 0.84rem;
  margin-top: 0.2rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.6rem;
}

.footer-col h3 {
  margin: 0 0 0.7rem;
  font: 900 0.74rem/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-col a {
  display: block;
  margin: 0.35rem 0;
  color: var(--paper-light);
  text-decoration: none;
  font: 700 0.92rem/1.3 Georgia, serif;
}

.footer-col a:hover { color: var(--red); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(248, 239, 217, 0.18);
  padding-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

.footer-bottom .footnote {
  margin: 0;
  color: rgba(248, 239, 217, 0.6);
  font-size: 0.78rem;
}

.footer-bottom a { color: var(--gold); }

.archives-heading.compact {
  display: block;
  margin-bottom: 1rem;
}

.archives-heading.compact h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1;
}

.archives-heading.compact p {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
}

/* === Home con secciones resumidas === */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1;
}

.section-cta {
  color: var(--red);
  text-decoration: none;
  font: 900 0.74rem/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
  white-space: nowrap;
}

.section-cta:hover { background: var(--ink); color: var(--paper-light); border-color: var(--ink); }

/* Resumen de equipos en home */
.team-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.8rem;
}

.team-summary {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(248, 239, 217, 0.84);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(33, 25, 16, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.team-summary:hover {
  transform: translateY(-2px);
  box-shadow: 7px 7px 0 rgba(200, 32, 24, 0.14);
}

.team-summary .team-emoji {
  font-size: 1.6rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
}

.team-summary strong {
  font: 800 0.94rem/1.2 Arial, sans-serif;
  letter-spacing: 0.02em;
  max-width: 22ch;
}

.team-summary em {
  color: var(--ink-soft);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
}

.team-summary .team-pos { color: var(--red); }

.team-last-result {
  display: block;
  margin-top: 0.2rem;
  font: 700 0.86rem/1.2 Georgia, serif;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 0.4rem;
}

.team-last-result .vs {
  display: inline-block;
  margin: 0 0.2rem;
  padding: 0 0.4rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* Versión condensada del archive-index para teasers en home */
.archive-index.condensed {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.7rem;
}

.archive-index.condensed .archive-link {
  min-height: 11rem;
}

.archive-index.condensed .archive-link.is-featured {
  grid-column: 1 / -1;
  min-height: 12rem;
}

/* Contacto resumido en home */
.home-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.6rem;
  background: var(--paper-light);
  border: 1px solid var(--line);
  padding: 1rem;
  box-shadow: 4px 4px 0 rgba(33, 25, 16, 0.06);
}

.home-contact a,
.home-contact span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 700 0.94rem/1 Arial, sans-serif;
  color: var(--ink);
  text-decoration: none;
}

.home-contact a { color: var(--blue); }
.home-contact span[aria-hidden="true"] { font-size: 1.2rem; }

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.team-card {
  display: grid;
  gap: 0.5rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(248, 239, 217, 0.84);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(33, 25, 16, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
  position: relative;
  min-height: 9rem;
}

.team-card:hover { transform: translateY(-3px); box-shadow: 8px 8px 0 rgba(200, 32, 24, 0.16); }

.team-emoji {
  font-size: 2.2rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
}

.team-card strong {
  font: 800 1.05rem/1.2 Arial, sans-serif;
  letter-spacing: 0.02em;
  max-width: 18ch;
}

.team-card em {
  color: var(--ink-soft);
  font-style: normal;
  font-size: 0.78rem;
}

.team-cta {
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  color: var(--red);
  font: 900 0.74rem/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* === Contacto: card + mapa + formulario === */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.2rem;
  align-items: stretch;
}

.contact-card {
  background: var(--paper-light);
  border: 1px solid var(--line);
  padding: 1.4rem;
  box-shadow: 8px 8px 0 rgba(33, 25, 16, 0.07);
  display: grid;
  gap: 1rem;
  align-content: start;
}

.contact-card a.big,
.contact-card span {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-card span:last-child { border-bottom: 0; }

.contact-card a.big {
  color: var(--blue);
  text-decoration: none;
  font: 800 1.05rem/1 Arial, sans-serif;
}

.contact-card span[aria-hidden="true"] { font-size: 1.2rem; }

.map-card {
  border: 1px solid var(--line);
  background: var(--paper-light);
  box-shadow: 8px 8px 0 rgba(33, 25, 16, 0.07);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

.map-frame {
  position: relative;
  background: var(--paper-dark);
  min-height: 16rem;
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: sepia(0.18) saturate(0.78) contrast(0.94);
}

.map-actions {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem 1.1rem;
  border-top: 1px solid var(--line);
  background: rgba(248, 239, 217, 0.78);
}

.map-actions strong {
  font: 800 0.74rem/1 Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.map-actions p {
  margin: 0;
  font: 700 0.94rem/1.3 Arial, sans-serif;
  color: var(--ink);
}

.map-actions .archive-button {
  margin-top: 0.4rem;
  justify-self: start;
}

/* Formulario de contacto */
.section-form .contact-form {
  display: grid;
  gap: 0.9rem;
  background: var(--paper-light);
  border: 1px solid var(--line);
  padding: 1.2rem;
  box-shadow: 6px 6px 0 rgba(33, 25, 16, 0.06);
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  font: 800 0.74rem/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.contact-form .form-block { display: grid; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid var(--line);
  padding: 0.65rem 0.7rem;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
  border-radius: 0;
}

.contact-form textarea { font-family: Georgia, serif; line-height: 1.45; }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 0;
}

.contact-form .form-err {
  color: var(--red);
  font-style: normal;
  font-weight: 700;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.contact-form .form-disclaimer {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}

.contact-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Honeypot: invisible para humanos, accesible solo a bots */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-result {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  font: 700 0.95rem/1.4 Arial, sans-serif;
}

.form-result.ok {
  background: rgba(18, 62, 97, 0.10);
  border-color: var(--blue);
  color: var(--blue);
}

.form-result.err {
  background: rgba(200, 32, 24, 0.10);
  border-color: var(--red);
  color: var(--red);
}

.form-note {
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  background: rgba(165, 117, 50, 0.12);
  border-left: 3px solid var(--gold);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form .form-row { grid-template-columns: 1fr; }
}

/* Inline link */
.inline-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 800;
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.inline-link:hover { text-decoration: underline; }

/* Footer slim */
.footer.slim {
  padding: 1rem clamp(1rem, 5vw, 3rem) 1.6rem;
}

.footer.slim .footnote {
  margin: 0.6rem 0 0;
  color: rgba(248, 239, 217, 0.55);
  font-size: 0.78rem;
}

/* Hemeroteca por secciones */
.hemeroteca-section { margin-top: 2.2rem; }

.hemeroteca-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--line);
}

.hemeroteca-section-head em {
  color: var(--ink-soft);
  font-style: normal;
  font: 800 0.74rem/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Tablas LCFS */
.lcfs-card {
  border: 1px solid var(--line);
  background: rgba(248, 239, 217, 0.7);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 5px 5px 0 rgba(33, 25, 16, 0.06);
}

.lcfs-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font: 800 0.86rem/1.2 Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lcfs-card header time {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.lcfs-table-wrap { overflow-x: auto; }

.lcfs-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Georgia, serif;
  font-size: 0.94rem;
}

.lcfs-table th, .lcfs-table td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.lcfs-table th {
  font: 800 0.7rem/1 Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(200, 32, 24, 0.06);
}

.lcfs-table tr:nth-child(even) td { background: rgba(214, 193, 156, 0.18); }

.lcfs-table tr.is-pista td {
  background: rgba(200, 32, 24, 0.14) !important;
  font-weight: 700;
}

.lcfs-empty { margin: 0; color: var(--ink-soft); font-style: italic; }

/* Patrocinadores */
.sponsors-strip {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(248, 239, 217, 0.6);
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: center;
}

.sponsors-strip li { font: 800 0.78rem/1 Arial, sans-serif; }
.sponsors-strip a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.sponsors-strip img { max-height: 32px; background: #fff; padding: 0.25rem 0.4rem; }

.roster-list, .sponsors-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
}

.roster-list li, .sponsors-list li {
  background: #fbf4e4;
  padding: 0.8rem 0.8rem 1rem;
  box-shadow: 0 8px 18px rgba(33, 25, 16, 0.12);
}

.roster-list img, .sponsors-list img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: sepia(0.18) contrast(0.94) saturate(0.82);
  margin-bottom: 0.5rem;
}

.sponsors-list img { background: #fff; object-fit: contain; filter: none; padding: 0.5rem; }

/* Botones */
.archive-button.alt {
  background: var(--paper-light);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(33, 25, 16, 0.18);
}

.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.4rem; }

.back-link { margin-top: 1.6rem; }
.back-link a {
  color: var(--red);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

.album-card { text-decoration: none; }

/* Consentimiento PDF */
.consent-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1rem 0 2rem; }

.consent-steps {
  list-style: decimal;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.55rem;
  max-width: 60ch;
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

.consent-steps strong { color: var(--ink); }

/* Lightbox */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(33, 25, 16, 0.94);
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 1rem;
  gap: 0.6rem;
}

.lightbox[hidden] { display: none; }

.lightbox-figure {
  margin: 0;
  display: grid;
  place-items: center;
  gap: 0.8rem;
  text-align: center;
  width: 100%;
  height: 100%;
}

.lightbox-figure img {
  max-width: min(94vw, 1400px);
  max-height: 84vh;
  background: #fbf4e4;
  padding: 0.6rem 0.6rem 1.6rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-figure figcaption {
  color: var(--paper-light);
  font: 800 0.86rem/1.2 Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 60ch;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  background: rgba(248, 239, 217, 0.12);
  color: var(--paper-light);
  border: 1px solid rgba(248, 239, 217, 0.4);
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.lightbox-close { position: absolute; top: 1rem; right: 1rem; }

@media (max-width: 680px) {
  .topbar.slim { padding: 0.6rem 0.8rem; }
  .topbar.slim .mark img { width: 1.7rem; height: 1.7rem; }
  .topbar.slim .mark span { font-size: 0.72rem; }

  .hero,
  .hero.compact {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 1.2rem 1rem;
    gap: 1.6rem;
  }
  .hero h1,
  .hero.compact h1 { font-size: clamp(2.8rem, 14vw, 4.6rem); }
  .hero .crest-photo,
  .hero.compact .crest-photo {
    display: block;
    max-width: 16rem;
    margin: 0 auto;
    padding: 0.6rem 0.6rem 2rem;
    transform: rotate(-1.5deg);
  }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-col h3 { font-size: 0.7rem; }

  .section-head { align-items: flex-start; }
  .section-cta { width: 100%; text-align: center; }
  .team-summary-grid { grid-template-columns: 1fr; }
  .archive-index.condensed { grid-template-columns: 1fr; }
  .archive-index.condensed .archive-link.is-featured { grid-column: auto; }

  .lcfs-card header { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .lcfs-table { font-size: 0.84rem; }

  .bn-emoji { font-size: 1.3rem; }
  .bn-label { font-size: 0.58rem; }

  .lightbox { grid-template-columns: 1fr; }
  .lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }
  .lightbox-figure img { max-height: 70vh; }
}

/* ====================================================================
   Anchura máxima en ESCRITORIO. Va al FINAL del archivo a propósito:
   las reglas base de .topbar.slim y .bottombar deben definirse antes,
   y los overrides aquí ganan por orden de cascada.
   ==================================================================== */
@media (min-width: 1100px) {
  body > main {
    max-width: 1280px;
    margin: 0 auto;
  }

  /* Header sticky: barra full width, contenido centrado al eje 1280.
     padding vertical más generoso para que logo y título respiren dentro de la barra. */
  .topbar.slim {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    padding-left: max(1.4rem, calc((100vw - 1280px) / 2 + 1.4rem));
    padding-right: max(1.4rem, calc((100vw - 1280px) / 2 + 1.4rem));
    /* Por encima del border interior fijo del documento (body::before z-index 10) */
    z-index: 11;
    min-height: 64px;
  }

  /* Footer: mismo eje del main */
  .footer.sitemap {
    padding-left: max(1.4rem, calc((100vw - 1280px) / 2 + 1.4rem));
    padding-right: max(1.4rem, calc((100vw - 1280px) / 2 + 1.4rem));
  }

  /* Bottombar: píldora flotante centrada (sobreescribe bottom/left/right base) */
  .bottombar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 720px;
    width: calc(100% - 6rem);
    bottom: 18px;
    border-radius: 999px;
    border: 1px solid rgba(248, 239, 217, 0.22);
    box-shadow: 0 14px 32px rgba(33, 25, 16, 0.45);
    overflow: hidden;
    z-index: 30;
  }

  body.has-bottombar {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .bn-item.active::before {
    top: auto;
    bottom: 6px;
    width: 22px;
    height: 2px;
  }
}
