/* ========================================= */
/* SECCIÓN URGENCIAS   */
/* ========================================= */

.emergency-section {
  background: var(--bg-light);
  padding: 80px 0;
  font-family: var(--font-primary);
}

.emergency-container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 25px;
}

/* Contenedor principal */
.emergency-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 15px;
  column-gap: 40px;
  animation: fadeInUp 0.8s ease-in-out;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/* COLUMNA TEXTO                 */
/* ============================= */

.emergency-info {
  flex: 1 1 550px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  gap: 10px;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.emergency-info > p,
.emergency-info .emergency-text {
  margin: 0;
  padding: 0;
}

.emergency-info > p + p {
  margin-top: 8px;
}

.emergency-title {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 2.4rem;
  margin-bottom: 6px;
  position: relative;
}

.emergency-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 3px;
  margin-top: 10px;
}

.emergency-text {
  color: var(--text-color);
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 0;
  text-align: justify;
}

/* ============================= */
/* BLOQUE DE CONTACTO DIRECTO    */
/* ============================= */

.emergency-contact-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 34px;
  padding: 10px 16px;
  margin-top: 14px;
  box-shadow: 0 6px 20px rgba(26, 54, 93, 0.25);
  color: #fff;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  width: auto;
  max-width: 260px;
  align-self: flex-start; 
}

.emergency-contact-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80px;
  width: 60px;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  transform: skewX(-25deg);
  transition: 0.8s ease;
}

.emergency-contact-gradient:hover::before {
  left: 120%;
}

.emergency-contact-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(26, 54, 93, 0.35);
}

/* Icono */
.contact-icon {
  font-size: 1.7rem;
  flex-shrink: 0;
  color: #fff;
}

/* Texto y botón */
.contact-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  margin: 0;
  padding: 0;
}

.call-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  opacity: 0.95;
}

.call-number-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  margin: 3px 0;
  transition: all var(--transition-fast);
}

.call-number-btn i {
  font-size: 1rem;
}

.call-number-btn:hover {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.call-subtext {
  font-size: 0.82rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* ============================= */
/* COLUMNA IMAGEN                */
/* ============================= */

.emergency-image {
  flex: 1 1 420px;
  display: flex;
  justify-content: center;
}

.img-urgencias {
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  box-shadow: 0 8px 22px var(--shadow);
  object-fit: cover;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.emergency-image:hover .img-urgencias {
  transform: scale(1.03);
  box-shadow: 0 12px 28px var(--shadow-hover);
}

/* ============================= */
/* RESPONSIVO                    */
/* ============================= */

@media (max-width: 992px) {
  .emergency-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .emergency-title {
    font-size: 2rem;
  }

  .emergency-text {
    text-align: justify;
  }

  .emergency-info {
    align-items: center;
  }

  .emergency-contact-gradient {
    flex-direction: column;
    text-align: center;
    padding: 14px 20px;
    max-width: 360px;
    margin: 12px auto 0 auto; 
  }

  .contact-content {
    align-items: center;
  }

  .img-urgencias {
    max-width: 380px;
  }
}

@media (max-width: 576px) {
  .emergency-section {
    padding: 50px 15px;
  }

  .emergency-title {
    font-size: 1.7rem;
  }

  .call-number-btn {
    font-size: 1.05rem;
    padding: 8px 14px;
  }
}
