:root {
  /* Fondo y superficies — "salud limpia": blanco con un dejo frío azulado, nada de gris plano */
  --bg: #F4F8F9;
  --bg-2: #EAF2F3;
  --surface: #FFFFFF;
  --ink: #2091B1; /* celeste petróleo — títulos, íconos y textos fuertes en todo el sitio */
  --muted: #5B7480;
  --border: #DCE8EA;

  /* Colores de marca — tomados directo del logo (mismo criterio que las tarjetas de área) */
  --fisio: #4FB8B4;
  --fisio-soft: #E3F7F6;
  --medicina: #86BE4C;
  --medicina-soft: #EFF8E6;
  --psico: #4B1F52;
  --psico-soft: #EFE7F0;

  /* Marca general (navbar, CTAs neutros) — degradado que conecta el teal de fisio con el verde de medicina */
  --brand: #2FA6A0;
  --brand-2: #6DBE58;
  --brand-gradient: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%);

  --danger: #C6473F;
  --warn-soft: #FBF1DD;
  --warn-ink: #93701C;
  --ok-soft: #E3F5E7;
  --ok-ink: #227A46;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16,40,44,.05), 0 1px 3px rgba(16,40,44,.06);
  --shadow: 0 8px 24px rgba(16,40,44,.08);
  --shadow-lg: 0 20px 48px rgba(16,40,44,.14);

  --font-heading: 'Poppins', 'Inter', Arial, Helvetica, sans-serif;
  --font-body: 'Inter', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Barra de scroll con el color de marca (Chrome/Edge/Safari + Firefox) */
html { scrollbar-color: var(--brand) var(--bg-2); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  border-radius: 99px;
  border: 2px solid var(--bg-2);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--brand-2), var(--brand)); }

/* Animación de aparición al hacer scroll (ver js/utils/scrollReveal.js) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,.84,.44,1), transform .7s cubic-bezier(.16,.84,.44,1);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.reveal-scale { transform: translateY(20px) scale(.94); }
.reveal.reveal-scale.in-view { transform: translateY(0) scale(1); }
.reveal.reveal-left { transform: translateX(-32px); }
.reveal.reveal-left.in-view { transform: translateX(0); }
.reveal.reveal-right { transform: translateX(32px); }
.reveal.reveal-right.in-view { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Efecto cascada: las tarjetas de una misma grilla no aparecen todas a la vez */
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }
.reveal:nth-child(5) { transition-delay: .32s; }
.reveal:nth-child(n+6) { transition-delay: .38s; }

/* Íconos SVG (sprite en index.html) que reemplazan los emojis en todo el sitio */
.ico {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.15em;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .01em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .18s, background .18s, transform .15s, box-shadow .18s;
}

.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn.solid {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(47,166,160,.28);
}
.btn.solid:hover {
  filter: brightness(1.06);
  color: #fff;
  box-shadow: 0 10px 26px rgba(47,166,160,.36);
}
.btn.sm { padding: 9px 15px; font-size: 13.5px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

section { padding: 66px 0; }
section h2.title { font-size: clamp(25px, 2.8vw, 34px); }
section p.sub {
  color: var(--muted);
  margin-top: 10px;
  font-size: 15px;
  max-width: 56ch;
  line-height: 1.55;
}

.page-head { padding: 44px 0 6px; }
.page-head .eyebrow { margin-bottom: 6px; }

/* Bloques de texto + imagen a dos columnas (Enfoque Integral, Quiénes somos...) */
.split-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.split-media-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  background-color: var(--surface) !important;
  border: 1px solid var(--border);
}

@media (max-width: 820px) {
  .split-media-grid { grid-template-columns: 1fr !important; }
  .split-media-img { max-width: 280px; margin: 0 auto; aspect-ratio: 1 / 1; }
}

/* Equipo (página Conócenos) — tarjetas con foto por área */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.team-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.16,.84,.44,1), box-shadow .3s;
}

.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.team-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .5s cubic-bezier(.16,.84,.44,1);
}

.team-card:hover .team-photo img { transform: scale(1.05); }

.team-info { padding: 18px 20px 22px; text-align: center; }
.team-info h4 { font-size: 17px; margin-bottom: 6px; }
.team-info p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }

/* Tarjetas de noticias/artículos */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.16,.84,.44,1), box-shadow .3s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.news-card-img { height: 200px; overflow: hidden; background: var(--bg-2); }
.news-card-img-lg { height: 220px; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,.84,.44,1); }
.news-card:hover .news-card-img img { transform: scale(1.07); }

.news-card-body { padding: 20px; }
.news-card-tag {
  display: inline-block;
  background: var(--fisio-soft);
  color: var(--fisio);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.news-card-body h3 { font-size: 17px; margin-bottom: 10px; }
.news-card-body p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 15px; }
.news-card-footer { display: flex; justify-content: space-between; align-items: center; }
.news-card-date { color: var(--muted); font-size: 12px; }
.news-card-link { color: var(--brand); font-weight: 700; font-size: 13px; transition: gap .15s; }

/* Estilos de la ubicación */
.location-section {
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d, #1a1a1a);
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
}

.location-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(40,197,143,0.08), transparent 70%);
  pointer-events: none;
}

.location-section .wrap { position: relative; z-index: 1; }
.location-section .eyebrow { color: #28c58f !important; font-size: 13px; letter-spacing: 0.15em; margin-bottom: 4px; }
.location-section .title { color: #ffffff; font-size: clamp(28px, 3.5vw, 40px); margin-bottom: 8px; }
.location-section .sub { color: rgba(255,255,255,0.6); font-size: 15px; margin-bottom: 30px; }

.location-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.location-card-map {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card-map:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.location-card-map .info-side {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(0,0,0,0.15);
}

.location-card-map .info-side .city {
  font-size: 18px;
  font-weight: 800;
  color: #28c58f;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.location-card-map .info-side .city-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.location-card-map .info-side .address-line {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-card-map .info-side .divider-line {
  height: 1px;
  background: linear-gradient(90deg, rgba(40,197,143,0.3), transparent);
  margin: 8px 0;
}

.location-card-map .info-side .phone {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-card-map .map-side { overflow: hidden; background: #0c1720; }
.location-card-map .map-side iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  display: block;
}

.location-card-image {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card-image:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.location-card-image .image-side { overflow: hidden; background: #0c1720; }
.location-card-image .image-side img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.location-card-image .text-side {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  background: rgba(0,0,0,0.15);
}

.location-card-image .text-side .label {
  font-size: 13px;
  font-weight: 700;
  color: #28c58f;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.location-card-image .text-side .building {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.location-card-image .text-side .detail {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.location-card-image .text-side .phone-link {
  color: #28c58f;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
  transition: color 0.2s;
}

.location-card-image .text-side .phone-link:hover { color: #3fd99e; }

@media (max-width: 1024px) {
  .location-grid-two { gap: 14px; }
  .location-card-map .info-side .city { font-size: 16px; }
  .location-card-map .info-side .address-line { font-size: 12px; }
  .location-card-image .text-side .building { font-size: 13px; }
}

@media (max-width: 900px) {
  .location-grid-two { grid-template-columns: 1fr; gap: 14px; }
  .location-card-map { grid-template-columns: 1fr 1fr; }
  .location-card-image { grid-template-columns: 1fr 1fr; }
  .location-card-image .text-side { text-align: left; }
  .location-section { padding: 40px 0 60px; }
}

@media (max-width: 600px) {
  .location-grid-two { gap: 12px; }
  .location-card-map { grid-template-columns: 1fr; }
  .location-card-image { grid-template-columns: 1fr; }
  .location-card-image .text-side { text-align: left; }
  .location-section { padding: 30px 0 40px; }
  .location-section .title { font-size: 22px; }
  .location-card-map .info-side { padding: 16px 18px; }
  .location-card-map .info-side .city { font-size: 17px; }
  .location-card-map .info-side .address-line { font-size: 12.5px; padding: 3px 0; }
  .location-card-image .text-side { padding: 16px 18px; }
  .location-card-image .text-side .building { font-size: 14px; }
  .location-card-image .text-side .detail { font-size: 12px; }
  .location-card-map .map-side iframe,
  .location-card-image .image-side img { aspect-ratio: 1.2 / 1; }
}