/* =============================================================================
   DEPORTES UNSAM — Encontrá tu deporte
   styles.css · tokens, base y componentes (mobile first, ~390px)
   Las adaptaciones a desktop viven en responsive.css
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. TOKENS
   Toda la paleta pasa por acá. Cambiar estas variables cambia el sitio entero.
   Los valores de UNSAM se tomaron de la identidad implementada en unsam.edu.ar;
   ajustar cuando esté el manual de identidad oficial.
   -------------------------------------------------------------------------- */
:root {
  /* Marca UNSAM */
  --unsam-primary:       #16325C;
  --unsam-primary-dark:  #0D1F3C;
  --unsam-primary-soft:  #E7EBF2;
  --unsam-secondary:     #2C88CD;

  /* Marca Debe Haber (sólo dentro de su territorio) */
  --debe-haber-primary:   #024593;
  --debe-haber-secondary: #FEBC2D;
  --debe-haber-soft:      #FFF6E0;

  /* Superficies y texto */
  --background:    #FFFFFF;
  --surface:       #F6F5F2;
  --surface-alt:   #FBFAF8;
  --text:          #14181F;
  --text-muted:    #5A6473;
  --text-invert:   #FFFFFF;
  --border:        #DCDBD5;
  --border-strong: #14181F;
  --focus:         #2C88CD;
  --danger:        #A3231B;
  --ok:            #1F6B43;

  /* Tipografía */
  --font-display: 'Saira Condensed', 'Saira', 'Arial Narrow', system-ui, sans-serif;
  --font-body:    'Saira', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Métrica */
  --gutter: 20px;
  --radius: 2px;
  --rule: 1px solid var(--border);
  --tap: 48px;
  --header-h: 42px;          /* era 56 — fila de logos, -25% */
  --nav-h: 36px;             /* era 46 — barra de navegación, -22% */
  --logo-unsam-h: 26px;      /* era 30 */
  --logo-dh-h: 21px;         /* el lockup de Debe Haber tiene 2 líneas de texto */
  --maxw: 1200px;

  /* Movimiento */
  --t-fast: 120ms;
  --t-base: 180ms;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* -----------------------------------------------------------------------------
   2. RESET Y BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.05; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--unsam-primary); color: var(--text-invert);
  padding: 10px 14px; font-weight: 600; transition: top var(--t-fast);
}
.skip-link:focus { top: 8px; }

/* Utilitarios tipográficos --------------------------------------------------- */
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted);
}
.display {
  font-family: var(--font-display);
  font-weight: 800; text-transform: uppercase;
  letter-spacing: -.005em; line-height: .92;
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* -----------------------------------------------------------------------------
   3. HEADER + CO-BRANDING
   Ambos logos siempre visibles. Jerarquía por escala, no por ocultamiento.
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--background);
  color: var(--text);
  border-top: 3px solid var(--unsam-primary);
  border-bottom: 1px solid var(--border-strong);
}
/* En mobile el header tiene dos filas: logos arriba, navegación abajo.
   Ambas quedan fijas al scrollear, así los dos logos siempre están visibles. */
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; column-gap: 12px; row-gap: 0;
}
.brand-unsam { order: 1; height: var(--header-h); display: flex; align-items: center; }
.brand-unsam img, .brand-unsam svg { height: var(--logo-unsam-h); width: auto; }

.cobrand { order: 2; height: var(--header-h); display: flex; align-items: center; gap: 10px; }
.cobrand__divider { width: 1px; height: 22px; background: var(--border); }
.brand-dh { display: flex; align-items: center; min-height: 40px; }
.brand-dh img, .brand-dh svg { height: var(--logo-dh-h); width: auto; }

/* Navegación — sin hamburguesa, siempre a la vista ------------------------- */
.site-nav {
  order: 3; flex: 1 0 100%;
  margin-inline: calc(var(--gutter) * -1);
  border-top: 1px solid var(--border);
}
.site-nav__scroll {
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.site-nav__scroll::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: 0 0 auto; scroll-snap-align: start;
  height: var(--nav-h); display: inline-flex; align-items: center;
  padding-inline: 12px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: color var(--t-fast);
  white-space: nowrap;
}
.site-nav a:first-child { padding-left: var(--gutter); }
.site-nav a:last-child  { padding-right: var(--gutter); }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--unsam-primary); border-bottom-color: var(--unsam-primary);
}

/* Placa clara para los logos sobre fondo oscuro. Los logos entregados son
   positivos sobre claro; no se generan versiones en negativo.               */
.logo-plaque {
  display: inline-flex; align-items: center;
  background: var(--background); border-radius: var(--radius);
  padding: 7px 11px; margin-bottom: 10px;
}
.logo-plaque--unsam img { height: 26px; width: auto; }
.logo-plaque--dh img    { height: 22px; width: auto; }

/* -----------------------------------------------------------------------------
   4. HERO — ENCONTRÁ TU DEPORTE
   -------------------------------------------------------------------------- */
.hero { padding: 14px 0 6px; }
.hero__kicker { margin-bottom: 8px; }
/* En mobile el hero es una sola columna apilada; la composición de dos
   columnas es exclusiva de desktop (ver responsive.css).                   */
.hero h1, .hero__title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(38px, 11.8vw, 50px); line-height: .9;   /* ~9% menos a 390px */
  letter-spacing: -.01em; color: var(--unsam-primary);
  margin-bottom: 8px;
}
.hero__lede {
  font-size: 15.5px; color: var(--text-muted); max-width: 34ch; margin-bottom: 13px;
}

/* Buscador ------------------------------------------------------------------ */
.search {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--background);
  padding: 0 12px; height: 50px;
  transition: border-color var(--t-fast);
}
.search:focus-within { border-color: var(--unsam-secondary); }
.search__icon { flex: 0 0 auto; color: var(--text-muted); }
.search input {
  flex: 1 1 auto; min-width: 0; border: 0; background: none;
  font-family: var(--font-body); font-size: 16px; color: var(--text);
  height: 100%;
}
.search input::placeholder { color: var(--text-muted); }
.search input:focus { outline: none; }
.search__clear {
  flex: 0 0 auto; width: 32px; height: 32px; display: none;
  align-items: center; justify-content: center; color: var(--text-muted);
  border-radius: var(--radius);
}
.search--filled .search__clear { display: flex; }

/* -----------------------------------------------------------------------------
   5. FILTROS — chips
   -------------------------------------------------------------------------- */
.filters { margin-top: 12px; }
.filter-group + .filter-group { margin-top: 10px; }
.filter-group__label { display: none; }

/* Envoltorio: la máscara del borde derecho se aplica acá y sólo cuando
   realmente hay chips fuera de pantalla (clase puesta por JS).             */
.chiprow-wrap { position: relative; min-width: 0; }
.chiprow-wrap.has-more-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
}
.chiprow {
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 2px;
  scroll-snap-type: x proximity; scroll-padding-inline: 2px;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.chiprow::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto; scroll-snap-align: start;
  min-height: 40px; display: inline-flex; align-items: center; gap: 5px;
  padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--background); color: var(--text);
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.chip:hover { background: var(--unsam-primary-soft); }
.chip[aria-pressed="true"] {
  background: var(--unsam-primary); color: var(--text-invert);
  border-color: var(--unsam-primary);
}
.chip[aria-pressed="true"]:hover { background: var(--unsam-primary-dark); }
.chip__count {
  font-size: 12px; font-weight: 600; opacity: .7; font-variant-numeric: tabular-nums;
}

.filters__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 12px; border-top: var(--rule);
}
.linkbtn {
  position: relative;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--unsam-primary); border-bottom: 2px solid var(--unsam-primary);
  padding-bottom: 1px;
}
/* Amplía el área táctil a 44px sin desplazar el subrayado ni el layout. */
.linkbtn::after {
  content: ''; position: absolute; left: -4px; right: -4px;
  top: 50%; transform: translateY(-50%); height: 44px;
}
.linkbtn--quiet { color: var(--text-muted); border-bottom-color: var(--border); }
.results-count { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.results-count b { color: var(--text); font-weight: 700; }

.more-filters { display: none; margin-top: 14px; padding-top: 14px; border-top: var(--rule); }
.more-filters.is-open { display: block; }
.more-filters .filter-group__label {
  display: block; margin-bottom: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted);
}

/* Toggle escuelitas --------------------------------------------------------- */
.switch { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--unsam-primary); }
.switch span { font-size: 14px; color: var(--text); }

/* -----------------------------------------------------------------------------
   6. RESULTADOS — filas, no cards
   -------------------------------------------------------------------------- */
.results { margin-top: 14px; border-top: 2px solid var(--border-strong); }

.row-activity {
  display: block; position: relative;
  padding: 16px 30px 16px 0;
  border-bottom: var(--rule);
  transition: background var(--t-fast);
}
.row-activity:hover { background: var(--surface-alt); }
.row-activity::after {
  content: '→'; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 20px; color: var(--text-muted);
  transition: transform var(--t-fast), color var(--t-fast);
}
.row-activity:hover::after { transform: translateY(-50%) translateX(3px); color: var(--unsam-primary); }

.row-activity__top {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 2px;
}
.row-activity__disc { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.row-activity__name {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  text-transform: uppercase; line-height: 1.04; margin: 2px 0 8px;
}
.row-activity__times { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.time-line {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 15px; color: var(--text);
}
.time-line__day {
  flex: 0 0 34px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: .06em; color: var(--text-muted);
}
.time-line__hours { font-variant-numeric: tabular-nums; font-weight: 500; }
.time-line--match {
  border-left: 3px solid var(--unsam-secondary);
  padding-left: 9px; margin-left: -12px;
}
.time-line--match .time-line__day { color: var(--unsam-primary); }
.time-line--match .time-line__hours { font-weight: 700; }
.row-activity__more { font-size: 13px; color: var(--text-muted); }
.row-activity__where { font-size: 14px; color: var(--text-muted); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border: 1px solid currentColor; border-radius: var(--radius);
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.badge--virtual   { color: var(--unsam-secondary); }
.badge--escuelita { color: var(--danger); }

/* CTA del preview de resultados --------------------------------------------- */
.results-more {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 15px 0; border-bottom: var(--rule);
}
.results-more__hint { font-size: 12.5px; color: var(--text-muted); }

/* Estados vacíos ------------------------------------------------------------ */
.empty {
  padding: 32px 0; border-bottom: var(--rule);
}
.empty h3 {
  font-family: var(--font-display); font-size: 22px; text-transform: uppercase;
  margin-bottom: 8px;
}
.empty p { color: var(--text-muted); font-size: 15px; max-width: 46ch; }

/* -----------------------------------------------------------------------------
   7. SECCIONES GENÉRICAS
   -------------------------------------------------------------------------- */
/* padding-block, NO el shorthand `padding`: varias vistas usan el mismo
   elemento como `class="wrap section"`, y `padding: 40px 0` pisaba el
   padding-inline de .wrap dejando el contenido pegado al borde.            */
.section { padding-block: 40px; }
.section--tight { padding-block: 28px; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
  border-bottom: 2px solid var(--border-strong); padding-bottom: 10px;
}
.section__title {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  text-transform: uppercase; line-height: .96; color: var(--unsam-primary);
}
.section__meta { font-size: 13px; color: var(--text-muted); text-align: right; flex: 0 0 auto; }

/* HOY ----------------------------------------------------------------------- */
.today-row {
  display: grid; grid-template-columns: 62px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: var(--rule); align-items: start;
  transition: background var(--t-fast);
}
.today-row:hover { background: var(--surface-alt); }
.today-row__time {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--unsam-primary); line-height: 1.1;
}
.today-row__end {
  font-size: 12px; font-variant-numeric: tabular-nums;
  color: var(--text-muted); line-height: 1.2; margin-top: 1px;
}
.today-row__name {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  text-transform: uppercase; line-height: 1.1;
}
.today-row__where { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Mosaico de disciplinas ---------------------------------------------------- */
/* Las líneas del mosaico las dibuja cada tile con su propio `outline`, no el
   fondo de la grilla: así, cuando la última fila queda incompleta (18 deportes
   en 4 columnas), las celdas sobrantes no pintan un bloque oscuro vacío.     */
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: transparent; }
.mosaic > .tile { outline: 1px solid var(--border-strong); }
.tile {
  position: relative; display: block; background: var(--background);
  aspect-ratio: 4 / 3; overflow: hidden;
  transition: background var(--t-fast);
}
.tile:hover { background: var(--surface); }
/* Placeholder editorial: trama de reglas, sin foto stock. Reemplazable por <img>. */
.tile__media {
  position: absolute; inset: 0;
  background-color: var(--surface-alt);
  background-image: repeating-linear-gradient(
    -45deg, var(--unsam-primary-soft) 0 2px, transparent 2px 10px
  );
}
/* Con fotografía real: misma relación de aspecto que el placeholder, recorte
   por cover (nunca deformada) y punto focal un poco por encima del centro,
   que es donde suele estar la acción en una foto deportiva.                 */
.tile__media--foto { background-image: none; background-color: var(--unsam-primary); }
.tile__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 38%;
}
/* Degradado corto al pie de la foto: la placa de texto apoya sobre la imagen
   sin un corte duro. No oscurece el centro ni "estetiza" la fotografía.     */
.tile__media--foto::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 48%;
  background: linear-gradient(to bottom, rgba(22,50,92,0) 0%, rgba(22,50,92,.50) 100%);
}
.tile__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--unsam-primary); color: var(--text-invert);
  padding: 9px 10px;
}
.tile__name {
  display: block;
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  text-transform: uppercase; line-height: 1.05;
}
.tile__meta {
  display: block; font-size: 11px; opacity: .78; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* -----------------------------------------------------------------------------
   8. TERRITORIO DEBE HABER — PARTICIPÁ
   Cambia el sustrato (fondo + acento), no el sistema tipográfico.
   -------------------------------------------------------------------------- */
.dh-territory {
  background: var(--surface);
  border-top: 4px solid var(--debe-haber-secondary);
  border-bottom: 1px solid var(--border);
}
.dh-rotulo {
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  padding-top: 20px; margin-bottom: 14px;
}
.dh-rotulo img, .dh-rotulo svg { height: 34px; width: auto; flex: 0 0 auto; }
.dh-rotulo span {
  font-size: 11px; font-weight: 700; letter-spacing: .11em; line-height: 1.55;
  text-transform: uppercase; color: var(--debe-haber-primary);
}
.dh-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 8.5vw, 38px); line-height: .94;
  color: var(--text); margin-bottom: 20px; max-width: 18ch;
}

.campaign-card {
  display: flex; flex-direction: column; background: var(--background);
  border: 1px solid var(--border-strong); border-left: 5px solid var(--debe-haber-secondary);
  padding: 16px 16px 18px; margin-bottom: 12px;
  transition: transform var(--t-fast);
}
.campaign-card:hover { transform: translateX(2px); }
.campaign-card__num {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .1em; color: var(--debe-haber-primary); margin-bottom: 6px;
}
.campaign-card__title {
  font-family: var(--font-display); font-size: 21px; font-weight: 800;
  text-transform: uppercase; line-height: 1.02; margin-bottom: 8px;
}
.campaign-card__text { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; flex: 1 1 auto; }
.campaign-card__cta {
  align-self: flex-start;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--debe-haber-primary);
  border-bottom: 2px solid var(--debe-haber-secondary); padding-bottom: 2px;
}

/* -----------------------------------------------------------------------------
   9. BOTONES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; width: 100%;
  border: 1.5px solid var(--unsam-primary); border-radius: var(--radius);
  background: var(--unsam-primary); color: var(--text-invert);
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  transition: background var(--t-fast), color var(--t-fast);
}
.btn:hover { background: var(--unsam-primary-dark); border-color: var(--unsam-primary-dark); }
.btn--outline { background: transparent; color: var(--unsam-primary); }
.btn--outline:hover { background: var(--unsam-primary-soft); }
.btn--dh { background: var(--debe-haber-primary); border-color: var(--debe-haber-primary); }
.btn--dh:hover { background: #01356f; border-color: #01356f; }
.btn--sm { min-height: 44px; font-size: 15px; width: auto; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-stack { display: flex; flex-direction: column; gap: 10px; }

/* -----------------------------------------------------------------------------
   10. FICHA DE ACTIVIDAD
   -------------------------------------------------------------------------- */
.backlink {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted);
}
.backlink:hover { color: var(--text); }

.detail__disc { font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--text-muted); }
.detail__name {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(34px, 10vw, 44px); line-height: .92; color: var(--unsam-primary);
  margin: 4px 0 10px;
}
.detail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.detail__staff { font-size: 15px; color: var(--text); }
.detail__staff b { font-weight: 600; }

.block { padding: 20px 0; border-top: var(--rule); }
.block__label {
  font-size: 11px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.turno-line {
  display: flex; align-items: baseline; gap: 14px;
  padding: 9px 0; border-bottom: 1px dotted var(--border);
}
.turno-line:last-child { border-bottom: 0; }
.turno-line__day {
  flex: 0 0 42px; font-family: var(--font-display); font-weight: 700;
  font-size: 16px; letter-spacing: .06em; color: var(--unsam-primary);
}
.turno-line__hours { font-size: 17px; font-variant-numeric: tabular-nums; font-weight: 500; }
.turno-line__where { font-size: 13px; color: var(--text-muted); margin-left: auto; text-align: right; }

.where-name { font-size: 17px; font-weight: 600; }
.where-space { font-size: 15px; color: var(--text); }
.where-addr { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }

.join {
  background: var(--unsam-primary); color: var(--text-invert);
  padding: 22px var(--gutter); margin-inline: calc(var(--gutter) * -1);
}
.join h2, .join h3 {
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
  text-transform: uppercase; margin-bottom: 6px;
}
.join p { font-size: 15px; opacity: .85; margin-bottom: 16px; }
.join .btn { background: var(--text-invert); color: var(--unsam-primary); border-color: var(--text-invert); }
.join .btn:hover { background: #E7EBF2; border-color: #E7EBF2; }
.join .btn--outline { background: transparent; color: var(--text-invert); }
.join .btn--outline:hover { background: rgba(255,255,255,.12); }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  background: var(--text); color: var(--text-invert);
  padding: 11px 18px; border-radius: var(--radius); font-size: 14px;
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* -----------------------------------------------------------------------------
   11. GRILLA SEMANAL — pestañas
   -------------------------------------------------------------------------- */
.daytabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--border-strong);
  overflow-x: auto; scrollbar-width: none;
}
.daytabs::-webkit-scrollbar { display: none; }
.daytab {
  flex: 1 1 0; min-width: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 9px 6px 7px;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  color: var(--text-muted);
  transition: color var(--t-fast), background var(--t-fast);
}
.daytab:hover { background: var(--surface-alt); color: var(--text); }
.daytab__d {
  font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: .06em;
}
.daytab__n { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .75; }
.daytab[aria-selected="true"] {
  color: var(--unsam-primary); border-bottom-color: var(--unsam-primary);
}
.daytab[aria-selected="true"] .daytab__n { opacity: 1; font-weight: 600; }

/* La grilla de 6 columnas es exclusiva de desktop; en mobile mandan las
   pestañas de día. Nunca se muestran las dos vistas a la vez.               */
.weekgrid-wrap { display: none; }

/* -----------------------------------------------------------------------------
   12. SEDES Y MAPA
   -------------------------------------------------------------------------- */
#map, .map {
  height: 300px; width: 100%; background: var(--surface);
  border: 1px solid var(--border-strong); margin-bottom: 20px;
}
/* Panel que ocupa el lugar del mapa cuando no se pueden pedir tiles (file://)
   o cuando algo falla. Se lee como una pieza diseñada, no como un error.    */
.map--panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 24px 22px;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(
    -45deg, var(--unsam-primary-soft) 0 2px, transparent 2px 11px
  );
}
.map-panel__title {
  margin: 0;
  font-family: var(--font-display); font-size: 21px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .01em; color: var(--unsam-primary);
}
.map-panel__text {
  margin: 0; max-width: 40ch; font-size: 14px; color: var(--text-muted);
}
.map-panel__text strong { color: var(--text); font-weight: 600; }

/* Pin de sede (antes iba con estilos en línea desde el JS) */
.venue-pin span {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: var(--unsam-primary); border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--unsam-primary);
}
.venue {
  padding: 18px 0; border-bottom: var(--rule);
}
.venue__name {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  text-transform: uppercase; line-height: 1.05; margin-bottom: 3px;
}
.venue__addr { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.venue__spaces { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill {
  font-size: 12px; padding: 3px 9px; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-muted); background: var(--surface-alt);
}
.venue__acts { margin-bottom: 12px; }
.venue__act {
  display: block; padding: 7px 0; border-top: 1px dotted var(--border);
  font-size: 15px;
}
.venue__act:hover { color: var(--unsam-primary); }
.venue__act .num { color: var(--text-muted); font-size: 13px; margin-left: 6px; }

/* -----------------------------------------------------------------------------
   13. FORMULARIOS (adhesiones)
   -------------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
}
.field input[type="text"], .field input[type="email"] {
  width: 100%; height: 50px; padding: 0 12px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  background: var(--background); color: var(--text);
  font-family: var(--font-body); font-size: 16px;
}
.field input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field--check { display: flex; gap: 10px; align-items: flex-start; }
.field--check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--debe-haber-primary); }
.field--check label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13.5px; color: var(--text); line-height: 1.4; }
.field__error { display: block; margin-top: 5px; font-size: 13px; color: var(--danger); }
.form-note {
  font-size: 12.5px; color: var(--text-muted); margin-top: 14px;
  padding-top: 12px; border-top: var(--rule);
}
.form-status { margin-top: 14px; font-size: 14px; }
.form-status--error { color: var(--danger); }
.form-status--dev {
  background: #FFF8E1; border: 1px dashed #C79A16; color: #6A4E00;
  padding: 10px 12px; font-size: 13px; border-radius: var(--radius);
}
.success {
  text-align: left; padding: 26px 0;
}
.success__title {
  font-family: var(--font-display); font-size: 34px; font-weight: 800;
  text-transform: uppercase; color: var(--debe-haber-primary); margin-bottom: 8px;
}
.success__count { font-size: 17px; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.success__jabali { width: 92px; height: auto; margin-top: 18px; }

/* -----------------------------------------------------------------------------
   14. JABALÍ — FAB, globo y panel
   -------------------------------------------------------------------------- */
/* El Jabalí es una FIGURA SUELTA: el contenedor no dibuja forma alguna —
   ni círculo, ni borde, ni fondo, ni radio. El globo va encima, en el mismo
   "dock", para que quede siempre alineado con la figura y nunca tape la cara
   (que en este asset está arriba, junto a la mano levantada).              */
.jabali-dock {
  position: fixed; z-index: 90;
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;                 /* sólo los hijos reciben clicks */
}
.jabali-dock > * { pointer-events: auto; }
/* El Jabalí es la mascota de Deportes UNSAM: se retira en el territorio Debe
   Haber (PARTICIPÁ), donde además tapaba el botón FIRMAR en mobile.
   Para volver a mostrarlo ahí, borrar esta regla.                          */
body.sin-jabali .jabali-dock { display: none; }

.jabali-fab {
  width: 78px; height: auto; padding: 0;
  background: none; border: 0; border-radius: 0;
  display: block; line-height: 0;
  /* Sombra de contacto mínima, sólo para que la figura se despegue del fondo. */
  filter: drop-shadow(0 3px 5px rgba(13, 31, 60, .20));
  transition: transform var(--t-fast);
}
.jabali-fab:hover { transform: translateY(-3px); }
.jabali-fab img { width: 100%; height: auto; display: block; }

.jabali-bubble {
  position: relative;
  max-width: 190px; padding: 9px 12px;
  background: var(--unsam-primary); color: var(--text-invert);
  font-size: 13.5px; line-height: 1.3; border-radius: var(--radius);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.jabali-bubble:not(.is-visible) { pointer-events: none; visibility: hidden; }
.jabali-bubble.is-visible { opacity: 1; transform: none; }
/* La cola apunta a la cabeza del personaje, no al centro de la figura. */
.jabali-bubble::after {
  content: ''; position: absolute; right: 34px; bottom: -5px;
  width: 10px; height: 10px; background: var(--unsam-primary); transform: rotate(45deg);
}
.jabali-bubble__close {
  position: absolute; top: -11px; right: -11px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--text); color: var(--text-invert);
  display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1;
}

.scrim {
  position: fixed; inset: 0; z-index: 95; background: rgba(10,16,26,.5);
  opacity: 0; pointer-events: none; transition: opacity var(--t-base);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
  background: var(--background);
  border-top: 4px solid var(--unsam-primary);
  max-height: 86vh; overflow-y: auto;
  transform: translateY(100%); transition: transform var(--t-base) var(--ease);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet.is-open { transform: none; }
.sheet__handle {
  width: 40px; height: 4px; border-radius: 4px; background: var(--border);
  margin: 10px auto 0;
}
.sheet__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter) 10px;
}
.sheet__title {
  font-family: var(--font-display); font-size: 25px; font-weight: 800;
  text-transform: uppercase; line-height: 1; color: var(--unsam-primary);
}
.sheet__step { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.sheet__close {
  flex: 0 0 auto; width: 40px; height: 40px; display: flex;
  align-items: center; justify-content: center; font-size: 22px; color: var(--text-muted);
}
.sheet__body { padding: 0 var(--gutter) 22px; }

.opt-list { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 14px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  background: var(--background); text-align: left;
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  transition: background var(--t-fast), color var(--t-fast);
}
.opt:hover { background: var(--unsam-primary-soft); }
.opt[aria-pressed="true"] { background: var(--unsam-primary); color: var(--text-invert); border-color: var(--unsam-primary); }
.opt__count {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: 0; text-transform: none; opacity: .7; font-variant-numeric: tabular-nums;
}
.opt--disabled { opacity: .4; }

.wizard-q {
  font-size: 17px; font-weight: 500; margin-bottom: 16px; color: var(--text);
}
.wizard-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding-top: 14px; border-top: var(--rule);
}
.wizard-days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.wizard-days .opt { justify-content: center; min-height: 52px; padding: 0 4px; font-size: 16px; }

.progress { height: 3px; background: var(--border); margin: 0 var(--gutter) 16px; }
.progress__bar { height: 100%; background: var(--unsam-primary); transition: width var(--t-base) var(--ease); }

.relaxed-note {
  background: var(--unsam-primary-soft); border-left: 3px solid var(--unsam-secondary);
  padding: 11px 13px; font-size: 13.5px; margin-bottom: 14px;
}
.relaxed-note b { font-weight: 700; }

.contact-lines { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.contact-lines b { font-weight: 600; }

/* -----------------------------------------------------------------------------
   15. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--unsam-primary); color: var(--text-invert);
  padding: 30px 0 28px;
}
.footer-block + .footer-block {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18);
}

.footer-block__line { font-size: 14px; opacity: .88; }
.footer-block__line a { display: inline-block; padding-block: 4px; }
.footer-block__line strong { font-weight: 600; }
.footer-block__line a { border-bottom: 1px solid rgba(255,255,255,.35); }
.footer-block__line a:hover { border-bottom-color: var(--text-invert); }
.footer-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; opacity: .6; margin-bottom: 6px;
}
.footer-secondary {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18);
  font-size: 13px; opacity: .7;
}
.footer-secondary a { border-bottom: 1px solid rgba(255,255,255,.3); display: inline-block; padding-block: 3px; }

/* Espacio para que el Jabalí nunca tape el último elemento ------------------- */
.page-bottom-space { height: 138px; }
/* En las vistas de Debe Haber el respiro inferior sigue siendo territorio DH,
   para que no quede una franja blanca suelta antes del footer.              */
#app[data-territorio="dh"] + .page-bottom-space { background: var(--surface); }

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

/* -----------------------------------------------------------------------------
   AJUSTES DE ACCESIBILIDAD (V1.3)
   -------------------------------------------------------------------------- */
/* Área táctil de 40px para la × del globo del Jabalí, sin agrandar el dibujo.
   OJO: no redeclarar `position` acá — la × es `position: absolute` en la
   esquina del globo, y pisarla con `relative` la mete dentro del texto. */
.jabali-bubble__close::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; transform: translate(-50%, -50%);
}
/* Controles de zoom del mapa: Leaflet los trae a 30px. Su hoja se inyecta
   después que ésta, así que hace falta un selector más específico.          */
.leaflet-touch .leaflet-bar a.leaflet-control-zoom-in,
.leaflet-touch .leaflet-bar a.leaflet-control-zoom-out,
.leaflet-bar a.leaflet-control-zoom-in,
.leaflet-bar a.leaflet-control-zoom-out { width: 36px; height: 36px; line-height: 36px; }
/* Casilla de consentimiento un poco mayor (la etiqueta completa sigue siendo
   el objetivo táctil real). */
.field--check input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--debe-haber-primary); }

/* -----------------------------------------------------------------------------
   MÁS HERRAMIENTAS PARA ESTUDIANTES (acceso secundario · Debe Haber)
   -----------------------------------------------------------------------------
   Transición editorial entre el micrositio de Deportes y el resto del
   ecosistema. Misma tipografía, mismas reglas, mismo navy. El amarillo de
   Debe Haber aparece sólo como acento chico, nunca como fondo: no es un
   banner de campaña, es un índice.
   -------------------------------------------------------------------------- */
.tools {
  border-top: 2px solid var(--unsam-primary);
  background: var(--surface);
  padding-block: 28px 32px;
}
/* En el territorio Debe Haber (PARTICIPÁ) sería redundante y competiría con
   las campañas: ahí no se muestra. */
body.en-participa .tools { display: none; }

.tools__rotulo {
  display: inline-block;
  border-top: 3px solid var(--debe-haber-secondary);
  padding-top: 7px; margin-bottom: 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted);
}
.tools__title {
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
  text-transform: uppercase; line-height: 1.04; color: var(--unsam-primary);
}
.tools__sub { font-size: 14.5px; color: var(--text-muted); margin-top: 6px; }

.tools__toggle {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 0; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--debe-haber-primary);
  border-bottom: 2px solid var(--debe-haber-secondary); padding-bottom: 3px;
}
.tools__toggle::after {                      /* área táctil de 44px */
  content: ''; position: absolute; left: -6px; right: -6px;
  top: 50%; transform: translateY(-50%); height: 44px;
}
.tools__toggle:hover { color: var(--unsam-primary); }
.tools__arrow { font-size: 16px; line-height: 1; }

.tools__panel { overflow: hidden; }
.tools__panel.is-animando { transition: height 300ms var(--ease); }

.tools__grid { border-top: 1px solid var(--border-strong); margin-top: 20px; }
.tool { padding: 18px 0 20px; border-bottom: 1px solid var(--border); }
.tool:last-child { border-bottom: 0; padding-bottom: 2px; }
.tool__name {
  font-family: var(--font-display); font-size: 21px; font-weight: 800;
  text-transform: uppercase; line-height: 1.05; color: var(--unsam-primary);
}
.tool__text { font-size: 15px; margin-top: 5px; max-width: 46ch; }
.tool__cta {
  position: relative; display: inline-block; margin-top: 13px; padding-bottom: 3px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--debe-haber-primary);
  border-bottom: 2px solid var(--debe-haber-secondary);
}
.tool__cta::after {
  content: ''; position: absolute; left: -6px; right: -6px;
  top: 50%; transform: translateY(-50%); height: 44px;
}
.tool__cta:hover { color: var(--unsam-primary); }

/* -----------------------------------------------------------------------------
   JABALÍ — movimiento de atención
   -----------------------------------------------------------------------------
   Dos ciclos y para. El eje de giro va a los pies para que se lea como un
   balanceo del cuerpo y no como un objeto girando. Con
   `prefers-reduced-motion: reduce` no se mueve: el globo aparece igual.
   -------------------------------------------------------------------------- */
@keyframes jabali-saludo {
  0%   { transform: translateY(0)    rotate(0deg); }
  18%  { transform: translateY(-5px) rotate(-3deg); }
  42%  { transform: translateY(0)    rotate(2.5deg); }
  64%  { transform: translateY(-3px) rotate(-1.5deg); }
  86%  { transform: translateY(0)    rotate(1deg); }
  100% { transform: translateY(0)    rotate(0deg); }
}
.jabali-fab { transform-origin: 50% 88%; }
.jabali-fab.is-saludando { animation: jabali-saludo 880ms var(--ease) 2; }

@media (prefers-reduced-motion: reduce) {
  .jabali-fab.is-saludando { animation: none; }
  .tools__panel.is-animando { transition: none; }
}
