/* ==========================================================================
   INNOVAITION — BLOG & ARTICLES STYLESHEET (css/blog.css)
   Requires css/base.css loaded first.
   Covers blog.html + individual blog-*.html article pages:
   Pastel Aurora Hero, Dynamic Year Filters, 3-Column Expanding Card Grid,
   Article Typography & Related Posts
   ========================================================================== */

body.blog-page {
    background-color: #ffffff;
    color: var(--text-dark);
}

/* ===== 1. BLOG / ARTICLE LIGHT HERO ===== */
.blog-hero-sec,
.article-hero-sec {
    position: relative;
    padding: 180px var(--layout-pad) 120px;
    background-color: #ffffff;
    background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
        url('../images/Hero section background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    z-index: 10;
}

.blog-hero-sec .section-frame::before,
.article-hero-sec .section-frame::before {
    display: none !important;
}

.blog-hero-sec .section-frame::after,
.article-hero-sec .section-frame::after {
    background-color: #ffffff;
}

.blog-hero-sec .section-frame .sf-line.top,
.blog-hero-sec .section-frame .sf-line.bottom,
.article-hero-sec .section-frame .sf-line.top,
.article-hero-sec .section-frame .sf-line.bottom {
    display: block;
    background-color: rgba(0, 0, 0, 0.15);
}

.blog-hero-sec .section-frame .sf-dia,
.article-hero-sec .section-frame .sf-dia {
    display: block;
    background-color: #000000;
}

.blog-hero-blur {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 182, 255, 0.15), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 255, 255, 0.1), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 235, 150, 0.15), transparent 50%);
    filter: blur(40px);
    z-index: 1;
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.blog-hero-title-group {
    margin: 0;
    font-weight: inherit;
}

.blog-hero-title {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(5rem, 14vw, 11rem);
    font-weight: 700;
    line-height: 0.85;
    color: #222222;
    letter-spacing: -0.03em;
}

.blog-hero-title.left {
    text-align: left;
}

.blog-hero-title.right {
    text-align: right;
    margin-top: -10px;
}

/* ===== 2. DYNAMIC YEAR FILTER PILLS ===== */
.blog-page-wrap {
    background: #ffffff;
    padding-bottom: 100px;
}

.blog-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 40px auto 50px;
    max-width: 1000px;
    padding: 0 20px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #000000;
    padding: 10px 20px;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: rgba(0, 0, 0, 0.45);
}

.filter-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.hidden-post {
    display: none !important;
}

/* ===== 3. 3-COLUMN EXPANDING BLOG GRID ===== */
.blog-main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 380px;
    margin: 0 var(--grid-edge);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.b-card {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 40px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #111111;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.b-card.featured {
    grid-column: 1 / 3;
    grid-row: span 2;
}

.b-img-wrap {
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    border-radius: 4px;
    transition: height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, margin-bottom 0.4s ease;
    position: relative;
}

.b-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.b-card:hover .b-img-wrap {
    height: 220px;
    opacity: 1;
    margin-bottom: 24px;
}

.b-card.featured .b-img-wrap,
.b-card.featured:hover .b-img-wrap {
    height: auto;
    flex-grow: 1;
    opacity: 1;
    margin-bottom: 30px;
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #ffffff;
    color: #000000;
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.b-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.b-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 1.5vw, 22px);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.3;
    color: #111111;
    transition: color 0.3s;
}

.b-card.featured .b-title {
    font-size: clamp(1.4rem, 2vw, 28px);
}

.b-card:hover .b-title {
    color: #666666;
}

.b-date {
    font-size: 0.8rem;
    color: #777777;
    font-weight: 500;
    white-space: nowrap;
    margin-top: 4px;
}

/* Related Articles / Bottom Insights Grid on Blog Post Pages */
.blog-section {
    background-color: #ffffff;
    color: var(--text-dark);
    padding: 140px var(--layout-pad) 100px;
    position: relative;
    z-index: 20;
}

.blog-section .blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.blog-section .blog-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 20px;
}

.blog-section .blog-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-section .blog-card:hover .blog-img-wrap img {
    transform: scale(1.05);
}

#paper-shader-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #0a0a0a;
    pointer-events: none;
}

/* ===== 4. TABLET & MOBILE BREAKPOINTS ===== */
@media (max-width: 1024px) and (min-width: 769px) {
    .blog-main-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 350px;
    }

    .b-card.featured {
        grid-column: 1 / 3;
    }
}

@media (max-width: 768px) {

    .blog-hero-sec,
    .article-hero-sec {
        min-height: auto;
        padding: 120px 20px 40px;
    }

    .blog-hero-title {
        font-size: clamp(3.5rem, 18vw, 5.5rem);
        line-height: 1;
        letter-spacing: -0.02em;
    }

    .blog-hero-title.right {
        margin-top: -5px;
    }

    .blog-page-wrap {
        padding-bottom: 60px;
    }

    .blog-filter-wrap {
        margin: 28px auto 32px;
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.72rem;
    }

    .blog-main-grid {
        display: flex;
        flex-direction: column;
        margin: 0;
        border-left: none;
        border-right: none;
    }

    .b-card {
        border-right: none;
        padding: 28px 20px;
        height: auto;
    }

    .b-card.featured {
        grid-column: auto;
        grid-row: auto;
    }

    .b-card .b-img-wrap,
    .b-card.featured .b-img-wrap {
        height: 220px;
        opacity: 1;
        margin-bottom: 16px;
        flex-grow: 0;
    }

    .b-meta {
        flex-direction: column;
        gap: 8px;
    }

    .b-title,
    .b-card.featured .b-title {
        font-size: 1.15rem;
    }

    .b-date {
        margin-top: 0;
        font-size: 0.85rem;
        color: #666666;
    }

    .blog-section {
        padding: 110px 20px 60px;
    }

    .blog-section .blog-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}