/* Stili per la pagina FAQ */
.faq-page {
    background-color: #f9fafc;
    color: #333;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.faq-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    position: relative;
    z-index: 1;
}

.faq-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: relative;
}

.back-button {
    position: absolute;
    top: 10px;
    left: 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-back i {
    margin-right: 6px;
}

.btn-back:hover {
    transform: translateX(-3px);
    color: #1565C0;
}

.faq-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 10px 0;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

/* Barra di ricerca */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 25px auto 0;
}

.search-container input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 2px 15px rgba(33, 150, 243, 0.2);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Filtri categorie */
.faq-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.category-btn {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background-color: #f0f0f0;
}

.category-btn.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

/* Sezioni FAQ */
.faq-section {
    margin-bottom: 40px;
}

.faq-section h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.3);
}

/* Item FAQ */
.faq-item {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.faq-icon {
    color: #2196F3;
    transform: rotate(0);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 1000px; /* Valore arbitrario sufficientemente grande */
}

.faq-answer p {
    margin-top: 0;
    line-height: 1.6;
    color: #555;
}

.faq-answer ul, .faq-answer ol {
    padding-left: 20px;
    color: #555;
    line-height: 1.6;
}

.faq-answer li {
    margin-bottom: 6px;
}

/* Messaggio nessun risultato */
.no-results {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.no-results a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
}

/* Sezione contatto supporto */
.contact-support {
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    padding: 30px;
    border-radius: 10px;
    margin-top: 50px;
}

.contact-support h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
}

.support-button {
    display: inline-flex;
    align-items: center;
    background-color: #2196F3;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.support-button i {
    margin-right: 8px;
}

.support-button:hover {
    background-color: #1565C0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

/* Footer */
.faq-footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
    color: #777;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

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

.faq-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive design */
@media (max-width: 768px) {
    .faq-header h1 {
        font-size: 2rem;
    }
    
    .faq-categories {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .category-btn {
        flex-shrink: 0;
    }
    
    .back-button {
        position: relative;
        display: block;
        margin-bottom: 15px;
        text-align: left;
    }
    
    .faq-container {
        padding: 20px 15px 40px;
    }
}

@media (max-width: 480px) {
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .search-container input {
        padding: 10px 40px 10px 15px;
        font-size: 0.9rem;
    }
    
    .faq-header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
}

/* ===== CORREZIONE SCROLL FAQ ===== */

/* Forza lo scroll per la pagina FAQ */
body.faq-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
}

html {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    max-height: none !important;
}

/* Assicurati che tutti i container permettano lo scroll */
.faq-container,
.faq-wrapper {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Rimuovi eventuali limitazioni di altezza */
.faq-item,
.faq-section {
    height: auto !important;
    max-height: none !important;
}

/* Assicurati che il footer sia visibile */
.faq-footer {
    position: relative !important;
    bottom: auto !important;
}

/* Background animato non deve interferire */
.animated-background {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none !important;
    overflow: hidden;
}