/* ============================================
   FAQ - STANDALONE STYLES
   ============================================
   
   Estilos específicos para el shortcode [faq]
   Diseño accordion responsive con animaciones suaves
   
   ============================================ */

/* ============================================
   1. CONTENEDOR PRINCIPAL
   ============================================ */

.faq-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
}

/* ============================================
   2. ENCABEZADO FAQ
   ============================================ */

.faq-header {
    text-align: center;
    margin-bottom: 30px;
}

.faq-title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #62c608;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.faq-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin: 0;
}

/* ============================================
   3. BUSCADOR
   ============================================ */

.faq-search {
    position: relative;
    margin-bottom: 30px;
}

.faq-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fafafa;
}

.faq-search-input:focus {
    outline: none;
    border-color: #62c608;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(98, 198, 8, 0.1);
}

.faq-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* ============================================
   4. LISTA DE PREGUNTAS
   ============================================ */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #62c608;
    box-shadow: 0 2px 8px rgba(98, 198, 8, 0.1);
}

.faq-item.active {
    border-color: #62c608;
    box-shadow: 0 4px 15px rgba(98, 198, 8, 0.15);
}

/* ============================================
   5. PREGUNTA (BOTÓN TRIGGER)
   ============================================ */

.faq-question {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.faq-question:hover {
    background-color: rgba(98, 198, 8, 0.05);
}

.faq-question[aria-expanded="true"] {
    background-color: rgba(98, 198, 8, 0.1);
    border-bottom: 1px solid #e5e5e5;
}

.faq-question-text {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    flex: 1;
    text-align: left;
}

.faq-question:hover .faq-question-text {
    color: #62c608;
}

/* ============================================
   6. ICONO DE TOGGLE
   ============================================ */

.faq-toggle-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: #666;
}

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

.faq-toggle-icon svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   7. RESPUESTA (CONTENIDO EXPANDIBLE)
   ============================================ */

.faq-answer {
    display: none;
    background-color: #f8fdf4;
    border-top: 1px solid #e5e5e5;
    animation: fadeIn 0.3s ease;
}

.faq-answer.active {
    display: block;
}

.faq-answer-content {
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

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

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

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

.faq-answer-content li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.faq-answer-content a {
    color: #62c608;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.faq-answer-content a:hover {
    color: #4fa006;
    text-decoration: underline;
}

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

/* ============================================
   8. ESTADO VACÍO (SIN RESULTADOS)
   ============================================ */

.faq-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

.faq-empty-state p {
    margin: 0;
}

/* ============================================
   9. ANIMACIONES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
}

.faq-item.animate-in {
    opacity: 1;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation para items */
.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(n+6) { animation-delay: 0.6s; }

/* ============================================
   10. DISEÑO RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .faq-container {
        margin: 30px auto;
        padding: 0 15px;
    }
    
    .faq-title {
        font-size: 28px;
    }
    
    .faq-subtitle {
        font-size: 14px;
    }
    
    .faq-search {
        margin-bottom: 25px;
    }
    
    .faq-question {
        padding: 15px;
        gap: 12px;
    }
    
    .faq-question-text {
        font-size: 15px;
    }
    
    .faq-toggle-icon {
        width: 20px;
        height: 20px;
    }
    
    .faq-answer-content {
        padding: 15px;
        font-size: 13px;
    }
    
    .faq-list {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .faq-container {
        margin: 20px auto;
        padding: 0 10px;
    }
    
    .faq-title {
        font-size: 24px;
    }
    
    .faq-subtitle {
        font-size: 13px;
    }
    
    .faq-question {
        padding: 12px;
        gap: 10px;
    }
    
    .faq-question-text {
        font-size: 14px;
    }
    
    .faq-search-input {
        padding: 10px 40px 10px 12px;
        font-size: 16px; /* Evitar zoom en iOS */
    }
    
    .faq-answer-content {
        padding: 12px;
        font-size: 12px;
    }
    
    .faq-list {
        gap: 10px;
    }
}

/* ============================================
   11. ACCESIBILIDAD
   ============================================ */

.faq-question:focus-visible {
    outline: 2px solid #62c608;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(98, 198, 8, 0.2);
}

.faq-search-input:focus-visible {
    outline: 2px solid #62c608;
    outline-offset: 2px;
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-answer,
    .faq-toggle-icon,
    .faq-question {
        animation: none;
        transition: none;
    }
    
    .faq-question[aria-expanded="true"] .faq-toggle-icon {
        transform: none;
    }
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    .faq-item {
        border-color: #000;
    }
    
    .faq-question-text {
        color: #000;
    }
    
    .faq-answer-content {
        color: #000;
    }
    
    .faq-question:hover {
        background-color: #f0f0f0;
    }
}

/* ============================================
   12. UTILIDADES
   ============================================ */

.faq-item.highlighted {
    background-color: #fff9e6;
    border-color: #ffa500;
}

.faq-item.hidden {
    display: none;
}

/* Loading state */
.faq-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   FIN DEL ARCHIVO
   ============================================ */