/* ===== EXTRAS: footer + burbuja WhatsApp + volver arriba ===== */
:root {
  --ex-blue: #1f5fd6;
  --ex-dark: #0f1b33;
  --ex-wa: #25d366;
}

/* ---------- Footer: horarios / dirección ---------- */
.footer__contact .footer__hours {
  display: block;
  line-height: 1.55;
}
.footer__contact a {
  word-break: break-word;
}

/* ---------- Burbuja WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 10px;
}
.wa-float__btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--ex-wa);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.2s;
  margin-top: 1rem;
}
.wa-float__btn:hover {
  transform: scale(1.08);
}
.wa-float__btn svg {
  width: 32px;
  height: 32px;
  display: block;
}

.wa-float__tip {
  background: #fff;
  color: var(--ex-dark);
  padding: 10px 34px 10px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  max-width: 210px;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition:
    opacity 0.35s,
    transform 0.35s;
}
.wa-float__tip.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.wa-float__close {
  position: absolute;
  top: 4px;
  right: 6px;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #8a94a8;
}

/* ---------- Botón volver arriba (centrado sobre WhatsApp) ----------
   WhatsApp: 58px, right 20px, bottom 20px  -> su borde superior queda en 78px
   Flecha: 46px, centrada (right = 20 + (58-46)/2 = 26px), 12px de separación */
.to-top {
  width: 46px !important;
  height: 46px !important;
  right: 26px !important;
  bottom: 90px !important;
  background: var(--ex-blue) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
}
.to-top svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 480px) {
  .wa-float {
    right: 14px;
    bottom: 14px;
  }
  .wa-float__tip {
    max-width: 170px;
    font-size: 0.82rem;
  }
  /* 14 + 58 + 12 = 84 ; right = 14 + 6 = 20 */
  .to-top {
    right: 20px !important;
    bottom: 84px !important;
  }
}

/* =========================================================
   AGREGAR AL FINAL DE styles/extras.css
   ========================================================= */

/* ===== Ubicación / Mapa (Hospital Real San José) ===== */
.footer .footer__location {
  margin: 40px 0 32px;
}
.footer .footer__location-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.footer .footer__location-pin {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.footer .footer__location-pin svg {
  width: 32px;
  height: 32px;
}
.footer .footer__location-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.footer .footer__location-addr {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.8;
}

.footer .footer__map {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.footer .footer__map iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}
.footer .footer__map-link {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: #0b1f3a;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.footer .footer__map-link svg {
  width: 24px;
  height: 24px;
}

/* ===== Íconos del footer más grandes ===== */
.footer .footer__social {
  gap: 14px;
}
.footer .footer__social a {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.footer .footer__social a svg {
  width: 28px;
  height: 28px;
}

.footer .footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 16px;
}
.footer .footer__contact li svg {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.footer .footer__wa-icon {
  width: 32px;
  height: 32px;
}
.footer .footer__logo {
  width: 84px;
  height: 84px;
}

/* Flotantes */
.wa-float__btn {
  width: 64px;
  height: 64px;
}
.wa-float__btn svg {
  width: 36px;
  height: 36px;
}
.to-top {
  width: 52px;
  height: 52px;
}
.to-top svg {
  width: 26px;
  height: 26px;
}

/* ===== Móvil ===== */
@media (max-width: 768px) {
  .footer .footer__location-head {
    align-items: flex-start;
  }
  .footer .footer__location-pin {
    width: 60px;
    height: 60px;
  }
  .footer .footer__location-pin svg {
    width: 34px;
    height: 34px;
  }
  .footer .footer__location-title {
    font-size: 18px;
  }

  .footer .footer__map iframe {
    height: 300px;
  }
  .footer .footer__map-link {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: center;
  }

  .footer .footer__social a {
    width: 58px;
    height: 58px;
  }
  .footer .footer__social a svg {
    width: 32px;
    height: 32px;
  }

  .footer .footer__contact li svg {
    width: 30px;
    height: 30px;
  }
  .footer .footer__contact li {
    font-size: 17px;
  }

  .footer .footer__wa-icon {
    width: 36px;
    height: 36px;
  }

  .wa-float__btn {
    width: 68px;
    height: 68px;
  }
  .wa-float__btn svg {
    width: 40px;
    height: 40px;
  }
  .to-top {
    width: 56px;
    height: 56px;
  }
}


/* Grid de especialidades con 4 tarjetas */
@media (min-width: 1100px) {
  .esp .esp__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 28px);
  }
  .esp .esp-card { padding: clamp(24px, 2.2vw, 36px); }
}

@media (min-width: 641px) and (max-width: 1099px) {
  .esp .esp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}