:root {
  --fit: #1b64a8;        /* azul del aro del logo */
  --fit-dark: #143f72;   /* azul oscuro */
  --fit-light: #e4f3fb;  /* celeste suave */
  --fit-cyan: #29b6e8;   /* celeste del círculo */
  --accent: #df7c2c;     /* naranja del logo */
  --accent-dark: #c4651a;
  --bs-link-color: var(--fit);
  --bs-link-hover-color: var(--fit-dark);
}
body { background: #f4f7fa; }
.bg-fit { background: linear-gradient(90deg, #0f2f57, var(--fit-dark) 55%, #1b5a9a); }
.wordmark { font-family: 'Cinzel', Georgia, serif; font-weight: 800; letter-spacing: .06em; font-size: 1.15rem;
  background: linear-gradient(180deg, #f7b26a 0%, #e8883a 55%, #c76519 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; }
.wordmark.small { font-size: .95rem; }
.emblema { filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.text-fit { color: var(--fit) !important; }
.btn-fit { background: var(--fit); border-color: var(--fit); color: #fff; }
.btn-fit:hover { background: var(--fit-dark); border-color: var(--fit-dark); color: #fff; }
.btn-outline-fit { border-color: var(--fit); color: var(--fit); }
.btn-outline-fit:hover { background: var(--fit); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

/* Botones menos rígidos: más redondeados y con movimiento al pasar/tocar */
.btn { border-radius: .65rem; transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease; }
.btn-lg { border-radius: .8rem; }
.btn-fit, .btn-accent, .btn-success, .btn-danger, .btn-outline-fit { will-change: transform; }
.btn-fit:hover, .btn-accent:hover, .btn-success:hover, .btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.btn-outline-fit:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-accent:focus-visible, .btn-fit:focus-visible { outline: 3px solid rgba(249,115,22,.35); outline-offset: 2px; }
.badge.text-bg-fit { background: var(--fit) !important; color: #fff; }
.navbar .nav-link.active { font-weight: 600; border-bottom: 2px solid var(--accent); }

.hero {
  background: radial-gradient(1200px 420px at 10% -20%, #2aa7dd 0, transparent 60%),
              radial-gradient(700px 300px at 92% 115%, #e07b2a 0, transparent 60%),
              linear-gradient(135deg, #0f2f57, #143f72 55%, #1b5a9a);
  background-size: 160% 160%, 160% 160%, 100% 100%;
  color: #fff; border-radius: 1rem;
  animation: heroMov 18s ease-in-out infinite alternate;
}
@keyframes heroMov { from { background-position: 0% 0%, 100% 100%, 0 0; } to { background-position: 20% 15%, 80% 90%, 0 0; } }
@media (prefers-reduced-motion: reduce) { .hero { animation: none; } }

/* Acento deportivo en los títulos de sección */
main h2.h4, main h2.h5 { position: relative; padding-left: .7rem; }
main h2.h4::before, main h2.h5::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 5px; border-radius: 3px; background: linear-gradient(var(--accent), var(--fit)); }

/* Aparición suave al hacer scroll (se activa por JS) */
.js-anim .reveal { opacity: 0; transform: translateY(16px); }
.js-anim .reveal.visible { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
.hero .logo-hero { max-height: 250px; width: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.logo-login { max-width: 190px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.hero h1 { font-weight: 800; letter-spacing: -.02em; }
.hero .form-control, .hero .form-select { border: 0; }

.card-hover { transition: transform .15s, box-shadow .15s; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.10); }
.object-fit-cover { object-fit: cover; width: 100%; height: 100%; }
.seccion-card { border: 0; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.seccion-card .icono { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

.fecha-box { min-width: 56px; background: var(--fit-light); border-radius: .75rem; padding: .4rem .3rem; }
.fecha-box .dia { font-size: 1.4rem; font-weight: 800; line-height: 1; color: var(--fit-dark); }
.fecha-box .mes { font-size: .7rem; font-weight: 700; color: var(--accent-dark); letter-spacing: .05em; }

.mapa { width: 100%; height: 420px; border-radius: 1rem; z-index: 0; }
.mapa-alto { height: 60vh; min-height: 380px; }
@media (max-width: 991px) { .mapa { height: 300px; } }

.filtros { background: #fff; border-radius: 1rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.filtros .form-control, .filtros .form-select { border-radius: 2rem; border-color: #a9d3ee; }
.form-control:focus, .form-select:focus { border-color: var(--fit); box-shadow: 0 0 0 .2rem rgba(27,100,168,.15); }

.resultado-calc { background: var(--fit-light); border-left: 5px solid var(--fit); border-radius: .75rem; padding: 1rem 1.25rem; }
.resultado-calc .valor { font-size: 2rem; font-weight: 800; color: var(--fit-dark); line-height: 1.1; }
.tabla-zonas td, .tabla-zonas th { padding: .35rem .6rem; }

.contenido-guia h5 { margin-top: 1.25rem; color: var(--fit-dark); }
.contenido-guia ol, .contenido-guia ul { padding-left: 1.25rem; }
.contenido-guia li { margin-bottom: .35rem; }
.alerta-urgente { background: #fff1f2; border: 1px solid #fecdd3; border-radius: .75rem; padding: .75rem 1rem; }

.producto-img { height: 180px; object-fit: contain; background: #fff; padding: .75rem; }
.chip { display: inline-block; background: var(--fit-light); color: var(--fit-dark); border-radius: 2rem; padding: .15rem .7rem; font-size: .8rem; margin: 0 .25rem .25rem 0; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: #fff;
  border-top: 1px solid #e5e7eb; display: flex; justify-content: space-around;
  padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
}
.bottom-nav a { color: #6b7280; text-decoration: none; display: flex; flex-direction: column; align-items: center; font-size: .68rem; min-width: 56px; }
.bottom-nav a i { font-size: 1.3rem; line-height: 1.1; }
.bottom-nav a.active { color: var(--fit); font-weight: 600; }
@media (max-width: 991px) { main { padding-bottom: 72px !important; } .footer-sitio { margin-bottom: 64px; } }

.leaflet-popup-content { font-size: .85rem; }
.leaflet-popup-content h6 { margin: 0 0 .25rem; font-size: .95rem; }
.marker-num { background: var(--accent); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

.admin-barra { background: #fff; border-radius: .75rem; padding: .5rem .75rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 4px solid var(--accent); }
.admin-barra .btn-sm { font-size: .78rem; padding: .2rem .55rem; }
.planilla { background: #fff; border-radius: 1rem; padding: 2rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); max-width: 860px; margin: 0 auto; }
.planilla .credencial { font-family: Consolas, monospace; font-size: 1.25rem; background: var(--fit-light); border: 1px dashed var(--fit); border-radius: .5rem; padding: .35rem .75rem; display: inline-block; }
.planilla .checklist li { padding: .3rem 0; border-bottom: 1px dotted #ddd; }
.progreso-ficha .progress { height: 10px; }
@media print {
  nav, footer, .bottom-nav, .no-print, .alert { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; }
  .planilla { box-shadow: none; padding: 0; max-width: none; }
  a { text-decoration: none; color: #000; }
}
.galeria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.galeria-grid .galeria-item { display: block; aspect-ratio: 1/1; border-radius: .6rem; overflow: hidden; background: #e9eef1; }
.galeria-grid .galeria-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.galeria-grid .galeria-item:hover img { transform: scale(1.06); }

.clima-card { border-radius: 1rem; padding: 1.25rem 1.5rem; color: #fff; height: 100%; display: flex; align-items: center; }
.clima-card.clima-dia { background: linear-gradient(135deg, #1b64a8, #29b6e8); }
.clima-card.clima-noche { background: linear-gradient(135deg, #0f2f57, #143f72); }
.clima-card .clima-icono { font-size: 3.2rem; }
.clima-card .clima-temp { font-size: 2.8rem; font-weight: 800; line-height: 1; }
.pron-card { background: #fff; border-radius: .75rem; padding: .6rem .4rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.countdown-evento { display: inline-block; background: var(--fit-light); color: var(--fit-dark); border-radius: 2rem; padding: .35rem 1rem; font-weight: 700; }
.badge.text-bg-accent { background: var(--accent) !important; color: #fff; }
.encuesta-card { border-radius: 1rem; background: linear-gradient(135deg, #fff 60%, var(--fit-light)); }
.encuesta-card .btn-outline-fit { border-radius: 2rem; }
.seccion-card .icono { transition: transform .15s; }
.seccion-card.card-hover:hover .icono { transform: scale(1.08); }

.admin-tabla td, .admin-tabla th { vertical-align: middle; white-space: nowrap; }
.admin-tabla td.wrap { white-space: normal; }
.stat { background: #fff; border-radius: 1rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat .n { font-size: 1.8rem; font-weight: 800; color: var(--fit-dark); }

/* Banda de cross-promo a productos */
.promo-productos { border-radius: 1rem; padding: 1rem 1.25rem; color: #fff;
  background: linear-gradient(120deg, var(--fit-dark), var(--fit) 60%, var(--fit-cyan)); box-shadow: 0 2px 8px rgba(20,63,114,.25); }
.promo-productos .bi-bag-heart-fill { color: #ffd36b; }

/* Título de grupo con barrita de color (productos agrupados) */
.franja-titulo { display: inline-block; width: 6px; height: 1.1em; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--fit)); }

/* Recuadro de muestra "espacio para publicidad" */
.publicidad-demo { min-height: 120px; padding: 1rem;
  background: linear-gradient(120deg, var(--fit) 0%, var(--fit-cyan) 45%, var(--accent) 115%);
  background-size: 160% 160%; }
.publicidad-demo a { color: #fff; }

/* Botones de compartir */
.compartir .btn i { font-size: 1rem; }

/* Avatar/foto circular en tarjetas de profesionales */
.avatar-circ { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto;
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(20,63,114,.18); background: #eef2f6; display: block; }
.prof-card .avatar-circ { transition: transform .15s; }
.prof-card:hover .avatar-circ { transform: scale(1.05); }

/* Fotos sin recortar (detalle de evento/historia y miniaturas) */
.foto-detalle { width: 100%; max-height: 460px; object-fit: contain; background: #eef2f6; display: block; }
img.foto-thumb { width: 100%; height: 100%; object-fit: contain; background: #eef2f6; }

/* Editor de recorridos en el mapa (admin de circuitos) */
.mapa-ruta-wrap { position: relative; }
.mapa-ruta-wrap .leaflet-container { cursor: crosshair; }

/* Franja decorativa de personas ejercitándose */
.franja-activa { position: relative; overflow: hidden; height: 140px; margin-top: 1.5rem;
  background: linear-gradient(180deg, #1b64a8 0%, #29b6e8 60%, #0d8a63 100%); }
.franja-activa .sol { position: absolute; top: 20px; right: 9%; width: 44px; height: 44px; border-radius: 50%;
  background: #ffd36b; box-shadow: 0 0 34px 6px rgba(255,211,107,.55); }
.franja-activa .suelo { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: rgba(0,0,0,.18); }
.franja-activa .tira { position: absolute; bottom: 16px; left: 0; display: flex; gap: 62px; white-space: nowrap;
  font-size: 54px; line-height: 1; color: rgba(255,255,255,.92); will-change: transform; }
body.js-anim .franja-activa .tira { animation: fitCorre 20s linear infinite; }
.franja-activa .tira i { animation: fitBob 1.1s ease-in-out infinite; }
.franja-activa .tira i:nth-child(2n) { animation-delay: .25s; }
.franja-activa .tira i:nth-child(3n) { animation-delay: .5s; }
@keyframes fitCorre { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fitBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  body.js-anim .franja-activa .tira, .franja-activa .tira i { animation: none; }
}
