/**
 * Stili per il blocco Griglia Tassonomie
 */

.agevolazioni-taxonomy-grid {
    margin: 40px 0;
    padding: 40px 20px;
}

.taxonomy-grid-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 40px 0;
    color: #333;
}

.taxonomy-grid-container {
    display: grid;
    grid-template-columns: repeat(var(--columns, 4), 1fr);
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Taxonomy Item */
.taxonomy-grid-item {
    background: #fff;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.taxonomy-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Image/Icon */
.taxonomy-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.taxonomy-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.taxonomy-item-icon {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    flex-shrink: 0;
}

/* Content */
.taxonomy-item-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 16px;
}

.taxonomy-item-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.4;
}

.taxonomy-item-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1200px) {
    .taxonomy-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .taxonomy-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .taxonomy-grid-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .taxonomy-item-image,
    .taxonomy-item-icon {
        width: 80px;
        height: 80px;
    }
    
    .taxonomy-item-icon {
        font-size: 40px;
    }
}

@media (max-width: 600px) {
    .agevolazioni-taxonomy-grid {
        padding: 30px 15px;
    }
    
    .taxonomy-grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .taxonomy-grid-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .taxonomy-grid-item {
        padding: 24px 16px;
    }
    
    .taxonomy-item-title {
        font-size: 16px;
    }
    
    .taxonomy-item-count {
        font-size: 13px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.taxonomy-grid-item {
    animation: fadeInUp 0.5s ease-out backwards;
}

.taxonomy-grid-item:nth-child(1) { animation-delay: 0.05s; }
.taxonomy-grid-item:nth-child(2) { animation-delay: 0.1s; }
.taxonomy-grid-item:nth-child(3) { animation-delay: 0.15s; }
.taxonomy-grid-item:nth-child(4) { animation-delay: 0.2s; }
.taxonomy-grid-item:nth-child(5) { animation-delay: 0.25s; }
.taxonomy-grid-item:nth-child(6) { animation-delay: 0.3s; }
.taxonomy-grid-item:nth-child(7) { animation-delay: 0.35s; }
.taxonomy-grid-item:nth-child(8) { animation-delay: 0.4s; }

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .taxonomy-grid-item {
        animation: none;
        transition: none;
    }
    
    .taxonomy-grid-item:hover {
        transform: none;
    }
}
