﻿/* =========================================================
   FAQ — PREGUNTAS FRECUENTES
   ========================================================= */

#faq {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 100px 0 120px;
    background: linear-gradient(180deg, #f1efeb 0%, #faf8f4 60%, #f4f1eb 100%);
    overflow: hidden;
}

    #faq::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 80% 10%, rgba(232,180,97,0.07), transparent 30%), radial-gradient(circle at 15% 90%, rgba(19,35,58,0.04), transparent 28%);
        pointer-events: none;
    }

/* =========================================================
   ENCABEZADO
   ========================================================= */

.faq-header {
    text-align: center;
    margin-bottom: 56px;
    position: relative;
    z-index: 2;
}

.faq-kicker-line {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.faq-kicker-dash {
    width: 32px;
    height: 1px;
    background: #E8B461;
    opacity: 0.8;
    display: block;
}

.faq-kicker-text {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #E8B461;
}

.faq-title {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #13233a;
    margin: 0 0 14px;
}

    .faq-title strong {
        font-weight: 800;
    }

.faq-subtitle {
    font-size: 1rem;
    color: #617089;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

/* =========================================================
   CUERPO
   ========================================================= */

.faq-body {
    width: min(860px, 88%);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* =========================================================
   TARJETAS DE CATEGORÍA 3D
   ========================================================= */

.faq-cats {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

.faq-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1.5px solid rgba(30,58,95,0.12);
    background: rgba(255,255,255,0.7);
    color: #617089;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    /* Efecto 3D sutil */
    box-shadow: 0 4px 0px rgba(30,58,95,0.08), 0 6px 16px rgba(19,35,58,0.05);
    transform: translateY(0);
    user-select: none;
}

    .faq-cat:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 0px rgba(30,58,95,0.1), 0 10px 24px rgba(19,35,58,0.08);
        color: #13233a;
        border-color: rgba(232,180,97,0.4);
        background: #fff;
    }

    .faq-cat:active {
        transform: translateY(2px);
        box-shadow: 0 1px 0px rgba(30,58,95,0.1), 0 2px 6px rgba(19,35,58,0.06);
    }

.faq-cat--active {
    background: #13233a;
    color: #fff;
    border-color: #13233a;
    box-shadow: 0 4px 0px rgba(8,16,30,0.4), 0 8px 20px rgba(19,35,58,0.2);
}

    .faq-cat--active:hover {
        background: #0f1c30;
        color: #fff;
        border-color: #0f1c30;
    }

.faq-cat-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .faq-cat-icon svg {
        width: 16px;
        height: 16px;
    }

/* =========================================================
   ACORDEÓN
   ========================================================= */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 56px;
}

.faq-item {
    background: rgba(255,255,255,0.75);
    border-radius: 16px;
    border: 1px solid rgba(30,58,95,0.08);
    box-shadow: 0 4px 0px rgba(30,58,95,0.06), 0 6px 18px rgba(19,35,58,0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(4px);
}

    .faq-item:hover {
        border-color: rgba(232,180,97,0.25);
        box-shadow: 0 4px 0px rgba(232,180,97,0.12), 0 8px 24px rgba(19,35,58,0.07);
    }

.faq-item--open {
    border-color: rgba(232,180,97,0.35);
    box-shadow: 0 4px 0px rgba(232,180,97,0.18), 0 12px 32px rgba(19,35,58,0.08);
    background: rgba(255,255,255,0.92);
}

/* Pregunta */
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.98rem;
    font-weight: 700;
    color: #13233a;
    line-height: 1.4;
    transition: color 0.2s ease;
}

    .faq-question:hover {
        color: #0f1c30;
    }

.faq-item--open .faq-question {
    color: #0f1c30;
}

/* Ícono + / × */
.faq-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: rgba(232,180,97,0.12);
    border: 1px solid rgba(232,180,97,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .faq-icon::before,
    .faq-icon::after {
        content: "";
        position: absolute;
        background: #E8B461;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Línea horizontal */
    .faq-icon::before {
        width: 10px;
        height: 1.5px;
    }

    /* Línea vertical */
    .faq-icon::after {
        width: 1.5px;
        height: 10px;
    }

/* Cuando está abierto → × */
.faq-item--open .faq-icon {
    background: rgba(232,180,97,0.2);
    border-color: rgba(232,180,97,0.5);
}

    .faq-item--open .faq-icon::after {
        transform: rotate(90deg);
        opacity: 0;
    }

    .faq-item--open .faq-icon::before {
        background: #c4723a;
    }

/* Respuesta */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    padding: 0 24px;
}

.faq-item--open .faq-answer {
    max-height: 400px;
    padding: 0 24px 22px;
}

.faq-answer p {
    font-size: 0.92rem;
    color: #4a5568;
    line-height: 1.8;
    margin: 0;
    padding-top: 4px;
    border-top: 1px solid rgba(30,58,95,0.06);
    padding-top: 16px;
}

.faq-answer strong {
    color: #13233a;
    font-weight: 700;
}

/* =========================================================
   CTA FINAL
   ========================================================= */

.faq-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

    .faq-cta p {
        font-size: 0.95rem;
        color: #617089;
        margin: 0;
    }

.faq-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 0px rgba(18,150,78,0.4), 0 8px 20px rgba(37,211,102,0.2);
    transition: all 0.3s ease;
}

    .faq-btn svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .faq-btn:hover {
        background: #1ebe5a;
        transform: translateY(-2px);
        box-shadow: 0 6px 0px rgba(18,150,78,0.4), 0 14px 30px rgba(37,211,102,0.28);
    }

    .faq-btn:active {
        transform: translateY(1px);
        box-shadow: 0 2px 0px rgba(18,150,78,0.4);
    }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    #faq {
        padding: 70px 0 90px;
    }

    .faq-body {
        width: min(94%, 100%);
    }

    .faq-title {
        font-size: 1.8rem;
    }

    .faq-cats {
        gap: 8px;
    }

    .faq-cat {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .faq-question {
        padding: 18px 18px;
        font-size: 0.92rem;
    }

    .faq-answer {
        padding: 0 18px;
    }

    .faq-item--open .faq-answer {
        padding: 0 18px 18px;
    }
}

@media (max-width: 480px) {
    .faq-cats {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

        .faq-cats::-webkit-scrollbar {
            display: none;
        }

    .faq-cat {
        flex-shrink: 0;
    }
}
