/* --- TABLE OF CONTENTS ---
 * File: blogs.css
 * 
 * 1. Category Nav / Topics Filter
 * 2. Premium Blogs Layout Blocks (Color Sections)
 * 3. Deep 3D Cards & Grids
 * 4. Blogs Hero Area (Moved to Bottom)
 * ========================================= */

.page-blogs-main {
    padding-top: calc(120px + 2rem);
    background-color: var(--color-bg-light);
}

/* =============================================
   0. Intro Hero Section (perfectly stacked)
============================================= */
.blogs-intro-section {
    padding: 3rem 2.5rem 0 2.5rem;
    max-width: min(96vw, 1540px);
    margin: 0 auto;
}

.blogs-intro-inner {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== PREMIUM ENTRANCE ORCHESTRATION ===== */
@keyframes eyebrowReveal {
    0% { opacity: 0; transform: translateX(-30px); letter-spacing: 0px; filter: blur(5px); }
    100% { opacity: 1; transform: translateX(0); letter-spacing: 2px; filter: blur(0); }
}
@keyframes title3DPop {
    0% { opacity: 0; transform: perspective(800px) rotateX(45deg) translateY(40px) scale(0.95); filter: blur(8px); }
    100% { opacity: 1; transform: perspective(800px) rotateX(0deg) translateY(0) scale(1); filter: blur(0); }
}
@keyframes leadDrift {
    0% { opacity: 0; transform: translateY(25px); filter: blur(3px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes filterPop {
    0% { opacity: 0; transform: translateY(30px) scale(0.8); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.blogs-intro-section .section-eyebrow {
    opacity: 0;
    animation: eyebrowReveal 1s var(--physics-overshoot) forwards 0.1s;
    display: inline-block;
}

.blogs-intro-section .section-title {
    opacity: 0;
    transform-origin: bottom center;
    animation: title3DPop 1.2s var(--physics-spring) forwards 0.25s;
}

.blogs-intro-section .section-lead {
    opacity: 0;
    animation: leadDrift 1s var(--physics-spring) forwards 0.45s;
}

.blogs-topics-nav .topics-title {
    opacity: 0;
    animation: eyebrowReveal 1s var(--physics-overshoot) forwards 0.55s;
    display: inline-block;
}

.blogs-topics-nav .topics-list li {
    opacity: 0;
    animation: filterPop 0.8s var(--physics-heavy) forwards;
}

.blogs-topics-nav .topics-list li:nth-child(1) { animation-delay: 0.65s; }
.blogs-topics-nav .topics-list li:nth-child(2) { animation-delay: 0.70s; }
.blogs-topics-nav .topics-list li:nth-child(3) { animation-delay: 0.75s; }
.blogs-topics-nav .topics-list li:nth-child(4) { animation-delay: 0.80s; }
.blogs-topics-nav .topics-list li:nth-child(5) { animation-delay: 0.85s; }
.blogs-topics-nav .topics-list li:nth-child(6) { animation-delay: 0.90s; }

/* Utility container matching scene-container but without grid */
.blogs-scene-container {
    max-width: min(96vw, 1540px);
    margin: 0 auto;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.articles-grid-section {
    padding: 4rem 0;
    margin-top: 2rem;
}

/* =============================================
   1. Premium Category Navigation (Topics)
============================================= */
.blogs-topics-nav {
    padding: 3rem 0;
    text-align: center;
}

.topics-title {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-weight: 700;
}

.topics-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.topics-list li a {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--color-bg-white);
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-brand-black);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.4s var(--physics-spring);
}

.topics-list li a:hover,
.topics-list li a.active {
    background: var(--color-brand-blue);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(35, 164, 214, 0.3);
}

@media (max-width: 768px) {
    .topics-list {
        gap: 0.8rem;
    }
    .topics-list li a {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* =============================================
   2. Premium Colored Layout Blocks
============================================= */

/* Deep Blue Premium Background Section */
.bg-premium-blue {
    background: linear-gradient(145deg, var(--color-brand-blue), #1a2a3a);
    color: #fff;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.bg-premium-blue .section-title {
    color: #fff;
}

.bg-premium-blue .section-eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

/* =============================================
   3. Trending Hype Cards (Image-Based)
============================================= */
.trending-hype-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.4s var(--physics-spring);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
}

.trending-hype-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--color-brand-red), #ff7a7a);
    transform: scaleY(0);
    transition: transform 0.4s var(--physics-spring);
    transform-origin: bottom;
    z-index: 2;
}

.trending-hype-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(230, 43, 43, 0.12);
    border-color: rgba(230, 43, 43, 0.2);
    text-decoration: none !important;
}

.trending-hype-card:hover::before {
    transform: scaleY(1);
}

.trending-hype-card img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s var(--physics-spring);
    flex-shrink: 0;
}

.trending-hype-card:hover img {
    transform: scale(1.08) rotate(-3deg);
}

.trending-hype-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.trending-title {
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--color-brand-black);
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.3px;
    text-decoration: none !important;
    transition: color 0.3s;
}

.trending-hype-card:hover .trending-title {
    color: var(--color-brand-red);
}

a:hover .trending-title {
    text-decoration: none !important;
}

/* =============================================
   3.5 Trending Layout & Titles (Custom)
============================================= */
.custom-section-pad {
    padding-top: 1rem;
    padding-bottom: 3rem;
    margin-top: 2rem;
}

.trending-header-bar {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.trending-fire-icon {
    font-size: 1.8rem;
    color: var(--color-brand-red);
    margin-right: 1rem;
    filter: drop-shadow(0 0 8px rgba(230, 43, 43, 0.4));
}

.trending-card-wrapper {
    /* Using grid so we don't need fixed heights or col sizes */
    display: flex;
    flex-direction: column;
}

/* =============================================
   4. Deep 3D Cards & Grids (All Articles)
============================================= */
.premium-card {
    background: var(--color-bg-white);
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    /* Deep 3D shadow for massive premium feel */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.6s var(--physics-spring), box-shadow 0.6s var(--physics-spring);
    position: relative;
}

.premium-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Glossy Overlay for premium cards */
.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 10;
    opacity: 0.5;
    transition: opacity 0.4s;
}

.premium-card:hover::before {
    opacity: 1;
}

.premium-card-img {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.premium-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--physics-spring);
}

.premium-card:hover .premium-card-img img {
    transform: scale(1.1);
}

.premium-card-tag {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-brand-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.premium-card-body {
    padding: 1.2rem 1.2rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.premium-card-title {
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--color-brand-black);
    margin-bottom: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.3 * 1.05rem * 3); /* Forces exact height for maximum 3 lines */
}

.premium-card-excerpt {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.premium-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 0.8rem;
}

.premium-meta {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.premium-read-more {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-brand-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: gap 0.3s var(--physics-spring);
}

.premium-card:hover .premium-read-more {
    gap: 0.8rem;
}


/* 4-column tight grid */
.dark-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .dark-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .dark-articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 540px) {
    .dark-articles-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   4.5 Dynamic Pagination Styles
============================================= */
.blogs-pagination-wrapper {
    margin-top: 4rem;
    width: 100%;
}

.desktop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.pagination-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s var(--physics-spring);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.pagination-btn.active {
    background: var(--color-brand-blue);
    border-color: var(--color-brand-blue);
    box-shadow: 0 8px 25px rgba(35, 164, 214, 0.4);
}

.mobile-pagination {
    display: none; /* Flex applied via JS */
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mobile-pagination-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
    max-width: 300px;
    line-height: 1.5;
}

.btn-view-more {
    background: var(--color-bg-white);
    color: var(--color-brand-black);
    border: none;
    padding: 1rem 3rem;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s var(--physics-spring);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-view-more:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}


/* =============================================
   4. Featured Blog Article (Bottom Hero)
============================================= */
.featured-bottom-section {
    padding: 2rem 0 3.5rem 0;
    background: var(--color-bg-light);
}

.massive-featured-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(135deg, var(--color-brand-blue) 0%, #0a8fa8 50%, var(--color-brand-red) 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(35, 164, 214, 0.22);
    position: relative;
    min-height: 0;
    /* override old 500px img height */
}

.massive-featured-img {
    width: 260px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.massive-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--physics-spring);
    opacity: 0.85;
}

.massive-featured-card:hover .massive-featured-img img {
    transform: scale(1.06);
}

.massive-featured-content {
    padding: 2.2rem 3rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    color: #fff;
    flex: 1;
}

.massive-featured-content-text {
    flex: 1;
}

.massive-featured-content-text .featured-flag {
    margin-bottom: 0.7rem;
}

.massive-featured-content-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

.featured-flag {
    display: inline-block;
    align-self: flex-start;
    background: var(--color-brand-red);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(230, 43, 43, 0.4);
}

.featured-massive-title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    line-height: 1.2;
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
}

.featured-massive-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.55;
    margin-bottom: 0;
    max-width: 500px;
}

@media (max-width: 1024px) {
    .massive-featured-card {
        grid-template-columns: 1fr;
    }

    .massive-featured-img {
        min-height: 350px;
    }

    .massive-featured-content {
        padding: 3rem 2rem;
    }
}

@media (max-width: 860px) {
    .massive-featured-card {
        flex-direction: column;
    }

    .massive-featured-img {
        width: 100%;
        height: 200px;
    }

    .massive-featured-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.8rem;
    }

    .massive-featured-content-action {
        align-items: flex-start;
    }
}