/* ============================================================
   Widget: blog|recent-category-posts
   Layout: 2 blocchi riga 1 + N blocchi successive righe
   Aspect ratio: 10/7 (desktop/tablet), 4/3 (mobile)
   ============================================================ */

.blog-recent-category-posts {
    padding-top: var(--website-padding-top-bottom);
    padding-bottom: var(--website-padding-top-bottom);
    width: 100%;
}

/* ---- Header sezione ---- */
.blog-recent-category-posts-header {
    padding: 0 0 3.5rem;
    text-align: center;
}

.blog-recent-category-posts-header-title {
    margin-bottom: 0.75rem;
}

.blog-recent-category-posts-header-description {
    font-size: 1rem;
    max-width: 640px;
    margin: 0 auto;
}

/* ---- Riga ---- */
.blog-recent-category-posts-row {
    margin-bottom: 0;
}

/* ---- Card ---- */
.blog-recent-category-posts-card {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 10 / 7;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #2a2a2a;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 16px;
}

/* Overlay scuro semitrasparente */
.blog-recent-category-posts-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.18) 55%, transparent 100%);
    transition: background 0.3s ease;
}

.blog-recent-category-posts-card:hover .blog-recent-category-posts-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
}

/* ---- Contenuto ---- */
.blog-recent-category-posts-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.5rem;
    z-index: 1;
}

.blog-recent-category-posts-title {
    color: #ffffff;
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    transition: transform 0.3s ease;
}

.blog-recent-category-posts-card:hover .blog-recent-category-posts-title {
    transform: translateY(-4px);
}

/* ---- Responsive ---- */
@media (max-width: 575.98px) {
    .blog-recent-category-posts-card {
        aspect-ratio: 4 / 3;
    }

    .blog-recent-category-posts-title {
        font-size: 1.125rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .blog-recent-category-posts-title {
        font-size: 1.25rem;
    }
}

@media (min-width: 992px) {
    .blog-recent-category-posts-title {
        font-size: 1.5rem;
    }

    .blog-recent-category-posts-content {
        padding: 1.75rem 2rem;
    }
}
