/* Importación de fuentes */
@font-face {
    font-family: 'Bienetresocial';
    font-style: normal;
    font-weight: 400;
    src: local('Bienetresocial Regular'), url('../fuentes/Bienetresocial.woff') format('woff');
}

@font-face {
    font-family: 'Bienetresocial';
    font-style: normal;
    font-weight: 700;
    src: local('Bienetresocial Bold'), url('../fuentes/BienetresocialBold.woff') format('woff');
}

/* Reseteo universal y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f8fafc;
    font-family: 'Open Sans', sans-serif;
    color: #334155;
    line-height: 1.7;
}

/* Contenedor principal tipo tarjeta de lectura con diseño moderno */
main {
    max-width: 1300px; 
    width: 92%;
    background-color: #ffffff;
    margin: 50px auto;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(30, 58, 138, 0.05), 0 10px 10px -5px rgba(30, 58, 138, 0.02);
    border: 1px solid #e2e8f0;
}

/* Barra de navegación superior unificada (Desktop) */
header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    height: 75px;
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.2s;
}

.menu-toggle:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 10px;
}

.nav-links li a {
    display: block;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.nav-links li a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Títulos y textos principales */
h1 {
    font-family: 'Bienetresocial', sans-serif;
    font-weight: 700;
    text-align: center;
    color: #1e3a8a;
    font-size: 40px;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: #64748b;
    font-size: 16px;
    margin-bottom: 45px;
    font-weight: 400;
}

/* Estilos de la barra de búsqueda moderna */
.search-container {
    max-width: 600px;
    margin: 0 auto 45px auto;
    position: relative;
}

#faqSearch {
    width: 100%;
    padding: 15px 22px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    border: 2px solid #e2e8f0;
    border-radius: 35px;
    outline: none;
    background-color: #f8fafc;
    color: #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#faqSearch:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

#faqSearch::placeholder {
    color: #94a3b8;
}

/* ==========================================================
   ESTILO DE TARJETAS Y ACORDEÓN INDEPENDIENTE
   ========================================================== */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    align-items: start;
}

.faq-card {
    background-color: #ffffff;
    padding: 25px;
}

.faq-card h2 {
    font-family: 'Bienetresocial', sans-serif;
    color: #1e3a8a;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* Cada pregunta individual con su acordeón */
.faq-item {
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #cbd5e1;
}

.faq-item h3 {
    font-family: 'Open Sans', sans-serif;
    color: #1e3a8a;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s ease;
}

.faq-item h3:hover {
    background-color: #f1f5f9;
}

/* Flechita indicadora */
.faq-item h3::after {
    content: '▼';
    font-size: 10px;
    color: #2563eb;
    transition: transform 0.3s ease;
}

.faq-item.active h3::after {
    transform: rotate(180deg);
}

/* Contenido interno desplegable por pregunta */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    padding: 0 20px;
}

.faq-item.active .faq-content {
    max-height: 1000px; /* Espacio suficiente para textos largos */
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Cuadro de contacto final con diseño de tarjeta destacada */

.contacto-faq {
    text-align: center;
    background-color: #e0e7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 50px;
    font-weight: 600;
}

.contacto-faq a {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Secciones de respuestas explicativas */
.respuestas-seccion h2 {
    font-family: 'Bienetresocial', sans-serif;
    font-weight: 700;
    color: #1e3a8a;
    font-size: 24px;
    margin-top: 55px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    clear: both;
}

p {
    font-size: 15.5px;
    color: #475569;
    margin-bottom: 18px;
}

p a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

p a:hover {
    text-decoration: underline;
}

/* Bloques de respuestas (.cuadro) */
.cuadro {
    background-color: #fafbfc;
    border: 1px solid #e2e8f0;
    padding: 30px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
    margin: 25px 0;
    transition: all 0.3s ease;
    display: flow-root; 
}

.cuadro:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.03);
}

.cuadro h2 {
    margin-top: 0;
    clear: both;
    font-size: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Footer elegante */
footer {
    height: 50px;
    background-color: #1e3a8a;
    margin-top: 60px;
}

/* ==========================================================
   ESTILOS EXCLUSIVOS PARA CELULARES (Pantallas <= 768px)
   ========================================================== */
@media screen and (max-width: 768px) {
    main {
        width: 100%;
        margin: 0;
        padding: 20px 15px;
        border-radius: 0;
        border: none;
    }

    nav {
        padding: 0 15px;
        height: 65px;
    }

    .menu-toggle {
        display: block;
    }

    .logo svg {
        max-width: 180px;
        height: auto;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #1e3a8a;
        box-shadow: 0 10px 15px rgba(0,0,0,0.15);
        padding: 15px 0;
        z-index: 1001;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        display: block;
        padding: 12px 20px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
    }

    h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cuadro {
        padding: 20px;
    }

    .cuadro h2 {
        font-size: 18px;
    }

    p {
        font-size: 14.5px;
    }

    .search-container {
        padding: 0 5px;
    }

    #faqSearch {
        font-size: 14px;
        padding: 12px 18px;
    }
}