/* ============================================
   Página Médicos
   Paleta alineada con inicio / especialidades
   ============================================ */

.med-hero {
  position: relative;
  min-height: 85vh;
  overflow: hidden;
  margin-bottom: 0;
  /* Solo fondo-hero-med.png (sin degradado tipo Especialidades); velo oscuro para texto */
  background-color: #0f3460;
  background-image: linear-gradient(
      180deg,
      rgba(0, 18, 45, 0.38) 0%,
      rgba(0, 18, 45, 0.48) 100%
    ),
    url("../imagenes/fondo-hero-med.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 100px rgba(0, 15, 40, 0.28);
}

.med-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  min-height: 85vh;
}

/* Panel izquierdo: sin fondo (diagonal se mantiene) */
.med-hero-left {
  position: relative;
  flex: 1 1 55%;
  min-height: 85vh;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  padding-top: calc(72px + 1.5rem);
  padding-bottom: 2rem;
  padding-left: 6.5rem;
  z-index: 1;
}

.med-hero-content-wrap {
  position: relative;
  z-index: 1;
  height: 100%;
}

.med-hero-row {
  padding-block: 0.5rem;
}

/* Contenedor del texto: alineado a la izquierda */
.med-hero-text {
  text-align: left;
}

/* Badge — igual criterio que esp-hero-badge */
.med-hero-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background-color: rgba(109, 212, 255, 0.28);
  border: 1px solid rgba(109, 212, 255, 0.55);
  border-radius: 999px;
  padding: 0.35rem 1rem;
}

.med-hero-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #6dd4ff;
  flex-shrink: 0;
}

/* Título: "Nuestros" blanco, "Médicos" azul claro */
.med-hero-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0;
  text-transform: uppercase;
}

.med-hero-title-medicos {
  color: #6dd4ff;
  display: block;
  margin-top: 0.08em;
}

/* Dos líneas decorativas bajo "Médicos": primera más corta, segunda más larga */
.med-hero-underline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.med-hero-line {
  display: block;
  height: 3px;
  background-color: #6dd4ff;
  border-radius: 2px;
}

.med-hero-line-1 {
  width: 2.2rem;
}

.med-hero-line-2 {
  width: 3.5rem;
}

/* Descripción */
.med-hero-desc {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  max-width: 28rem;
  line-height: 1.6;
}

/* Botones */
.med-hero-btns .btn {
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.med-btn-agendar {
  background-color: #ffffff;
  color: #052a59;
  border: 1px solid rgba(109, 212, 255, 0.55);
  box-shadow: 0 4px 18px rgba(5, 42, 89, 0.12);
}

.med-btn-agendar:hover {
  color: #021a3d;
  background-color: rgba(255, 255, 255, 0.98);
  border-color: #6dd4ff;
  transform: translateY(-1px);
}

/* Ver Especialidades: transparente, borde celeste, texto blanco */
.med-btn-especialidades {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid #6dd4ff;
}

.med-btn-especialidades:hover {
  background-color: rgba(109, 212, 255, 0.15);
  color: #ffffff;
  border-color: #6dd4ff;
  transform: translateY(-1px);
}

/* Cajas de estadísticas */
.med-hero-stats {
  max-width: 32rem;
}

.med-hero-stat-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background-color: rgba(109, 212, 255, 0.14);
  border: 1px solid rgba(109, 212, 255, 0.42);
  border-radius: 14px;
  min-height: 100%;
  box-shadow: 0 4px 20px rgba(2, 26, 61, 0.18);
  backdrop-filter: blur(6px);
}

.med-hero-stat-box i {
  font-size: 1.25rem;
  color: #6dd4ff;
}

.med-hero-stat-num {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #ffffff;
}

.med-hero-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.3;
}

/* Panel derecho: imagen con corte diagonal (se extiende a la izquierda para tapar la banda azul) */
.med-hero-right {
  flex: 1 1 45%;
  position: relative;
  min-height: 60vh;
  overflow: visible;
  z-index: 1;
}

.med-hero-image-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: -18%;
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
}

.med-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Desktop: imagen ocupa toda la altura y tapa la banda */
@media (min-width: 992px) {
  .med-hero-right {
    min-height: 85vh;
  }

  .med-hero-image-wrap {
    left: -15%;
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* Tablet y móvil: apilado, sin diagonal; imagen arriba */
@media (max-width: 991.98px) {
  .med-hero {
    min-height: auto;
  }

  .med-hero-inner {
    flex-direction: column;
    min-height: auto;
  }

  .med-hero-left {
    min-height: auto;
    clip-path: none;
    padding-top: calc(72px + 1rem);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    flex: 1 1 auto;
  }

  .med-hero-right {
    min-height: 320px;
    flex: 0 0 auto;
    order: -1; /* imagen arriba en móvil */
  }

  .med-hero-image-wrap {
    position: relative;
    clip-path: none;
    min-height: 320px;
  }

  .med-hero-img {
    min-height: 320px;
  }
}

@media (max-width: 575.98px) {
  .med-hero-title {
    font-size: 1.9rem;
  }

  .med-hero-btns .btn {
    width: 100%;
    justify-content: center;
  }

  .med-hero-stat-box {
    padding: 0.6rem 0.75rem;
  }

  .med-hero-stat-num {
    font-size: 1.15rem;
  }

  .med-hero-stat-label {
    font-size: 0.7rem;
  }
}

/* ============================================
   Directorio de Médicos (debajo del hero)
   ============================================ */

.med-directorio {
  background-color: #ffffff;
}

.med-directorio-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0d6bb8;
}

.med-directorio-badge i {
  font-size: 1rem;
  color: #1a8bc8;
}

.med-directorio-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: #052a59;
  margin-bottom: 0;
}

.med-directorio-underline {
  display: block;
  width: 3.5rem;
  height: 3px;
  background: linear-gradient(90deg, #4fc3f7, #0d8ce8);
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.med-directorio-subtitle {
  font-size: 0.95rem;
  font-weight: 400;
  color: #4a6d8c;
}

/* Buscador tipo pill */
.med-directorio-search-wrap {
  position: relative;
}

.med-directorio-search {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  font-size: 0.95rem;
  color: #052a59;
  background-color: #ffffff;
  border: 1px solid rgba(42, 140, 196, 0.35);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.med-directorio-search::placeholder {
  color: #8899aa;
}

.med-directorio-search:focus {
  border-color: #0d6bb8;
  box-shadow: 0 0 0 3px rgba(13, 140, 232, 0.18);
}

.med-directorio-search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #2a8cc4;
  pointer-events: none;
}

/* Botones de filtro por especialidad */
.med-directorio-filters {
  margin-top: 0.5rem;
}

.med-filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0d5a9e;
  background-color: #ffffff;
  border: 1px solid rgba(42, 140, 196, 0.45);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.med-filter-btn:hover {
  background-color: #f0f8ff;
  color: #042d58;
  border-color: #2a8cc4;
}

.med-filter-btn.active {
  background: linear-gradient(135deg, #0d8ce8 0%, #0669b8 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(13, 140, 232, 0.3);
}

.med-filter-btn.active:hover {
  filter: brightness(1.05);
  color: #ffffff;
}

/* ============================================
   Tarjetas de médicos (debajo del directorio)
   ============================================ */

.med-cards {
  background-color: #f8f9fa;
}

.med-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(77, 163, 224, 0.2);
  box-shadow: 0 4px 24px rgba(5, 42, 89, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.med-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(13, 107, 184, 0.12);
  border-color: rgba(79, 195, 247, 0.45);
}

.med-card-image-wrap {
  position: relative;
  /* Misma proporción que .doctor-image-wrap en inicio (tarjeta compacta) */
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #f5f9fc 0%, #e8f0f7 100%);
}

.med-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Franja con degradado azul solo en la parte inferior de la imagen */
.med-card-image-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(13, 140, 232, 0.35) 45%,
    rgba(5, 42, 89, 0.88) 100%
  );
  pointer-events: none;
}

/* Especialidad: óvalo/píldora a la izquierda sobre el degradado azul */
.med-card-especialidad {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #0d8ce8 0%, #0669b8 100%);
  border-radius: 999px;
  z-index: 1;
  text-transform: none;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(5, 42, 89, 0.25);
}

.med-card-body {
  padding: 0.9rem 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.med-card-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #052a59;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.med-card-contact {
  font-size: 0.8rem;
  color: #4a6d8c;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.med-card-contact i {
  font-size: 0.9rem;
  color: #2a8cc4;
  flex-shrink: 0;
}

.med-card-actions {
  margin-top: auto;
  padding-top: 0.75rem;
}

.med-card-btn-profile {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0d5a9e;
  background-color: #ffffff;
  border: 2px solid #2a8cc4;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.med-card-btn-profile:hover {
  background-color: #f0f8ff;
  color: #042d58;
  border-color: #0669b8;
}

/* Misma familia cromática que el sitio (enlace sigue siendo WhatsApp) */
.med-card-btn-whatsapp {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0d8ce8 0%, #0669b8 100%);
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  box-shadow: 0 4px 14px rgba(13, 140, 232, 0.35);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.med-card-btn-whatsapp:hover {
  filter: brightness(1.06);
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Filtro (especialidad / búsqueda): ocultar filas no coincidentes */
.med-card-col.med-card-col-filtered-out {
  display: none !important;
}

/* Ocultar tarjetas que no corresponden a la página actual (JS las muestra) */
.med-card-col[data-page] {
  display: none;
}

.med-card-col.med-card-col-visible {
  display: block;
}

/* Paginación */
.med-pagination-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #052a59;
  background-color: #ffffff;
  border: 1px solid rgba(42, 140, 196, 0.45);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.med-pagination-btn:hover:not(:disabled) {
  background-color: #f0f8ff;
  border-color: #2a8cc4;
}

.med-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.med-pagination-num {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #052a59;
  background-color: #ffffff;
  border: 1px solid rgba(42, 140, 196, 0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.med-pagination-num:hover {
  background-color: #f0f8ff;
  border-color: #2a8cc4;
}

.med-pagination-num.active {
  background: linear-gradient(135deg, #052a59 0%, #0d6bb8 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(5, 42, 89, 0.25);
}

.med-pagination-info {
  font-size: 0.9rem;
  color: #4a6d8c;
}

/* ============================================
   CTA antes del footer — esp-cta-v2 (mismo bloque que especialidades)
   ============================================ */

.esp-cta-contact.esp-cta-v2 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #ffffff 0%, #f0f8ff 35%, #e5f2fc 70%, #dbeefd 100%);
  color: #052a59;
}

.esp-cta-contact.esp-cta-v2::before,
.esp-cta-contact.esp-cta-v2::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.esp-cta-contact.esp-cta-v2::before {
  width: 22rem;
  height: 22rem;
  top: -8rem;
  right: -6rem;
  background: radial-gradient(circle, rgba(173, 220, 255, 0.45) 0%, transparent 70%);
}

.esp-cta-contact.esp-cta-v2::after {
  width: 16rem;
  height: 16rem;
  bottom: -6rem;
  left: -4rem;
  background: radial-gradient(circle, rgba(135, 206, 250, 0.22) 0%, transparent 70%);
}

.esp-cta-contact.esp-cta-v2 .container {
  position: relative;
  z-index: 1;
}

.esp-cta-v2-panel {
  background: #ffffff;
  border-radius: 1.35rem;
  padding: 2.25rem 2rem;
  border: 1px solid rgba(77, 163, 224, 0.22);
  box-shadow:
    0 4px 24px rgba(5, 42, 89, 0.06),
    0 24px 48px rgba(13, 107, 184, 0.08);
  border-left: 5px solid #4fc3f7;
}

@media (min-width: 992px) {
  .esp-cta-v2-panel {
    padding: 2.75rem 2.75rem;
  }
}

.esp-cta-v2-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a8bc8;
}

.esp-cta-v2-title {
  font-size: clamp(1.45rem, 3.5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #052a59;
  max-width: 20em;
}

.esp-cta-v2-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: #4a6d8c;
  max-width: 36rem;
}

.esp-cta-v2-btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.75rem 1.45rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
}

.esp-cta-v2-btn-primary {
  background: linear-gradient(135deg, #0d8ce8 0%, #0669b8 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 8px 22px rgba(13, 140, 232, 0.35);
}

.esp-cta-v2-btn-primary:hover {
  color: #ffffff !important;
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(13, 140, 232, 0.42);
}

.esp-cta-v2-btn-outline {
  background: #ffffff;
  color: #0d5a9e !important;
  border: 2px solid #2a8cc4;
}

.esp-cta-v2-btn-outline:hover {
  background: #f0f8ff;
  color: #042d58 !important;
  border-color: #0669b8;
  transform: translateY(-2px);
}

.esp-cta-v2-meta {
  background: linear-gradient(145deg, #f5fbff 0%, #eaf4fc 100%);
  border: 1px solid rgba(79, 195, 247, 0.35);
  border-radius: 1rem;
  padding: 1.5rem 1.35rem;
}

.esp-cta-v2-meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0d6bb8;
  margin-bottom: 0;
}

.esp-cta-v2-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.esp-cta-v2-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #355570;
}

.esp-cta-v2-meta-ico {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 195, 247, 0.2);
  border: 1px solid rgba(37, 154, 214, 0.35);
  color: #0d6bb8;
  font-size: 1.1rem;
}

.esp-cta-v2-accent-bar {
  height: 4px;
  max-width: 6rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #4fc3f7, #0d8ce8, rgba(13, 140, 232, 0));
}
