﻿/* Blog layout refinements */
:root {
    --blog-side-thumb-w: 220px;
    --blog-side-thumb-h: 140px;
    --blog-featured-h: 480px;
    --blog-gap: 24px;
    --blog-featured-meta-w: 840px;
}

/* Generic small-card enhancements */
.small-card {
    display: flex;
    gap: var(--blog-gap);
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.cat-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(124, 42, 232, 0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
    line-height: 1.6;
}

.popular-divider {
    border-top: 1px solid #f1f5f9;
    margin: 32px 0;
}

/* Side Column Vertical Centering */
@media (min-width: 1024px) {
    .side-column {
        min-height: var(--blog-featured-h);
        justify-content: center;
        display: flex;
        flex-direction: column;
        gap: var(--blog-gap);
    }
}

/* Responsive side thumbs */
.side-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.5s ease;
}

.side-card:hover .side-thumb {
    transform: scale(1.05);
}

/* Featured Meta Centering */
#featuredMeta {
    max-width: var(--blog-featured-meta-w);
    margin-left: auto;
    margin-right: auto;
    padding-top: 32px;
}

/* Typography refinements */
h2,
h3,
h4,
h5,
h6 {
    color: #0f172a;
    /* Slate 900 */
}

a {
    transition: color 0.2s ease;
}

.popular-grid .card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    height: 100%;
}

.popular-grid .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    border-color: #e2e8f0;
}

.overlay-title {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #0f172a;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 8px;
    z-index: 5;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Remove any dark mode forced colors that were breaking readability */
@media (prefers-color-scheme: dark) {

    /* We reset to light-friendly colors because the background is white */
    .small-card .meta p,
    .popular-grid .card p,
    .side-card .meta p {
        color: #64748b !important;
    }

    .popular-grid .card {
        background: #fff !important;
    }

    h2,
    h3,
    h4,
    h5,
    h6,
    a {
        color: #0f172a !important;
    }
}

/* Vertical text helper */
.vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}