/* ====================================================
   Preguntas Frecuentes — Estilos Específicos
   SiembraApp | siembraapp-web
   ==================================================== */

/* --- Barra de Búsqueda --- */
.faq-search-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.faq-search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted-color);
    font-size: 1.1rem;
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    font-family: var(--font-family);
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 158, 69, 0.12);
}

/* --- Acordeón FAQ --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: #fff;
    border-radius: 14px;
    border: 1.5px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.25s, border-color 0.25s;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(44, 158, 69, 0.1);
    border-color: #a8d5b1;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-family);
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.2s, background 0.2s;
}

.faq-question:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.faq-question.open {
    color: var(--primary-color);
    background: #f0f9f2;
}

.faq-question .faq-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.3s;
    color: var(--primary-color);
    font-size: 1rem;
}

.faq-question.open .faq-icon {
    background: var(--primary-color);
    color: #fff;
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    padding: 0 1.25rem;
    font-size: 0.92rem;
    color: var(--text-muted-color);
    line-height: 1.7;
    border-top: 0px solid transparent;
}

.faq-answer.open {
    max-height: 500px;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    margin: 0;
}

/* --- Estado vacío de búsqueda --- */
.faq-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted-color);
    display: none;
}

.faq-no-results i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

/* --- Bloque de contacto al final --- */
.faq-contact-block {
    background: linear-gradient(135deg, #f0f9f2 0%, #e8f5e9 100%);
    border: 1.5px solid #c8e6c9;
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    margin-top: 2rem;
}

.faq-contact-block i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: block;
}

.faq-contact-block h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.faq-contact-block p {
    margin: 0 0 1rem;
    color: var(--text-muted-color);
    font-size: 0.9rem;
}

.faq-contact-block a.btn {
    display: inline-block;
    width: auto;
    padding: 0.65rem 1.75rem;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .faq-question {
        font-size: 0.9rem;
        padding: 1rem;
    }

    .faq-answer.open {
        padding: 0.85rem 1rem 1rem;
    }
}
