:root {
  --home-line: #dfe9f2;
  --home-soft: #f5faff;
  --home-teal-soft: #e8fafb;
}

.home-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(19, 185, 196, .16), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.home-hero-grid {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(520px, 1.07fr);
  align-items: stretch;
}

.home-hero-copy {
  z-index: 2;
  align-self: center;
  padding: 68px 62px 64px 0;
}

.home-kicker,
.home-section-kicker {
  display: inline-block;
  color: var(--teal-600);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 720px;
  margin: 12px 0 22px;
  color: var(--blue-950);
  font-size: clamp(48px, 5vw, 76px);
  font-weight: 850;
  letter-spacing: -.052em;
  line-height: 1.03;
}

.home-hero h1 em {
  display: block;
  color: var(--teal-600);
  font-style: normal;
}

.home-hero-copy > p {
  max-width: 650px;
  margin: 0 0 30px;
  color: var(--body);
  font-size: 18px;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.home-hero-visual {
  position: relative;
  min-height: 570px;
  margin-right: calc((100vw - min(var(--container), calc(100vw - 48px))) / -2);
  overflow: hidden;
  border-bottom-left-radius: 70px;
}

.home-hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 570px;
  object-fit: cover;
  object-position: center;
}

.home-hero-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.13), transparent 34%),
    linear-gradient(180deg, transparent 72%, rgba(4,53,110,.08));
}

.home-trust {
  position: relative;
  z-index: 5;
  margin-top: -22px;
}

.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 22px;
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow);
}

.home-trust-grid article {
  display: flex;
  gap: 18px;
  padding: 28px 30px;
  border-right: 1px solid var(--home-line);
}

.home-trust-grid article:last-child {
  border-right: 0;
}

.home-round-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--home-teal-soft);
  color: var(--teal-600);
}

.home-round-icon svg {
  width: 33px;
  height: 33px;
}

.home-trust h2 {
  margin: 2px 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.home-trust p {
  margin: 0;
  color: var(--body);
  font-size: 13px;
}

.home-services {
  padding-top: 86px;
}

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

.home-service-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-small);
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.home-service-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.home-service-card > div {
  padding: 20px;
}

.home-service-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.2;
}

.home-service-card p {
  min-height: 66px;
  margin: 0 0 17px;
  color: var(--body);
  font-size: 13.5px;
}

.home-service-card a,
.home-specialties-grid a {
  color: var(--teal-600);
  font-size: 13px;
  font-weight: 850;
}

.home-specialties {
  background:
    radial-gradient(circle at 20% 20%, rgba(19,185,196,.08), transparent 24%),
    linear-gradient(180deg, #f6fcfd 0%, #ffffff 100%);
}

/* Laboratorio clínico y especialidades — carrusel extensible */
.home-carousel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  text-align: left;
}

.home-carousel-heading > div:first-child {
  max-width: 780px;
}

.home-carousel-heading .heading-line {
  margin-left: 0;
}

.home-carousel-heading p {
  margin: 16px 0 0;
  color: var(--body);
  font-size: 15px;
}

.home-carousel-controls {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.home-carousel-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--home-line);
  border-radius: 50%;
  background: #fff;
  color: var(--blue-900);
  box-shadow: var(--shadow-small);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.home-carousel-button:hover,
.home-carousel-button:focus-visible {
  background: var(--blue-900);
  color: #fff;
  transform: translateY(-2px);
}

.home-specialties-carousel {
  position: relative;
}

.home-specialties-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 44px) / 3);
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 18px;
}

.home-specialties-track::-webkit-scrollbar { display: none; }

.home-specialty-slide {
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--home-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.home-specialty-slide img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.home-specialty-slide > div {
  padding: 22px;
}

.home-specialty-slide h3 {
  margin: 0 0 9px;
  font-size: 20px;
  line-height: 1.2;
}

.home-specialty-slide p {
  min-height: 64px;
  margin: 0 0 18px;
  color: var(--body);
  font-size: 13px;
  line-height: 1.48;
}

.home-specialty-slide a {
  color: var(--teal-600);
  font-size: 13px;
  font-weight: 850;
}

.home-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 7px;
}

.home-carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cbd8e6;
  cursor: pointer;
}

.home-carousel-dot.active {
  width: 25px;
  border-radius: 999px;
  background: var(--teal-600);
}

.home-process {
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.home-process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
}

.home-process-grid article {
  position: relative;
  min-height: 180px;
  padding: 30px 23px 24px;
  border: 1px solid var(--home-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.home-step {
  position: absolute;
  top: -15px;
  left: 22px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-900);
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  box-shadow: 0 7px 18px rgba(7,73,139,.25);
}

.home-process-grid h3 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.home-process-grid p {
  margin: 0;
  color: var(--body);
  font-size: 13px;
}

.home-locations {
  background: #fbfdff;
}

.home-locations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 22px;
}

.home-locations-grid article {
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.home-locations-grid article > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.home-locations-grid article > div {
  padding: 23px;
}

.home-locations-grid h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.home-address {
  min-height: 48px;
  margin: 0 0 10px;
  color: var(--body);
  font-size: 14px;
}

.home-phone {
  display: inline-block;
  min-height: 24px;
  margin-bottom: 18px;
  color: var(--blue-800);
  font-size: 14px;
  font-weight: 800;
}

.home-phone-pending {
  color: #758397;
  font-weight: 700;
}

.home-location-actions {
  display: flex;
  gap: 9px;
}

.home-location-actions .button {
  flex: 1 1 auto;
}

.home-footer-locations a {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-footer-locations a strong {
  color: #fff;
  font-size: 11.5px;
}

.home-footer-locations a span {
  color: rgba(255,255,255,.66);
  font-size: 10.5px;
}



/* Google Maps en las tarjetas de sedes */
.home-map-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eaf2f8;
  border-bottom: 1px solid var(--home-line);
}

.home-map-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  pointer-events: none;
  filter: saturate(.88) contrast(.98);
}

.home-map-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 14px;
  color: transparent;
  background: linear-gradient(180deg, transparent 68%, rgba(4, 53, 110, .16));
  cursor: pointer;
}

.home-map-link::after {
  content: "Abrir en Google Maps";
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--blue-900);
  box-shadow: 0 7px 20px rgba(4,53,110,.18);
  font-size: 11px;
  font-weight: 800;
}

.home-map-link:hover::after,
.home-map-link:focus-visible::after {
  background: var(--blue-900);
  color: #fff;
}

@media (max-width: 1180px) {
  .home-hero-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .home-specialties-grid {
    grid-template-columns: 1fr;
  }

  .home-specialties-grid article {
    grid-template-columns: 34% 66%;
  }

  .home-featured-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-process-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 34px;
  }
}

@media (max-width: 900px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-copy {
    padding: 55px 0 42px;
  }

  .home-hero-visual {
    min-height: 430px;
    margin: 0;
    border-radius: 28px 28px 70px 28px;
  }

  .home-hero-visual img {
    min-height: 430px;
  }

  .home-trust {
    margin-top: 22px;
  }

  .home-trust-grid {
    grid-template-columns: 1fr;
  }

  .home-trust-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--home-line);
  }

  .home-trust-grid article:last-child {
    border-bottom: 0;
  }

  .home-services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-featured-grid,
  .home-locations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-hero h1 {
    font-size: 40px;
  }

  .home-hero-copy > p {
    font-size: 16px;
  }

  .home-hero-actions {
    flex-direction: column;
  }

  .home-hero-actions .button {
    width: 100%;
  }

  .home-services-grid {
    grid-template-columns: 1fr;
  }

  .home-service-card p {
    min-height: 0;
  }

  .home-specialties-grid article {
    grid-template-columns: 1fr;
  }

  .home-specialties-grid img {
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .home-featured-grid,
  .home-process-grid {
    grid-template-columns: 1fr;
  }

  .home-location-actions {
    flex-direction: column;
  }
}




@media (max-width: 1180px) {
  .home-specialties-track {
    grid-auto-columns: calc((100% - 22px) / 2);
  }
}

@media (max-width: 720px) {
  .home-carousel-heading {
    align-items: flex-start;
  }

  .home-carousel-controls {
    display: none;
  }

  .home-specialties-track {
    grid-auto-columns: 86%;
  }
}

@media (max-width: 480px) {
  .home-specialties-track {
    grid-auto-columns: 94%;
  }
}


/* Estado de tarjetas del carrusel de especialidades avanzadas */
.home-specialty-badge{display:inline-flex;align-items:center;min-height:27px;margin-bottom:10px;padding:0 10px;border-radius:999px;background:#e8fafb;color:var(--teal-600);font-size:10px;font-weight:850;letter-spacing:.05em;text-transform:uppercase}
.home-specialty-badge.pending{background:#eef3f8;color:#68788b}.home-specialty-badge.provisional{background:#fff4e8;color:#a55b00}
.home-specialty-active{outline:2px solid rgba(19,185,196,.22);outline-offset:-2px}
.home-specialty-slide p{min-height:66px}
