.x-infografiche-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.x-infografiche-item {
    width: 150px;
    height: 150px;

    position: relative;
    background-color: #00000010;
}
.x-infografiche-item a {
    display: inline-block;
    position: absolute;
    width: 100%;
    height: 100%;
}
.x-infografiche-item img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}
.x-infografiche-item .x-infografiche-caption {
    display: none;
}

@media (min-width: 780px) {
    .x-infografiche-item {
        width: 200px;
        height: 200px;
    }
}

/* Paginazione */
.x-infografiche-gallery-wrapper {
    position: relative;
}

.x-infografiche-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
}

.x-infografiche-pagination button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition:
        background-color 0.3s,
        border-color 0.3s;
}

.x-infografiche-pagination button:hover:not(:disabled) {
    background: #e9e9e9;
    border-color: #999;
}

.x-infografiche-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.x-infografiche-page-info {
    font-weight: bold;
    color: #666;
}

.x-infografiche-gallery-container {
    position: relative;
}

.x-infografiche-gallery {
    display: none;
}

.x-infografiche-gallery.active {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

/* Filtri per tag */
.x-infografiche-tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    padding: 20px;
    /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

.x-infografiche-tag-link {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    background: #ffffff;
    color: #495057;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.x-infografiche-tag-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.x-infografiche-tag-link:hover::before {
    left: 100%;
}

.x-infografiche-tag-link:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.x-infografiche-tag-link.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    border-color: #007bff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.x-infografiche-tag-link.active:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    border-color: #0056b3;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .x-infografiche-tags-filter {
        padding: 15px;
        gap: 8px;
    }

    .x-infografiche-tag-link {
        padding: 8px 16px;
        font-size: 13px;
    }
}
