/* ---------- Base común (se usa igual en todas las páginas) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.ico { width: 1.2em; height: 1.2em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -9999px; top: 0; padding: 10px 14px; z-index: 100; background: #000; color: #fff; }
.saltar:focus { left: 8px; top: 8px; }
.form__error:empty { display: none; }
[hidden] { display: none !important; }

/* Botón flotante de WhatsApp con menú */
.wa { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: end; gap: 10px; transition: transform .3s ease, opacity .3s ease; }
.wa.oculto { transform: translateY(110px); opacity: 0; pointer-events: none; }
.wa__boton { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: #1F8A4C; color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.28); transition: transform .2s ease; }
.wa__boton:hover { transform: scale(1.06); }
.wa__boton:active { transform: scale(.95); }
.wa__boton .ico { width: 30px; height: 30px; }
.wa__menu { display: grid; gap: 6px; min-width: 230px; padding: 8px; border-radius: 16px; background: #fff; color: #1d1d1f; box-shadow: 0 14px 40px rgba(0,0,0,.25);
  transform-origin: bottom right; transform: scale(.85) translateY(10px); opacity: 0; visibility: hidden; transition: transform .22s ease, opacity .22s ease, visibility 0s .22s; }
.wa.abierto .wa__menu { transform: none; opacity: 1; visibility: visible; transition: transform .22s ease, opacity .22s ease; }
.wa__menu p { font-size: .8125rem; color: #555; padding: 6px 10px 2px; }
.wa__menu a { display: flex; align-items: center; min-height: 46px; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; background: #F1F4F2; }
.wa__menu a:hover, .wa__menu a:focus-visible { background: #DCF1E3; }

/* Movimiento al hacer scroll: solo si la persona no pidió reducirlo */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  .js [data-reveal].visto { opacity: 1; transform: none; }
  .js [data-cascada] > * { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
  .js [data-cascada].visto > * { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Blue Gym ---------- */
:root {
  --azul: #1446A0;
  --azul-osc: #0F3478;
  --noche: #0A1838;
  --celeste: #4FB0F2;
  --cielo: #CFE8FB;
  --hielo: #F1F7FD;
  --amarillo: #FFD21F;
  --gris: #4F5B70;
  --cond: "Saira Extra Condensed", "Arial Narrow", sans-serif;
  --texto: "Saira", system-ui, sans-serif;
  --max: 1160px;
  --g: 20px;
  --azulejo: radial-gradient(circle at 0 0, var(--azul) 21%, transparent 22%), radial-gradient(circle at 100% 0, var(--azul) 21%, transparent 22%),
             radial-gradient(circle at 0 100%, var(--azul) 21%, transparent 22%), radial-gradient(circle at 100% 100%, var(--azul) 21%, transparent 22%),
             radial-gradient(circle, var(--celeste) 9%, transparent 10%, transparent 26%, var(--azul) 27%, var(--azul) 31%, transparent 32%);
}
body { background: #fff; color: var(--noche); font: 400 1.0625rem/1.6 var(--texto); }
h1, h2, h3 { font-family: var(--cond); font-weight: 800; line-height: .95; text-transform: uppercase; letter-spacing: .005em; }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 3px; }

.cabecera { position: absolute; inset: 0 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--g); color: #fff; }
.marca { font: 800 1.9rem/1 var(--cond); text-transform: uppercase; text-decoration: none; letter-spacing: .01em; }
.marca span, .pie__marca span { color: var(--celeste); margin-left: 4px; }
.cabecera__tel { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 2px solid rgba(255,255,255,.8); border-radius: 999px; text-decoration: none; font-weight: 600; }
.cabecera__tel:hover { background: #fff; color: var(--azul); }

.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font: 800 1.25rem/1 var(--cond); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.boton:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(10,24,56,.8); }
.boton:active { transform: scale(.98); }
.boton--blanco { background: #fff; color: var(--azul); }
.boton--azul { background: var(--azul); color: #fff; }
.boton--azul:hover { background: var(--azul-osc); }
.boton--linea { border-color: var(--azul); color: var(--azul); }
.titulo { font-size: clamp(2.6rem, 12vw, 5rem); color: var(--azul); }

/* Hero */
.hero { position: relative; min-height: min(100svh, 820px); display: grid; align-items: end; overflow: hidden; isolation: isolate; background: var(--azul); }
.hero__fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: grayscale(1) contrast(1.1); mix-blend-mode: luminosity; opacity: .5; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,70,160,.2), rgba(10,24,56,.85) 80%); }
.hero__cont { padding: 100px var(--g) 44px; max-width: var(--max); margin: 0 auto; width: 100%; display: grid; gap: 14px; justify-items: start; color: #fff; }
.hero__horas { display: flex; align-items: baseline; gap: 10px; font-family: var(--cond); font-weight: 800; line-height: .8; }
.hero__num { font-size: clamp(7rem, 40vw, 15rem); letter-spacing: -.02em; }
.hero__num:last-child { color: var(--celeste); }
.hero__a { font-size: clamp(2rem, 9vw, 4rem); color: var(--cielo); }
.hero__titulo { font-size: clamp(2rem, 9vw, 3.6rem); }
.hero__texto { color: #DCE8F7; max-width: 30em; }
.hero__cont .boton { width: 100%; max-width: 360px; }
.hero__nota { color: #C9D7EA; font-size: .95rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.hero__calif { font: 800 1.7rem/1 var(--cond); color: #fff; }
.estrellas { color: var(--amarillo); letter-spacing: 1px; }

@media (prefers-reduced-motion: no-preference) {
  .hero__num:first-child { animation: entra .7s .1s cubic-bezier(.2,.9,.3,1.1) both; }
  .hero__a { animation: aparece .5s .45s ease both; }
  .hero__num:last-child { animation: entra .7s .55s cubic-bezier(.2,.9,.3,1.1) both; }
  .hero__titulo, .hero__texto { animation: sube .6s .7s ease both; }
  .hero__cont .boton, .hero__nota { animation: sube .6s .85s ease both; }
  @keyframes entra { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
  @keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
  @keyframes sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* El día: del amanecer a la noche */
.dia { max-width: var(--max); margin: 0 auto; padding: 64px var(--g); }
.dia__cab { display: grid; gap: 8px; margin-bottom: 24px; }
.dia__cab p { color: var(--gris); max-width: 32em; }
.cielo { position: relative; border-radius: 22px; padding: 22px 18px 18px; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #8FD0FA 0%, #3D8EE0 30%, #1446A0 62%, #0A1838 100%); }
.cielo::before { content: ""; position: absolute; width: 46px; height: 46px; border-radius: 50%; left: calc(100% - 64px); top: 18px; background: #FFF4C2; box-shadow: 0 0 30px 8px rgba(255,240,180,.6); }
.cielo__momentos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.momento { display: grid; grid-template-columns: 88px 1fr; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.momento:last-child { border-bottom: 0; }
.momento__hora { font: 800 2.6rem/1 var(--cond); }
.momento__texto { font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .js .cielo::before { top: 18px; left: 18px; transform: scale(.6); background: #FFE07A; transition: none; }
  .js .cielo.visto::before { animation: astro 2.2s .2s cubic-bezier(.4,0,.2,1) forwards; }
  @keyframes astro { 0% { top: 80%; left: 18px; background: #FFC84A; transform: scale(.8); } 50% { top: 18px; background: #FFF4C2; transform: scale(1); } 100% { top: 18px; left: calc(100% - 64px); background: #E8EEFF; box-shadow: 0 0 24px 6px rgba(220,230,255,.5); transform: scale(.8); } }
}
.dia__sabado { margin-top: 16px; font-weight: 600; }
.abierto { color: var(--gris); font-weight: 400; }
.abierto--si { color: #16794A; font-weight: 600; }

/* Planes */
.planes { padding: 0 var(--g) 64px; }
.planes__caja { max-width: var(--max); margin: 0 auto; background: var(--hielo); border: 2px solid var(--cielo); border-radius: 22px; padding: 30px 22px; display: grid; gap: 12px; justify-items: start; }
.planes__caja p { color: var(--gris); max-width: 30em; }

/* Sala */
.sala { max-width: var(--max); margin: 0 auto; padding: 0 var(--g) 64px; }
.sala .titulo { margin-bottom: 18px; }
.sala__fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sala__fotos figure { margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 4; }
.sala__fotos figure.ancha { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.sala__fotos img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.sala__fotos figure:hover img { transform: scale(1.05); }

/* Sociedad Española: azulejos */
.sociedad { background-color: #fff; background-image: var(--azulejo); background-size: 72px 72px; padding: 56px var(--g); display: grid; gap: 0; }
.sociedad__foto { margin: 0 auto; max-width: 720px; width: 100%; border: 8px solid #fff; border-radius: 18px 18px 0 0; overflow: hidden; aspect-ratio: 4 / 3; }
.sociedad__foto img { width: 100%; height: 100%; object-fit: cover; }
.sociedad__texto { margin: 0 auto; max-width: 720px; width: 100%; background: #fff; border-radius: 0 0 18px 18px; padding: 22px; display: grid; gap: 8px; }
.sociedad__texto .titulo { font-size: clamp(2rem, 9vw, 3.4rem); }
.sociedad__texto p { color: var(--gris); }

/* Visita */
.visita { max-width: var(--max); margin: 0 auto; padding: 64px var(--g) 72px; display: grid; gap: 24px; }
.visita__info { display: grid; gap: 16px; align-content: start; }
address { font-style: normal; font-size: 1.1rem; font-weight: 500; }
.horarios { width: 100%; border-collapse: collapse; }
.horarios th, .horarios td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--cielo); font-weight: 500; }
.horarios td { text-align: right; }
.horarios .hoy th, .horarios .hoy td { color: var(--azul); font-weight: 700; }
.hoy__marca { font-size: .72rem; background: var(--azul); color: #fff; border-radius: 999px; padding: 1px 9px; margin-left: 4px; vertical-align: 2px; }
.visita__acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.visita__acciones .boton { padding: 12px 8px; font-size: 1.1rem; }
.visita__mapa { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--hielo); }
.visita__mapa iframe { width: 100%; height: 100%; border: 0; display: block; }

.pie { background: var(--noche); color: #B8C6DD; text-align: center; padding: 40px var(--g) 110px; display: grid; gap: 4px; }
.pie__marca { font: 800 2.2rem/1 var(--cond); text-transform: uppercase; color: #fff; margin-bottom: 6px; }
.pie a { color: #fff; text-underline-offset: 4px; }
.pie__brito { margin-top: 12px; font-size: .85rem; }

.wa__boton { background: var(--azul); }
.wa__menu { border-radius: 20px; }
.wa__menu a { background: var(--hielo); }
.wa__menu a:hover, .wa__menu a:focus-visible { background: var(--cielo); }

@media (min-width: 820px) {
  :root { --g: 40px; }
  .hero__cont { padding-bottom: 72px; }
  .hero__cont .boton { width: auto; }
  .dia { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0 56px; align-items: center; }
  .dia__sabado { grid-column: 2; }
  .cielo { padding: 28px 28px 22px; }
  .cielo__momentos { grid-template-columns: repeat(4, 1fr); padding-top: 70px; }
  .momento { grid-template-columns: 1fr; border-bottom: 0; border-left: 1px solid rgba(255,255,255,.3); padding: 0 0 0 14px; gap: 6px; }
  .planes__caja { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; padding: 32px 40px; }
  .sala__fotos { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; }
  .sala__fotos figure { aspect-ratio: auto; }
  .sala__fotos figure.ancha { grid-column: span 2; aspect-ratio: auto; }
  .sociedad { grid-template-columns: 1.2fr 1fr; max-width: none; padding: 80px max(var(--g), calc((100vw - var(--max)) / 2 + var(--g))); align-items: center; }
  .sociedad__foto { border-radius: 18px 0 0 18px; margin: 0; max-width: none; }
  .sociedad__texto { border-radius: 0 18px 18px 0; margin: 0; max-width: none; height: 100%; align-content: center; padding: 36px; }
  .visita { grid-template-columns: 1fr 1.3fr; }
  .visita__mapa { aspect-ratio: auto; min-height: 380px; }
  .pie { padding-bottom: 48px; }
}
