/* ======== AYUDA - DISEÑO INSTITUCIONAL (Texto Grande y Legible) ======== */

:root {
  --burgundy: #611232;
  --gold: #d6bd55;
  --cream-bg: #fbf8eb; /* Fondo para las tarjetas */
  --white: #ffffff;    /* Fondo para la página */
  --text-dark: #333333;
}

/* Layout General (Fondo Blanco) */
.ayuda-layout {
  background-color: var(--white);
  padding: 3rem 5% 5rem;
  min-height: calc(100vh - 100px);
}

.ayuda-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.ayuda-header h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--burgundy);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.ayuda-header p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.2rem; /* Texto introductorio más grande */
  color: #555;
  max-width: 65ch;
  margin: 0 auto;
}

/* Grid de Tarjetas */
.ayuda-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); /* Tarjetas un poco más anchas */
  gap: 3rem;
  max-width: 1250px;
  margin: 0 auto 5rem;
}

/* TARJETAS DE INFORMACIÓN */
.info-card {
  background-color: var(--cream-bg);
  border-radius: 1rem;
  padding: 3rem; /* Más espacio interno */
  border: 1px solid #e0e0e0;
  border-top: 6px solid var(--burgundy);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(97, 18, 50, 0.12);
}

.card-header h2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 2rem; /* Título de tarjeta más grande */
  color: var(--burgundy);
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.divider {
  height: 4px;
  width: 60px;
  background-color: rgba(97, 18, 50, 0.15);
  margin-bottom: 2rem;
}

/* Items de Información */
.info-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  align-items: flex-start;
}

.icon-box {
  background-color: white;
  color: var(--burgundy);
  width: 48px; /* Icono más grande */
  height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.icon-box svg { width: 24px; height: 24px; }

/* AUMENTO DE TEXTO AQUÍ */
.info-item strong { 
  display: block; 
  font-size: 1.15rem; /* Etiquetas más grandes */
  color: var(--burgundy); 
  margin-bottom: 0.3rem; 
}

.info-item p { 
  margin: 0; 
  font-size: 1.15rem; /* Contenido más grande */
  color: #444; 
  line-height: 1.5; 
}

.btn-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 1rem;
  background-color: white; border: 1px solid #ddd; border-radius: 10px;
  color: #333; text-decoration: none; font-weight: 700;
  transition: all 0.2s;
  font-size: 1.1rem; /* Botón más grande */
}
.btn-social:hover { border-color: #1877f2; color: #1877f2; background-color: #f8faff; }

/* Tarjeta Comunidad */
.text-body { 
  line-height: 1.7; 
  color: #444; 
  margin-bottom: 1.8rem; 
  font-size: 1.2rem; /* Texto de cuerpo aumentado */
}

.quote-box {
  background-color: white; border-left: 5px solid var(--gold);
  padding: 1.8rem; 
  text-align: center; 
  margin: 2rem 0;
  font-style: italic; color: var(--burgundy); 
  font-size: 1.25rem; /* Cita más grande */
  border-radius: 0 10px 10px 0;
}

.hashtag-pill {
  display: inline-block; background-color: var(--burgundy); color: white;
  padding: 0.6rem 1.5rem; border-radius: 50px; 
  font-size: 1rem; 
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* SECCIÓN EMERGENCIA */
.emergency-strip {
  background-color: #fff5f5; 
  border-radius: 1.2rem;
  max-width: 1000px; /* Sección más ancha */
  margin: 0 auto;
  padding: 3.5rem;
  text-align: center;
  border: 1px solid #ffe0e0;
}

.emergency-header h3 {
  margin: 0 0 0.8rem 0;
  color: #c62828;
  font-family: 'Quicksand', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
}

.emergency-header p {
  margin-bottom: 2.5rem;
  color: #666;
  font-size: 1.2rem;
}

/* Imágenes de emergencia */
.emergency-images {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.emg-img {
  height: 13rem; 
  width: auto;
  transition: transform 0.3s;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: white;
  padding: 0.6rem;
}

.emg-img:hover {
  transform: scale(1.05);
}

.btn-directory {
  background: transparent; border: 2px solid var(--burgundy); color: var(--burgundy);
  padding: 1.1rem 2.8rem; border-radius: 50px; font-weight: 700;
  cursor: pointer; transition: all 0.3s; 
  font-size: 1.2rem; /* Botón más grande */
}
.btn-directory:hover { background: var(--burgundy); color: white; }

/* --- MODAL OPTIMIZADO (Header Fijo + Scroll Interno + Compacto) --- */

.contact-modal {
  position: fixed; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.6); z-index: 2000;
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.contact-modal.active { display: flex; }

.modal-container {
  background: var(--white);
  border-radius: 1rem;
  width: 95%; 
  max-width: 1000px; 
  
  /* Altura fija máxima para asegurar que quepa en la pantalla */
  height: 90vh; 
  max-height: 90vh;
  
  /* Flexbox vertical para fijar header y footer */
  display: flex;
  flex-direction: column;
  
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  overflow: hidden; /* Importante para recortar las esquinas */
}

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  border: none; background: white; width: 40px; height: 40px;
  border-radius: 50%; font-size: 2rem; cursor: pointer; color: var(--burgundy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 10;
  line-height: 1;
}

/* Header FIJO al tope */
.modal-header {
  text-align: center;
  background-color: var(--cream-bg);
  padding: 2rem; /* Reducido un poco */
  border-bottom: 3px solid var(--gold);
  flex-shrink: 0; /* Evita que se aplaste */

}

.modal-header h2 {
  color: var(--burgundy);
  font-family: 'Quicksand', sans-serif;
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  padding-right: 2rem; /* Espacio para la X de cerrar */
}

/* Cuerpo SCROLLEABLE */
.directory-grid {
  padding: 2rem;
  overflow-y: auto; 
  flex-grow: 1; 
  
  display: grid;
  /* Aumentamos el ancho mínimo de tarjeta para que no se vean tan angostas */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin:1rem;
  /* CAMBIO: Aumentamos el gap (antes 1.2rem) para más separación */
  gap: 2rem; 
}

.dir-group h4 {
  color: #888;
  font-size: 0.9rem; /* Un poco más grande */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1.5rem 0 1rem 0;
  border-bottom: 2px solid #eee;
  display: block;
  padding-bottom: 4px;
  font-weight: 700;
}
.dir-group:first-child h4 { margin-top: 0; }

/* Tarjetas con HOVER */
.dir-card {
  background: #f9f9f9;
  padding: 1.2rem; /* Un poco más de relleno interno */
  border-radius: 10px;
  border: 1px solid #eee;
  display: flex; 
  flex-direction: column;
  margin:1rem;
  /* CAMBIO: Transición suave para el efecto hover */
  transition: all 0.3s ease;
  position: relative;
}

/* CAMBIO: Efecto Hover (Levantar + Sombra + Borde Dorado) */
.dir-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: var(--gold);
  background-color: #fffdf5; /* Fondo crema muy sutil al hover */
  z-index: 1;
}

.dir-card.emergency {
  background: #fff0f0;
  border-color: #ffcdd2;
}

/* Hover específico para emergencia (Borde Rojo) */
.dir-card.emergency:hover {
  border-color: #ef5350;
  background-color: #ffebee;
}

.d-top {
  display: flex;
  align-items: center;
  gap: 1rem; /* Más separación entre icono y numero */
  margin-bottom: 0.3rem;
}

.contact-icon svg {
  width: 24px; 
  height: 24px; 
  color: var(--burgundy);
  transition: transform 0.3s ease;
}

/* Animación del icono al hacer hover en la tarjeta */
.dir-card:hover .contact-icon svg {
  transform: scale(1.1);
}

.d-num {
  font-size: 1.3rem; /* Números un poco más grandes */
  font-weight: 800;
  color: var(--burgundy);
}

.d-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  line-height: 1.3;
  display: block;
  margin-top: 0.2rem;
}

.dir-card small {
  font-size: 0.85rem; 
  color: #666; 
  margin-top: 0.5rem; 
  line-height: 1.4;
}

/* Footer FIJO al fondo */
.modal-footer {
  text-align: center;
  padding: 1.5rem;
  margin: 0;
  font-style: italic;
  color: #666;
  background: #fafafa;
  border-top: 1px solid #eee;
  font-size: 1.05rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .ayuda-container { grid-template-columns: 1fr; }
  .emergency-images { flex-direction: column; align-items: center; gap: 1.5rem; }
  .emg-img { height: auto; width: 160px; }
  
  /* Ajuste modal móvil */
  .directory-grid { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.5rem; }
  .modal-header h2 { font-size: 1.5rem; }
}