/* Centro de Fisioterapia Bernabé — propuesta de diseño */
:root {
  --white: #FFFFFF;
  --alt: #E8F1F8;
  --navy: #1E3A5F;
  --navy-2: #28496F;
  --accent: #E8833A;
  --text: #1B2633;
  --muted: #3D4B5C;
  --line: #C9D9E8;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(30, 58, 95, .10);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  padding-bottom: 72px; /* barra móvil */
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-top: 1.5rem; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  padding: .85em 1.4em; border-radius: 999px; border: 2px solid transparent;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
  min-height: 48px; text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: .55em 1.1em; font-size: .92rem; min-height: 40px; }
.btn--lg { padding: 1em 1.6em; font-size: 1.05rem; }
.btn--accent { background: var(--accent); color: var(--text); box-shadow: 0 4px 14px rgba(232, 131, 58, .35); }
.btn--accent:hover { background: #EF9450; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--light { background: transparent; color: #fff; border-color: #fff; }
.btn--light:hover { background: #fff; color: var(--navy); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy); margin-bottom: .8em;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); border-radius: 2px; }
.eyebrow--light { color: #fff; }

/* Cabecera */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.header.scrolled { border-color: var(--line); box-shadow: 0 2px 12px rgba(30, 58, 95, .08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); }
.logo__mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--navy); color: #fff; font: 700 1.35rem/1 var(--serif);
  box-shadow: inset 0 -5px 0 var(--accent);
}
.logo__text { font: 700 1.3rem/1 var(--serif); display: flex; flex-direction: column; }
.logo__text small { font: 500 .66rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }

.menu-btn {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 11px; background: none; border: 0; cursor: pointer; border-radius: 10px;
}
.menu-btn span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  display: none; flex-direction: column; padding: 8px 20px 20px;
}
.nav.open { display: flex; }
.nav a:not(.btn) { padding: 14px 4px; text-decoration: none; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--alt); }
.nav a:not(.btn):hover { color: var(--navy); }
.nav .btn { margin-top: 14px; }
.no-js .nav { position: static; display: flex; box-shadow: none; }
.no-js .menu-btn { display: none; }

/* Portada */
.hero { position: relative; padding: 40px 0 70px; background: #fff; overflow: hidden; }
.hero__grid { display: grid; gap: 28px; align-items: center; }
.hero__title { font-size: clamp(2.1rem, 8.5vw, 3.6rem); margin-bottom: .45em; }
.hero__accent { display: block; color: var(--navy); background: linear-gradient(transparent 68%, rgba(232, 131, 58, .45) 68%); width: fit-content; }
.hero__lead { font-size: 1.08rem; color: var(--muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0 1.4rem; }
.hero__actions .btn { flex: 1 1 220px; }
.hero__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .92rem; color: var(--muted); }
.hero__facts li { display: flex; align-items: center; gap: .45em; }
.hero__facts .ico { color: var(--navy); }
.hero__art svg { display: block; width: 100%; max-width: 440px; margin: 0 auto; height: auto; }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 50px; display: block; }

/* Secciones */
.section { padding: 64px 0; }
.section--alt { background: var(--alt); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; }
.section__head .eyebrow { justify-content: center; }
.section__sub { color: var(--muted); }

/* Servicios */
.services { display: grid; gap: 18px; }
.service {
  background: #fff; border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow);
  border-top: 4px solid var(--navy); display: flex; flex-direction: column;
}
.service--feature { border-top-color: var(--accent); }
.service__ico {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--alt); color: var(--navy); margin-bottom: 14px;
}
.service__ico svg { width: 28px; height: 28px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 6px 0 6px 22px; border-bottom: 1px dashed var(--line); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.service__link { margin-top: auto; padding-top: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: .4em; }
.note { text-align: center; margin: 2rem auto 0; padding: 14px 18px; max-width: 560px; background: #fff; border-radius: 999px; border: 1px solid var(--line); }
.note a { font-weight: 600; white-space: nowrap; }

/* Pilates */
.pilates { background: var(--navy); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.pilates::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%;
  border: 40px solid rgba(232, 131, 58, .18); pointer-events: none;
}
.pilates__grid { display: grid; gap: 32px; align-items: center; position: relative; z-index: 1; }
.pilates h2 { color: #fff; }
.pilates p { color: #E8F1F8; }
.pilates__art svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.pilates__list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 10px; }
.pilates__list li { display: flex; align-items: center; gap: .6em; }
.pilates__list .ico { color: var(--accent); width: 1.3em; height: 1.3em; }
.pilates__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pilates__actions .btn { flex: 1 1 200px; }

/* Nosotros */
.about { max-width: 900px; text-align: center; }
.about .eyebrow { justify-content: center; }
.about__text > p { color: var(--muted); max-width: 44em; margin-left: auto; margin-right: auto; }
.perks { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 16px; text-align: left; }
.perks li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.perks__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--alt); color: var(--navy); flex: none; }
.perks__ico .ico { width: 24px; height: 24px; }
.perks strong { display: block; color: var(--navy); }
.perks span { color: var(--muted); font-size: .94rem; }

/* Horario */
.status { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin: 0; }
.status:empty { display: none; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status.is-open { background: #DDF3E4; color: #13643A; }
.status.is-closed { background: #FBE3E3; color: #9B1C1C; }
.hours { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hours th, .hours td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--alt); vertical-align: top; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { font-weight: 600; color: var(--navy); width: 44%; white-space: nowrap; }
.hours td span { display: block; }
.hours td.closed { color: var(--muted); }
.hours tr.today { background: #FDF0E6; box-shadow: inset 4px 0 0 var(--accent); }
.hours tr.today th::after { content: " · hoy"; font-weight: 500; color: var(--text); font-size: .85em; }

/* Reservas */
.booking {
  text-align: center; background: var(--alt); border: 2px dashed #9CB6CF; border-radius: var(--radius);
  padding: 36px 22px;
}
.booking__ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--navy); margin-bottom: 12px; }
.booking__ico svg { width: 32px; height: 32px; }
.booking__title { font: 700 1.3rem/1.3 var(--serif); color: var(--navy); margin-bottom: .4em; }
.booking__text { color: var(--muted); max-width: 30em; margin: 0 auto 1.4rem; }

/* Mapa */
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; aspect-ratio: 4 / 3; max-width: 100%; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Contacto */
.contact { display: grid; gap: 14px; }
.contact__item {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text);
  transition: border-color .2s, transform .2s;
}
a.contact__item:hover { border-color: var(--navy); transform: translateY(-2px); }
.contact__ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; flex: none; }
.contact__item strong { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.contact__item > span:last-child { overflow-wrap: anywhere; }

/* Pie */
.footer { background: var(--text); color: #D6E1EC; padding: 36px 0; text-align: center; font-size: .92rem; }
.footer p { margin: 0 0 .5em; }
.footer a { color: #fff; }
.footer__name { font: 700 1.2rem/1.3 var(--serif); color: #fff; }
.footer__demo { display: inline-block; margin-top: .6em !important; padding: 4px 12px; border: 1px solid var(--accent); border-radius: 999px; color: #fff; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* Barra fija móvil */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(30, 58, 95, .10);
}
.mobile-cta__btn {
  display: flex; align-items: center; justify-content: center; gap: .45em; min-height: 48px; border-radius: 999px;
  font-weight: 600; text-decoration: none; background: var(--navy); color: #fff;
}
.mobile-cta__btn--accent { background: var(--accent); color: var(--text); }

/* Animaciones */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .contact__item { transition: none; }
  .btn:hover, a.contact__item:hover { transform: none; }
}

/* Tablet */
@media (min-width: 640px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: repeat(3, 1fr); }
  .contact__item { flex-direction: column; text-align: center; }
  .perks { grid-template-columns: repeat(3, 1fr); }
  .perks li { flex-direction: column; }
  .map { aspect-ratio: 16 / 8; }
}

/* Escritorio */
@media (min-width: 960px) {
  :root { --header-h: 80px; }
  body { padding-bottom: 0; }
  .mobile-cta { display: none; }
  .menu-btn { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 4px;
    padding: 0; border: 0; box-shadow: none; background: none;
  }
  .nav a:not(.btn) { border: 0; padding: 8px 12px; font-size: .95rem; }
  .nav .btn { margin: 0 0 0 10px; }
  .hero { padding: 70px 0 110px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .hero__actions .btn { flex: 0 0 auto; }
  .section, .pilates { padding: 96px 0; }
  .services { grid-template-columns: repeat(3, 1fr); }
  .service--feature { background: #FFF7F0; grid-column: span 2; }
  .pilates__grid { grid-template-columns: .9fr 1.1fr; gap: 64px; }
  .pilates__actions .btn { flex: 0 0 auto; }
}
