/* Layout principale degli articoli */
.custom-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /* Spazio tra le colonne e le righe */
    max-width: 1200px;
    margin: 0 auto;
    justify-content: flex-start;
    /* Allinea meglio gli elementi per distribuirli */
}

.custom-article-card {
    flex: 1 1 calc(33.33% - 20px);
    /* Tre colonne su desktop */
    box-sizing: border-box;
    padding: 10px;
    max-width: 33%;
    transition: transform 0.3s ease;
}

.custom-article-card:hover {
    transform: scale(1.02);
}

.custom-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.custom-card-inner {
    border: 1px solid #FFA6B6;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background-color 0.3s;
}

.custom-card-inner:hover {
    background-color: #FFA6B6;
    border-radius: 10px;
}

.custom-article-image {
    max-height: 150px;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
    margin-bottom: 10px;
}

.custom-article-card:hover .custom-article-image {
    transform: scale(1.05);
}

.custom-article-title {
    font-size: 1.15rem;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

.custom-article-text-preview {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Limita a 3 righe */
    -webkit-box-orient: vertical;
}

/* Filtri */
.custom-filter-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    row-gap: 20px;
    padding-left: 15px;
    padding-right: 15px;
}

#all-filters {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 20px;
    width: 90%;
}

.custom-filter-container label {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.9rem;
}

.custom-show-more {
    margin-right: 20px;
    color: #c36;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

#custom-clear-filters {
    background-color: #FFA6B6;
    color: #000;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9rem;
}

#custom-post-results {
    width: 100%;
    display: flex;
    flex-flow: wrap;
}

.w-100 {
    width: 100%;
    display: block;

}

/* Responsività */
@media (max-width: 992px) {
    .custom-article-card {
        flex: 1 1 calc(50% - 20px);
        /* Due colonne su tablet */
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .custom-article-card {
        padding-left: 50px;
        padding-right: 50px;
        max-width: 100%;
        flex: 1 1 100%;
        /* Una colonna su mobile */
    }
}


/* Spinner Loader */
.custom-loader-overlay {
    display: none;
    /* Nascosto di default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.custom-loader-spinner {
    border: 4px solid rgba(255, 166, 182, 0.5);
    border-top: 4px solid #FFA6B6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

#custom-pagination{
    padding: 20px;
    text-align: right;    
    max-width: 1200px;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


.container-img{
    margin-bottom: 25px;
    padding:  0 25px;
}

.container-img img{
    border-radius: 50px;
}

#filtri{
    display: none;
}