/* =========================================
   CONTACTO - HOJA DE ESTILOS
   ========================================= */

/* --- HERO SECTION (CONTACTO) --- */
.contacto-hero {
    position: relative;
    width: 100%;
    height: 50vh; 
    min-height: 400px;
    display: flex;
    align-items: center;
    /* Imagen de fondo */
    background-image: url('../img/contact-hero.webp');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(21, 35, 58, 0.9) 0%, rgba(21, 35, 58, 0.6) 100%); /* Gradiente para mejorar lectura a la izquierda */
    z-index: 1;
}

.contacto-hero .contenedor {
    position: relative;
    z-index: 2;
    width: 80%;            
    max-width: 1400px;     
    margin: 0 auto;        
    text-align: left;      /* Mantenemos a la izquierda siempre */
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem; /* Un poco más grande en escritorio para impacto */
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1rem;
    max-width: 800px; /* Evita que se estire demasiado en pantallas ultra anchas */
}

.hero-content p {
    font-size: 1.5rem;
    color: #cbd5e1; /* Color gris azulado para mejor contraste */
    font-weight: 300;
    margin-top: 1rem;
}

/* --- RESPONSIVE --- */

/* Tableta (< 900px) */
@media (max-width: 900px) {
    .hero-content h1 {
        font-size: 2.5rem; /* Tamaño mediano */
    }
    .hero-content p {
        font-size: 1.25rem;
    }
}

/* Móvil (< 480px) */
@media (max-width: 480px) {
    .contacto-hero .contenedor {
        width: 90%; /* Más ancho en celular para aprovechar espacio */
    }

    .hero-content h1 {
        font-size: 1.8rem; /* Mucho más controlado para que no se vea "raro" */
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1.1rem; /* Subtítulo proporcional */
        margin-top: 0.5rem;
    }
}


/* --- SECCIÓN PRINCIPAL (CONTENEDOR) --- */
.contacto-main {
    padding: 5rem 0; /* Un poco menos de padding para móviles */
    background-color: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem; /* Margen de seguridad lateral */
}

.section-header h2 {
    color: #15233A;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.section-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* --- GRID RESPONSIVO (La estructura) --- */
.contact-grid {
    display: grid;
    /* Escritorio: 3 Columnas */
    grid-template-columns: repeat(3, 1fr); 
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* Evita que las tarjetas toquen los bordes en móvil */
}

/* --- TARJETA (Estilos Base) --- */
.contact-card {
    background-color: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Iconos */
.card-icon {
    font-size: 2rem;
    color: #187495;
    margin-bottom: 1.5rem;
    background-color: #f0f9ff;
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

/* Textos dentro de la tarjeta */
.card-info-block h3 {
    font-size: 1.4rem; /* Tamaño escritorio */
    color: #15233A;
    margin-bottom: 1rem;
    font-weight: 700;
}

.description {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Lista de teléfonos y correos */
.contact-data-list p {
    margin-bottom: 1rem;
    color: #334155;
    font-size: 1rem;
    line-height: 1.4;
}

.contact-data-list a {
    color: #187495;
    text-decoration: none;
    font-weight: 600;
    word-break: break-word; /* Evita que correos largos rompan el móvil */
}

/* Botones */
.btn-card {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-blue { background-color: #187495; color: #fff; }
.btn-blue:hover { background-color: #15233A; }

.btn-outline { background-color: transparent; border: 2px solid #187495; color: #187495; }
.btn-outline:hover { background-color: #187495; color: #fff; }

/* Botones Plataformas */
.platform-buttons { display: flex; flex-direction: column; gap: 10px; }
.btn-platform {
    background: #f1f5f9; color: #15233A; padding: 0.8rem; border-radius: 8px; 
    text-decoration: none; font-weight: 600; display: block; transition: 0.3s;
}
.btn-platform:hover { background: #15233A; color: #fff; }

/* Tarjeta Oscura */
.card-dark { background-color: #15233A; border: none; }
.card-dark h3 { color: #fff; }
.card-dark .card-icon { background-color: rgba(255,255,255,0.1); color: #fff; }

/* Tarjeta Emergencia */
.card-emergency { border-top: 5px solid #ef4444; }
.card-emergency .card-icon { color: #ef4444; background-color: #fef2f2; }
.btn-red { background-color: #ef4444; color: #fff; }
.btn-red:hover { background-color: #dc2626; }


/* =========================================
   MEDIA QUERIES (Ajuste de Grid y Textos)
   ========================================= */

/* 1. TABLETAS (Entre 600px y 1024px) */
@media (max-width: 1024px) {
    .contact-grid {
        /* Aquí forzamos las 2 columnas */
        grid-template-columns: repeat(2, 1fr); 
        gap: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem; /* Título un poco más chico */
    }
}

/* 2. MÓVILES (Menos de 600px) */
@media (max-width: 600px) {
    .contact-grid {
        /* Aquí forzamos 1 sola columna */
        grid-template-columns: 1fr; 
        gap: 2rem;
    }

    /* Ajuste de Títulos para que no se vean gigantes */
    .section-header h2 {
        font-size: 1.8rem; 
    }
    
    .card-info-block h3 {
        font-size: 1.25rem; /* Nombre del departamento más pequeño */
    }

    .contact-card {
        padding: 2rem 1.5rem; /* Menos relleno interno para ganar espacio */
    }
}

/* --- SECCIÓN FAQ (Preguntas Frecuentes) --- */
.faq-section {
    padding: 6rem 0;
    background-color: #ffffff; /* Fondo blanco */
}

.section-header-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.section-header-center h2 {
    font-size: 2rem;
    color: #15233A;
    font-weight: 700;
}

/* Contenedor de la lista */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid #e2e8f0; /* Línea superior inicial */
}

/* Item Individual */
.faq-item {
    border-bottom: 1px solid #e2e8f0; /* Líneas divisorias */
}

/* El Botón (Pregunta) */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 1rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: #15233A;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #187495; /* Azul al pasar el mouse */
}

/* Icono (Flecha/Chevron) */
.faq-icon {
    color: #187495;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

/* Cuando está activo (Abierto) */
.faq-question.active .faq-icon {
    transform: rotate(180deg); /* Gira la flecha hacia arriba */
}

.faq-question.active {
    color: #187495;
}

/* La Respuesta (Oculta por defecto) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out; /* Animación de deslizamiento */
    background-color: #f8fafc; /* Fondo gris muy tenue para la respuesta */
}

.faq-answer p {
    padding: 0 1rem 1.5rem 1rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* --- SECCIÓN CTA FINAL (Fondo Blanco) --- */
.cta-section-white {
    padding: 6rem 0;
    background-color: #ffffff; /* Fondo Blanco */
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800; /* Letra gruesa */
    margin-bottom: 2rem;
    color: #15233A; /* Azul Oscuro */
}

/* BOTÓN OSCURO (Según referencia) */
.btn-cta-dark {
    background-color: #15233A; /* Azul Navy Oscuro */
    color: #ffffff;
    padding: 1rem 3.5rem; /* Botón ancho */
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(21, 35, 58, 0.3); /* Sombra elegante */
    transition: all 0.3s ease;
}

.btn-cta-dark:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(21, 35, 58, 0.4);
    background-color: #0f1a2e; /* Aún más oscuro al hover */
}

/* --- ESTILOS DEL MODAL (Necesarios para que se vea bien) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); display: none; justify-content: center; align-items: center; z-index: 9999; padding: 1rem;
}
.modal-container {
    background-color: #fff; width: 100%; max-width: 900px; border-radius: 20px;
    position: relative; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 2rem; color: #64748b; cursor: pointer; z-index: 10; }
.modal-grid { display: grid; grid-template-columns: 1fr 1.2fr; }
.modal-info { background-color: #15233A; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.modal-form-wrapper { padding: 3rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #15233A; font-weight: 600; }
.form-group input, .form-group select { width: 100%; padding: 0.8rem; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: 1rem; }
.btn-submit { width: 100%; background-color: #187495; color: #fff; padding: 1rem; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: 700; cursor: pointer; margin-top: 1rem; }

/* Responsive del Modal */
@media (max-width: 768px) {
    .modal-grid { grid-template-columns: 1fr; }
    .modal-info, .modal-form-wrapper { padding: 2rem; }
}

/* --- AJUSTES NUEVAS TARJETAS CONTACTO --- */

/* Lista de datos más ordenada */
.contact-data-list p {
    margin-bottom: 0.8rem;
    line-height: 1.4;
    color: #5B5A63;
}
.contact-data-list a {
    color: #187495;
    text-decoration: none;
    font-weight: 600;
}
.contact-data-list a:hover {
    text-decoration: underline;
}

/* Tarjeta Oscura para Plataformas */
.card-dark {
    background-color: #15233A !important;
    color: #ffffff;
}
.card-dark h3 {
    color: #ffffff !important;
}
.card-dark .card-icon {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

/* Botones de Plataformas */
.platform-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.btn-platform {
    display: block;
    background-color: #ffffff;
    color: #15233A;
    padding: 10px 15px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: transform 0.2s;
    font-size: 0.9rem;
}
.btn-platform:hover {
    transform: translateY(-2px);
    background-color: #f0f9ff;
}

/* Ajuste para Grid de 3 columnas (si no estaba definido así) */
@media (min-width: 992px) {
    .contact-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 Tarjetas por fila */
        gap: 2rem;
    }
}

/* Forzar alineación superior en el bloque de texto */
.card-info-block {
    justify-content: flex-start !important; /* El contenido empieza arriba */
    flex-grow: 1; /* Ocupa todo el espacio disponible */
}