/* ============================================================
   MEDENS — Grupo Hospitalario
   styles.css
   ============================================================ */

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --blue-dark:   #0c4a6e;
  --blue:        #0369a1;
  --blue-mid:    #0284c7;
  --blue-light:  #0ea5e9;
  --blue-xlight: #e0f2fe;
  --cyan:        #06b6d4;
  --green:       #10b981;
  --orange:      #f97316;
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-300:    #cbd5e1;
  --gray-400:    #94a3b8;
  --gray-500:    #64748b;
  --gray-700:    #334155;
  --gray-900:    #0f172a;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
}



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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  transition: background .3s;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--blue-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-text {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--blue-dark);
}

.nav-logo-sub {
  font-size: 10px;
  color: var(--gray-400);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-500);
  text-decoration: none;
  transition: color .2s;
}

.nav-links a:hover { color: var(--blue); }

.nav-cta {
  background: var(--blue) !important;
  color: var(--white) !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
}

.nav-cta:hover { background: var(--blue-dark) !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: all .3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


.nav-logo-img {
  height: 40px;
  width: auto;
  display: block;
}
/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--blue-dark);
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, .05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(3, 105, 161, .45) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .6; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;  transform: translate(-50%, -50%) scale(1.1); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, .12);
  border: 1px solid rgba(14, 165, 233, .28);
  color: #7dd3fc;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 40px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeup .8s var(--ease) .2s forwards;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .25; }
}

h1.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--white);
  max-width: 800px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeup .9s var(--ease) .4s forwards;
}

h1.hero-title em { font-style: italic; color: #7dd3fc; }

.hero-sub {
  font-size: 17px;
  font-weight: 300;
  color: rgba(255, 255, 255, .5);
  max-width: 460px;
  line-height: 1.7;
  margin-top: 24px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeup .9s var(--ease) .6s forwards;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 40px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeup .9s var(--ease) .8s forwards;
}

.btn-primary {
  background: var(--white);
  color: var(--blue-dark);
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  font-family: var(--font-body);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}

.btn-ghost {
  color: rgba(255, 255, 255, .65);
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color .2s, color .2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, .5);
  color: var(--white);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  opacity: 0;
  animation: fadeup .6s var(--ease) 1.4s forwards;
}

.hero-scroll span {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .3), transparent);
  animation: scrolldown 2s ease-in-out infinite;
}

@keyframes scrolldown {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes fadeup {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SHARED SECTION UTILITIES
   ============================================================ */
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 16px;
  display: block;
}

h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--blue-dark);
  margin-bottom: 16px;
}

h2.section-title em { font-style: italic; color: var(--blue-mid); }

.section-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--gray-400);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto 56px;
}

/* ============================================================
   FEEL — ¿Cómo te sientes hoy?
   ============================================================ */
#feel {
  padding: 120px 48px;
  background: var(--white);
  text-align: center;
}

.feel-inner { max-width: 900px; margin: 0 auto; }

.feel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feel-card {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 28px 20px;
  cursor: pointer;
  transition: all .25s var(--ease);
  text-align: center;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.feel-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--blue-mid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}

.feel-card:hover::after { transform: scaleX(1); }

.feel-card:hover {
  background: var(--white);
  border-color: rgba(14, 165, 233, .4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(3, 105, 161, .1);
}

.feel-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--blue-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: background .25s;
}

.feel-card:hover .feel-icon { background: var(--blue-light); }

.feel-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .25s;
}

.feel-card:hover .feel-icon svg { stroke: var(--white); }

.feel-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.feel-card-desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--gray-400);
  line-height: 1.5;
}

/* ============================================================
   STATS
   ============================================================ */
#stats {
  padding: 100px 48px;
  background: var(--blue-dark);
  position: relative;
  overflow: hidden;
}

.stats-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 80px 80px;
}

.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.stats-left h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  color: var(--white);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 20px;
}

.stats-left h2 em { font-style: italic; color: #7dd3fc; }

.stats-left p {
  font-size: 15px;
  font-weight: 300;
  color: rgba(255, 255, 255, .45);
  line-height: 1.7;
  max-width: 380px;
}

.stats-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border-radius: 16px;
  overflow: hidden;
}

.stat-box {
  background: rgba(255, 255, 255, .05);
  padding: 36px 28px;
  text-align: center;
  transition: background .3s;
}

.stat-box:hover { background: rgba(255, 255, 255, .09); }

.stat-num {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-num sup { color: #7dd3fc; }

.stat-label {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, .35);
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Reemplaza .stat-num — ya no se usa en la nueva versión */
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #7dd3fc;
}

/* Sobrescribe el label para que admita texto de 2-3 líneas */
.stat-label {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, .6);
  letter-spacing: .02em;
  text-transform: none;
  line-height: 1.5;
}
/* ============================================================
   SERVICES — Rueda interactiva
   ============================================================ */
#services {
  padding: 120px 48px;
  background: var(--off-white);
  text-align: center;
}

.services-inner { max-width: 1000px; margin: 0 auto; }

.wheel-wrap {
  position: relative;
  width: 520px;
  height: 520px;
  margin: 60px auto 0;
}

.wheel-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 116px;
  height: 116px;
  background: var(--blue-dark);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 0 0 8px rgba(3, 105, 161, .08), 0 0 0 16px rgba(3, 105, 161, .04);
}

.wheel-center svg { width: 36px; height: 36px; }

.wheel-center-text {
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
  margin-top: 4px;
}

.wheel-ring { position: absolute; inset: 0; }

.snode {
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  transition: background .25s, border-color .25s, box-shadow .25s;
}

.snode:hover,
.snode.active {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  box-shadow: 0 8px 32px rgba(3, 105, 161, .25);
}

.snode svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .25s;
}

.snode:hover svg,
.snode.active svg { stroke: var(--white); }

.snode span {
  font-size: 9px;
  font-weight: 500;
  color: var(--gray-500);
  margin-top: 4px;
  letter-spacing: .02em;
  text-align: center;
  line-height: 1.2;
  transition: color .25s;
}

.snode:hover span,
.snode.active span { color: rgba(255, 255, 255, .75); }

.service-detail {
  margin-top: 48px;
  min-height: 140px;
  text-align: center;
  transition: opacity .3s;
}

.service-detail h3 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--blue-dark);
  margin-bottom: 10px;
}

.service-detail p {
  font-size: 15px;
  font-weight: 300;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.service-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-svc {
  background: var(--blue);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s;
}

.btn-svc:hover { background: var(--blue-dark); }

.btn-svc-ghost {
  background: transparent;
  color: var(--blue);
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color .2s;
}

.btn-svc-ghost:hover { border-color: var(--blue-light); }

/* Mobile service grid */
.svc-grid {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 40px;
}

.svc-grid-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}

.svc-grid-card.active,
.svc-grid-card:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.svc-grid-card svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: stroke .2s;
}

.svc-grid-card.active svg,
.svc-grid-card:hover svg { stroke: var(--white); }

.svc-grid-card span {
  font-size: 12px;
  font-weight: 500;
  color: var(--blue-dark);
  transition: color .2s;
}

.svc-grid-card.active span,
.svc-grid-card:hover span { color: var(--white); }

/* ============================================================
   STORY — Pasos del recorrido
   ============================================================ */
#story { background: var(--white); }

.story-header { padding: 120px 48px 80px; text-align: center; }

.story-steps { max-width: 1100px; margin: 0 auto; }

.story-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
  border-top: 1px solid var(--gray-200);
}

.story-step:nth-child(even) .story-visual { order: -1; }

.story-text {
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: 20px;
}

.story-text h3 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  color: var(--blue-dark);
  line-height: 1.15;
  margin-bottom: 16px;
}

.story-text h3 em { font-style: italic; color: var(--blue-mid); }

.story-text p {
  font-size: 15px;
  font-weight: 300;
  color: var(--gray-500);
  line-height: 1.8;
  max-width: 400px;
}

.story-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-visual.bg1 { background: var(--blue-xlight); }
.story-visual.bg2 { background: #ecfdf5; }
.story-visual.bg3 { background: #fff7ed; }
.story-visual.bg4 { background: var(--blue-xlight); }

.vis-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vis-circle svg {
  width: 80px;
  height: 80px;
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .55;
}

.bg1 .vis-circle svg { stroke: var(--blue); }
.bg2 .vis-circle svg { stroke: var(--green); }
.bg3 .vis-circle svg { stroke: var(--orange); }
.bg4 .vis-circle svg { stroke: var(--blue); }

/* ============================================================
   TEAM — Tarjetas con flip
   ============================================================ */
#team {
  padding: 120px 48px;
  background: var(--off-white);
}

.team-inner { max-width: 1100px; margin: 0 auto; }

.team-header { text-align: center; margin-bottom: 64px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  perspective: 1000px;
  height: 300px;
  cursor: pointer;
}

.team-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .5s var(--ease);
  transform-style: preserve-3d;
}

.team-card:hover .team-card-inner { transform: rotateY(180deg); }

.tcf,
.tcb {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.tcb {
  transform: rotateY(180deg);
  background: var(--blue-dark);
}

.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-xlight);
  border: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.team-avatar svg {
  width: 28px;
  height: 28px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tname { font-size: 16px; font-weight: 500; color: var(--blue-dark); margin-bottom: 4px; }
.trole { font-size: 11px; font-weight: 400; color: var(--blue-mid); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 14px; }

.tquote {
  font-size: 13px;
  font-weight: 300;
  color: var(--gray-400);
  line-height: 1.7;
  font-style: italic;
  border-left: 2px solid var(--gray-200);
  padding-left: 14px;
  flex: 1;
}

.tcb .tname { color: var(--white); }
.tcb .trole { color: #7dd3fc; }

.tcert {
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tcert svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #7dd3fc;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tcert p {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, .6);
  line-height: 1.5;
}

.team-hint {
  font-size: 11px;
  color: var(--gray-300);
  text-align: center;
  margin-top: 22px;
  letter-spacing: .04em;
}

/* ============================================================
   FAMILY — Recursos para cuidadores
   ============================================================ */
#family {
  padding: 100px 48px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fed7aa;
}

.family-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.family-left h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  color: #92400e;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
}

.family-left h2 em { font-style: italic; }

.family-left > p {
  font-size: 15px;
  font-weight: 300;
  color: #78350f;
  line-height: 1.8;
  margin-bottom: 32px;
}

.fam-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #b45309;
  margin-bottom: 16px;
  display: block;
}

.family-resources { display: flex; flex-direction: column; gap: 12px; }

.fam-res {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 10px;
  padding: 14px 18px;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.fam-res:hover {
  background: rgba(255, 255, 255, .9);
  transform: translateX(4px);
}

.fam-res-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fed7aa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fam-res-icon svg {
  width: 18px;
  height: 18px;
  stroke: #92400e;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fam-res-title { font-size: 13px; font-weight: 500; color: #78350f; }
.fam-res-sub   { font-size: 11px; color: #a16207; font-weight: 300; margin-top: 2px; }

.family-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fam-stat {
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 12px;
  padding: 24px;
}

.fam-stat-num { font-family: var(--font-display); font-size: 36px; color: #92400e; }

.fam-stat-label {
  font-size: 12px;
  color: #a16207;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 6px;
}

/* ============================================================
   APPOINTMENT — Agendar cita
   ============================================================ */
#appointment { padding: 120px 48px; background: var(--white); }

.appt-inner { max-width: 840px; margin: 0 auto; text-align: center; }

.appt-inner > h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  color: var(--blue-dark);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
}

.appt-inner > h2 em { font-style: italic; color: var(--blue-mid); }

.appt-inner > p {
  font-size: 16px;
  font-weight: 300;
  color: var(--gray-400);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 56px;
}

.appt-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-bottom: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
}

.appt-step {
  padding: 36px 28px;
  text-align: left;
  border-right: 1px solid var(--gray-200);
  transition: background .2s;
  cursor: pointer;
}

.appt-step:last-child { border-right: none; }
.appt-step.active { background: var(--blue-dark); }

.appt-step-num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 16px;
}

.appt-step.active .appt-step-num { color: #7dd3fc; }

.appt-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.appt-step.active .appt-step-icon { background: rgba(255, 255, 255, .1); }

.appt-step-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.appt-step.active .appt-step-icon svg { stroke: #7dd3fc; }

.appt-step h4 { font-size: 15px; font-weight: 500; color: var(--blue-dark); margin-bottom: 6px; }
.appt-step.active h4 { color: var(--white); }
.appt-step p { font-size: 13px; font-weight: 300; color: var(--gray-400); line-height: 1.6; }
.appt-step.active p { color: rgba(255, 255, 255, .45); }

.appt-cta { display: flex; gap: 16px; justify-content: center; }

.btn-lg {
  padding: 14px 34px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lg-blue { background: var(--blue); color: var(--white); }

.btn-lg-blue:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(3, 105, 161, .25);
}

.btn-lg-wa { background: #25d366; color: var(--white); }

.btn-lg-wa:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 211, 102, .25);
}

/* ============================================================
   LOCATION — Mapa y datos de contacto
   ============================================================ */
#location { padding: 100px 48px; background: var(--off-white); }

.loc-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}

.loc-left h2 {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--blue-dark);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 28px;
}

.loc-left h2 em { font-style: italic; color: var(--blue-mid); }

.loc-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.loc-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--blue-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loc-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loc-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.loc-value { font-size: 14px; font-weight: 400; color: var(--blue-dark); line-height: 1.5; }

.loc-tips {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--blue-xlight);
  border-radius: 10px;
  border-left: 3px solid var(--blue-mid);
}

.loc-tips-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue-dark);
  margin-bottom: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.loc-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 300;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.loc-tip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--blue-mid);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  height: 420px;
}

.map-wrap iframe { width: 100%; height: 100%; border: none; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--blue-dark);
  padding: 64px 48px 40px;
  position: relative;
  overflow: hidden;
}

.ft-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.ft-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

.ft-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.ft-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.ft-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-brand { font-weight: 500; font-size: 15px; color: var(--white); letter-spacing: .04em; }
.ft-sub   { font-size: 10px; color: rgba(255, 255, 255, .3); letter-spacing: .1em; text-transform: uppercase; }

.ft-desc {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, .35);
  line-height: 1.7;
  max-width: 260px;
}

.ft-col-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
  margin-bottom: 16px;
}

.ft-links { list-style: none; }
.ft-links li { margin-bottom: 10px; }

.ft-links a {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, .45);
  text-decoration: none;
  transition: color .2s;
}

.ft-links a:hover { color: var(--white); }

.ft-bottom { display: flex; justify-content: space-between; align-items: center; }

.ft-copy { font-size: 12px; color: rgba(255, 255, 255, .22); font-weight: 300; }

.ft-hemo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #7dd3fc;
  text-decoration: none;
  border: 1px solid rgba(125, 211, 252, .2);
  padding: 7px 16px;
  border-radius: 6px;
  transition: border-color .2s;
}

.ft-hemo:hover { border-color: rgba(125, 211, 252, .55); }

.ft-hemo svg {
  width: 14px;
  height: 14px;
  stroke: #7dd3fc;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   FLOATING BUTTONS
   ============================================================ */
.float-group {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 200;
}

.fbtn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}

.fbtn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .22);
}

.fbtn-wa { background: #25d366; }
.fbtn-wa svg { width: 26px; height: 26px; fill: var(--white); }

.fbtn-appt { background: var(--blue); }
.fbtn-appt svg {
  width: 22px;
  height: 22px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ============================================================
   RESPONSIVE — TABLET (768–1024px)
   ============================================================ */
@media (max-width: 1024px) {
  nav { padding: 0 28px; }
  .nav-links { gap: 18px; }
  #feel { padding: 80px 28px; }
  .feel-grid { grid-template-columns: repeat(2, 1fr); }
  #stats { padding: 72px 28px; }
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 48px; }
  #services { padding: 80px 28px; }
  .wheel-wrap { width: 440px; height: 440px; }
  #story .story-header { padding: 80px 28px 60px; }
  .story-text { padding: 60px 40px; }
  .story-text h3 { font-size: 30px; }
  #team { padding: 80px 28px; }
  .team-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  #family { padding: 72px 28px; }
  .family-inner { gap: 48px; }
  #appointment { padding: 80px 28px; }
  #location { padding: 72px 28px; }
  .loc-inner { gap: 40px; }
  footer { padding: 48px 28px 32px; }
  .ft-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤767px)
   ============================================================ */
@media (max-width: 767px) {
  /* Nav */
  nav { padding: 0 20px; height: 60px; }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  }

  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--gray-100); }
  .nav-links a { display: block; padding: 13px 20px; font-size: 14px; color: var(--gray-700); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta { margin: 8px 20px; border-radius: 6px !important; text-align: center; display: block; }
  .nav-hamburger { display: flex; }

  /* Hero */
  #hero { padding: 100px 20px 72px; }
  .hero-badge { font-size: 10px; padding: 5px 12px; }
  h1.hero-title { font-size: clamp(38px, 10vw, 56px); }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; width: 100%; gap: 10px; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; text-align: center; }

  /* Feel */
  #feel { padding: 72px 20px; }
  .feel-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feel-card { padding: 20px 14px; }

  /* Stats */
  #stats { padding: 64px 20px; }
  .stats-inner { grid-template-columns: 1fr; gap: 40px; }
  .stats-right { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 40px; }

  /* Services: hide wheel, show grid */
  .wheel-wrap { display: none; }
  .svc-grid { display: grid; }
  .service-detail { margin-top: 24px; }
  .service-detail h3 { font-size: 24px; }
  .service-detail-actions { flex-direction: column; align-items: center; }

  /* Story */
  .story-header { padding: 72px 20px 48px; }
  .story-step { grid-template-columns: 1fr; min-height: auto; }
  .story-step:nth-child(even) .story-visual { order: 0; }
  .story-text { padding: 40px 20px; }
  .story-text h3 { font-size: 28px; }
  .story-text p { max-width: 100%; }
  .story-visual { min-height: 200px; }
  .vis-circle { width: 140px; height: 140px; }
  .vis-circle svg { width: 56px; height: 56px; }

  /* Team */
  #team { padding: 72px 20px; }
  .team-grid { grid-template-columns: 1fr; gap: 14px; }
  .team-card { height: auto; }
  .team-card-inner { transform: none !important; height: auto; }
  .tcf { position: relative; inset: auto; backface-visibility: visible; transform: none; }
  .tcb { display: none; }
  .team-hint { display: none; }
  .tcf .tquote { display: none; }
  .tcf-certs { margin-top: 12px; }
  .tcf-certs .tcert { display: flex; }

  /* Family */
  #family { padding: 64px 20px; }
  .family-inner { grid-template-columns: 1fr; gap: 40px; }
  .family-right { grid-template-columns: 1fr 1fr; }

  /* Appointment */
  #appointment { padding: 72px 20px; }
  .appt-steps { grid-template-columns: 1fr; border-radius: 12px; }
  .appt-step { border-right: none; border-bottom: 1px solid var(--gray-200); }
  .appt-step:last-child { border-bottom: none; }
  .appt-cta { flex-direction: column; align-items: stretch; }
  .btn-lg { justify-content: center; }

  /* Location */
  #location { padding: 64px 20px; }
  .loc-inner { grid-template-columns: 1fr; gap: 36px; }
  .map-wrap { height: 280px; }
  .loc-left h2 { font-size: 32px; }

  /* Footer */
  footer { padding: 48px 20px 28px; }
  .ft-top { grid-template-columns: 1fr; gap: 32px; }
  .ft-bottom { flex-direction: column; gap: 16px; text-align: center; }

  /* Floating */
  .float-group { bottom: 20px; right: 16px; }
  .fbtn { width: 46px; height: 46px; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤400px)
   ============================================================ */
@media (max-width: 400px) {
  .feel-grid { grid-template-columns: 1fr; }
  .stats-right { grid-template-columns: 1fr 1fr; }
  .family-right { grid-template-columns: 1fr; }
  h1.hero-title { font-size: 36px; }
}
/* ============================================================
   APPOINTMENT — Formulario inline
   ============================================================ */
.appt-form-wrap {
  max-width: 720px;
  margin: 48px auto 0;
}

.appt-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  color: var(--gray-400);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.appt-divider::before,
.appt-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.appt-inline-form {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.apf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.apf-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apf-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.apf-optional {
  font-weight: 300;
  color: var(--gray-400);
}

.apf-group input,
.apf-group select,
.apf-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
}

.apf-group input:focus,
.apf-group select:focus,
.apf-group textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .12);
}

.apf-group textarea {
  resize: vertical;
  min-height: 88px;
}

.apf-footer {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.apf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}

.apf-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--blue);
  margin-top: 2px;
}

.apf-check span {
  font-size: 12px;
  font-weight: 300;
  color: var(--gray-500);
  line-height: 1.5;
}

.apf-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.apf-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(3, 105, 161, .25);
}

.apf-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

.apf-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.apf-note {
  font-size: 12px;
  font-weight: 300;
  color: var(--gray-400);
  text-align: center;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden { display: none; }

.modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d1fae5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--green);
}

.modal-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--blue-dark);
  margin-bottom: 10px;
}

.modal-content p {
  font-size: 14px;
  font-weight: 300;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 24px;
}

.btn-close-modal {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 11px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}

.btn-close-modal:hover { background: var(--blue-dark); }

/* Responsive */
@media (max-width: 767px) {
  .appt-inline-form { padding: 24px 18px; }
  .apf-row { grid-template-columns: 1fr; }
  .apf-footer { flex-direction: column; }
  .apf-btn { width: 100%; justify-content: center; }
}

/* ============================================
   TABS para Teléfono / Correo (sección appointment)
   ============================================ */
.appt-tabs {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 0.5rem;
}

/* TABS para Teléfono / Correo (sección appointment) */
.appt-tabs {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0 1rem;
  border-bottom: none; /* quitamos borde para que no interfiera */
  padding-bottom: 0;
  background: transparent;
}

.appt-tab {
  background: #0a2540;  /* azul oscuro */
  border: 1px solid #1e4a76; /* borde sutil */
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.6rem 1.8rem;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255,255,255,0.8);
  box-shadow: none;
}

.appt-tab.active {
  background: white;
  color: #0a84ff;
  border: 1px solid #0a84ff;
  box-shadow: 0 4px 12px rgba(10,132,255,0.2);
}

.appt-tab:hover:not(.active) {
  background: #0f3b5c;
  color: white;
}

.appt-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.appt-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ajustes para que los botones de teléfono y WhatsApp se vean bien dentro del tab */
.appt-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

/* ============================================
   CORRECCIÓN: ancho completo en location y footer
   ============================================ */
#location, footer {
  width: 100%;
  overflow-x: hidden;
}

.loc-inner, .ft-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Para pantallas pequeñas */
@media (max-width: 768px) {
  .loc-inner, .ft-inner {
    padding: 2rem 1.5rem;
  }
  .appt-tab {
    font-size: 0.9rem;
    padding: 0.4rem 1.2rem;
  }
}

/* Asegurar que el fondo azul de stats y otros ocupen todo el ancho */
#stats, #diferenciadores {
  width: 100%;
}

.stats-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Footer fondo completo */
footer {
  background: #0b1120;
  position: relative;
}
.ft-bg {
  display: none; /* si usabas un div para fondo, lo reemplazamos */
}