/* ============================================================
   Canchas Boyacá — Diseño público (moderno, verde cancha)
   ============================================================ */
:root {
  --verde: #16a34a;
  --verde-osc: #0f7a3d;
  --verde-2: #22c55e;
  --verde-fondo: #0d3b24;
  --ambar: #f59e0b;
  --ambar-2: #d97706;
  --rojo: #e5484d;
  --azul: #3b82f6;
  --gris: #9aa5b1;
  --gris-claro: #e6ebe8;
  --gris-osc: #5b6672;
  --texto: #17251e;
  --blanco: #ffffff;
  --fondo: #f3f7f4;
  --borde: #e3eae6;
  --sombra: 0 12px 34px rgba(13, 59, 36, 0.10);
  --sombra-lite: 0 4px 14px rgba(13, 59, 36, 0.07);
  --radio: 18px;
  --fuente: 'Poppins', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--fuente);
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--gris-osc); }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ================= HERO ================= */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(150deg, #0e4628 0%, #11703b 55%, #16a34a 130%);
  color: #fff;
  overflow: hidden;
  padding-bottom: 64px;
}
.hero::after { /* líneas de césped decorativas */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 49.6%, rgba(255,255,255,0.10) 50%, transparent 50.4%),
    linear-gradient(0deg, transparent 49.7%, rgba(255,255,255,0.05) 50%, transparent 50.3%);
  background-size: 90px 90px;
  pointer-events: none;
  opacity: 0.55;
}
.hero-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 20px 20px 6px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 50px; height: 50px; border-radius: 15px; background: rgba(255,255,255,0.16);
  display: grid; place-items: center; font-size: 27px; flex: none;
  border: 1px solid rgba(255,255,255,0.25);
}
.brand h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: 0.2px; }
.brand p { margin: 1px 0 0; font-size: 12.5px; opacity: 0.9; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pill-btn {
  border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.12); color: #fff;
  font-weight: 600; font-family: var(--fuente); font-size: 13.5px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: 0.2s;
}
.pill-btn:hover { background: rgba(255,255,255,0.26); }
.admin-link {
  color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.45); padding: 8px 15px; border-radius: 999px; transition: 0.2s;
}
.admin-link:hover { background: rgba(255,255,255,0.18); }
.admin-link.dark { color: var(--texto); border-color: var(--borde); }
.admin-link.dark:hover { background: #eef3ef; }

.hero-main { position: relative; z-index: 2; padding: 40px 20px 0; max-width: 820px; }
.hero-eyebrow {
  display: inline-block; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.4px;
}
.hero-main h2 { font-size: clamp(30px, 6vw, 52px); line-height: 1.08; font-weight: 800; margin: 18px 0 12px; }
.hero-sub { font-size: 16.5px; max-width: 560px; opacity: 0.95; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  border: 0; cursor: pointer; border-radius: 14px; padding: 13px 20px; font-size: 15px;
  font-weight: 700; font-family: var(--fuente); display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-big { padding: 15px 24px; font-size: 15.5px; border-radius: 16px; }
.btn-light { background: #fff; color: #0d3b24; box-shadow: 0 10px 26px rgba(0,0,0,0.22); }
.btn-light:hover { background: #eaf7ef; }
/* botones de la portada con borde claro (sobre el fondo verde) */
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.14); color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.24); }
.btn-ghost-dark { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.26); }
.btn-primary { background: var(--verde); color: #fff; box-shadow: 0 8px 20px rgba(22,163,74,0.28); }
.btn-primary:hover { background: var(--verde-osc); }
.btn-ghost { background: #eef2ef; color: var(--gris-osc); }
.btn-ghost:hover { background: #e0e7e2; }
.btn-wa { background: #25d366; color: #fff; box-shadow: 0 8px 20px rgba(37,211,102,0.3); width: 100%; }
.btn-wa:hover { background: #1fb959; }
.btn:disabled { opacity: 0.6; cursor: default; }

.hero-sports { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-sport-tag {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.28);
  color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 600;
}
.hero-pitch { /* curva inferior */
  position: absolute; left: -8%; right: -8%; bottom: -34px; height: 90px;
  background: var(--fondo); border-radius: 50% 50% 0 0;
}

/* ================= ZONA DE RESERVA ================= */
.booking-shell {
  position: relative;
  background: #fff; border: 1px solid var(--borde); border-radius: 26px;
  box-shadow: var(--sombra);
  padding: 22px 22px 30px;
  margin: -6px 0 0;
  z-index: 3;
}
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 12px; color: var(--texto); }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--borde); flex: 1; }
.divider span { font-weight: 700; font-size: 13.5px; color: var(--gris-osc); letter-spacing: 0.4px; text-transform: uppercase; }

/* selector de día */
.picker {
  display: flex; align-items: stretch; justify-content: space-between; gap: 12px;
  background: linear-gradient(180deg, #f6faf7, #eef5f0);
  border: 1px solid var(--borde); border-radius: 20px; padding: 14px 16px;
}
.day-btn {
  border: 1px solid var(--borde); background: #fff; font-size: 22px; width: 50px;
  border-radius: 14px; cursor: pointer; color: var(--verde-osc); flex: none;
  font-family: var(--fuente); box-shadow: var(--sombra-lite);
}
.day-btn:hover:not(:disabled) { background: var(--verde-claro); }
.day-btn:disabled { color: #d3dad6; cursor: default; box-shadow: none; }
.day-center { text-align: center; min-width: 0; }
.day-caption { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gris-osc); margin-bottom: 4px; }
.day-center input[type="date"] {
  border: 1px solid var(--borde); padding: 8px 12px; font-size: 15.5px; border-radius: 12px;
  color: var(--texto); font-family: var(--fuente); background: #fff;
}
.date-label { margin-top: 5px; font-size: 13.5px; color: var(--verde-osc); font-weight: 700; }

/* pills de deporte */
.sport-pills { display: flex; gap: 9px; flex-wrap: wrap; }
.sport-pill {
  border: 1.5px solid var(--borde); background: #fff; color: var(--texto); padding: 10px 17px;
  border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: var(--fuente); transition: 0.15s;
}
.sport-pill:hover { border-color: var(--verde); transform: translateY(-1px); }
.sport-pill.active {
  background: linear-gradient(120deg, var(--verde), var(--verde-2)); border-color: transparent;
  color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,0.3);
}

/* leyenda */
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.8px; color: var(--gris-osc); padding: 4px 2px 14px; }
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.legend .item.touch { color: var(--verde-osc); font-weight: 600; }
.dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.dot.free { background: var(--verde); }
.dot.offer { background: var(--ambar); }
.dot.busy { background: #d7dde0; }
.dot.wanted { background: var(--rojo); }
.dot.rival { background: var(--azul); }
.dot.past { background: #eceff0; border: 1px dashed #ccd2d0; }

.status { text-align: center; color: var(--gris-osc); padding: 26px 0; }

/* ================= GRUPOS Y CANCHAS ================= */
.sport-group { margin: 26px 0 0; }
.sport-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 19px; }
.sport-head .icon {
  width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(140deg, var(--verde-claro), #d9f2e2);
  display: grid; place-items: center; color: var(--verde-osc); font-size: 21px;
}
.court-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 760px) { .court-grid { grid-template-columns: 1fr 1fr; } }

.court-card {
  background: #fff; border: 1px solid var(--borde); border-radius: 22px;
  padding: 14px; box-shadow: var(--sombra-lite); transition: transform 0.18s, box-shadow 0.18s;
}
.court-card:hover { transform: translateY(-3px); box-shadow: var(--sombra); }

/* fotos de la cancha */
.court-photos { display: grid; gap: 7px; margin: 0 0 14px; }
.court-photos.n1 { grid-template-columns: 1fr; }
.court-photos.n2 { grid-template-columns: 1fr 1fr; }
.court-photos.n3, .court-photos.more { grid-template-columns: repeat(3, 1fr); }
.court-photos .ph {
  aspect-ratio: 16/10; overflow: hidden; border-radius: 14px; cursor: pointer;
  background: #e9efeb; position: relative;
}
.court-photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.court-photos .ph:hover img { transform: scale(1.06); }
.court-photos .ph.more {
  display: grid; place-items: center; background: linear-gradient(140deg, #1d3227, #0d3b24);
  color: #fff; font-weight: 800; font-size: 17px; letter-spacing: 0.3px;
}
.court-photos .ph.more small { font-size: 11.5px; font-weight: 600; opacity: 0.85; }
.court-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 4px; }
.court-title h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: 0.2px; }
.court-title .court-sub { display: block; margin-top: 3px; font-size: 13.5px; color: var(--gris-osc); }
.court-top .price { color: var(--verde-osc); font-weight: 800; }
.owner-line { display: inline-block; font-size: 12px; color: var(--gris-osc); margin: 4px 4px 6px; }
.court-desc { color: var(--gris-osc); font-size: 13px; margin: 4px 4px 10px; }
.hours-line { font-size: 12.5px; color: var(--gris-osc); margin: 0 4px 10px; }
.court-loc { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--gris-osc); margin: 0 4px 10px; }
.court-loc .map-link { text-decoration: none; font-weight: 700; color: var(--verde-osc); white-space: nowrap; }
.map-link { text-decoration: none; font-weight: 700; color: var(--verde-osc); }

/* turnos */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px; }
.chip {
  border: 0; padding: 8px 6px; border-radius: 13px; cursor: pointer; font-size: 13px;
  font-weight: 700; min-width: 78px; text-align: center; font-family: var(--fuente);
  transition: transform 0.08s ease; line-height: 1.35;
}
.chip:active { transform: scale(0.94); }
.chip.free { background: var(--verde); color: #fff; box-shadow: 0 4px 10px rgba(22,163,74,0.25); }
.chip.free:hover { background: var(--verde-osc); }
.chip.offer { background: linear-gradient(140deg, var(--ambar), var(--ambar-2)); color: #fff; box-shadow: 0 4px 10px rgba(245,158,11,0.3); }
.chip.offer .strike { display: block; font-size: 10.5px; font-weight: 500; text-decoration: line-through; opacity: 0.85; }
.chip.offer .main-price { display: block; }
.chip:disabled { cursor: not-allowed; }
.chip.busy { background: #eceff0; color: var(--gris-osc); text-decoration: line-through; }
.chip.past { background: #f2f4f3; color: #c2c9c6; }
.chip.wanted { background: #fff0f0; color: #b3261e; border: 1.5px dashed #f0a0a0; text-decoration: none; cursor: pointer; }
.chip.rival { background: #eef4ff; color: #1d4ed8; border: 1.5px dashed #93b4f7; text-decoration: none; cursor: pointer; }
.chip.wanted:hover, .chip.rival:hover { transform: scale(1.02); }
.chip .res-lbl { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.2px; opacity: 0.85; }
.chip.wanted .wanted-lbl, .chip.rival .wanted-lbl { display: block; font-size: 10px; font-weight: 700; line-height: 1.25; }

/* ================= MODALES ================= */
.overlay {
  position: fixed; inset: 0; background: rgba(9, 24, 17, 0.62); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 14px; z-index: 50;
}
.sheet {
  background: #fff; border-radius: 22px; width: 100%; max-width: 560px; max-height: 94vh;
  overflow: auto; padding: 24px; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.x { position: absolute; top: 14px; right: 16px; border: 0; background: #eef2ef; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 14px; font-family: var(--fuente); z-index: 3; }
.x:hover { background: #e0e7e2; }
.sheet h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.sheet .sub { color: var(--gris-osc); margin: 0 0 18px; font-size: 14.5px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--borde); border-radius: 12px;
  font-size: 15px; font-family: var(--fuente); color: var(--texto); background: #fff; transition: border 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--verde); }
.field textarea { min-height: 74px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--gris-osc); margin-top: 5px; }
.checkline { display: flex; gap: 9px; align-items: flex-start; background: #f0f8f3; padding: 12px; border-radius: 13px; border: 1px solid #d7ecde; }
.checkline input { margin-top: 3px; width: 18px; height: 18px; }
.checkline .hint { margin: 0; }

.summary { background: #f6faf7; border: 1px solid #e2eee6; border-radius: 15px; padding: 14px 16px; margin-bottom: 18px; font-size: 14px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.summary .row.total { border-top: 1px solid #d7e8dd; margin-top: 8px; padding-top: 9px; font-weight: 800; font-size: 16px; }
.discount-row { color: var(--verde-osc); font-weight: 700; }
.old-price { text-decoration: line-through; color: var(--gris-osc); font-weight: 500; }
.btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.join-panel { background: #f1f8f4; border: 1px solid #d7ecde; border-radius: 15px; padding: 14px 16px; margin-bottom: 14px; }
.join-panel .join-title { margin: 0 0 4px; font-size: 16px; }

/* éxito */
.success-hero { text-align: center; padding: 8px 0 6px; }
.success-hero .big { font-size: 56px; }
.success-hero h2 { margin: 8px 0; }
.ref-code {
  font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--verde-osc);
  background: linear-gradient(140deg, #e8f7ee, #d3efdd); display: inline-block;
  padding: 9px 20px; border-radius: 14px; margin: 8px 0 16px; border: 1px solid #c2e6cf;
}

/* registro de jugador */
.sport-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-sport {
  display: inline-flex; align-items: center; gap: 6px; background: #f2f7f4; border: 1.5px solid var(--borde);
  padding: 9px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.pl-sport input { width: 16px; height: 16px; }

/* foto opcional de jugador/equipo y botones pequeños */
.ava-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ava-prev { width: 74px; height: 74px; border-radius: 16px; object-fit: cover; border: 1px solid var(--borde); background: #eef2ef; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }

/* botón flotante de WhatsApp (contacto con el administrador) */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 9px;
  background: #25d366; color: #fff; text-decoration: none; font-weight: 700; font-family: var(--fuente);
  padding: 13px 19px; border-radius: 999px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28); font-size: 15px; transition: transform 0.15s;
}
.wa-float:hover { background: #1fb959; transform: scale(1.03); }
.wa-float .wa-icon { font-size: 21px; }
@media (max-width: 520px) { .wa-float { width: 60px; justify-content: center; padding: 14px 0; } .wa-float .wa-label { display: none; } }

/* ================= TORNEOS ================= */
.tourney-shell { margin: 34px 0 10px; }
.tourney-head h2 { margin: 0 0 6px; font-size: 24px; }
.tourney-head .sub { margin: 0 0 14px; color: var(--gris-osc); font-size: 14px; }
.toolbar-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-pills select {
  border: 1px solid var(--borde); background: #fff; border-radius: 12px; padding: 10px 12px;
  font-family: var(--fuente); font-size: 13.5px; color: var(--texto);
}
.tourney-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .tourney-grid { grid-template-columns: 1fr 1fr; } }
.tourney-card {
  background: #fff; border: 1px solid var(--borde); border-radius: 20px; overflow: hidden;
  box-shadow: var(--sombra-lite); display: flex; flex-direction: column;
}
.tourney-img { height: 150px; background-size: cover; background-position: center; }
.tourney-img.sin-foto { display: grid; place-items: center; background: linear-gradient(140deg, #1d3227, #0d3b24); color: #fff; font-size: 40px; }
.tourney-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.tourney-body h3 { margin: 0; font-size: 19px; }
.tourney-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--gris-osc); }
.tourney-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px dashed #e3ede6; }
.tourney-foot .money { color: var(--verde-osc); font-weight: 800; }
.tourney-foot .btn { margin-left: auto; }

/* ================= SECCIONES: funcionan incluso sin JavaScript =================
   Por defecto se ve "canchas". Al abrir #partidos, #torneos o #info, el navegador
   marca esa sección como :target y el CSS muestra una sola. Si el JavaScript sí
   carga, él toma el control con estilos en línea (que mandan sobre estas reglas). */
[data-vista-panel] { display: none; }
[data-vista-panel="canchas"] { display: block; }
[data-vista-panel]:target { display: block; }
body:has(#partidos:target) [data-vista-panel="canchas"],
body:has(#torneos:target) [data-vista-panel="canchas"],
body:has(#info:target) [data-vista-panel="canchas"] { display: none; }

/* ================= BOTONES DE SECCIÓN (arriba) ================= */
.vistas-wrap {
  position: sticky; top: 0; z-index: 38;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--borde); box-shadow: 0 4px 14px rgba(15, 40, 25, 0.06);
}
.vistas { display: flex; gap: 8px; padding: 8px 20px; overflow-x: auto; scrollbar-width: none; }
.vistas::-webkit-scrollbar { display: none; }
.vista-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--borde); background: #fff; color: var(--texto);
  font-family: var(--fuente); font-weight: 700; font-size: 13.5px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer; transition: 0.15s; white-space: nowrap;
  text-decoration: none;
}
.vista-refresh { border-style: dashed; color: var(--verde-osc); }
/* barra de error visible: ayuda a saber si algo falla en el navegador */
.js-error {
  position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 90;
  background: #7f1d1d; color: #fff; border-radius: 12px; padding: 12px 14px;
  font-size: 13.5px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); display: flex;
  gap: 10px; align-items: center; flex-wrap: wrap;
}
.js-error button { margin-left: auto; }
.vista-btn span { font-size: 16px; }
.vista-btn:hover { border-color: var(--verde); transform: translateY(-1px); }
.vista-btn.active {
  background: linear-gradient(120deg, var(--verde), var(--verde-2)); border-color: transparent;
  color: #fff; box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28);
}
@media (max-width: 560px) { .vista-btn { font-size: 12.5px; padding: 8px 12px; } }

/* ================= SECCIÓN INFORMACIÓN ================= */
.info-shell { margin: 22px 0 10px; }
.info-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
@media (min-width: 700px) { .info-cards { grid-template-columns: 1fr 1fr; } }
.info-card {
  text-align: left; background: #fff; border: 1px solid var(--borde); border-radius: 18px;
  padding: 16px; cursor: pointer; font-family: var(--fuente); box-shadow: var(--sombra-lite);
  display: flex; flex-direction: column; gap: 4px; transition: transform 0.15s, box-shadow 0.15s;
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.info-card .ic { font-size: 26px; }
.info-card b { font-size: 16px; color: var(--texto); }
.info-card small { color: var(--gris-osc); font-size: 13px; line-height: 1.45; }
.info-block { background: #fff; border: 1px solid var(--borde); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.info-block h3 { margin: 0 0 10px; font-size: 18px; }
.info-block p { margin: 0 0 10px; color: var(--gris-osc); font-size: 14.5px; line-height: 1.6; }
.pasos { margin: 0; padding-left: 20px; color: var(--gris-osc); font-size: 14.5px; line-height: 1.8; }
.pasos b { color: var(--texto); }
.lista-ok { margin: 0 0 14px; padding-left: 20px; color: var(--gris-osc); font-size: 14.5px; line-height: 1.8; }
.info-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-grid b { display: block; font-size: 14px; margin-bottom: 2px; }
.info-block details { border-top: 1px dashed #e3ede6; padding: 10px 0; }
.info-block details:first-of-type { border-top: none; }
.info-block summary { cursor: pointer; font-weight: 700; font-size: 14.5px; color: var(--texto); }
.info-block details p { margin: 8px 0 0; font-size: 14px; }

/* ================= PARTIDOS ABIERTOS ================= */
.match-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .match-grid { grid-template-columns: 1fr 1fr; } }
.match-card {
  display: flex; gap: 12px; background: #fff; border: 1px solid var(--borde); border-radius: 18px;
  padding: 12px; box-shadow: var(--sombra-lite); align-items: stretch;
}
.match-img {
  width: 92px; min-width: 92px; border-radius: 14px; background-size: cover; background-position: center;
  background-color: #e9efeb; position: relative;
}
.match-hoy {
  position: absolute; top: 6px; left: 6px; background: var(--rojo); color: #fff; font-size: 10.5px;
  font-weight: 800; padding: 3px 7px; border-radius: 999px; letter-spacing: 0.4px;
}
.match-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.match-body h3 { margin: 0; font-size: 17px; }
.match-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.match-tag {
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: #eef2f0; color: var(--gris-osc);
}
.match-tag.wanted { background: #fdecec; color: #b91c1c; }
.match-tag.rival { background: #e8f0fe; color: #1d4ed8; }
.match-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--gris-osc); }
.match-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.match-foot .money { color: var(--verde-osc); font-weight: 800; font-size: 14px; }
.match-foot .btn { margin-left: auto; }

/* secciones: que los anclajes no queden debajo de la barra */
#reservar, #partidos, #torneos, #info { scroll-margin-top: 72px; }

/* ================= BARRA INFERIOR TIPO APP (celular) ================= */
.appbar { display: none; }
@media (max-width: 760px) {
  .appbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--borde); box-shadow: 0 -6px 18px rgba(15, 40, 25, 0.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .appbar-item {
    flex: 1; border: none; background: none; cursor: pointer; font-family: var(--fuente);
    font-size: 10.5px; font-weight: 700; color: var(--gris-osc); display: flex; flex-direction: column;
    align-items: center; gap: 2px; padding: 4px 0; border-radius: 10px;
  }
  .appbar-item span { font-size: 19px; line-height: 1; }
  .appbar-item.active { color: var(--verde-osc); }
  .appbar-item.active span { transform: translateY(-1px); }
  body { padding-bottom: 68px; }
  .wa-float { bottom: 78px; }
  .audio-fab { bottom: 78px; }
  .back-filters { bottom: 142px; }
}

.audio-fab {
  position: fixed; left: 18px; bottom: 18px; z-index: 45; width: 54px; height: 54px; border: none; cursor: pointer;
  border-radius: 50%; background: var(--verde); color: #fff; font-size: 24px; line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28); transition: transform 0.15s, background 0.15s;
}
.audio-fab:hover { transform: scale(1.06); }
.audio-fab.sonando { background: var(--verde-osc); animation: audioPulso 1.4s ease-in-out infinite; }
@keyframes audioPulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); } 50% { box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); } }
.audio-invite { position: fixed; inset: 0; z-index: 60; background: rgba(6, 24, 14, 0.55); display: flex; align-items: flex-end; justify-content: center; padding: 18px; animation: aparecer 0.25s ease-out; }

/* pista discreta del modo automático (no bloquea la página) */
#audio-pista {
  position: fixed; left: 18px; bottom: 84px; z-index: 46; cursor: pointer;
  display: flex; align-items: center; gap: 8px; max-width: 74vw;
  background: rgba(17, 24, 39, 0.92); color: #fff; font-family: var(--fuente); font-size: 13.5px;
  padding: 10px 15px; border-radius: 999px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  animation: audioLatido 2s ease-in-out infinite;
}
#audio-pista span { font-size: 17px; }
@keyframes audioLatido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.audio-invite-box { background: #fff; border-radius: 18px; padding: 18px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); }
.audio-invite-box .ai-icon { font-size: 34px; }
.audio-invite-box b { display: block; margin: 8px 0 12px; font-family: var(--fuente); color: var(--gris-osc); font-size: 15px; }
.audio-invite-box .ai-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

/* avisito rápido de la página pública */
#toast-publico {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(12px); z-index: 70;
  background: rgba(17, 24, 39, 0.94); color: #fff; font-family: var(--fuente); font-size: 14px;
  padding: 11px 16px; border-radius: 12px; max-width: 88vw; text-align: center; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast-publico.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* publicidad en los lados (pantallas anchas) */
.ad-rail { position: fixed; top: 50%; transform: translateY(-50%); width: 200px; z-index: 20; display: flex; flex-direction: column; gap: 12px; }
.ad-rail:empty { display: none; }
.ad-rail .ad-card { width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; }
.ad-rail .ad-card img { width: 100%; height: 100%; object-fit: cover; }
.ad-rail.left { left: max(8px, calc((100vw - 1180px) / 2 - 216px)); }
.ad-rail.right { right: max(8px, calc((100vw - 1180px) / 2 - 216px)); }
@media (max-width: 1380px) { .ad-rail { display: none; } }

/* ============================================================
   REFRESCO VISUAL — parrilla de horarios + ticket de reserva
   ============================================================ */

/* etiquetas de estado (usadas en "Mis reservas") */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill.confirmada { background: var(--verde-claro); color: var(--verde-osc); }
.pill.cancelada { background: #eceff0; color: var(--gris-osc); }

/* filtros: se quedan ARRIBA y se van con el scroll (no tapan las canchas) */
.filters-sticky {
  padding: 4px 0 6px; margin: 0 0 4px;
}
.filters-sticky .picker { background: #fff; }
.filters-sticky .divider { margin: 16px 0 10px; }

/* botón para volver arriba a cambiar el día o el deporte */
.back-filters {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 44; cursor: pointer; font-family: var(--fuente); font-weight: 700; font-size: 13.5px;
  border: 1px solid var(--borde); background: rgba(255, 255, 255, 0.97); color: var(--verde-osc);
  padding: 11px 18px; border-radius: 999px; box-shadow: 0 10px 26px rgba(15, 40, 25, 0.22);
  white-space: nowrap;
}
.back-filters:hover { background: #fff; transform: translateX(-50%) translateY(-2px); }
@media (max-width: 560px) {
  .filters-sticky { padding: 2px 0 4px; }
  .filters-sticky .divider { margin: 12px 0 8px; }
  .back-filters { bottom: 82px; font-size: 12.5px; padding: 10px 15px; }
}

/* parrilla de turnos (estilo Playtomic: rejilla de horarios) */
.chips { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.chip {
  min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 14px; font-size: 14px; padding: 8px 6px; line-height: 1.25;
}
.chip .strike { font-size: 10.5px; }
.chip .main-price { font-size: 12.5px; }
.chip .res-lbl, .chip .wanted-lbl { font-size: 10px; }
.chip.free, .chip.offer { box-shadow: 0 6px 14px rgba(22, 163, 74, 0.18); }
.chip:hover:not(:disabled) { transform: translateY(-2px); }

/* tarjetas de cancha más limpias */
.court-card { padding: 16px; border-radius: 24px; }
.court-top { align-items: center; }
.court-title h3 { font-size: 20px; }
.court-sub { font-size: 13.5px; }
.court-top .price {
  background: var(--verde-claro); color: var(--verde-osc); padding: 5px 12px;
  border-radius: 999px; font-weight: 800; font-size: 13.5px;
}
.owner-line { font-size: 12px; }
.court-loc .map-link {
  background: #eef4ff; border: 1px solid #dbe6ff; padding: 4px 10px; border-radius: 999px; font-size: 12px;
}
.court-photos { margin-bottom: 14px; }

/* resumen tipo "ticket" */
.summary {
  background: #fff; border: 1px dashed #cfe3d6; border-radius: 18px;
  padding: 16px 18px; box-shadow: inset 0 0 0 1px #f3f8f5;
}
.summary .row { padding: 6px 0; }
.summary .row.total { font-size: 17px; border-top: 1px dashed #cfe3d6; }
.discount-row { background: #f0fbf4; border-radius: 10px; padding: 6px 8px !important; }

/* acciones fijas abajo del modal (siempre visibles) */
.sheet .btn-row {
  position: sticky; bottom: -26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 45%);
  padding-top: 12px; padding-bottom: 4px;
}

/* formularios más cómodos */
.field label { font-size: 14px; }
.field input, .field select, .field textarea { padding: 13px 14px; border-radius: 12px; font-size: 15px; }
.checkline { gap: 10px; }
.btn { min-height: 48px; }
.btn-sm { min-height: 38px; }
:focus-visible { outline: 3px solid rgba(22, 163, 74, 0.35); outline-offset: 2px; }

/* títulos y aire */
.sport-head { margin-top: 4px; }
.legend { gap: 10px 18px; padding: 2px 2px 14px; }
.status { padding: 34px 0; font-size: 15px; }
.info-strip { margin-top: 30px; }

@media (max-width: 640px) {
  .court-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .chips { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
  .chip { min-height: 50px; font-size: 13.5px; }
  .sheet { padding: 20px 16px; border-radius: 20px; }
}

/* secciones dentro de los formularios (más ordenados y fáciles de leer) */
.form-section { border-top: 1px solid var(--borde); margin-top: 16px; padding-top: 14px; }
.form-section:first-of-type { border-top: 0; margin-top: 6px; padding-top: 0; }
.form-section h4 {
  margin: 0 0 12px; font-size: 12.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gris-osc);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }

/* lightbox */
.lb-box { background: #000; border-radius: 20px; width: 100%; max-width: 900px; max-height: 92vh; position: relative; overflow: hidden; }
.lb-box .x { background: rgba(255,255,255,0.18); color: #fff; }
.lb-img img { width: 100%; max-height: 82vh; object-fit: contain; display: block; }
.lb-cap { color: #fff; text-align: center; padding: 10px; font-size: 14px; }

/* franja informativa */
.info-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 26px 0 0; }
.info-item {
  background: #fff; border: 1px solid var(--borde); border-radius: 18px; padding: 16px 18px;
  display: flex; gap: 12px; align-items: center; box-shadow: var(--sombra-lite);
}
.info-item span { font-size: 26px; }
.info-item b { display: block; font-size: 14.5px; }
.info-item small { color: var(--gris-osc); font-size: 12.5px; }

/* espacios publicitarios / decoración */
.ad-zone { margin-top: 22px; }
#ad-top { display: block; }
.ad-zone:empty { display: none; }
.ad-card {
  position: relative; overflow: hidden; border-radius: 18px; display: block;
  background: #eef2ef; border: 1px solid var(--borde); box-shadow: var(--sombra-lite);
  text-decoration: none;
}
.ad-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
#ad-top .ad-card { width: 100%; aspect-ratio: 24/5; min-height: 110px; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.ad-grid .ad-card { aspect-ratio: 16/5; min-height: 84px; }
@media (max-width: 620px) {
  #ad-top .ad-card { aspect-ratio: 16/6; }
  .ad-grid .ad-card { aspect-ratio: 16/5; }
}

/* footer */
.site-footer { margin-top: 44px; background: linear-gradient(150deg, #0a2f1d, #0d3b24); color: #d6eadc; }
.footer-inner { padding: 28px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.site-footer .foot-name { margin: 0; font-weight: 800; color: #fff; font-size: 16px; }
.site-footer .muted { color: #a9cfb8; margin: 2px 0 0; }
