/**
 * NUOVA SEZIONE FAQ - XDOM
 * Design moderno, pulito, espandibile
 */

/* ============================================
   FAQ SECTION - Layout Base
   ============================================ */

.faqs-section {
    background: #f8f9fa;
    padding: 100px 0;
}

.faqs-section .section-title {
    margin-bottom: 60px;
}

.questions-holder {
    background: white;
    border-radius: 16px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}


/* ============================================
   SINGOLA DOMANDA
   ============================================ */

.question {
    padding: 30px 0;
    border-bottom: 2px solid #f1f3f5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.question:last-child {
    border-bottom: none;
}

.question:hover {
    background: #f8f9fa;
    padding-left: 20px;
    padding-right: 20px;
    margin: 0 -20px;
    border-radius: 8px;
}

/* Domanda (Titolo) */
.question h5 {
    color: #333;
    margin-bottom: 0;
    position: relative;
    padding-right: 40px;
    transition: color 0.3s;
}

.question h5::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    font-weight: 300;
    color: #107549;
    transition: transform 0.3s;
}

.question.active h5::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.question:hover h5 {
    color: #107549;
}

/* Risposta */
.question p,
.question ul,
.question ol {
    display: none;
    margin-top: 20px;
    color: #495057;
    line-height: 1.8;
}

.question.active p,
.question.active ul,
.question.active ol {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================
   LISTE NELLE RISPOSTE
   ============================================ */

.question .simple-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.question .simple-list li {
    padding: 12px 0 12px 35px;
    position: relative;
    border-bottom: 1px solid #f1f3f5;
}

.question .simple-list li:last-child {
    border-bottom: none;
}

.question .simple-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    color: #107549;
    font-weight: 700;
    font-size: 18px;
}

.question .digit-list {
    list-style: none;
    counter-reset: faq-counter;
    padding: 0;
    margin: 20px 0;
}

.question .digit-list li {
    counter-increment: faq-counter;
    padding: 15px 0 15px 50px;
    position: relative;
    border-bottom: 1px solid #f1f3f5;
}

.question .digit-list li:last-child {
    border-bottom: none;
}

.question .digit-list li::before {
    content: counter(faq-counter);
    position: absolute;
    left: 0;
    top: 15px;
    background: #107549;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}


/* ============================================
   ELEMENTI EVIDENZIATI
   ============================================ */

.question strong {
    color: #107549;
    font-weight: 600;
}

.question .grey-color {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #fcb808;
    margin: 15px 0;
    display: block;
}


/* ============================================
   BOTTONI NELLE RISPOSTE
   ============================================ */

.question .btn {
    margin-top: 20px;
    display: inline-block;
}


/* ============================================
   LINK "MORE QUESTIONS"
   ============================================ */

.more-questions {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

.more-questions h5 {
    margin: 0;
}

.more-questions a {
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.more-questions a:hover {
    text-decoration: underline;
}

.more-questions .violet-color {
    color: #107549;
}

.more-questions .green-color {
    color: #25D366;
}


/* ============================================
   SEARCH BAR (Opzionale)
   ============================================ */

.faq-search {
    margin-bottom: 40px;
    position: relative;
}

.faq-search input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
}

.faq-search input:focus {
    outline: none;
    border-color: #107549;
    box-shadow: 0 0 0 3px rgba(16, 117, 73, 0.1);
}

.faq-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #107549;
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.faq-search button:hover {
    background: #0a5234;
    transform: translateY(-50%) scale(1.05);
}


/* ============================================
   CATEGORIE FAQ (Opzionale)
   ============================================ */

.faq-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    justify-content: center;
}

.faq-category-btn {
    padding: 10px 25px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    color: #495057;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.faq-category-btn:hover,
.faq-category-btn.active {
    background: #107549;
    border-color: #107549;
    color: white;
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .questions-holder {
        padding: 40px 30px;
    }
    
    .faqs-section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .questions-holder {
        padding: 30px 20px;
    }
    
    .question {
        padding: 20px 0;
    }
    
    .question h5 {
        font-size: 16px;
        padding-right: 35px;
    }
    
    .question h5::after {
        font-size: 28px;
    }
    
    .question p,
    .question ul,
    .question ol {
        font-size: 14px;
    }
    
    .question .simple-list li,
    .question .digit-list li {
        padding-left: 40px;
    }
}


/* ============================================
   VERSIONE ALTERNATIVA: CARDS SEPARATE
   (Se preferisci card separate invece di lista)
   ============================================ */

.questions-holder.cards-style {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.questions-holder.cards-style .question {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

.questions-holder.cards-style .question:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: -3px -3px 17px -3px;
    padding: 28px 33px;
}

.questions-holder.cards-style .question.active {
    border-left: 4px solid #107549;
}


/* ============================================
   ANIMAZIONI WOW.JS
   ============================================ */

.question.wow {
    visibility: hidden;
}

.question.wow.animated {
    visibility: visible;
}


/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .question h5::after {
        display: none;
    }
    
    .question p,
    .question ul,
    .question ol {
        display: block !important;
    }
    
    .more-questions,
    .faq-search {
        display: none;
    }
}