/* ==========================================================================
   Simal Fisioterapia — Hoja de estilos común
   Sistema de diseño "Serene Vitality" (Silk & Sage)
   ========================================================================== */

/* ---- Fuentes autoalojadas ---- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---- Variables del sistema de diseño ---- */
:root {
  /* Color */
  --primary: #00458a;
  --primary-bright: #045cb4;
  --primary-fixed: #d6e3ff;
  --on-primary: #ffffff;
  --secondary: #466558;
  --sage-wash: #E9EFE6;
  --secondary-container: #c5e7d7;
  --on-secondary-container: #4a695c;
  --deep-navy: #1E293B;
  --off-white: #FCFCFC;
  --silk-gray: #F2F4F7;
  --surface: #f8f9ff;
  --surface-low: #eff4ff;
  --surface-variant: #d5e3fd;
  --on-surface: #0d1c2f;
  --on-surface-variant: #424752;
  --outline-variant: #c2c6d4;
  --white: #ffffff;

  /* Tipografía */
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  /* Espaciado */
  --container-max: 1200px;
  --gutter: 24px;
  --section-pad: 120px;
  --section-pad-m: 64px;
  --margin-m: 16px;

  /* Radios */
  --r-btn: 8px;
  --r-card: 16px;
  --r-hero: 24px;

  /* Sombras (azul desaturado, blur amplio, opacidad baja) */
  --shadow-soft: 0 10px 30px -5px rgba(0, 69, 138, 0.05), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
  --shadow-lift: 0 20px 40px -10px rgba(0, 69, 138, 0.10);
  --shadow-silk: 0 20px 40px -10px rgba(0, 69, 138, 0.08);
}

/* ---- Reset básico ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--on-surface);
  background: var(--off-white);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--primary-fixed); color: var(--primary); }

/* ---- Tipografía ---- */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--deep-navy); margin: 0; }
h1 { font-size: 36px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 24px; line-height: 32px; font-weight: 600; }
h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
h4 { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.05em; }
p { margin: 0; }
.text-body-lg { font-size: 18px; line-height: 28px; }
.text-muted { color: var(--on-surface-variant); }
.text-primary { color: var(--primary); }
.text-caption { font-size: 12px; line-height: 16px; }
.eyebrow {
  display: inline-block;
  font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 16px;
}
@media (min-width: 768px) {
  h1 { font-size: 48px; line-height: 56px; }
  h2 { font-size: 32px; line-height: 40px; }
}

/* ---- Layout ---- */
.container { max-width: var(--container-max); margin: 0 auto; padding-left: var(--margin-m); padding-right: var(--margin-m); }
.section { padding-top: var(--section-pad-m); padding-bottom: var(--section-pad-m); }
.bg-surface-low { background: var(--surface-low); }
.bg-white { background: var(--white); }
.bg-sage { background: var(--sage-wash); }
@media (min-width: 768px) {
  .container { padding-left: 40px; padding-right: 40px; }
  .section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }
}

/* ---- Iconos SVG inline ---- */
.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-sm { width: 18px; height: 18px; }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  padding: 14px 28px; border-radius: var(--r-btn);
  border: none; cursor: pointer; transition: all 0.25s ease;
  text-align: center;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-bright); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.btn-sage { background: var(--sage-wash); color: var(--secondary); }
.btn-sage:hover { background: var(--secondary-container); }
.btn-light { background: var(--white); color: var(--primary); }
.btn-light:hover { background: var(--silk-gray); }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-lg { padding: 16px 32px; font-size: 20px; border-radius: 12px; }

/* ---- Chips ---- */
.chip {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--sage-wash); color: var(--secondary);
  font-size: 14px; font-weight: 600; letter-spacing: 0.05em;
}
.chip-blue { background: var(--primary-fixed); color: var(--primary); }

/* ---- Tarjetas ---- */
.card {
  background: var(--white); border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-pad { padding: 32px; }

/* ---- Cabecera / Navegación ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(248, 249, 255, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 4px 12px rgba(0, 69, 138, 0.08); }
.site-header .header-inner {
  max-width: var(--container-max); margin: 0 auto;
  padding: 12px var(--margin-m);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header .logo img { height: 48px; width: auto; }
.main-nav { display: none; align-items: center; gap: 32px; }
.main-nav a {
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  color: var(--on-surface-variant); padding-bottom: 4px;
  border-bottom: 2px solid transparent; transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.header-cta { padding: 10px 24px; font-size: 14px; }
.menu-toggle {
  display: inline-flex; background: none; border: none; cursor: pointer;
  color: var(--primary); padding: 8px;
}
.menu-toggle .icon { width: 30px; height: 30px; }
@media (min-width: 768px) {
  .site-header .header-inner { padding: 12px 40px; }
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
}

/* Menú móvil desplegable */
.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px var(--margin-m) 20px;
  background: rgba(248, 249, 255, 0.98);
  border-top: 1px solid var(--outline-variant);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
  color: var(--on-surface-variant); padding: 12px 8px; border-radius: var(--r-btn);
}
.mobile-nav a[aria-current="page"] { color: var(--primary); background: var(--surface-low); }
@media (min-width: 768px) { .mobile-nav { display: none !important; } }

/* Barra inferior móvil (patrón de la vista móvil de Stitch) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(252, 252, 252, 0.97);
  border-top: 1px solid var(--outline-variant);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 600; color: var(--on-surface-variant); padding: 4px 0;
}
.bottom-nav a .icon { width: 22px; height: 22px; }
.bottom-nav a[aria-current="page"] { color: var(--primary); }
@media (min-width: 768px) { .bottom-nav { display: none; } }
body { padding-bottom: 64px; }
@media (min-width: 768px) { body { padding-bottom: 0; } }

/* ---- Hero ---- */
.page-offset { padding-top: 76px; }
@media (min-width: 768px) { .page-offset { padding-top: 88px; } }

.hero-home { position: relative; min-height: 82vh; display: flex; align-items: center; overflow: hidden; }
.hero-home .hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0.2; filter: brightness(0.95);
}
.hero-home .hero-fade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to right, var(--off-white) 0%, rgba(252, 252, 252, 0.8) 50%, transparent 100%);
}
.hero-home .hero-content { position: relative; z-index: 2; max-width: 640px; }

/* Tarjetas de estadísticas del hero */
.hero-stats {
  display: none; position: absolute; right: 40px; bottom: 96px; z-index: 3;
  grid-template-columns: 1fr 1fr; gap: 16px;
}
.hero-stats .stat { padding: 32px; border-radius: var(--r-card); text-align: center; }
.hero-stats .stat .num { font-family: var(--font-head); font-size: 28px; font-weight: 700; color: var(--primary); display: block; margin-bottom: 4px; }
.hero-stats .stat .lbl { font-size: 13px; font-weight: 600; color: var(--on-surface-variant); }
@media (min-width: 1024px) { .hero-stats { display: grid; } }

/* Estadísticas en franja (móvil) */
.stats-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (min-width: 1024px) { .stats-strip { display: none; } }

/* ---- Rejillas ---- */
.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-12 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-12 { grid-template-columns: repeat(12, 1fr); }
  .col-5 { grid-column: span 5; }
  .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 7; }
  .col-12 { grid-column: span 12; }
}

/* ---- Listas con check ---- */
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; }
.check-list .icon { color: var(--secondary); margin-top: 2px; }

/* ---- Tarjeta de imagen (bento instalaciones) ---- */
.media-card {
  position: relative; overflow: hidden; border-radius: var(--r-card);
  box-shadow: var(--shadow-soft); min-height: 260px;
  display: flex; align-items: flex-end;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.media-card:hover { transform: translateY(-8px); }
.media-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.media-card:hover > img { transform: scale(1.05); }
.media-card .media-caption {
  position: relative; z-index: 1; width: 100%; padding: 32px; color: var(--white);
  background: linear-gradient(to top, rgba(30, 41, 59, 0.75), transparent);
}
.media-card .media-caption h3 { color: var(--white); font-size: 24px; margin-bottom: 8px; }
.media-card .media-caption p { color: rgba(255, 255, 255, 0.9); max-width: 640px; }
@media (min-width: 768px) {
  .media-card.tall { min-height: 500px; }
  .media-card.wide { min-height: 600px; }
}

/* ---- Imagen enmarcada (instalaciones: santuario) ---- */
.framed-photo {
  background: var(--white); padding: 8px; border-radius: var(--r-card);
  box-shadow: var(--shadow-lift); transform: rotate(3deg);
}
.framed-photo img { border-radius: 12px; width: 100%; height: 100%; object-fit: cover; }

/* ---- Panel CTA oscuro (inicio) ---- */
.cta-panel {
  background: var(--deep-navy); border-radius: 40px; overflow: hidden;
  display: flex; flex-direction: column;
}
.cta-panel .cta-info { flex: 1; padding: 40px; color: var(--white); }
.cta-panel .cta-info h2 { color: var(--primary-fixed); margin-bottom: 32px; }
.cta-panel .cta-media { flex: 1; min-height: 320px; position: relative; }
.cta-panel .cta-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.info-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.info-row .icon { color: var(--primary-fixed); }
.info-row h4 { color: var(--white); opacity: 0.6; text-transform: uppercase; margin-bottom: 4px; }
.info-row p { color: var(--white); }
@media (min-width: 768px) {
  .cta-panel { flex-direction: row; }
  .cta-panel .cta-info { padding: 64px; }
}

/* ---- Banda CTA a color (tratamientos / instalaciones) ---- */
.cta-band { text-align: center; color: var(--white); }
.cta-band h2 { color: var(--white); font-size: 36px; line-height: 44px; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 24px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 640px; margin: 0 auto 40px; }
.cta-band .btn-row { display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; }
.bg-primary-band { background: var(--primary-bright); }
@media (min-width: 640px) { .cta-band .btn-row { flex-direction: row; } }
@media (min-width: 768px) { .cta-band h2 { font-size: 48px; line-height: 56px; } }

/* ---- Formularios ---- */
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--on-surface-variant); margin-bottom: 8px; margin-left: 4px; }
.field input, .field textarea {
  width: 100%; background: var(--silk-gray); border: 1px solid transparent;
  border-radius: var(--r-btn); padding: 16px; font-family: var(--font-body); font-size: 16px;
  color: var(--on-surface); transition: border-color 0.2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--secondary); }
.field { margin-bottom: 24px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.checkbox-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.checkbox-row label { font-size: 13px; color: var(--on-surface-variant); }
.checkbox-row a { text-decoration: underline; }

/* ---- Tabla de horarios ---- */
.hours-table { display: flex; flex-direction: column; gap: 16px; }
.hours-table .row {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(70, 101, 88, 0.12); padding-bottom: 8px;
}
.hours-table .row:last-child { border-bottom: none; padding-bottom: 0; }
.hours-table .day { color: var(--on-surface-variant); }
.hours-table .time { font-family: var(--font-head); font-weight: 600; color: var(--secondary); }

/* ---- Pie de página ---- */
.site-footer { background: var(--white); border-top: 1px solid rgba(194, 198, 212, 0.3); }
.site-footer .footer-inner {
  max-width: var(--container-max); margin: 0 auto;
  padding: var(--section-pad-m) var(--margin-m);
  display: flex; flex-direction: column; gap: 40px;
}
.site-footer .brand { max-width: 340px; }
.site-footer .brand img { height: 56px; width: auto; margin-bottom: 20px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 48px; }
.site-footer h4 { color: var(--deep-navy); text-transform: uppercase; margin-bottom: 20px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer ul a { color: var(--on-surface-variant); transition: color 0.2s ease; }
.site-footer ul a:hover { color: var(--primary); }
.social-links { display: flex; gap: 12px; margin-top: 24px; }
.social-links a {
  width: 40px; height: 40px; border-radius: 999px; background: var(--surface-variant);
  display: inline-flex; align-items: center; justify-content: center; color: var(--primary);
  transition: all 0.2s ease;
}
.social-links a:hover { background: var(--primary); color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(194, 198, 212, 0.3); padding-top: 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--on-surface-variant);
}
@media (min-width: 768px) {
  .site-footer .footer-inner { flex-direction: row; justify-content: space-between; padding: 80px 40px 48px; flex-wrap: wrap; }
  .footer-bottom { width: 100%; }
}

/* ---- Páginas legales ---- */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h1 { margin-bottom: 16px; }
.legal-content h2 { margin-top: 48px; margin-bottom: 16px; font-size: 24px; line-height: 32px; }
.legal-content h3 { margin-top: 32px; margin-bottom: 12px; }
.legal-content p, .legal-content li { color: var(--on-surface-variant); margin-bottom: 16px; }
.legal-content ul { padding-left: 24px; }

/* ---- Utilidades ---- */
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-10 { margin-bottom: 40px; }
.mb-16 { margin-bottom: 64px; }
.mt-6 { margin-top: 24px; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 16px; }
.rounded-img { border-radius: var(--r-card); box-shadow: var(--shadow-silk); overflow: hidden; }
.rounded-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Animación de aparición ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
