/* ══════════════════════════════════════════════════════════════════
   BSCare – index.css  (Página de Inicio)
   ══════════════════════════════════════════════════════════════════ */

/* ── HERO & MEDICAL NETWORK CAROUSEL ────────────────────────────── */
.hero {
  min-height: 100vh;
  background: #001844;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center;
  /* Abajo se reserva espacio para la etiqueta y los puntos del carrusel,
     así el texto y los botones nunca quedan debajo de ellos */
  padding: calc(var(--nav-h) + 2rem) 2rem 150px;
  gap: 2rem;
}

/* Background Carousel Slides */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 2.5s ease-out;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 1;
}
.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 14, 45, 0.96) 0%,
    rgba(0, 30, 80, 0.93) 48%,
    rgba(0, 42, 110, 0.86) 80%,
    rgba(0, 18, 55, 0.94) 100%
  );
}

/* Carousel Nav Controls */
.hero-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
/* Flechas junto a los puntos del carrusel (abajo), así nunca tapan el texto */
.hero-carousel-arrow {
  top: auto; bottom: 66px; transform: none;
  width: 36px; height: 36px;
}
.hero-carousel-arrow.prev { left: calc(50% - 116px); }
.hero-carousel-arrow.next { right: calc(50% - 116px); }

.hero-carousel-arrow:hover {
  background: var(--blue-primary);
  border-color: #ffffff;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 6px 22px rgba(0, 58, 140, 0.5);
}

/* Carousel Indicators & Tag Pill */
.hero-carousel-nav {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px; /* deja libre la fila de los puntos para las flechas */
  pointer-events: auto;
}
.hero-slide-caption-pill {
  background: rgba(0, 20, 60, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease;
  white-space: nowrap;
}
.pulse-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px #22C55E;
  animation: liveDotBlink 1.8s infinite;
}
.hero-carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-dot {
  width: 24px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.35s ease;
  padding: 0;
}
.hero-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}
.hero-dot.active {
  width: 44px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .hero-carousel-arrow { display: none; }
  .hero-carousel-nav { bottom: 65px; }
  .hero-slide-caption-pill { font-size: 0.72rem; padding: 4px 12px; }
}
.hero::before {
  content: '';
  position: absolute; top: -20%; right: -15%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
  border-radius: 50%; pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -20%; left: -8%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(204,26,26,0.15) 0%, transparent 60%);
  border-radius: 50%; pointer-events: none;
}
/* Wave bottom */
.hero-wave {
  position: absolute; bottom: -2px; left: 0; right: 0;
  z-index: 2;
}
.hero-wave svg {
  display: block; width: 100%;
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 680px;
  padding-left: calc((100vw - var(--max-w)) / 2);
  padding-left: max(2rem, calc((100vw - var(--max-w)) / 2));
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.4rem 1.1rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.95);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.7s ease forwards 0.2s; opacity: 0;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #00A3FF;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 163, 255, 0.7); }
  50%       { box-shadow: 0 0 0 7px rgba(0, 163, 255, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.8rem);
  font-weight: 900; color: #fff;
  white-space: nowrap;
  line-height: 1.08; letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease forwards 0.4s; opacity: 0;
}
.hero-title .line-brand {
  display: block;
  font-weight: 800;
  color: #ffffff;
}
.hero-title .line-red {
  color: #ffffff;
  font-weight: 900;
  font-style: italic;
  display: block;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.hero-sub {
  font-size: 1.1rem; color: rgba(255,255,255,0.82);
  line-height: 1.75; margin-bottom: 2.5rem;
  max-width: 480px;
  animation: fadeUp 0.8s ease forwards 0.6s; opacity: 0;
}

.hero-actions {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease forwards 0.8s; opacity: 0;
}
/* Ambos botones del hero con el mismo ancho y alto */
.hero-actions .btn { width: 230px; justify-content: center; border: 2px solid transparent; }
.hero-actions .btn-outline-white { border-color: rgba(255,255,255,0.4); }
.hero-actions .btn-outline-white:hover { border-color: #fff; }

/* Sami speech bubble in hero */
.hero-sami-quote {
  display: flex; align-items: flex-end; gap: 1rem;
  animation: fadeUp 0.8s ease forwards 0.9s; opacity: 0;
}
.hero-sami-mini {
  width: 60px; height: auto; flex-shrink: 0;
  animation: samiFloat 3s ease-in-out infinite;
}

/* Hero visual (right side) */
.hero-visual {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  animation: fadeIn 1s ease forwards 0.3s; opacity: 0;
  padding-right: max(2rem, calc((100vw - var(--max-w)) / 2));
}
.sami-main-img {
  width: min(420px, 90%); height: auto;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.4));
  animation: samiFloat 4s ease-in-out infinite;
  position: relative; z-index: 2;
}
/* Botón Únete bajo el Sami del hero */
.hero-unete {
  position: relative; z-index: 3;
  margin-top: 0.5rem;
  box-shadow: 0 10px 28px rgba(204,26,26,0.45);
}
.hero-unete-mobile { display: none; }

.hero-stat-cards {
  position: absolute;
  display: flex; flex-direction: column; gap: 0.75rem;
  right: calc(max(2rem, calc((100vw - var(--max-w)) / 2)) - 1.5rem);
  top: 50%; transform: translateY(-50%);
  z-index: 3;
}
.hero-stat-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  min-width: 130px;
  animation: slideLeft 0.6s ease forwards;
  opacity: 0;
}
.hero-stat-card:nth-child(1) { animation-delay: 1.2s; }
.hero-stat-card:nth-child(2) { animation-delay: 1.4s; }
.hero-stat-card:nth-child(3) { animation-delay: 1.6s; }

.hsc-num {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 900;
  color: var(--blue-primary); line-height: 1;
  margin-bottom: 2px;
}
.hsc-label {
  font-size: 0.72rem; color: var(--gray-500); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* Decoration circles */
.hero-deco-1 {
  position: absolute; bottom: 8%; left: 5%;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,215,0,0.6);
  animation: floatDeco 3s ease-in-out infinite;
  z-index: 1;
}
.hero-deco-2 {
  position: absolute; top: 20%; right: 18%;
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: floatDeco 4s ease-in-out infinite 1s;
  z-index: 1;
}
@keyframes floatDeco {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.2); }
}

/* ── SAMI INTRO & VIDEO SECTION ───────────────────────────────────── */
.sami-section {
  background: var(--white);
  padding: 5rem 2rem;
  position: relative; overflow: hidden;
  margin-top: -2px;
}
.sami-section::before {
  content: '';
  position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  width: 450px; height: 450px;
  background: radial-gradient(circle, var(--blue-pale) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.sami-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 500px) 1fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Left: Media Column with Video */
.sami-media-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.sami-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #001844;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 58, 140, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(0, 58, 140, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sami-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video Player Controls Bar */
.sami-video-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: linear-gradient(to top, rgba(0, 14, 45, 0.7) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sami-video-container:hover .sami-video-controls {
  opacity: 1;
}

.sami-ctrl-btn {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.sami-ctrl-btn:hover {
  background: var(--blue-primary);
  border-color: #fff;
  transform: scale(1.1);
}

/* Slogan debajo del video */
.sami-slogan-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.sami-slogan-pill {
  background: linear-gradient(135deg, rgba(0, 58, 140, 0.08) 0%, rgba(204, 26, 26, 0.06) 100%);
  border: 1.5px solid rgba(0, 58, 140, 0.2);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 15px rgba(0, 58, 140, 0.06);
  transition: transform var(--t-fast);
  text-align: center;
}

.sami-slogan-pill:hover {
  transform: translateY(-2px);
  border-color: var(--blue-primary);
}

.slogan-icon {
  font-size: 1.15rem;
}

.slogan-text {
  font-size: 0.95rem;
  color: var(--blue-dark);
  letter-spacing: -0.01em;
  font-style: italic;
}

.slogan-text strong {
  color: var(--red-primary);
  font-weight: 800;
  font-style: italic;
}

/* Logo BSCare debajo del slogan */
.sami-logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.35rem;
}

.sami-brand-logo {
  height: 90px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 4px 14px rgba(0, 58, 140, 0.12));
  transition: transform var(--t-fast);
}

.sami-brand-logo:hover {
  transform: scale(1.04);
}

/* Right: Sami text column adjustments */
.sami-text .section-tag { margin-bottom: 0.75rem; }
.sami-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.18;
  margin-bottom: 0.85rem;
}
.sami-text h2 span { color: var(--blue-primary); }
.sami-text p {
  font-size: 0.96rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}
.sami-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}
.sami-val-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--blue-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
}
.sami-val-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--blue-primary);
  box-shadow: 0 2px 8px rgba(0, 58, 140, 0.1);
  transition: background var(--t-med), color var(--t-med);
}
.sami-val-icon svg { width: 19px; height: 19px; }
.sami-val-item:hover .sami-val-icon { background: var(--blue-primary); color: #fff; }
.sami-actions-row .btn svg { flex-shrink: 0; }
.sami-val-text { font-size: 0.82rem; font-weight: 700; color: var(--gray-700); }

.sami-actions-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* ── WHY BSCARE ─────────────────────────────────────────────────── */
.why-section {
  background:
    radial-gradient(900px 520px at 50% 78%, var(--blue-bg) 0%, rgba(240,245,255,0) 70%),
    #fff;
  padding: 5.5rem 2rem 6rem;
  overflow: hidden;
}
.why-header { max-width: var(--max-w); margin: 0 auto 3rem; }
.why-header .section-title { white-space: nowrap; }
.why-subtitle { font-style: italic; max-width: 640px; }

/* ── 4 pilares ─────────────────────────────────────────────────── */
.why-pillars {
  list-style: none;
  max-width: var(--max-w); margin: 0 auto 5rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.why-pillar {
  position: relative;
  padding: 1.5rem 1.4rem 1.4rem;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.why-pillar::after {
  content: ''; position: absolute; left: 1.4rem; right: 1.4rem; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--blue-primary), var(--red-primary));
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-med);
}
.why-pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--blue-pale); }
.why-pillar:hover::after { transform: scaleX(1); }
.why-pillar-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-pale); color: var(--blue-primary);
  margin-bottom: 1rem;
}
.why-pillar-icon svg { width: 27px; height: 27px; display: block; }
.why-pillar h3 {
  font-family: var(--font-main); font-size: 1rem; font-weight: 700;
  color: var(--gray-900); margin-bottom: 0.4rem;
}
.why-pillar p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.6; }

/* ── Equipo médico ─────────────────────────────────────────────── */
.team { max-width: var(--max-w); margin: 0 auto; }
.team-head { text-align: center; max-width: 720px; margin: 0 auto 1.5rem; }
.team-head .section-tag { margin-bottom: 0.9rem; }
.team-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15;
  color: var(--gray-900); margin-bottom: 0.75rem;
}
.team-title span { color: var(--red-primary); }
.team-sub { color: var(--gray-500); font-size: 0.95rem; line-height: 1.65; }
.team-hint { display: block; font-weight: 600; color: var(--blue-primary); margin-top: 0.25rem; }
.team-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
  margin-top: 1.4rem;
}
.team-chip {
  font: 600 0.82rem var(--font-main);
  padding: 0.5rem 1rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-200); background: #fff; color: var(--gray-700);
  cursor: pointer; transition: all var(--t-fast);
}
.team-chip:hover { border-color: var(--blue-mid); color: var(--blue-primary); }
.team-chip.active {
  background: var(--grad-blue); border-color: transparent; color: #fff;
  box-shadow: var(--shadow-blue);
}
.team-chip:focus-visible { outline: 2px solid var(--blue-primary); outline-offset: 2px; }

/* Órbita */
.team-orbit {
  position: relative;
  height: 780px;
  margin-top: 0.5rem;
}
.team-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.team-ring {
  fill: none; stroke: var(--gray-200); stroke-width: 1.5;
  stroke-dasharray: 2 8; vector-effect: non-scaling-stroke;
}
.team-ring--inner { stroke: var(--blue-pale); stroke-width: 22; stroke-dasharray: none; opacity: 0.7; }
.team-link {
  stroke: var(--blue-light); stroke-width: 1.5; stroke-opacity: 0.25;
  stroke-dasharray: 6 7; vector-effect: non-scaling-stroke;
  animation: teamFlow 2.6s linear infinite;
  transition: stroke-opacity var(--t-med), stroke var(--t-med), stroke-width var(--t-med);
}
.team-link.is-on { stroke: var(--red-primary); stroke-opacity: 0.9; stroke-width: 2.5; }
.team-link.is-dim { stroke-opacity: 0.06; }
@keyframes teamFlow { to { stroke-dashoffset: -26; } }

/* Sami al centro */
.team-core {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -38%);
  width: 290px; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
}
.team-sami {
  width: 175px; height: auto;
  filter: drop-shadow(0 16px 30px rgba(0,58,140,0.22));
  animation: samiFloat 4.5s ease-in-out infinite;
}
.team-bubble {
  position: relative;
  width: 100%; min-height: 92px;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1.5px solid var(--blue-pale);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-bottom: 14px;
  transition: border-color var(--t-med);
}
.team-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -9px;
  width: 16px; height: 16px; background: #fff;
  border-right: 1.5px solid var(--blue-pale); border-bottom: 1.5px solid var(--blue-pale);
  transform: translateX(-50%) rotate(45deg);
}
.team-bubble.is-doc { border-color: var(--red-primary); }
.team-bubble.is-doc::after { border-color: var(--red-primary); }
.team-bubble-kicker {
  display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--red-primary); margin-bottom: 0.2rem;
}
.team-bubble-text { display: block; font-size: 0.86rem; color: var(--gray-700); line-height: 1.45; }
.team-bubble-text strong { color: var(--blue-primary); }
.team-bubble.swap .team-bubble-text, .team-bubble.swap .team-bubble-kicker { animation: bubbleIn 0.35s ease; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.team-247 {
  position: absolute; right: -18px; bottom: 26px;
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--grad-red); color: #fff;
  padding: 0.5rem 0.8rem; border-radius: 14px;
  box-shadow: var(--shadow-red);
  transform: rotate(4deg);
}
.team-247 strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; line-height: 1; }
.team-247 span { font-size: 0.62rem; font-weight: 600; opacity: 0.92; }

/* Nodos (médicos) */
.team-nodes { list-style: none; position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.doc {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  width: 190px;
  pointer-events: auto;
}
.doc-btn {
  width: 100%; background: none; border: 0; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  font-family: var(--font-main);
  animation: docFloat 6s ease-in-out infinite; animation-delay: calc(var(--d) * -1);
}
@keyframes docFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.doc-btn:focus-visible { outline: none; }
.doc-btn:focus-visible .doc-avatar::before { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--blue-primary); }

/* Avatar "troquelado": la foto sin fondo sale por encima del círculo */
.doc-avatar {
  position: relative; display: block;
  width: 150px; height: 182px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.doc-avatar::before {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--blue-light) 0%, var(--blue-primary) 62%, var(--blue-deep) 100%);
  box-shadow: 0 14px 30px rgba(0,58,140,0.28), inset 0 0 0 5px rgba(255,255,255,0.18);
  transition: background var(--t-med), box-shadow var(--t-med);
}
.doc-frame {
  position: absolute; inset: 0;
  border-radius: 0 0 75px 75px;
  overflow: hidden;
}
.doc-frame img {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.doc-initials {
  position: absolute; left: 0; bottom: 0; width: 150px; height: 150px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; color: #fff;
  letter-spacing: 0.04em;
}
.doc-avatar--initials::before {
  background: radial-gradient(circle at 30% 25%, var(--red-light) 0%, var(--red-primary) 60%, var(--red-dark) 100%);
}
.doc-name {
  display: inline-block; margin-top: 0.65rem;
  padding: 0.3rem 0.8rem; border-radius: var(--radius-full);
  background: #fff; box-shadow: var(--shadow-sm);
  font-size: 0.82rem; font-weight: 700; color: var(--gray-900);
  transition: background var(--t-med), color var(--t-med);
}
.doc-spec { display: block; margin-top: 0.3rem; font-size: 0.72rem; font-weight: 600; color: var(--gray-500); }
.doc-more { display: none; }

.doc-btn:hover .doc-avatar, .doc.is-on .doc-avatar { transform: scale(1.07); }
.doc-btn:hover .doc-frame img, .doc.is-on .doc-frame img { transform: translateY(-4px); }
.doc.is-on .doc-avatar::before {
  background: radial-gradient(circle at 30% 25%, var(--red-light) 0%, var(--red-primary) 60%, var(--red-dark) 100%);
  box-shadow: 0 16px 34px rgba(204,26,26,0.32), inset 0 0 0 5px rgba(255,255,255,0.22);
}
.doc.is-on .doc-name { background: var(--red-primary); color: #fff; }
.doc.is-dim { opacity: 0.28; filter: grayscale(1); }
.doc { transition: opacity var(--t-med), filter var(--t-med); }

/* Pantallas medianas: la órbita se aprieta un poco */
@media (max-width: 1150px) {
  .team-orbit { height: 740px; }
  .doc { width: 160px; }
  .doc-avatar { transform-origin: center bottom; }
  .doc-btn { zoom: 0.9; }
}

/* Tablet y móvil: cuadrícula de tarjetas, Sami arriba */
@media (max-width: 980px) {
  .why-pillars { grid-template-columns: repeat(2, 1fr); margin-bottom: 4rem; }
  .team-orbit { height: auto; display: flex; flex-direction: column; align-items: center; }
  .team-links { display: none; }
  .team-core { position: relative; left: auto; top: auto; transform: none; margin-bottom: 1.5rem; }
  .team-sami { width: 130px; }
  .team-247 { right: -6px; bottom: 10px; }
  .team-nodes {
    position: static; pointer-events: auto; width: 100%;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2rem 1rem;
  }
  .doc { position: static; transform: none; width: auto; }
  .doc-btn { animation: none; zoom: 1; }
  .doc-more { display: block; margin-top: 0.3rem; font-size: 0.72rem; color: var(--gray-500); text-align: center; line-height: 1.4; }
  .team-hint { display: none; }
}
@media (max-width: 560px) {
  .why-section { padding: 4rem 1.25rem 4.5rem; }
  .why-pillars { grid-template-columns: 1fr; }
  .team-nodes { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 0.5rem; }
  .doc-avatar { width: 124px; height: 150px; margin: 0 auto; }
  .doc-avatar::before, .doc-initials { width: 124px; height: 124px; }
  .doc-frame { border-radius: 0 0 62px 62px; }
  .doc-name { font-size: 0.76rem; padding: 0.28rem 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .team-link, .doc-btn, .team-sami { animation: none; }
}

/* ── CTA SECTION ────────────────────────────────────────────────── */
.cta-section {
  background: var(--grad-hero);
  padding: 6rem 2rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  border-radius: 50%;
}
.cta-inner {
  position: relative; z-index: 1;
  max-width: 700px; margin: 0 auto;
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; color: #fff;
  margin-bottom: 1rem; line-height: 1.15;
}
.cta-inner h2 span { color: #fff; font-style: italic; }
.cta-inner p { color: rgba(255,255,255,0.8); font-size: 1.05rem; margin-bottom: 2.5rem; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.cta-sami {
  width: 240px; position: absolute; z-index: 1;
  right: max(2rem, calc((100vw - var(--max-w)) / 2));
  top: 50%; margin-top: -112px; /* centrado vertical en la franja (alto ≈ 225px) */
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.35));
  transform-origin: 50% 85%;
  animation: ctaSamiMove 4s ease-in-out infinite;
}
@keyframes ctaSamiMove {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  25%      { transform: translateY(-14px) rotate(2deg) scale(1.03); }
  50%      { transform: translateY(-6px) rotate(5deg) scale(1); }
  75%      { transform: translateY(-16px) rotate(-1deg) scale(1.03); }
}
@media (max-width: 1280px) {
  .cta-sami { width: 170px; margin-top: -80px; }
}
/* Por debajo de 1100px Sami ya no cabe al lado del título: se oculta para no taparlo */
@media (max-width: 1100px) {
  .cta-sami { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cta-sami { animation: none; }
}

/* Carrusel de fondo de la franja CTA (médicos atendiendo por teléfono) */
.cta-bg-carousel { position: absolute; inset: 0; z-index: 0; }
.cta-bg-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.3s ease, transform 6.5s ease-out;
}
.cta-bg-slide.active { opacity: 1; transform: scale(1); }
/* Capa azul de la marca para que el texto y los botones se lean */
.cta-bg-carousel::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 32, 96, 0.55) 0%, rgba(0, 32, 96, 0.15) 75%),
    linear-gradient(135deg, rgba(0, 32, 96, 0.86) 0%, rgba(0, 58, 140, 0.68) 55%, rgba(26, 92, 200, 0.78) 100%);
}
.cta-section::before { z-index: 0; }
.cta-bg-dots {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 1.2rem;
  display: flex; justify-content: center; gap: 0.5rem;
}
.cta-bg-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, 0.45); cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease;
}
.cta-bg-dots button.active { width: 28px; background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .cta-bg-slide { transition: opacity 0.6s ease; transform: none; }
}

/* ── KEYFRAMES ──────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes samiFloat {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%       { transform: translateY(-20px) rotate(1.5deg); }
}

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .cities-grid { grid-template-columns: repeat(3, 1fr); }
  .city-card.nucleus { grid-column: span 3; }
}
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-bottom: 150px; }
  .hero-visual { display: none; }
  .hero-unete-mobile { display: inline-flex; }
  .hero-content { max-width: 100%; padding: 0; }
  .city-panel { position: static; }
  .sami-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .sami-media-col { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 768px) {
  .hero-title { white-space: normal; }
  .why-header .section-title { white-space: normal; }
  .cities-grid { grid-template-columns: repeat(2, 1fr); }
  .city-card.nucleus { grid-column: span 2; }
  .hero-stat-cards { display: none; }
  .cta-sami { display: none; }
}
@media (max-width: 480px) {
  .cities-grid { grid-template-columns: 1fr; }
  .city-card.nucleus { grid-column: span 1; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* ── Botón pausar/reanudar del carrusel del hero (WCAG 2.2.2) ── */
.hero-carousel-pause {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff; cursor: pointer; padding: 0; transition: background 0.25s ease;
}
.hero-carousel-pause:hover { background: rgba(255, 255, 255, 0.32); }
.hero-carousel-pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero-carousel-pause .ico-play { display: none; }
.hero-carousel-pause.is-paused .ico-play { display: block; }
.hero-carousel-pause.is-paused .ico-pause { display: none; }
/* El botón de pausa va a la izquierda de la flecha "anterior" en escritorio */
.hero-carousel-dots { position: relative; }
.hero-carousel-pause { position: absolute; right: calc(100% + 58px); top: 50%; transform: translateY(-50%); }
@media (max-width: 768px) {
  .hero-carousel-pause { position: static; transform: none; }
}

/* ── Ajustes finos del equipo médico ── */
.doc-avatar--initials::before {
  background: radial-gradient(circle at 30% 25%, #fff 0%, var(--blue-pale) 70%, #d6e3fa 100%);
  box-shadow: 0 14px 30px rgba(0,58,140,0.16), inset 0 0 0 3px var(--blue-pale);
}
.doc-initials { color: var(--blue-primary); }
.team-247 { right: -52px; bottom: 74px; }
@media (max-width: 1150px) { .doc { width: 180px; } }
@media (max-width: 980px) {
  .team-247 { position: relative; right: auto; bottom: auto; margin-top: -14px; transform: rotate(-3deg); align-items: center; }
}
@media (max-width: 560px) {
  .why-pillars { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .why-pillar { padding: 1.1rem 0.9rem; border-radius: var(--radius-md); }
  .why-pillar-icon { width: 42px; height: 42px; margin-bottom: 0.7rem; }
  .why-pillar-icon svg { width: 22px; height: 22px; }
  .why-pillar h3 { font-size: 0.86rem; }
  .why-pillar p { font-size: 0.76rem; line-height: 1.5; }
}

/* ══ Fusión: pilares + equipo médico en un solo panel ══════════════ */
.why-section { padding-bottom: 5rem; }
.why-header { margin-bottom: 0; }
.why-stage {
  position: relative;
  max-width: var(--max-w);
  margin: 6.5rem auto 0;
  padding: 0 2rem 1rem;
  border-radius: 40px;
  border: 1px solid var(--blue-pale);
  background:
    radial-gradient(640px 420px at 50% 72%, rgba(46,127,235,0.10) 0%, rgba(46,127,235,0) 70%),
    linear-gradient(180deg, var(--blue-bg) 0%, #fff 78%);
}
.why-stage::before {           /* trama de puntos sutil, como una red */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(rgba(0,58,140,0.09) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
}
/* Los pilares "montados" sobre el borde superior del panel */
.why-pillars {
  position: relative; z-index: 2;
  margin: -5rem auto 0;
  counter-reset: pilar;
}
.why-pillar { counter-increment: pilar; }
.why-pillar::before {
  content: '0' counter(pilar);
  position: absolute; top: 1.15rem; right: 1.2rem;
  font-family: var(--font-display); font-weight: 900; font-size: 1.6rem;
  color: var(--blue-pale); line-height: 1;
}
/* conector: cada pilar baja con una línea punteada hacia el equipo */
.why-pillar .pin { display: none; }
.why-pillars::after {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: -1.6rem; height: 1.6rem;
  background:
    linear-gradient(var(--blue-light), var(--blue-light)) 0 0 / 2px 100% no-repeat,
    linear-gradient(var(--blue-light), var(--blue-light)) 33.33% 0 / 2px 100% no-repeat,
    linear-gradient(var(--blue-light), var(--blue-light)) 66.66% 0 / 2px 100% no-repeat,
    linear-gradient(var(--blue-light), var(--blue-light)) 100% 0 / 2px 100% no-repeat;
  opacity: 0.25;
}
.team { position: relative; z-index: 1; padding-top: 2.75rem; }
.team-head { margin-bottom: 0.5rem; }
.team-title { font-size: clamp(1.6rem, 2.8vw, 2.15rem); }

/* Médicos que se adaptan al ancho (sin cortar nombres) */
.team-orbit { --av: 150px; }
.doc { width: auto; }
.doc-btn { zoom: 1; }
.doc-avatar { width: var(--av); height: calc(var(--av) * 1.2133); }
.doc-avatar::before, .doc-initials { width: var(--av); height: var(--av); }
.doc-frame { border-radius: 0 0 calc(var(--av) / 2) calc(var(--av) / 2); }
.doc-initials { font-size: calc(var(--av) * 0.28); }
.doc-name, .doc-spec { white-space: nowrap; }

@media (max-width: 1250px) {
  .team-orbit { --av: 120px; height: 690px; }
  .team-core { width: 250px; }
  .team-sami { width: 145px; }
  .team-bubble { min-height: 84px; padding: 0.7rem 0.85rem; }
  .team-bubble-text { font-size: 0.8rem; }
  .team-247 { right: -40px; bottom: 62px; }
  .doc-name { font-size: 0.76rem; padding: 0.26rem 0.7rem; }
  .doc-spec { font-size: 0.68rem; }
}
@media (max-width: 980px) {
  .why-stage { margin-top: 9rem; padding: 0 1.25rem 1.5rem; border-radius: 32px; }
  .why-pillars { margin-top: -8rem; }
  .why-pillars::after { display: none; }
  .team-orbit { --av: 140px; }
  .doc-name, .doc-spec { white-space: normal; }
  .team-247 { right: auto; bottom: auto; margin-top: -10px; }
  .team-core { margin-bottom: 0.5rem; }
}
@media (max-width: 560px) {
  .why-stage { margin-top: 13rem; padding: 0 0.75rem 1.25rem; border-radius: 26px; }
  .why-pillars { margin-top: -12rem; }
  .why-pillar::before { font-size: 1.2rem; top: 0.9rem; right: 0.8rem; }
  .team-orbit { --av: 118px; }
}
