/* =====================================================
   Federación Nacional de Caza y Pesca de Chile Sur
   Paleta basada en el logo institucional
   ===================================================== */
:root {
  /* Paleta "sur": bosque nativo, atardecer en el lago, araucarias */
  --azul: #2f5d3f;
  --azul-oscuro: #1f3e2a;
  --azul-noche: #15271a;
  --rojo: #c1652f;
  --rojo-oscuro: #9c4e22;
  --dorado: #a9842f;
  --dorado-claro: #e8c877;
  --terracota-claro: #f0a569;
  --error: #b3261e;
  --crema: #f6f1e4;
  --blanco: #ffffff;
  --tinta: #1c251d;
  --gris: #5c6457;
  --borde: #e4ded0;
  --sombra: 0 10px 30px rgba(20, 30, 20, .10);
  --radio: 14px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  color: var(--tinta);
  background: var(--blanco);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--azul); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; }

.container { width: min(1160px, 92%); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13,23,48,.18); }
.btn-primary { background: var(--rojo); color: #fff; }
.btn-primary:hover { background: var(--rojo-oscuro); }
.btn-ghost { border-color: var(--azul); color: var(--azul); }
.btn-ghost:hover { background: #eef3fc; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--azul-noche);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 54px; height: 54px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: .8rem; letter-spacing: .02em; color: #fff; white-space: nowrap; }
.brand-text em { font-style: normal; font-weight: 700; letter-spacing: .22em; font-size: .8rem; color: var(--terracota-claro); }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  color: #f0f2ec;
}
.main-nav a:hover { background: rgba(255,255,255,.1); color: var(--terracota-claro); }
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--azul-oscuro);
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, transform .12s;
  white-space: nowrap;
}
.btn-login:hover { background: var(--crema); transform: translateY(-1px); }
.btn-login .btn-login-avatar { font-size: 1rem; }
.btn-login.sesion-activa { background: var(--terracota-claro); color: var(--azul-noche); }
.btn-login.sesion-activa:hover { background: var(--rojo); color: #fff; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span { width: 26px; height: 3px; background: #fff; border-radius: 2px; transition: .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(640px, 86vh);
  display: flex;
  align-items: center;
  color: #fff;
  text-align: left;
  padding: 120px 0 72px;
}
.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(100deg, rgba(15,26,18,.92) 8%, rgba(15,26,18,.62) 48%, rgba(15,26,18,.22) 82%);
}
.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--dorado-claro);
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); color: #fff; }
.hero h1 span { color: var(--terracota-claro); }
.hero-sub {
  max-width: 560px;
  margin: 18px 0 30px;
  font-size: 1.08rem;
  color: #dde6dc;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { border-color: #fff; color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.14); }

/* ---------- Secciones ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--crema); }
.section-dark { background: var(--azul-noche); color: #eef2fb; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.kicker {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .76rem;
  font-weight: 700;
  color: var(--rojo);
  margin-bottom: 8px;
}
.section-dark .kicker { color: #f0b4ad; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--azul-oscuro); }
.section-dark .section-head h2 { color: #fff; }
.section-head::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--rojo);
  margin: 16px auto 0;
  border-radius: 2px;
}
.section-desc { color: var(--gris); margin-top: 12px; }
.section-dark .section-desc { color: #b9c4dd; }

/* ---------- Grillas y tarjetas ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 26px;
  box-shadow: var(--sombra);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(13,23,48,.14); }
.card h3 { color: var(--azul-oscuro); font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--gris); font-size: .95rem; }
.card-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  background: linear-gradient(135deg, #e7f0e3, #fbe8d9);
  border-radius: 14px;
  margin-bottom: 14px;
}

/* Disciplinas: tarjeta centrada con insignia circular, como en el mockup */
.discipline-card { text-align: center; background: linear-gradient(165deg, #fff, var(--crema)); }
.discipline-card .card-icon {
  margin: 0 auto 16px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  background-image: none;
}
.discipline-card h3 { margin-bottom: 6px; }

.muted { color: var(--gris); }
.small { font-size: .85rem; }

/* ---------- Carrusel Infinite Stack ---------- */
.section-carrusel {
  background: var(--azul-noche);
  padding: 64px 0 40px;
  overflow: hidden;
}
.section-carrusel .kicker { color: var(--dorado-claro); }
.section-carrusel .section-head h2 { color: #fff; }
.section-carrusel .section-head { margin-bottom: 28px; }
.stack-zona {
  max-width: min(1040px, 94vw);
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}
.stack-mazo {
  position: relative;
  height: min(58vh, 620px);
  min-height: 380px;
  perspective: 1400px;
  touch-action: pan-y;
  cursor: grab;
}
.stack-mazo.arrastrando { cursor: grabbing; }
.stack-carta {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 94%;
  height: 96%;
  border-radius: 22px;
  overflow: hidden;
  background: var(--azul-noche);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 6px 18px rgba(0,0,0,.4);
  will-change: transform, opacity;
  transition: none;
}
.stack-carta img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.stack-carta .carta-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 48px 24px 18px;
  background: linear-gradient(180deg, transparent, rgba(13,23,48,.88));
  color: #fff;
}
.stack-carta .carta-info h3 {
  font-size: 1.25rem;
  margin-bottom: 3px;
}
.stack-carta .carta-info span {
  font-size: .85rem;
  color: #d9e2f5;
}
.stack-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
  opacity: .75;
}
.stack-btn:hover { background: rgba(255,255,255,.18); border-color: #fff; transform: scale(1.1); opacity: 1; }
.stack-controles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.stack-contador {
  color: #93a1bd;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .05em;
  min-width: 52px;
  text-align: center;
}
.stack-vacio {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  color: #b9c4dd;
  padding: 60px 20px;
  border: 2px dashed rgba(255,255,255,.2);
  border-radius: 16px;
}

/* ---------- Historia ---------- */
.history-grid { display: grid; grid-template-columns: 260px 1.15fr .85fr; gap: 30px; align-items: stretch; }
.history-media { position: relative; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); min-height: 320px; }
.history-media .history-logo { position: absolute; top: 50%; left: 50%; width: 62%; height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); pointer-events: none; }
.history-media > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.history-text p { margin-bottom: 14px; color: #2b3a2d; font-size: 1.02rem; }
.history-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-top: 4px solid var(--rojo);
  border-radius: var(--radio);
  padding: 20px;
  text-align: center;
  box-shadow: var(--sombra);
}
.stat-num { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 800; color: var(--azul); }
.stat-label { font-size: .85rem; color: var(--gris); font-weight: 600; }

/* ---------- Mapa de clubes ---------- */
.clubs-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
  align-items: stretch;
}
.clubs-panel {
  background: #fff;
  border-radius: var(--radio);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--sombra);
}
.clubs-controls { padding: 16px; border-bottom: 1px solid var(--borde); display: grid; gap: 10px; }
#clubSearch {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--borde);
  border-radius: 10px;
  font: inherit;
  outline: none;
}
#clubSearch:focus { border-color: var(--azul); }
.region-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--borde);
  background: #fff;
  color: var(--tinta);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: .15s;
}
.chip:hover { border-color: var(--azul); color: var(--azul); }
.chip.active { background: var(--azul); border-color: var(--azul); color: #fff; }

.clubs-list { list-style: none; overflow-y: auto; max-height: 520px; flex: 1; }
.clubs-list li { border-bottom: 1px solid #f0ede4; }
.club-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  padding: 13px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background .12s;
}
.club-item:hover, .club-item.active { background: #f2f6ff; }
.club-item.active { box-shadow: inset 4px 0 0 var(--rojo); }
.club-item .club-texto { display: grid; gap: 2px; min-width: 0; }
.club-item strong { font-size: .95rem; color: var(--azul-oscuro); }
.club-item .club-lugar { font-size: .82rem; color: var(--gris); }

/* Logo del club (o iniciales si no tiene) */
.club-logo {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e6e1d4;
}
.club-logo--iniciales {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.club-logo--popup { width: 64px; height: 64px; display: block; margin-bottom: 8px; }
.clubs-count { padding: 10px 16px; font-size: .82rem; color: var(--gris); border-top: 1px solid var(--borde); }

.map-wrap { min-height: 560px; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
#clubMap { width: 100%; height: 100%; min-height: 560px; background: #dfe8f2; }

/* Marcador personalizado */
.club-marker {
  background: #fff;
  border: 3px solid var(--azul);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(13,23,48,.4);
  transition: transform .12s;
}
.club-marker::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--rojo);
}
.club-marker:hover { transform: scale(1.25); }

/* Popup del club */
.leaflet-popup-content-wrapper { border-radius: 12px; }
.club-popup { min-width: 250px; }
.club-popup h4 { font-family: var(--serif); color: var(--azul-oscuro); font-size: 1.02rem; margin-bottom: 4px; padding-right: 18px; }
.club-popup .popup-place { color: var(--rojo); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.club-popup dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: .88rem; }
.club-popup dt { font-weight: 700; color: var(--gris); }
.club-popup dd { word-break: break-word; }
.club-popup dd a { color: var(--azul); }
.club-popup .popup-actions { margin-top: 12px; }
.club-popup .popup-actions a {
  display: inline-block;
  background: var(--rojo);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
}
.club-popup .popup-actions a:hover { background: var(--rojo-oscuro); }

/* ---------- Agenda, documentos y trámites: panel de 4 columnas ---------- */
.quick-grid { display: grid; grid-template-columns: 1fr 1.7fr 1fr; gap: 24px; align-items: stretch; margin-top: 28px; }
.quick-grid > .quick-panel { min-width: 0; }
.quick-panel {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 22px;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quick-panel h3 { color: var(--azul-oscuro); font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.quick-desc { color: var(--gris); font-size: .86rem; }
.quick-btn { align-self: flex-start; margin-top: 10px; }
.afiliaciones-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-afiliacion { background: var(--crema); border: 1px solid var(--borde); color: var(--azul-oscuro); font-weight: 700; font-size: .76rem; padding: 6px 12px; border-radius: 999px; }
.quick-list { list-style: none; display: grid; gap: 4px; }
.quick-list a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; color: var(--tinta); font-weight: 600; font-size: .87rem; }
.quick-list a:hover { background: var(--crema); color: var(--rojo); }
.quick-icon { font-size: 1.05rem; }
.institutional-logos {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.institutional-logos img { height: 44px; width: auto; opacity: .8; }

/* ---------- Calendario (compacto, dentro de .quick-panel) ---------- */
.calendar-panel { padding: 30px; }
.calendar-panel h3 { font-size: 1.3rem; justify-content: center; margin-bottom: 6px; }
.calendar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.event-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--sombra);
  transition: transform .18s ease, box-shadow .18s ease;
  text-align: left;
  font: inherit;
  padding: 0;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(13,23,48,.15); }
.event-top {
  background: linear-gradient(135deg, var(--azul), var(--azul-oscuro));
  color: #fff;
  text-align: center;
  padding: 12px 10px 10px;
}
.event-top .event-month { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: #ffd9d5; }
.event-top .event-days { font-family: var(--serif); font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
.event-body { padding: 16px; }
.event-body h3 { font-size: 1rem; color: var(--azul-oscuro); margin-bottom: 8px; }
.event-place { font-size: .84rem; color: var(--gris); font-weight: 600; }
.calendar-note { margin-top: 10px; font-size: .78rem; color: var(--gris); }
#calendarGrid .event-card { display: flex; flex-direction: row; align-items: stretch; }
#calendarGrid .event-top { min-width: 92px; display: flex; flex-direction: column; justify-content: center; }
#calendarGrid .event-body { padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
#calendarGrid .event-body h3 { font-size: 1rem; margin-bottom: 0; }
#calendarGrid .muted { grid-column: 1 / -1; text-align: center; }
.calendar-panel .calendar-note { text-align: center; }

/* ---------- Documentos (compacto, dentro de .quick-panel) ---------- */
.doc-card { display: flex; align-items: center; gap: 18px; }
.doc-icon { font-size: 2.3rem; }
.doc-info { flex: 1; }
.doc-format { font-size: .78rem; color: var(--dorado); font-weight: 700; }
/* Documentos dentro del panel del socio */
.panel-doc-cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); margin: 10px 0 4px; }
.panel-doc { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--borde); }
.panel-doc:last-child { border-bottom: 0; }
.panel-doc-icono { font-size: 1.4rem; flex: 0 0 auto; }
.panel-doc-info { display: grid; gap: 1px; flex: 1; min-width: 0; }
.panel-doc-info strong { font-size: .92rem; overflow-wrap: anywhere; }
.panel-doc-btn { flex: 0 0 auto; font-size: .78rem; padding: 6px 12px; }

/* ---------- Hazte socio + Contacto: una sola sección con foto ---------- */
.socios-contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: stretch; }
/* min-width:0 evita que el <select> de clubes (nombres largos) agrande la columna */
.socios-contacto-grid > div { min-width: 0; display: flex; flex-direction: column; }
.socios-contacto-grid .section-head { text-align: left; margin: 0 0 24px; max-width: none; }
.socios-contacto-grid .section-head::after { margin: 16px 0 0; }
.socios-contacto-grid .card { flex: 1; transition: none; }
.socios-contacto-grid .card:hover { transform: none; box-shadow: var(--sombra); }
@media (min-width: 1021px) {
  /* Títulos en una fila y tarjetas en la siguiente: ambas columnas quedan alineadas */
  .socios-contacto-grid { grid-template-rows: auto 1fr; }
  .socios-contacto-grid > div { display: grid; grid-template-rows: subgrid; grid-row: span 2; }
}

/* ---------- Contacto ---------- */
.contact-card { display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--azul); }
.contact-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--azul-oscuro); }
.contact-role { color: var(--gris); font-size: .9rem; }
.contact-details { list-style: none; display: grid; gap: 6px; margin: 12px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--borde); color: var(--tinta); font-size: .93rem; }
.contact-form { display: grid; gap: 12px; flex: 1; align-content: start; }
.contact-form button, .socio-form button { justify-self: start; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1.5px solid var(--borde);
  border-radius: 10px;
  outline: none;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--azul); }
/* Texto suelto (fuera de las tarjetas blancas) sobre la foto de fondo */
.section-sur .card p.muted { color: var(--gris); }
.section-sur .card p.muted a { color: var(--rojo); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--azul-noche); color: #c6d0e4; }
.footer-mountains { position: absolute; top: 0; left: 0; width: 100%; height: auto; display: block; z-index: 0; pointer-events: none; opacity: .9; }
.footer-grid, .footer-bottom { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: clamp(120px, 14vw, 210px) 0 40px; }
.footer-logo { width: 96px; height: auto; margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; line-height: 1.5; }
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.footer-col a, .footer-col p { display: block; color: #c6d0e4; font-size: .9rem; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .82rem; text-align: center; }

/* ---------- Noticias + Galería: una sola sección en 2 columnas ---------- */
.split-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.split-grid > div { min-width: 0; }
.split-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.split-head h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--azul-oscuro); }
.split-link { font-size: .85rem; font-weight: 700; color: var(--rojo); white-space: nowrap; }
.split-link:hover { color: var(--rojo-oscuro); }

/* ---------- Noticias ---------- */
#newsGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; cursor: pointer; text-align: left; font: inherit; border: 1px solid var(--borde); background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); transition: transform .18s, box-shadow .18s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(13,23,48,.14); }
.news-img { width: 100%; height: 170px; flex-shrink: 0; background: linear-gradient(135deg, var(--azul), var(--azul-oscuro)); position: relative; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-cat { position: absolute; top: 8px; left: 8px; background: var(--rojo); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.news-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: flex-start; }
.news-body h3 { font-size: .98rem; color: var(--azul-oscuro); line-height: 1.3; }
.news-body p { display: none; }
.news-meta { font-size: .74rem; color: var(--dorado); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Galería ---------- */
#albumsGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.album-card { position: relative; border-radius: var(--radio); overflow: hidden; cursor: pointer; border: 0; padding: 0; font: inherit; text-align: left; height: 150px; background: var(--azul-noche); box-shadow: var(--sombra); }
.album-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-card:hover img { transform: scale(1.06); }
.album-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(13,23,48,.85)); display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; }
.album-overlay h3 { font-size: .9rem; color: #fff; }
.album-overlay span { font-size: .72rem; color: #d9e2f5; }
.album-badge { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); color: var(--azul-oscuro); font-weight: 700; font-size: .68rem; padding: 3px 8px; border-radius: 999px; }

/* ---------- Hazte socio: sección con foto ---------- */
.section-sur { position: relative; overflow: hidden; color: #fff; }
.section-sur .section-media { position: absolute; inset: 0; z-index: 0; }
.section-sur .section-media img { width: 100%; height: 100%; object-fit: cover; }
.section-sur .section-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,35,24,.55), rgba(14,25,16,.92));
}
.section-sur .container { position: relative; z-index: 1; }
.section-sur .kicker { color: var(--dorado-claro); }
.section-sur .section-head h2 { color: #fff; }
.section-sur .section-desc { color: #dfe6de; }

/* ---------- Socios ---------- */
.socio-form { display: grid; gap: 12px; align-content: start; }
.socio-form h3 { color: var(--azul-oscuro); margin-bottom: 6px; }
.socio-form label { display: grid; gap: 5px; font-weight: 600; font-size: .88rem; }
.socio-form input, .socio-form select, .socio-form textarea { font: inherit; padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 10px; outline: none; }
.socio-form input:focus, .socio-form select:focus, .socio-form textarea:focus { border-color: var(--azul); }
.socio-form input, .socio-form select, .socio-form textarea { width: 100%; max-width: 100%; }
#socioFormMsg.ok, #contactFormMsg.ok { color: #1d7a4f; font-weight: 600; }
#socioFormMsg.err, #contactFormMsg.err { color: var(--error); font-weight: 600; }
.cuotas-mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0; }
.cuotas-mini span { display: grid; place-items: center; padding: 7px 0; border-radius: 8px; font-size: .72rem; font-weight: 700; background: #f2f0e9; color: var(--gris); }
.cuotas-mini span.pagado { background: #e2f3ea; color: #177a4c; }

/* ---------- Modal login y panel ---------- */
.modal-card.wide { max-width: 660px; max-height: 86vh; overflow-y: auto; }
.modal-form { display: grid; gap: 12px; margin-top: 14px; }
.modal-form label { display: grid; gap: 5px; font-weight: 600; font-size: .88rem; }
.modal-form input { font: inherit; padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 10px; outline: none; }
.modal-form input:focus { border-color: var(--azul); }
#headerLoginMsg.err { color: var(--error); font-weight: 600; }
#headerLoginMsg.ok { color: #1d7a4f; font-weight: 600; }

.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.panel-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul), var(--azul-oscuro));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 800;
}
.panel-head h3 { color: var(--azul-oscuro); margin-bottom: 2px; }
.panel-head .rol-chip {
  display: inline-block;
  background: #eef3fc;
  color: var(--azul);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 999px;
}
.panel-section { border-top: 1px solid var(--borde); padding-top: 16px; margin-top: 16px; }
.panel-section h4 { color: var(--azul-oscuro); margin-bottom: 8px; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn-admin {
  background: var(--azul-noche);
  color: #fff;
}
.btn-admin:hover { background: #1a2440; }

.panel-vot { border: 1.5px solid var(--borde); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.panel-vot h4 { margin-bottom: 4px; }
.panel-vot .vot-meta { font-size: .8rem; margin-bottom: 10px; }
.panel-vot .vot-opt { margin-bottom: 6px; }

/* ---------- Votaciones ---------- */
.votaciones-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.vot-card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 24px; box-shadow: var(--sombra); }
.vot-card h3 { color: var(--azul-oscuro); margin-bottom: 4px; }
.vot-meta { font-size: .82rem; color: var(--gris); margin-bottom: 14px; }
.vot-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.vot-opt:hover { border-color: var(--azul); }
.vot-opt.votado { border-color: var(--azul); background: #f2f6ff; }
.vot-opt input { accent-color: var(--azul); }
.vot-bar { height: 8px; border-radius: 999px; background: #eef0f5; overflow: hidden; margin-top: 4px; }
.vot-bar i { display: block; height: 100%; background: var(--azul); border-radius: 999px; }
.vot-opt .pct { margin-left: auto; font-weight: 700; font-size: .85rem; color: var(--azul); }
.vot-estado { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.vot-estado.activa { background: #e2f3ea; color: #177a4c; }
.vot-estado.cerrada { background: #f6e0de; color: var(--rojo-oscuro); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13,23,48,.6); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  background: #fff;
  border-radius: var(--radio);
  max-width: 460px;
  width: 92%;
  padding: 34px;
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
}
.modal-card h3 { color: var(--azul-oscuro); font-size: 1.4rem; margin-bottom: 6px; }
.modal-card .chip { margin-bottom: 14px; }
.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: 0;
  font-size: 2rem;
  line-height: 1;
  color: var(--gris);
  cursor: pointer;
}
.modal-close:hover { color: var(--rojo); }

/* ---------- Admin embebido (ruta #/admin) ---------- */
#adminRoot { display: none; position: fixed; inset: 0; z-index: 1500; background: #f4f6f9; }
#adminRoot.activo { display: block; }
#adminRoot iframe { width: 100%; height: 100%; border: 0; display: block; }
body.modo-admin > *:not(#adminRoot) { display: none !important; }
body.modo-admin { background: #f4f6f9; }

/* ---------- Leaflet popup helpers ---------- */
.leaflet-popup-content { margin: 14px 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: 1fr; }
  .calendar-grid { grid-template-columns: repeat(2, 1fr); }
  #newsGrid { grid-template-columns: repeat(2, 1fr); }
  .clubs-layout { grid-template-columns: 1fr; }
  .map-wrap, #clubMap { min-height: 440px; }
  .clubs-list { max-height: 300px; }
  .history-grid { grid-template-columns: 1fr; }
  .history-media { min-height: 220px; }
  .split-grid { grid-template-columns: 1fr; }
  .socios-contacto-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 5%;
    border-bottom: 3px solid var(--rojo);
    box-shadow: 0 18px 30px rgba(13,23,48,.12);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; border-bottom: 1px solid #f2efe7; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 100px 0 56px; text-align: left; }
  .hero-inner { max-width: 100%; }
  .section { padding: 56px 0; }
  .doc-card { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .calendar-grid, #newsGrid, #docsGrid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  #albumsGrid { grid-template-columns: 1fr; }
  .brand-text strong { font-size: .85rem; }
  .brand-text em { font-size: .68rem; }
  .btn-login .btn-login-text { display: none; }
  .btn-login { padding: 8px 12px; }
}
.stack-controles[hidden] { display: none; }
.section-sur .card { color: var(--tinta); }
/* La tarjeta de postulación absorbe la altura sobrante con el campo Mensaje */
.socio-form { display: flex; flex-direction: column; }
.socio-form label:has(textarea) { flex: 1; grid-template-rows: auto 1fr; }
.socio-form textarea { min-height: 80px; resize: vertical; }
.socio-form button { align-self: flex-start; }
