/* ========================================
   FAQ SECTION STYLES
   Estilos para sección de Preguntas Frecuentes
   Optimizado para SEO y UX
   ======================================== */

/* ============ SECCIÓN PRINCIPAL ============ */
.faq_section {
    background: linear-gradient(135deg, #0a1828 0%, #1a2f42 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.faq_section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(42, 159, 214, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255, 163, 32, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.faq_section .container {
    position: relative;
    z-index: 1;
}

/* ============ TÍTULO Y SUBTÍTULO ============ */
.faq-intro {
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    margin: 15px auto 50px;
    max-width: 800px;
    line-height: 1.6;
}

/* ============ CONTENEDOR DE FAQ ============ */
.faq-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(42, 159, 214, 0.2);
    padding: 40px;
    backdrop-filter: blur(10px);
}

/* ============ CATEGORÍAS ============ */
.faq-category {
    margin-bottom: 50px;
}

.faq-category:last-child {
    margin-bottom: 0;
}

.faq-category-title {
    color: #2a9fd6;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(42, 159, 214, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

.faq-category-title i {
    font-size: 28px;
    color: #ffa320;
}

/* ============ ITEMS DE FAQ ============ */
.faq-item {
    margin-bottom: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(42, 159, 214, 0.3);
    transform: translateX(5px);
}

.faq-item:last-child {
    margin-bottom: 0;
}

/* ============ PREGUNTAS (BOTONES) ============ */
.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 20px 25px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.faq-question:hover {
    color: #2a9fd6;
}

.faq-question:focus {
    outline: none;
}

.faq-question .question-text {
    flex: 1;
    line-height: 1.5;
}

.faq-icon {
    font-size: 16px;
    color: #ffa320;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

/* ============ RESPUESTAS (CONTENIDO) ============ */
.faq-answer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-answer-content {
    padding: 25px 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.8;
}

.faq-answer-content p {
    margin-bottom: 15px;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content strong {
    color: #fff;
    font-weight: 600;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.faq-answer-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.faq-answer-content li:last-child {
    margin-bottom: 0;
}

.faq-answer-content ul li {
    list-style-type: none;
    position: relative;
    padding-left: 25px;
}

.faq-answer-content ul li::before {
    content: '\f00c';
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    color: #2a9fd6;
    font-weight: 400;
}

.faq-answer-content ol li {
    padding-left: 10px;
}

.faq-answer-content a {
    color: #2a9fd6;
    text-decoration: none;
    border-bottom: 1px solid rgba(42, 159, 214, 0.3);
    transition: all 0.2s ease;
}

.faq-answer-content a:hover {
    color: #ffa320;
    border-bottom-color: #ffa320;
}

/* ============ CTA DENTRO DE RESPUESTAS ============ */
.faq-cta {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
}

.faq-cta a {
    font-weight: 600;
    margin-right: 20px;
}

/* ============ GRID DE CUMPLIMIENTO (Pregunta 4) ============ */
.compliance-grid-faq {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.compliance-card-faq {
    background: rgba(42, 159, 214, 0.08);
    border: 2px solid rgba(42, 159, 214, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.compliance-card-faq:hover {
    background: rgba(42, 159, 214, 0.15);
    border-color: rgba(42, 159, 214, 0.4);
    transform: translateY(-3px);
}

.compliance-card-faq h5 {
    color: #2a9fd6;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compliance-card-faq h5 i {
    color: #10b981;
    font-size: 18px;
}

.compliance-card-faq p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.6;
}

/* ============ TIEMPOS DE IMPLEMENTACIÓN (Pregunta 8) ============ */
.implementation-times {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.time-box {
    background: rgba(255, 163, 32, 0.08);
    border: 2px solid rgba(255, 163, 32, 0.2);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.time-box:hover {
    background: rgba(255, 163, 32, 0.15);
    border-color: rgba(255, 163, 32, 0.4);
    transform: translateY(-5px);
}

.time-box h5 {
    color: #ffa320;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.time-box h5 i {
    font-size: 20px;
}

.time-range {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 15px 0;
}

.time-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* ============ CTA FINAL DE FAQ ============ */
.faq-bottom-cta {
    margin-top: 60px;
    padding: 50px 30px;
    background: linear-gradient(135deg, rgba(42, 159, 214, 0.15) 0%, rgba(255, 163, 32, 0.1) 100%);
    border-radius: 20px;
    border: 2px solid rgba(42, 159, 214, 0.3);
}

.faq-bottom-cta h3 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.faq-bottom-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    margin-bottom: 30px;
}

.faq-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.faq-cta-buttons .btn {
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.faq-cta-buttons .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
}

.faq-cta-buttons .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.faq-cta-buttons .btn-primary {
    background: linear-gradient(135deg, #2a9fd6 0%, #1a7fb6 100%);
    border: none;
}

.faq-cta-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #1a7fb6 0%, #155f8a 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(42, 159, 214, 0.4);
}

/* ============ RESPONSIVE ============ */

/* Tablets */
@media (max-width: 992px) {
    .faq-container {
        padding: 30px 25px;
    }

    .faq-category-title {
        font-size: 22px;
    }

    .faq-question {
        font-size: 16px;
        padding: 18px 20px;
    }

    .faq-answer-content {
        padding: 20px 25px;
        font-size: 15px;
    }

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

    .implementation-times {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .faq-bottom-cta h3 {
        font-size: 26px;
    }

    .faq-bottom-cta p {
        font-size: 16px;
    }
}

/* Móviles */
@media (max-width: 576px) {
    .faq_section {
        padding: 60px 0;
    }

    .faq-intro {
        font-size: 16px;
        margin: 10px auto 30px;
    }

    .faq-container {
        padding: 20px 15px;
        border-radius: 15px;
    }

    .faq-category {
        margin-bottom: 35px;
    }

    .faq-category-title {
        font-size: 19px;
        gap: 10px;
        margin-bottom: 20px;
    }

    .faq-category-title i {
        font-size: 22px;
    }

    .faq-item {
        margin-bottom: 15px;
    }

    .faq-question {
        font-size: 15px;
        padding: 15px 18px;
        gap: 15px;
    }

    .faq-icon {
        font-size: 14px;
    }

    .faq-answer-content {
        padding: 20px;
        font-size: 14px;
    }

    .faq-answer-content ul,
    .faq-answer-content ol {
        padding-left: 20px;
    }

    .faq-answer-content ul li {
        padding-left: 20px;
    }

    .faq-cta {
        font-size: 14px;
    }

    .faq-cta a {
        display: block;
        margin: 10px 0;
    }

    .compliance-card-faq {
        padding: 15px;
    }

    .compliance-card-faq h5 {
        font-size: 15px;
    }

    .compliance-card-faq p {
        font-size: 13px;
    }

    .time-box {
        padding: 20px 15px;
    }

    .time-box h5 {
        font-size: 15px;
    }

    .time-range {
        font-size: 24px;
    }

    .time-desc {
        font-size: 12px;
    }

    .faq-bottom-cta {
        margin-top: 40px;
        padding: 35px 20px;
    }

    .faq-bottom-cta h3 {
        font-size: 22px;
    }

    .faq-bottom-cta p {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .faq-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .faq-cta-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 25px;
        font-size: 15px;
    }
}

/* ============ ANIMACIONES ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInUp 0.5s ease forwards;
}

.faq-category:nth-child(1) .faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-category:nth-child(1) .faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-category:nth-child(1) .faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-category:nth-child(1) .faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-category:nth-child(1) .faq-item:nth-child(5) { animation-delay: 0.5s; }

/* ============ ACCESIBILIDAD ============ */
.faq-question:focus-visible {
    outline: 2px solid #2a9fd6;
    outline-offset: 3px;
}

/* Mejora de contraste para lectores de pantalla */
@media (prefers-contrast: high) {
    .faq-question,
    .faq-answer-content {
        color: #ffffff;
    }

    .faq-item {
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Reducción de movimiento para usuarios con preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-icon,
    .faq-question,
    .compliance-card-faq,
    .time-box,
    .faq-cta-buttons .btn {
        animation: none;
        transition: none;
    }

    .faq-item:hover,
    .compliance-card-faq:hover,
    .time-box:hover {
        transform: none;
    }
}
