/* =========================================
   Category Showcase Section
   ========================================= */

.blog-over-catshowcase-wrapper {
    margin: 40px 0;
    padding: 40px 0;
    background: var(--blog-over-bg-body, #f9fafb);
    border-top: 1px solid var(--blog-over-border-color, #e5e7eb);
}

/* ── Grid ───────────────────────────────────────── */
.blog-over-catshowcase-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 10px;
}

.blog-over-catshowcase-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.blog-over-catshowcase-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.blog-over-catshowcase-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ── Card Base ──────────────────────────────────── */
.blog-over-catshowcase-card {
    position: relative;
    display: block;
    height: 200px;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: var(--blog-over-shadow-card, 0 2px 15px rgba(0, 0, 0, 0.08));
}

.blog-over-catshowcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

/* ── Background Image ───────────────────────────── */
.blog-over-catshowcase-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

/* No image fallback - gradient placeholder */
.blog-over-catshowcase-no-image {
    background: linear-gradient(135deg,
        var(--blog-over-primary, #3b82f6) 0%,
        var(--blog-over-secondary, #1e40af) 100%);
}

/* Hover Zoom Effect (applied when .blog-over-catshowcase-zoom is present) */
.blog-over-catshowcase-zoom .blog-over-catshowcase-card:hover .blog-over-catshowcase-bg {
    transform: scale(1.06);
}

/* ── Overlay ────────────────────────────────────── */
.blog-over-catshowcase-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* Slightly deepen overlay on hover for legibility */
.blog-over-catshowcase-card:hover .blog-over-catshowcase-overlay {
    opacity: 1;
}

/* ── Card Content ───────────────────────────────── */
.blog-over-catshowcase-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px 20px;
    z-index: 3;
}

/* ── Post Count Badge ───────────────────────────── */
.blog-over-catshowcase-count {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    border-radius: 50px;
    margin-bottom: 8px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    width: fit-content;
    transition: background 0.25s ease;
}

.blog-over-catshowcase-card:hover .blog-over-catshowcase-count {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Category Name ──────────────────────────────── */
.blog-over-catshowcase-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: letter-spacing 0.25s ease;
}

.blog-over-catshowcase-card:hover .blog-over-catshowcase-name {
    letter-spacing: 0.02em;
}

/* ── Description ────────────────────────────────── */
.blog-over-catshowcase-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 8px;
    /* 2-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Arrow Icon ─────────────────────────────────── */
.blog-over-catshowcase-arrow {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    font-size: 0.78rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateX(-6px);
}

.blog-over-catshowcase-card:hover .blog-over-catshowcase-arrow {
    opacity: 1;
    transform: translateX(0);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ── Dark Mode ──────────────────────────────────── */
body.blog-over-dark-mode .blog-over-catshowcase-wrapper {
    background: var(--blog-over-bg-body);
    border-top-color: var(--blog-over-border-color);
}

body.blog-over-dark-mode .blog-over-catshowcase-card {
    box-shadow: var(--blog-over-shadow-card);
}

body.blog-over-dark-mode .blog-over-catshowcase-card:hover {
    box-shadow: var(--blog-over-shadow-lg);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1200px) {
    .blog-over-catshowcase-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .blog-over-catshowcase-grid,
    .blog-over-catshowcase-cols-3,
    .blog-over-catshowcase-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .blog-over-catshowcase-wrapper {
        padding: 25px 0;
        margin: 25px 0;
    }

    .blog-over-catshowcase-grid,
    .blog-over-catshowcase-cols-2,
    .blog-over-catshowcase-cols-3,
    .blog-over-catshowcase-cols-4 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .blog-over-catshowcase-card {
        height: 170px;
    }

    .blog-over-catshowcase-name {
        font-size: 1rem;
    }
}
