/**
 * ============================================
 * FAQ BLOCK - FRONTEND STYLES
 * ============================================
 * Stili per la visualizzazione pubblica delle FAQ
 */

.faq-section {
    padding: 3.5rem 1rem;
    background-color: #f8fafc; /* slate-50 */
}

.faq-container {
    max-width: 1280px; /* max-w-7xl */
    margin: 0 auto;
    padding: 0 1rem;
}

.faq-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 800;
    color: #0f172a; /* slate-900 */
    margin-bottom: 1.5rem;
}

/* Grid Layout */
.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-grid-cols-1 {
    grid-template-columns: 1fr;
}

.faq-grid-cols-2 {
    grid-template-columns: 1fr;
}

.faq-grid-cols-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .faq-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .faq-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* FAQ Item */
.faq-item {
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0; /* slate-200 */
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #cbd5e1; /* slate-300 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.faq-item[open] {
    border-color: #0ea5e9; /* sky-600 */
}

/* Summary (Question) */
.faq-item summary {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #0f172a; /* slate-900 */
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    user-select: none;
    padding-right: 2.5rem;
    position: relative;
    min-height: 1.5rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: #0ea5e9; /* sky-600 */
    transition: transform 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    right: 0;
    top: 0;
    line-height: 1;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-item[open] summary::after {
    content: '−';
    transform: rotate(0deg);
}

.faq-item summary:hover {
    color: #0ea5e9; /* sky-600 */
}

/* Content (Answer) */
.faq-content {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9; /* slate-100 */
}

.faq-content p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #64748b; /* slate-600 */
    line-height: 1.6;
}

.faq-content p:first-child {
    margin-top: 0;
}

.faq-content p:last-child {
    margin-bottom: 0;
}

.faq-content ul,
.faq-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}

.faq-content li {
    margin: 0.25rem 0;
}

.faq-content a {
    color: #0ea5e9;
    text-decoration: underline;
    font-weight: 500;
}

.faq-content a:hover {
    color: #0284c7;
}

/* Category Badge */
.faq-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background-color: #dbeafe; /* sky-100 */
    color: #0369a1; /* sky-700 */
    margin-left: 0.5rem;
}

/* Animation */
.faq-item[open] .faq-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Optimization */
@media (max-width: 767px) {
    .faq-section {
        padding: 2rem 0.5rem;
    }
    
    .faq-item {
        padding: 0.875rem;
    }
    
    .faq-item summary {
        font-size: 0.875rem;
        padding-right: 2rem;
    }
    
    .faq-item summary::after {
        font-size: 1.25rem;
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .faq-content p {
        font-size: 0.8125rem;
    }
}

/* Print Styles */
@media print {
    .faq-item {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .faq-item summary::after {
        display: none;
    }
    
    .faq-item[open] .faq-content {
        display: block !important;
    }
}