/* =========================================================================
   BEST GYM · Hoja de estilos
   Paleta: negro, rojo y blanco (según el logo). Portada oscura, secciones claras.
   Puntos de corte: 720px (tableta), 900px (escritorio), 64em ≈ 1024px (menú
   horizontal; en em para que respete el tamaño de letra elegido por el usuario).
   ========================================================================= */

/* ---------- Fuentes autoalojadas (Barlow y Barlow Condensed, licencia OFL: assets/fonts/OFL.txt) ---------- */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-800-latin.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/barlow-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/barlow-600-latin.woff2') format('woff2'); }

/* ---------- Variables ---------- */
:root {
  --black: #0b0b0c;
  --ink: #151517;
  --ink-2: #1f1f23;
  --white: #ffffff;
  --paper: #f6f5f3;
  --paper-2: #ecebe8;
  --text: #1a1a1c;
  --muted: #5b5b63;
  --muted-dark: #c9c9cf;
  --red: #e00c14;
  --red-dark: #b10911;
  --red-light: #ff4b50;
  --line: #e2e1dd;
  --line-dark: #27272b;

  --font-display: 'Barlow Condensed', 'Arial Narrow', Impact, 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 64px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 8vw, 96px);
  --shadow: 0 12px 32px rgba(0, 0, 0, .12);
}
@media (min-width: 900px) { :root { --header-h: 72px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); overflow-x: hidden; overflow-x: clip; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.menu-open, html.dialog-open { overflow: hidden; }
body { margin: 0; font: 400 1rem/1.6 var(--font-body); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
dialog:not([open]) { display: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.section--dark :focus-visible, .site-header :focus-visible, .hero :focus-visible, .cta :focus-visible,
.site-footer :focus-visible, .lightbox :focus-visible, .notfound :focus-visible { outline-color: #fff; }
.block { display: block; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -120px; z-index: 100; padding: 12px 18px; background: var(--red); color: #fff; font-weight: 600; text-decoration: none; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--light { background: var(--white); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--black); color: #fff; }
.section--dark .section-lead { color: var(--muted-dark); }

/* ---------- Tipografía ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .65rem; margin: 0; font: 700 .8rem/1.2 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.eyebrow::before { content: ''; flex: none; width: 26px; height: 3px; background: currentColor; border-radius: 2px; }
.eyebrow--light { color: var(--red-light); }
.section-title { margin: .75rem 0 1rem; font: 800 clamp(2.1rem, 4.8vw, 3.4rem)/.98 var(--font-display); text-transform: uppercase; letter-spacing: -.005em; max-width: 20ch; text-wrap: balance; overflow-wrap: break-word; }
.section-lead { font-size: 1.08rem; line-height: 1.65; color: var(--muted); max-width: 62ch; }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.section-head .section-lead { margin-top: .25rem; }
.fine-print { font-size: .88rem; color: var(--muted); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; max-width: 100%; padding: .65rem 1.3rem; border-radius: 8px; border: 2px solid transparent; font: 700 1.02rem/1.1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn__note { font: 600 .8em/1 var(--font-body); letter-spacing: 0; text-transform: none; opacity: .85; }
.btn--lg { min-height: 56px; padding: .85rem 1.7rem; font-size: 1.12rem; }
.btn--primary { background: var(--red); color: #fff; }
.btn--ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn--text { background: transparent; color: var(--text); text-decoration: underline; text-underline-offset: 4px; padding-inline: .6rem; }
.btn--disabled, .btn[disabled] { background: var(--paper-2); color: var(--muted); border-color: transparent; cursor: not-allowed; }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background-color .2s ease; }
.icon-btn--dark { background: var(--paper-2); color: var(--text); }
@media (hover: hover) {
  .btn--primary:hover { background: var(--red-dark); }
  .btn--ghost:hover { background: #fff; color: var(--black); border-color: #fff; }
  .btn--outline:hover { background: var(--text); color: #fff; }
  .btn--text:hover { color: var(--red-dark); }
  .btn--disabled:hover, .btn[disabled]:hover { background: var(--paper-2); color: var(--muted); }
  .icon-btn:hover { background: rgba(255, 255, 255, .24); }
  .icon-btn--dark:hover { background: var(--line); }
}

/* ---------- Cabecera ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); border-bottom: 1px solid rgba(255, 255, 255, .06); }
/* El fondo con desenfoque vive en un pseudo-elemento: un backdrop-filter en la propia
   cabecera la convertiría en bloque contenedor del menú móvil (position: fixed). */
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(11, 11, 12, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .3s ease; }
.site-header.is-scrolled::before { background: rgba(11, 11, 12, .96); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%; }
.brand { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; max-width: none; }
.brand__word { width: auto; height: 17px; max-width: none; }
@media (min-width: 900px) { .brand__mark { width: 44px; height: 44px; } .brand__word { height: 19px; } }

.menu-toggle { flex: none; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 48px; height: 48px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.menu-toggle__bar { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 40; display: none; flex-direction: column; gap: 20px; padding: 20px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); background: var(--black); overflow-y: auto; overscroll-behavior: contain; }
.site-nav.is-open { display: flex; }
.site-nav__list { display: flex; flex-direction: column; }
.site-nav__list a { display: block; padding: 15px 0; font: 700 1.75rem/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; color: #fff; text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.site-nav__list a:hover { color: var(--red-light); }
.site-nav__cta { margin-top: auto; align-self: stretch; }

@media (min-width: 64em) {
  .menu-toggle { display: none; }
  .site-nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 28px; padding: 0; background: none; overflow: visible; }
  .site-nav__list { flex-direction: row; gap: 24px; }
  .site-nav__list a { position: relative; padding: 8px 2px; font: 600 .98rem/1 var(--font-body); letter-spacing: 0; text-transform: none; color: #e7e7ea; border: 0; white-space: nowrap; }
  .site-nav__list a::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
  .site-nav__list a:hover { color: #fff; }
  .site-nav__list a:hover::after { transform: scaleX(1); }
  .site-nav__cta { margin: 0; min-height: 44px; padding: .5rem 1.1rem; font-size: .95rem; white-space: nowrap; }
}

/* Sin JavaScript: el menú se muestra como una fila de enlaces bajo el logo */
html.no-js .menu-toggle { display: none; }
@media (max-width: 63.99em) {
  html.no-js .site-header { position: relative; height: auto; }
  html.no-js .site-header__inner { flex-wrap: wrap; height: auto; padding-block: 10px; row-gap: 4px; }
  html.no-js .site-nav { position: static; display: block; width: 100%; padding: 0; background: none; overflow: visible; }
  html.no-js .site-nav__list { flex-direction: row; flex-wrap: wrap; gap: 0 16px; }
  html.no-js .site-nav__list a { padding: 10px 0; font: 600 .95rem/1.2 var(--font-body); text-transform: none; letter-spacing: 0; border: 0; }
  html.no-js .site-nav__cta { display: none; }
  html.no-js .hero { padding-top: 24px; }
}

/* ---------- Portada ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 600px; min-height: min(100svh, 820px); padding-top: calc(var(--header-h) + 24px); background: var(--black); color: #fff; overflow: hidden; }
@media (max-width: 899px) { .hero { min-height: 560px; min-height: max(560px, 86svh); } }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero__shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(11, 11, 12, .55) 0%, rgba(11, 11, 12, .2) 30%, rgba(11, 11, 12, .72) 62%, var(--black) 100%); }
@media (min-width: 900px) { .hero__shade { background:
  linear-gradient(90deg, rgba(11, 11, 12, .78) 0%, rgba(11, 11, 12, .4) 55%, rgba(11, 11, 12, .1) 100%),
  linear-gradient(180deg, rgba(11, 11, 12, .45) 0%, rgba(11, 11, 12, .05) 35%, rgba(11, 11, 12, .6) 70%, var(--black) 100%); } }
.hero__content { position: relative; padding-bottom: clamp(56px, 9vh, 104px); }
.hero .eyebrow { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.hero .eyebrow::before { background: var(--red); }
.hero__title { margin: .9rem 0 1rem; font: 800 clamp(3rem, 11.5vw, 6.6rem)/.92 var(--font-display); text-transform: uppercase; letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); overflow-wrap: break-word; }
.hero__subtitle { max-width: 36ch; font-size: clamp(1.05rem, 1.4vw, 1.3rem); line-height: 1.5; color: #ececef; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.hero__branches { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: 1.6rem; font-size: .92rem; color: #b9b9c0; }
.hero__branches-names { color: #fff; font-weight: 600; }
.hero__scroll { position: absolute; right: var(--gutter); bottom: 18px; display: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
@media (min-width: 900px) { .hero__scroll { display: grid; } }
@media (prefers-reduced-motion: no-preference) { .hero__scroll svg { animation: nudge 2.2s ease-in-out 3; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- Galería (Instalaciones) ---------- */
.gallery-wrap { container-type: inline-size; }
.gallery { --g: 10px; display: grid; gap: var(--g); grid-template-columns: repeat(3, 1fr); grid-template-areas: "main main main" "a b c" "f f f"; }
.tile { position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0; overflow: hidden; border-radius: var(--radius-sm); background: var(--ink-2); cursor: zoom-in; aspect-ratio: 3 / 4; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile__zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(11, 11, 12, .7); color: #fff; opacity: .9; transition: opacity .2s ease, background-color .2s ease; }
@media (hover: hover) {
  .tile:hover img { transform: scale(1.035); }
  .tile:hover .tile__zoom { background: var(--red); opacity: 1; }
}
.tile:focus-visible img { transform: scale(1.035); }
.tile--main { grid-area: main; aspect-ratio: 4 / 5; }
.tile--a { grid-area: a; } .tile--b { grid-area: b; } .tile--c { grid-area: c; }
.tile--f { grid-area: f; aspect-ratio: 16 / 9; }
.tile--f img { object-position: 50% 78%; }
.gallery__note { margin-top: 12px; font-size: .85rem; color: var(--muted); }
@supports (height: 1cqw) {
  .gallery { grid-template-rows: calc(100cqw * 1.12) calc((100cqw - 2 * var(--g)) / 3 * 4 / 3) calc(100cqw * 9 / 16); }
  .gallery .tile { aspect-ratio: auto; height: 100%; }
}
@media (min-width: 720px) {
  .gallery { grid-template-areas: "main main a" "main main b" "c f f"; }
  .tile--main { aspect-ratio: auto; height: 100%; }
  .tile--f { aspect-ratio: 3 / 2; }
  @supports (height: 1cqw) { .gallery { grid-template-rows: repeat(3, calc((100cqw - 2 * var(--g)) / 3 * 4 / 3)); } }
}
@media (min-width: 1024px) {
  .gallery { --g: 12px; grid-template-columns: repeat(5, 1fr); grid-template-areas: "main main a b c" "main main f f f"; }
  .tile--f { aspect-ratio: 9 / 4; }
  @supports (height: 1cqw) { .gallery { grid-template-rows: repeat(2, calc((100cqw - 4 * var(--g)) / 5 * 4 / 3)); } }
}

/* ---------- Visor (lightbox) ---------- */
dialog { color: inherit; }
.lightbox { width: 100%; max-width: 100vw; height: 100%; max-height: 100vh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overscroll-behavior: contain; }
.lightbox::backdrop { background: rgba(5, 5, 6, .94); }
.lightbox__inner { position: relative; width: 100%; height: 100%; }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 100%; padding: 72px 16px 20px; }
.lightbox__img { max-width: min(100%, 1280px); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lightbox__caption { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; max-width: 70ch; text-align: center; font-size: .95rem; color: #d5d5da; }
.lightbox__counter { color: #a4a4ad; font-variant-numeric: tabular-nums; }
.lightbox__close { position: absolute; top: 14px; right: 14px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }
@media (min-width: 900px) { .lightbox__nav--prev { left: 28px; } .lightbox__nav--next { right: 28px; } .lightbox__figure { padding-inline: 96px; } }

/* ---------- Líder ---------- */
.leader { background: radial-gradient(900px 500px at 85% 10%, rgba(224, 12, 20, .22), transparent 60%), var(--black); }
.leader__grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
.leader__media { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; grid-template-areas: "big big" "a b"; }
.leader__photo { border-radius: var(--radius); aspect-ratio: 4 / 5; }
.leader__photo--main { grid-area: big; }
.leader__photo--a { grid-area: a; }
.leader__photo--b { grid-area: b; }
.leader__name { margin-top: 1.25rem; font: 700 1.1rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: #fff; }
@media (min-width: 720px) {
  .leader__media { grid-template-columns: 2fr 1fr; grid-template-areas: "big a" "big b"; }
  .leader__photo--main { aspect-ratio: auto; height: 100%; }
}
@media (min-width: 900px) { .leader__grid { grid-template-columns: 1fr 1.1fr; } }

/* ---------- Equipo ---------- */
.team__grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
.team__media { justify-self: center; width: 100%; max-width: 560px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.team__media img { width: 100%; height: auto; }
.team__text .btn { margin-top: 1.6rem; }
@media (min-width: 900px) {
  .team__grid { grid-template-columns: 1fr 1fr; }
  .team__media { order: -1; justify-self: stretch; }
}

/* ---------- Transformación ---------- */
.transformation__grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
.carousel { position: relative; min-width: 0; }
.carousel__track { position: relative; display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel__caption { margin-top: 10px; font: 700 .95rem/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.carousel__controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.carousel__controls[hidden] { display: none; }
.carousel__btn { width: 44px; height: 44px; }
.carousel__btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.carousel__dots { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px; }
.carousel__dot { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.carousel__dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: transparent; border: 2px solid var(--muted); transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.carousel__dot[aria-current="true"]::before { background: var(--red); border-color: var(--red); transform: scale(1.2); }
.carousel__status { min-width: 4.5ch; text-align: center; font: 600 .9rem/1 var(--font-body); color: var(--muted); font-variant-numeric: tabular-nums; }
html.no-js .carousel__track { display: grid; gap: 28px; overflow: visible; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare__panel { position: relative; min-width: 0; }
.compare__btn { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 5; background: linear-gradient(180deg, #202024, #0b0b0c); }
.compare__btn img { width: 100%; height: 100%; object-fit: contain; }
.carousel .compare__btn:focus-visible { outline-offset: -4px; }
.compare__label { position: absolute; top: 12px; left: 12px; padding: 8px 12px; border-radius: 6px; background: #fff; color: var(--black); font: 700 .85rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.compare__label--after { background: var(--red); color: #fff; }
.transformation__text .fine-print { margin-top: 1rem; }
.transformation__text .btn { margin-top: 1.4rem; }
@media (min-width: 900px) { .transformation__grid { grid-template-columns: 1.15fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .carousel__track { scroll-behavior: auto; } .carousel__dot::before { transition: none; } }

/* ---------- Sucursales ---------- */
.branch-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
@media (min-width: 680px) and (max-width: 1007.98px) {
  .branch-grid { grid-template-columns: repeat(2, 1fr); }
  .branch-grid > .branch-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 11px); }
}
.branch-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .06); }
.branch-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-2); }
.branch-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.branch-card__badge { position: absolute; left: 12px; bottom: 12px; padding: 6px 10px; border-radius: 6px; background: rgba(11, 11, 12, .72); color: #fff; font-size: .75rem; letter-spacing: .02em; }
.branch-card__body { display: flex; flex-direction: column; gap: 14px; padding: 20px; flex: 1; }
.branch-card__title { font: 800 1.7rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.branch-card__title span { color: var(--red); }
.branch-card__details { display: grid; gap: 6px; }
.branch-card__detail { display: flex; align-items: flex-start; gap: 8px; color: var(--text); font-size: .98rem; line-height: 1.45; }
.branch-card__detail svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--red); }
.branch-card__sub { display: block; color: var(--muted); font-size: .9rem; }
.branch-card__phone { display: inline-block; padding-block: 4px; margin-block: -4px; color: var(--text); font-weight: 600; text-decoration: none; letter-spacing: .01em; }
.location-card { display: grid; gap: 10px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.location-card__head { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.location-card__head svg { flex: none; width: 20px; height: 20px; color: var(--red); }
.location-card__text { margin: 0; font-size: .9rem; color: var(--muted); }
.location-card .btn { justify-self: start; min-height: 44px; font-size: .92rem; }
.location-card--pending { flex: 1 1 auto; align-content: start; background: var(--paper); border-style: dashed; }
.branch-card__map { display: grid; gap: 8px; }
.map-frame { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2) repeating-linear-gradient(45deg, transparent 0 14px, rgba(0, 0, 0, .025) 14px 28px); }
.map-frame__placeholder { padding: 0 12px; font-size: .85rem; color: var(--muted); text-align: center; }
.map-frame.is-loaded .map-frame__placeholder { display: none; }
.map-frame__link { padding: 14px; color: var(--text); font-weight: 600; text-underline-offset: 3px; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: .85rem; }
.map-note a { display: inline-block; padding-block: 8px; color: var(--text); font-weight: 600; text-underline-offset: 3px; }
.pending-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: .78rem; }
.pending-tag::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.branch-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.branch-card__actions .btn { flex: 1 1 160px; min-height: 48px; padding-inline: .9rem; font-size: .95rem; }
.branch-card__actions .btn--primary, .branch-card__actions--stack .btn { flex-basis: 100%; }
.branch-fallback { grid-column: 1 / -1; }
.branch-fallback li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.branch-fallback__note { margin-top: 12px; color: var(--muted); }
.img-placeholder { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; background: linear-gradient(180deg, #202024, #0b0b0c); color: #c9c9cf; font-size: .9rem; }

/* ---------- Selector de sucursal ---------- */
.selector { width: min(100% - 24px, 640px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 18px; background: #fff; color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overscroll-behavior: contain; }
.selector::backdrop { background: rgba(5, 5, 6, .78); }
.selector__inner { padding: clamp(20px, 4vw, 32px); }
.selector__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.selector__title { margin-top: .6rem; font: 800 clamp(1.7rem, 4vw, 2.3rem)/1 var(--font-display); text-transform: uppercase; letter-spacing: -.005em; }
.selector__title:focus { outline: none; }
.selector__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.selector__item:last-child { border-bottom: 1px solid var(--line); }
.selector__info { flex: 1 1 170px; min-width: 0; }
.selector__goto { flex: 0 0 auto; min-height: 44px; }
.selector__actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.selector__actions .btn { flex: 1 1 190px; min-height: 44px; padding: .5rem .9rem; font-size: .9rem; }
.selector__phone { color: var(--text); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .branch-card__phone:hover, .selector__phone:hover { text-decoration: underline; text-underline-offset: 3px; } }
.selector__name { font: 800 1.3rem/1.05 var(--font-display); text-transform: uppercase; }
.selector__loc { margin-top: 4px; font-size: .9rem; color: var(--muted); }
.selector__note { margin-top: 14px; font-size: .85rem; color: var(--muted); }
@media (max-width: 379px) { .selector__goto { padding-inline: 0; } }

/* ---------- Preguntas frecuentes ---------- */
.faq__grid { display: grid; gap: 28px; }
.faq__grid .section-head { margin-bottom: 0; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 4px; list-style: none; cursor: pointer; font: 600 1.1rem/1.35 var(--font-body); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary svg { flex: none; color: var(--red); transition: transform .3s ease; }
.faq__item[open] summary svg { transform: rotate(45deg); }
@media (hover: hover) { .faq__item summary:hover { color: var(--red-dark); } }
.faq__answer { padding: 0 4px 20px; color: var(--muted); max-width: 62ch; line-height: 1.65; }
.faq__answer a { color: var(--text); font-weight: 600; }
@media (min-width: 900px) { .faq__grid { grid-template-columns: 1fr 1.35fr; align-items: start; gap: 56px; } }

/* ---------- Cierre ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; padding: clamp(80px, 13vw, 140px) 0; background: var(--black); color: #fff; text-align: center; }
.cta__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; opacity: .55; }
.cta__shade { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 50% 60%, rgba(224, 12, 20, .32), transparent 70%), linear-gradient(180deg, rgba(11, 11, 12, .75), rgba(11, 11, 12, .9)); }
.cta__title { margin: 0 auto 30px; max-width: 18ch; font: 800 clamp(2.3rem, 6.4vw, 4.4rem)/.96 var(--font-display); text-transform: uppercase; text-wrap: balance; overflow-wrap: break-word; }

/* ---------- Pie de página ---------- */
.site-footer { padding: 56px 0 24px; background: #050506; color: var(--muted-dark); border-top: 1px solid var(--line-dark); }
.site-footer__grid { display: grid; gap: 36px; }
.site-footer__logo { width: 140px; height: auto; }
.site-footer__tagline { margin-top: 14px; font-size: .95rem; }
.site-footer__heading { margin: 0 0 8px; font: 700 .82rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.site-footer ul { display: grid; gap: 2px; }
.site-footer a { color: var(--muted-dark); text-decoration: none; }
.site-footer li a { display: inline-block; padding-block: 7px; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: .9rem; }
.site-footer__top { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }

/* ---------- Botón flotante ---------- */
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 18px 0 16px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font: 700 1rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; cursor: pointer; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); transition: background-color .2s ease, transform .2s ease; }
.fab svg { width: 22px; height: 22px; }
@media (hover: hover) { .fab:hover { background: var(--red-dark); transform: translateY(-1px); } }

/* ---------- Página 404 ---------- */
.notfound { display: grid; place-content: center; justify-items: center; gap: 18px; min-height: 100vh; min-height: 100svh; padding: 48px var(--gutter); background: radial-gradient(70% 60% at 50% 40%, rgba(224, 12, 20, .22), transparent 70%), var(--black); color: #fff; text-align: center; }
.notfound__title { font: 800 clamp(2.4rem, 8vw, 4.4rem)/.95 var(--font-display); text-transform: uppercase; }
.notfound__text { max-width: 44ch; color: var(--muted-dark); }

/* ---------- Animaciones de entrada ----------
   Solo se ocultan cuando main.js añade .reveal-ready: si JavaScript falla, todo se ve. */
.reveal { transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.reveal-ready .reveal:not(.is-visible) { opacity: 0; transform: translateY(18px); }

/* ---------- Sin JavaScript ---------- */
html.no-js .tile, html.no-js .compare__btn { cursor: default; }
html.no-js .tile__zoom, html.no-js .js-only, html.no-js [data-lightbox] .visually-hidden { display: none; }
html.no-js .tile:focus-visible img { transform: none; }

/* ---------- Preferencias del sistema ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .tile img, .btn, .fab, .menu-toggle__bar, .faq__item summary svg, .site-header::before { transition: none; }
  .tile:hover img, .tile:focus-visible img { transform: none; }
}
@media (forced-colors: active) {
  .menu-toggle__bar { background: CanvasText; }
  .btn--disabled, .btn[disabled] { border-color: GrayText; color: GrayText; }
  .carousel__dot[aria-current="true"]::before { border-width: 5px; }
}
@media print {
  .site-header, .fab, .hero__scroll, .skip-link, .carousel__controls { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .carousel__track { display: grid; gap: 28px; overflow: visible; }
}
