/* ============================================
   Página Especialidades
   Paleta alineada con inicio (index): hero overlay, barra stats, blancos, CTA home-life
   ============================================ */

.esp-hero {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  background-color: #1a6bb8;
  /* Solo degradado (sin foto de fondo); la rejilla de cruces va en .esp-hero-pattern */
  background-image: linear-gradient(
    105deg,
    rgba(2, 38, 78, 0.78) 0%,
    rgba(0, 72, 140, 0.62) 42%,
    rgba(0, 92, 168, 0.52) 100%
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 140px rgba(0, 30, 70, 0.35);
}

/* Patrón de cruces + sobre el degradado (sin imagen de fondo en .esp-hero) */
.esp-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%236dd4ff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

.esp-hero .container {
  position: relative;
  z-index: 1;
  padding-top: calc(72px + 1.25rem);
  padding-bottom: 2rem;
}

.esp-hero-row {
  padding-block: 0.5rem;
  min-height: 0;
}

/* Badge superior "ATENCIÓN MÉDICA ESPECIALIZADA" (fondo claro, texto blanco, borde) */
.esp-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;
}

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

.esp-hero-badge-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(109, 212, 255, 0.5);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Título principal: "Especialidades" blanco, "Médicas" azul claro */
.esp-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;
}

.esp-hero-title-médicas {
  color: #6dd4ff;
  display: block;
  margin-top: 0.1em;
}

/* Tres líneas decorativas bajo "Médicas" */
.esp-hero-title-lines {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.esp-hero-title-lines span {
  display: block;
  width: 2.5rem;
  height: 3px;
  border-radius: 2px;
  background-color: #6dd4ff;
}

.esp-hero-title-lines span:nth-child(1) { width: 2rem; }
.esp-hero-title-lines span:nth-child(2) { width: 2.5rem; }
.esp-hero-title-lines span:nth-child(3) { width: 1.5rem; }

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

/* Botones del hero */
.esp-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;
}

/* Botón Agendar Cita: fondo blanco, texto e icono azul */
.esp-btn-agendar {
  background-color: #ffffff;
  color: #2a8ad9;
  border: none;
}

.esp-btn-agendar:hover {
  color: #1e7bc4;
  background-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* Botón Ver Médicos: transparente, borde azul claro, texto blanco */
.esp-btn-ver-medicos {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #6dd4ff;
}

.esp-btn-ver-medicos:hover {
  color: #ffffff;
  background-color: rgba(109, 212, 255, 0.25);
  border-color: #6dd4ff;
}

/* Columna de la imagen */
.esp-hero-image-wrap {
  position: relative;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.esp-hero-doctors-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  background: rgba(109, 212, 255, 0.18);
}

/* Badges sobre la imagen (10+ espec. / 30+ médicos) */
.esp-hero-badge-img {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e7bc4;
  background-color: #6dd4ff;
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.esp-hero-badge-top {
  top: 8%;
  right: -5%;
}

.esp-hero-badge-bottom {
  bottom: 12%;
  left: -5%;
}

@media (max-width: 991.98px) {
  .esp-hero-image-wrap {
    max-width: 320px;
    margin: 0 auto;
  }

  .esp-hero-badge-top {
    right: 0;
  }

  .esp-hero-badge-bottom {
    left: 0;
  }
}

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

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

/* ============================================
   Estadísticas — misma barra que .hero-stats-bar (inicio)
   ============================================ */

.esp-stats {
  background: linear-gradient(180deg, #042b52 0%, #021627 100%);
  border-top: 1px solid rgba(79, 195, 247, 0.28);
  color: #ffffff;
}

.esp-stats-container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.esp-stat-item {
  padding: 0.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.esp-stat-icon-wrap {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  background: rgba(109, 212, 255, 0.2);
  border: 1px solid rgba(109, 212, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.esp-stat-icon {
  font-size: 1.3rem;
  color: #8ad8ff;
  display: block;
}

.esp-stat-number {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.esp-stat-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 0.08rem;
}

@media (max-width: 767.98px) {
  .esp-stats-container {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .esp-stat-icon-wrap {
    width: 2.4rem;
    height: 2.4rem;
  }

  .esp-stat-icon {
    font-size: 1.15rem;
  }

  .esp-stat-number {
    font-size: 1.35rem;
  }

  .esp-stat-label {
    font-size: 0.6rem;
  }
}

/* ============================================
   Directorio de Especialidades
   ============================================ */

/* Directorio — fondos como bloques blancos del inicio (#especialidades-inicio) */
.esp-directorio-header {
  background-color: #ffffff;
}

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

.esp-directorio-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4aa8e8;
}

.esp-directorio-title {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  color: #052a59;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.esp-directorio-title-ul {
  color: #0d6bb8;
  border-bottom: 3px solid #6dd4ff;
  padding-bottom: 2px;
}

.esp-directorio-subtitle {
  font-size: 0.95rem;
  color: #6b7c8f;
}

/* Barra de búsqueda */
.esp-directorio-search {
  max-width: 100%;
}

.esp-directorio-input {
  border: 2px solid rgba(109, 212, 255, 0.6);
  border-radius: 999px;
  padding: 0.6rem 3rem 0.6rem 1.25rem;
  font-size: 0.95rem;
  background-color: #fff;
}

.esp-directorio-input:focus {
  border-color: #6dd4ff;
  box-shadow: 0 0 0 3px rgba(109, 212, 255, 0.25);
}

.esp-directorio-search-icon {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: #6dd4ff;
  pointer-events: none;
}

.esp-directorio-card {
  background: #fff;
  border-radius: 1.4rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease,
    background 0.22s ease;
  position: relative;
}

.esp-directorio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
  border-color: rgba(37, 99, 235, 0.45);
}

/* Tarjeta tipo clínica: cabecera azul + icono en círculo */
.esp-med-card .esp-med-card-header {
  background: linear-gradient(135deg, #0a4f9e 0%, #0a6cbc 48%, #0055a5 100%);
  color: #fff;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.esp-med-card-icon-circle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.esp-med-card-icon-circle img.esp-med-card-svg {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.esp-med-card-icon-circle img.esp-med-card-legacy {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.esp-med-card-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.esp-med-card-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
}

.esp-med-card-body {
  padding-top: 1.25rem;
}

.esp-med-especialistas {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.esp-med-especialistas .esp-directorio-especialistas-title {
  color: #0b4f96;
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

.esp-med-especialistas .esp-directorio-list {
  color: #0f172a;
  font-size: 0.875rem;
}

.esp-med-especialistas .esp-directorio-list li::before {
  color: #0b4f96;
}

.esp-directorio-media {
  width: 100%;
  min-height: 152px;
  padding: 1.85rem 1.35rem;
  overflow: hidden;
  background-color: #f8fafc;
  background-image: radial-gradient(ellipse 120% 100% at 50% 0%, rgba(0, 85, 165, 0.07) 0%, transparent 55%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.esp-directorio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.esp-directorio-media img.esp-svg-icon {
  width: 58px;
  height: 58px;
  max-width: none;
  max-height: none;
  object-fit: contain;
  margin: auto;
  padding: 1.1rem;
  box-sizing: content-box;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(0, 85, 165, 0.1);
  filter: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.esp-directorio-card:hover .esp-directorio-media img.esp-svg-icon {
  transform: scale(1.05);
  box-shadow:
    0 10px 32px rgba(0, 85, 165, 0.12),
    0 0 0 1px rgba(0, 85, 165, 0.14);
}

.esp-directorio-media img.esp-legacy-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  margin: 0;
  filter: none;
}

.esp-directorio-media-fallback {
  width: 100%;
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0055a5;
}

.esp-directorio-media-fallback i {
  font-size: 2.15rem;
  opacity: 0.85;
  padding: 1rem;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(0, 85, 165, 0.1);
}

.esp-directorio-card-body {
  padding: 1.2rem 1.35rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #ffffff;
}

.esp-directorio-title-card {
  font-size: 1.05rem;
  font-weight: 700;
  color: #052a59;
  margin-bottom: 0.4rem;
}

.esp-directorio-desc {
  font-size: 0.9rem;
  color: #5a6c7d;
  line-height: 1.5;
  margin-bottom: 0;
}

.esp-directorio-especialistas-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6dd4ff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.esp-directorio-especialistas-title i {
  font-size: 1rem;
}

.esp-directorio-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: #1e6fb8;
}

.esp-directorio-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
}

.esp-directorio-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #1e6fb8;
}

.esp-directorio-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.esp-dir-btn-mas {
  border: 1px solid rgba(0, 85, 165, 0.35);
  color: #0055a5;
  background: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.esp-dir-btn-mas:hover {
  background-color: rgba(0, 85, 165, 0.06);
  color: #043d7a;
  border-color: rgba(0, 85, 165, 0.45);
}

.esp-dir-btn-cita {
  background: linear-gradient(180deg, #0a6cbc 0%, #0055a5 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 85, 165, 0.25);
}

.esp-dir-btn-cita:hover {
  background: linear-gradient(180deg, #0760a8 0%, #043d7a 100%);
  color: #fff;
}

.esp-dir-btn-mas,
.esp-dir-btn-cita {
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.esp-dir-btn-mas:hover,
.esp-dir-btn-cita:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

@media (max-width: 767.98px) {
  .esp-directorio-title {
    font-size: 1.5rem;
  }
}

/* Paginación: fondo blanco, círculos azules */
.esp-directorio-pagination-wrap {
  margin-top: 1rem;
}

.esp-pagination-controls {
  flex-wrap: wrap;
  justify-content: center;
}

.esp-pagination-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid #1e6fb8;
  background-color: #fff;
  color: #1e6fb8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.esp-pagination-btn:hover:not(:disabled) {
  background-color: rgba(30, 111, 184, 0.12);
}

.esp-pagination-btn.active,
.esp-pagination-btn[aria-current="page"] {
  background-color: #1e6fb8;
  color: #fff;
  border-color: #1e6fb8;
}

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

.esp-pagination-info {
  font-size: 0.9rem;
}

/* ============================================
   CTA antes del footer — banda clara (no confundir con footer oscuro)
   Paleta: blanco, celeste, azules (sin verde/amarillo)
   ============================================ */

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

/* Suaves círculos decorativos (solo azul muy claro) */
.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));
}
