/* css/faq.css */

/* Contenedor principal de FAQ */
.faq {
    padding: 5rem 0;
    background: linear-gradient(135deg, #C8E6C9 0%, #DCEDC8 50%, #E8F5E9 100%);
    position: relative;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Acordeón */
.faq-accordion {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    /* Espacio extra entre preguntas para que parezcan tarjetas independientes */
}

/* Cada item (pregunta + respuesta) */
.faq-item {
    background-color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(46, 125, 50, 0.25);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.08);
    overflow: hidden;
    transition: all 0.35s ease;
    backdrop-filter: blur(8px);
}

.faq-item:hover {
    box-shadow: 0 12px 35px rgba(46, 125, 50, 0.20);
    border-color: #4CAF50;
    transform: translateY(-4px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Botón de la pregunta */
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem 1.75rem;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B5E20 !important;
    /* Verde oscuro profundo — visible y elegante */
    font-family: inherit;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    letter-spacing: 0.2px;
}

.faq-question:focus {
    outline: none;
}

.faq-question:hover {
    color: #2E7D32 !important;
    background-color: rgba(76, 175, 80, 0.05);
}

/* Ícono de + */
.faq-icon {
    font-size: 1.6rem;
    font-weight: 300;
    color: #4CAF50;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(76, 175, 80, 0.1);
    /* Circulito tenue alrededor del '+' */
}

/* Estado Activo (Abierto) */
.faq-question[aria-expanded="true"] {
    color: #1B5E20 !important;
    background-color: rgba(76, 175, 80, 0.06);
    border-bottom: 1px solid rgba(76, 175, 80, 0.15);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    background-color: #ffecec;
    color: #e53935;
    /* El icono cambia a rojo/cruz cuando está abierto */
}

/* Contenedor de la respuesta */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: transparent;
}

/* El contenido interno de la respuesta */
.faq-answer-inner {
    padding: 1.5rem 1.75rem;
    color: #2E7D32 !important;
    line-height: 1.8;
    font-size: 1rem;
    border-top: 1px solid rgba(76, 175, 80, 0.12);
}

.faq-answer-inner p {
    margin: 0;
    color: #2E7D32 !important;
}

/* ===================================================
   CORRECCIÓN DEFINITIVA — Texto verde oscuro en FAQ
   Estos selectores son los más específicos posibles
   para garantizar que nada los sobreescriba
   =================================================== */

/* El SPAN de texto dentro del botón de pregunta */
section#faq .faq-accordion .faq-item .faq-question span:first-child,
.faq-accordion .faq-item button.faq-question span:not(.faq-icon),
.faq-question>span:first-child {
    color: #1B5E20 !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
}

/* El botón completo */
section#faq button.faq-question {
    color: #1B5E20 !important;
    font-weight: 700 !important;
}

/* Al hacer hover */
section#faq button.faq-question:hover,
section#faq button.faq-question:hover span {
    color: #2E7D32 !important;
}

/* Cuando está abierto */
section#faq button.faq-question[aria-expanded="true"],
section#faq button.faq-question[aria-expanded="true"] span {
    color: #1B5E20 !important;
}

/* Las respuestas expandidas */
section#faq .faq-answer-inner,
section#faq .faq-answer-inner p {
    color: #2E7D32 !important;
    font-size: 1rem !important;
    line-height: 1.8 !important;
}

@media (max-width: 768px) {
    .faq {
        padding: 4rem 0;
    }

    .faq-question {
        font-size: 1.05rem;
        padding: 1.25rem;
    }

    .faq-answer-inner {
        padding: 1.25rem;
        font-size: 0.95rem;
    }
}