/* ==========================
   FAQ - Stile Base del Container
   ========================== */
.gd-faq-container {
    margin: 20px 0;
    }

/* ==========================
   Singolo elemento FAQ
   ========================== */
.gd-faq-container .gd-faq-item,
.gd-faq-item {
    border: 1px solid #305228;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.gd-faq-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ==========================
   Bottone della domanda
   ========================== */
.gd-faq-container .gd-faq-question,
.gd-faq-question {
    background-color: #98703a;
    color: white;
    padding: 15px;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.05em;
    transition: background-color 0.2s ease;
}

.gd-faq-question:hover {
    background-color: #8a6333;
}

.gd-faq-question:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
    border-radius: 5px;
}

/* ==========================
   Icona (+ / ×)
   ========================== */
.gd-faq-icon {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 24px; /* Per evitare salti di layout */
    text-align: center;
}

/* Rotazione dell'icona quando aperta */
.gd-faq-question.active .gd-faq-icon,
.gd-faq-question[aria-expanded="true"] .gd-faq-icon {
    transform: rotate(45deg);
}

/* ==========================
   Risposta nascosta
   ========================== */
.gd-faq-container .gd-faq-answer,
.gd-faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.2, 0, 0.2, 1); /* Animazione morbida */
    background-color: #f9f9f9;
}

/* Espansione della risposta */
.gd-faq-item.active .gd-faq-answer,
.gd-faq-item[aria-expanded="true"] .gd-faq-answer {
    max-height: 1000px;
    transition: max-height 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); /* Entrata più dolce */
}

/* ==========================
   Testo interno alla risposta
   ========================== */
.gd-faq-container .gd-faq-answer p,
.gd-faq-answer p {
    padding: 15px 0;
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* Supporto per altri elementi dentro la risposta */
.gd-faq-answer ul,
.gd-faq-answer ol {
    margin: 15px 0;
    padding-left: 20px;
}

.gd-faq-answer a {
    color: #98703a;
    text-decoration: underline;
}

.gd-faq-answer a:hover {
    color: #305228;
}