/*!
 * Fisiosalud Integral · hoja de estilos principal
 */

:root {
  --ink: #3b4057; /* texto principal */
  --muted: #5d6378; /* texto secundario */
  --brand: #00a7b5; /* turquesa corporativo (botones y acentos) */
  --navy: #2d3663; /* azul oscuro (títulos, pie y fondos oscuros) */
  --soft: #eceef5; /* fondo de secciones claras */
  --brand-text: #007c88; /* turquesa oscuro para texto (contraste AA) */
  --line: #dcdfe8; /* bordes y separadores */
  --radius: 14px; /* radio de esquinas */
  --shadow: 0 12px 32px rgba(45, 54, 99, 0.16); /* sombra de tarjetas */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-text);
  text-decoration: none;
}

a:hover {
  color: var(--navy);
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.55em;
}

h1 {
  font-size: clamp(2.3rem, 7vw, 4.6rem);
}

h2 {
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-text);
  margin-bottom: 12px;
}

.dark .eyebrow,
.hero .eyebrow {
  color: #8fe0e4;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
  background: #fff;
  padding: 8px;
  z-index: 99;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* ==========================================================================
   Cabecera y navegación
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
  transition: background 0.3s, box-shadow 0.3s;
}

.home .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
}

.home .site-header.is-stuck {
  background: #fff;
  box-shadow: var(--shadow);
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 7px;
  padding-bottom: 7px;
}

.topbar a {
  color: var(--navy);
  font-weight: 600;
}

.home .site-header.is-stuck .topbar {
  display: none;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo img {
  width: 176px;
}

.logo-white {
  display: none !important;
}

.home .site-header:not(.is-stuck) .logo-white {
  display: block !important;
}

.home .site-header:not(.is-stuck) .logo-gray {
  display: none;
}

.menu-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}

.home .site-header:not(.is-stuck) .menu-toggle {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  background: var(--navy);
  content: "";
  transition: 0.25s;
}

.menu-toggle span {
  top: 22px;
}

.menu-toggle span::before {
  left: 0;
  top: -6px;
}

.menu-toggle span::after {
  left: 0;
  top: 6px;
}

.home .site-header:not(.is-stuck) .menu-toggle span,
.home .site-header:not(.is-stuck) .menu-toggle span::before,
.home .site-header:not(.is-stuck) .menu-toggle span::after {
  background: #fff;
}

.menu-toggle[aria-expanded=true] span {
  background: transparent !important;
}

.menu-toggle[aria-expanded=true] span::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded=true] span::after {
  top: 0;
  transform: rotate(-45deg);
}

nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  box-shadow: var(--shadow);
    /* Altura visible real en móviles (100dvh descuenta las barras del navegador); 100vh queda como respaldo */
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}

nav.is-open {
  display: block;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav > ul > li {
  border-top: 1px solid var(--line);
  padding: 10px 20px;
}

nav a,
nav span {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  display: block;
  padding: 4px 0;
}

nav li ul {
  padding-left: 14px;
}

nav li li a {
  font-weight: 400;
  color: var(--muted);
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 99px;
  font-weight: 700;
  border: 2px solid var(--brand);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn.btn-outline-light:hover {
  background: #fff;
  color: var(--navy);
}

.btn.btn-outline {
  background: transparent;
  color: var(--brand-text);
}

.btn.btn-outline:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ==========================================================================
   Secciones y cabeceras de página
   ========================================================================== */

.section {
  padding: 64px 0;
}

.section.soft {
  background: var(--soft);
}

.section.dark {
  background: var(--navy);
  color: #dfe2ee;
}

.section.dark h2,
.section.dark h3 {
  color: #fff;
}

.section.dark a:not(.btn) {
  color: #fff;
}

.page-header {
  background: var(--navy);
  color: #fff;
  padding: 56px 0 44px;
  position: relative;
}

.page-header h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 6vw, 3.2rem);
  position: relative;
}

.page-header[style] {
  padding: 110px 0 70px;
  background: linear-gradient(rgba(24, 30, 66, 0.55), rgba(24, 30, 66, 0.8)), var(--header-image) center/cover;
}

.home .page-header {
  padding-top: 56px;
}

.grid {
  display: grid;
  gap: 28px;
}

/* En móvil y tableta, las columnas pueden encogerse por debajo del ancho de su contenido (evita que una imagen ensanche la página) */
@media (max-width: 899px) {
  .grid > * {
    min-width: 0;
  }
}

.grid-3,
.grid-2 {
  grid-template-columns: 1fr;
}

.grid-2 {
  align-items: center;
}

.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s, box-shadow 0.25s;
}

a.card:hover,
.card.card-image:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card.card-image {
  padding: 0;
  overflow: hidden;
}

.card.card-image div {
  padding: 22px 26px;
}

.card.card-image img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

.card .more {
  font-weight: 700;
  color: var(--brand-text);
}

.round {
  border-radius: var(--radius);
}

.shadow {
  box-shadow: var(--shadow);
}

.gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 28px 0;
}

.gallery img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  object-fit: cover;
}

.section ul {
  padding-left: 1.2em;
}

.section li {
  margin-bottom: 0.5em;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
}

.narrow {
  max-width: 780px;
}

.pull-quote {
  font: 500 1.35rem/1.45 Georgia, serif;
  font-style: italic;
  color: var(--navy);
  border-left: 4px solid var(--brand);
  padding-left: 20px;
  margin: 28px 0;
}

.section.dark .pull-quote {
  color: #fff;
  border-color: #8fe0e4;
}

blockquote {
  margin: 0;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

blockquote footer {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--muted);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}

.faq p {
  margin: 10px 0 0;
  color: var(--muted);
}

table.opening-hours {
  border-collapse: collapse;
}

table.opening-hours td {
  padding: 4px 24px 4px 0;
}

/* ==========================================================================
   Portada
   ========================================================================== */

.dots {
  display: flex;
  gap: 10px;
  position: absolute;
  z-index: 4;
  left: max(20px, calc((100% - 1080px)/2));
  bottom: 48px;
}

.dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
}

.dots button.is-active {
  background: #fff;
}

.carousel .slides {
  display: grid;
}

.carousel .slide.fade {
  grid-area: 1/1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s, visibility 0.6s;
}

.carousel .slide.fade.is-active {
  opacity: 1;
  visibility: visible;
}

.carousel {
  position: relative;
}

.carousel .dots {
  position: static;
  margin-top: 22px;
}

.carousel .dots button {
  background: var(--line);
}

.carousel .dots button.is-active {
  background: var(--brand);
}

.dark .carousel .dots button {
  background: rgba(255, 255, 255, 0.3);
}

.dark .carousel .dots button.is-active {
  background: #fff;
}

.cards {
  margin-top: -140px;
  position: relative;
  z-index: 5;
}

.cards .card {
  padding: 34px;
  box-shadow: var(--shadow);
  border: 0;
}

.cards .card-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--line);
  line-height: 1;
  margin-bottom: 8px;
}

.icon-item {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  font-weight: 700;
  color: #fff;
}

.icon-item img {
  width: 52px;
  height: 52px;
}

.stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.stats b {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand-text);
  line-height: 1;
}

.stats span {
  font-size: 0.9rem;
  color: var(--muted);
}

.testimonial {
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
}

.testimonial::before {
  content: "“";
  display: block;
  font: 700 5rem/0.6 Georgia, serif;
  color: var(--brand);
  margin-bottom: 10px;
}

/* ==========================================================================
   Pie de página
   ========================================================================== */

.site-footer {
  background: var(--navy);
  color: #dfe2ee;
  padding: 56px 0 30px;
  font-size: 0.95rem;
}

.site-footer a {
  color: #fff;
}

.site-footer h2 {
  font-size: 1.05rem;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 6px;
}

.site-footer address {
  font-style: normal;
  margin-bottom: 1em;
}

.footer-columns {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
}

.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(28px);
}

.reveal {
  transition: opacity 0.7s, transform 0.7s;
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }

  nav {
    display: block !important;
    position: static;
    box-shadow: none;
    overflow: visible;
    max-height: none;
    background: transparent;
  }

  nav > ul {
    display: flex;
    gap: 2px;
  }

  nav > ul > li {
    position: relative;
    border: 0;
    padding: 0;
  }

  nav > ul > li > a,
  nav > ul > li > span {
    padding: 26px 13px;
    font-size: 0.93rem;
  }

  .home .site-header:not(.is-stuck) nav > ul > li > a,
  .home .site-header:not(.is-stuck) nav > ul > li > span {
    color: #fff;
  }

  nav li ul {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% - 8px);
    min-width: 240px;
    background: #fff;
    border-radius: var(--radius);
    padding: 10px 0;
    box-shadow: var(--shadow);
  }

  nav li:hover > ul,
  nav li:focus-within > ul {
    display: block;
  }

  nav li li a {
    padding: 9px 20px;
    color: var(--ink);
  }

  nav li li a:hover {
    background: var(--soft);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .footer-columns {
    grid-template-columns: 1.2fr 1fr 1.3fr;
  }

  .section {
    padding: 96px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }

  .js .reveal:not(.is-visible) {
    opacity: 1;
    transform: none;
  }
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar svg {
  flex: none;
}

@media (min-width: 900px) {
  nav > ul > li:hover > a,
  nav > ul > li:hover > span,
  nav > ul > li:focus-within > a,
  nav > ul > li:focus-within > span,
  nav > ul > li > a:hover {
    background: var(--brand);
    color: #fff !important;
  }

  nav li li a:hover,
  nav li li a:focus {
    background: var(--brand);
    color: #fff;
  }
}

.section.soft {
  background: #eceef5;
}

.section.soft .carousel .dots button {
  background: rgba(45, 54, 99, 0.25);
}

.section.soft .carousel .dots button.is-active {
  background: var(--navy);
}

@media (min-width: 900px) {
  nav > ul {
    gap: 4px;
  }

  nav > ul > li {
    padding: 15px 0;
  }

  nav > ul > li > a,
  nav > ul > li > span {
    padding: 9px 14px;
    border-radius: 8px;
  }

  nav > ul > li > ul {
    top: calc(100% - 6px);
  }
}

/* ==========================================================================
   Elementos sobre fondo oscuro
   ========================================================================== */

.section.dark blockquote,
.section.dark blockquote footer {
  color: #3b4057;
}

.site-footer .btn:hover,
.section.dark .btn:hover {
  background: #fff;
  border-color: #fff;
  color: var(--navy);
}

/* ==========================================================================
   Pie de página: ajustes
   ========================================================================== */

.site-footer .footer-columns > div:first-child img {
  margin-bottom: 26px;
}

.site-footer .separated {
  margin-top: 24px;
}

/* ==========================================================================
   Portada: slider, caja de presentación y flechas
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}

.hero .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s;
}

.hero .slide.is-active {
  opacity: 1;
}

.hero .hero-bg {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  transform: scale(1.07);
  transition: transform 9s linear;
}

.hero .slide.is-active .hero-bg {
  transform: scale(1);
}

.hero .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(24, 30, 66, 0.55);
}

.hero .hero-caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 180px;
}

.hero .hero-title {
  font-size: clamp(2rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero .hero-caption a {
  margin-top: 18px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #8fe0e4;
}

.hero .hero-caption a::after {
  content: " →";
}

.hero .hero-caption a:hover {
  color: #fff;
}

.hero .dots {
  left: 50%;
  transform: translateX(-50%);
  bottom: 172px;
}

.intro-grid {
  align-items: stretch;
}

.intro {
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro .eyebrow {
  color: #fff;
  opacity: 0.9;
}

.intro h1 {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  color: #fff;
  margin-bottom: 0.45em;
}

.intro p {
  color: #fff;
}

.intro .button-group {
  flex-direction: column;
  align-items: stretch;
  margin-top: 8px;
}

.intro .btn {
  text-align: center;
}

.btn.btn-navy {
  background: var(--navy);
  border-color: var(--navy);
}

.btn.btn-navy:hover {
  background: #fff;
  border-color: #fff;
  color: var(--navy);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(24, 30, 66, 0.35);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 6;
  padding: 0;
  transition: background 0.2s, color 0.2s;
}

.carousel-arrow:hover {
  background: #fff;
  color: var(--navy);
}

.carousel-arrow.prev {
  left: 16px;
}

.carousel-arrow.next {
  right: 16px;
}

.hero .carousel-arrow {
  top: calc(50% - 60px);
}

.carousel[data-arrows] {
  padding-bottom: 30px;
}

.carousel[data-arrows] .dots {
  justify-content: center;
}

.carousel[data-arrows] .carousel-arrow {
  top: auto;
  bottom: 10px;
  transform: none;
  width: 42px;
  height: 42px;
}

.carousel[data-arrows] .carousel-arrow.prev {
  left: 0;
}

.carousel[data-arrows] .carousel-arrow.next {
  right: 0;
}

@media (min-width: 900px) {
  .cards .intro-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .intro {
    grid-column: 1/-1;
  }

  .carousel[data-arrows] {
    padding-bottom: 0;
    position: static;
  }

  .carousel[data-arrows] .carousel-arrow {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
  }

  .carousel[data-arrows] .carousel-arrow.prev {
    left: 16px;
  }

  .carousel[data-arrows] .carousel-arrow.next {
    right: 16px;
  }
}

@media (min-width: 1100px) {
  .cards .intro-grid {
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
  }

  .intro {
    grid-column: auto;
  }
}

.carousel .slide.fade {
  transition: opacity 0.25s, visibility 0.25s;
}

.carousel .slide.fade.is-active {
  transition: opacity 0.5s 0.25s, visibility 0.5s 0.25s;
}

.intro .btn {
  padding: 14px 18px;
}

.relative {
  position: relative;
}

.carousel .card.card-image:hover {
  transform: none;
  box-shadow: none;
}

.section.dark .card h3 {
  color: var(--navy);
}

.section.dark .card a:not(.btn) {
  color: var(--brand-text);
}

.section.dark .card a:not(.btn):hover {
  color: var(--navy);
}

/* ==========================================================================
   Mapa (imagen enlazada, sin cookies de terceros)
   ========================================================================== */

.mapbox {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--soft);
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.mapbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.map-button {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  padding: 13px 28px;
  border-radius: 99px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transition: background 0.2s;
}

.mapbox:hover .map-button,
.mapbox:focus-visible .map-button {
  background: var(--navy);
  color: #fff;
}

@media (min-width: 700px) {
  .mapbox {
    aspect-ratio: 2/1;
  }

  .mapbox.square {
    aspect-ratio: 4/3;
  }
}

/* ==========================================================================
   Carrusel de fotos
   ========================================================================== */

.slides.round {
  overflow: hidden;
}

.carousel .slides > img.slide {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.carousel .dots {
  justify-content: center;
}

.carousel .dots button {
  background: rgba(45, 54, 99, 0.28);
}

.carousel .dots button.is-active {
  background: var(--brand);
}

/* ==========================================================================
   Botones: variantes y comportamiento en móvil
   ========================================================================== */

.btn.btn-outline {
  background: transparent;
  color: var(--brand-text);
  border-color: var(--brand);
}

.btn.btn-outline:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.section.dark .btn.btn-outline {
  color: #fff;
  border-color: #fff;
}

.section.dark .btn.btn-outline:hover {
  background: #fff;
  border-color: #fff;
  color: var(--navy);
}

@media (max-width: 600px) {
  .button-group {
    flex-direction: column;
    align-items: stretch;
  }

  .button-group .btn {
    text-align: center;
  }
}

/* ==========================================================================
   Utilidades
   ========================================================================== */

.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.mt-16 {
  margin-top: 16px !important;
}

.mt-20 {
  margin-top: 20px !important;
}

.mt-32 {
  margin-top: 32px !important;
}

.mb-24 {
  margin-bottom: 24px !important;
}

.items-start {
  align-items: start !important;
}

.text-ink {
  color: var(--ink) !important;
}
