/* ================================
   CARDS ESPECIALIDADES PEDIATRÍA
================================ */

.card-especialidad {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.35s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* franja superior */
.card-especialidad::before {
  content: "";
  height: 6px;
  width: 100%;
  background: var(--color);
}

/* imagen ocupa 50% */
.card-especialidad .img-box {
  height: 100%;
  min-height: 190px;
  /* background: rgba(0, 0, 0, .04); */
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-especialidad .img-box img {
  width: 85%;
  /* antes 100% */
  max-height: 75%;
  object-fit: contain;
  transition: all 0.35s ease;
}

/* cuerpo */
.card-especialidad .card-body {
  padding: 20px 20px 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* 👈 controla el espacio real */
  justify-content: flex-start;
  /* 👈 clave */
}

.card-especialidad h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  /* antes 20px */
  line-height: 1.3;
  /* más compacto */
}

/* acciones */
.card-especialidad .acciones {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.card-especialidad .acciones li a {
  width: 44px;
  height: 44px;
  background: var(--color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

/* hover */
.card-especialidad:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
}

.card-especialidad:hover .img-box {
  background: rgba(0, 0, 0, 0.02);
}

.card-especialidad:hover img {
  transform: scale(1.05);
}

.card-especialidad .acciones li a:hover {
  text-decoration: none;
}

.card-especialidad .acciones li a:hover {
  background: #333;
  transform: scale(1.1);
}

/* responsive */
@media (max-width: 767px) {
  .card-especialidad .img-box {
    min-height: 160px;
  }

  .card-especialidad h3 {
    font-size: 17px;
  }
}
