/* _assets/faecher.css
 * Estratto da faecher.php (righe 40-322) il 2026-06-18_08-55.
 * NON modificare faecher.php per cambiare il foglio di stile — modifica QUESTO file.
 */

    /* Subject card hover effects */
    .subject-card {
        transition: all 0.3s ease;
        transform: translateY(0);
    }
    
    .subject-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
    
    /* Subject specific gradients */
    .physics-gradient {
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    }
    
    .math-gradient {
        background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    }
    
    .cs-gradient {
        background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    }

    .english-gradient {
        background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    }

    .art-gradient {
        background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    }

    /* Modal styles */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
    }

    .modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        background: white;
        border-radius: 16px;
        padding: 2rem;
        max-width: 800px;
        max-height: 80vh;
        overflow-y: auto;
        overflow-x: hidden;
        margin: 1rem;
        animation: modalSlideIn 0.3s ease-out;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        /* scrollbar sottile/arrotondata (Firefox) */
        scrollbar-width: thin;
        scrollbar-color: #c7cad6 transparent;
    }
    /* scrollbar custom (WebKit) — il margine in alto/in basso preserva gli angoli arrotondati */
    .modal-content::-webkit-scrollbar { width: 10px; }
    .modal-content::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
    .modal-content::-webkit-scrollbar-thumb {
        background: #c7cad6;
        border-radius: 999px;
        border: 3px solid transparent;
        background-clip: content-box;
    }
    .modal-content::-webkit-scrollbar-thumb:hover { background: #a6abbd; background-clip: content-box; }

    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(-50px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* Year button styles */
    .year-button {
        background: #f3f4f6;
        border: 2px solid #d1d5db;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s ease;
        text-align: center;
        color: #374151;
    }

    .year-button:hover {
        background: #e5e7eb;
        border-color: #9ca3af;
        transform: translateY(-2px);
    }

    .year-button.active {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

    .year-button.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: #f9fafb;
        color: #9ca3af;
    }

    .year-button.disabled:hover {
        transform: none;
        background: #f9fafb;
        border-color: #d1d5db;
    }

    /* Theme list styles */
    .theme-item-container {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        margin-bottom: 1rem;
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .theme-item-container:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: #cbd5e1;
    }

    .theme-item-header {
        padding: 1.25rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .theme-item-header:hover {
        background-color: #e2e8f0;
    }

    .theme-title {
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 0.5rem;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .theme-description {
        color: #6b7280;
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .theme-badge {
        display: inline-block;
        background: #dbeafe;
        color: #1e40af;
        padding: 0.25rem 0.5rem;
        border-radius: 0.375rem;
        font-size: 0.75rem;
        font-weight: 500;
        margin-left: auto;
    }

    .theme-expand-icon {
        font-size: 0.875rem;
        color: #6b7280;
        transition: transform 0.3s ease;
        display: inline-block;
        width: 1rem;
    }

    .theme-expand-icon.expanded {
        transform: rotate(90deg);
    }

    /* Sottotemi styles */
    .sub-themes-container {
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
        }
        to {
            opacity: 1;
            max-height: 500px;
        }
    }

    .sub-theme-item {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        padding: 1rem;
        margin: 0.75rem 1.25rem;
        cursor: pointer;
        transition: all 0.3s ease;
        animation: fadeInUp 0.3s ease-out forwards;
        opacity: 0;
    }

    .sub-theme-item:hover {
        background: #e0f2fe;
        border-color: #7dd3fc;
        transform: translateX(8px);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    }

    .sub-theme-title {
        font-weight: 600;
        color: #1e40af;
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

    .sub-theme-description {
        color: #6b7280;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .modal-content {
            margin: 0.5rem;
            padding: 1.5rem;
            max-height: 90vh;
        }
        
        .year-button {
            padding: 0.5rem 0.75rem;
            font-size: 0.875rem;
        }
    }

    /* Grid responsive per year buttons */
    .year-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    @media (min-width: 640px) {
        .year-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
        }
    }

    @media (min-width: 768px) {
        .year-grid {
            grid-template-columns: repeat(6, 1fr);
        }
    }

    /* Animazione per temi */
    .theme-item {
        animation: fadeInUp 0.3s ease-out forwards;
        opacity: 0;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes modalSlideOut {
        to {
            opacity: 0;
            transform: translateY(-50px) scale(0.95);
        }
    }
