/* ==========================================================================
   Articles Library & Archive Styles
   ========================================================================== */

/* ==========================================================================
   Interactive Hero Section
   ========================================================================== */

.interactive-hero-wrap {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto var(--spacing-xxl) auto;
    border-radius: 40px;
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interactive-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    z-index: 0;
}

.hero-header {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    /* Increased transparency */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--spacing-xxl) var(--spacing-xl);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-width: 800px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.hero-header .page-title {
    margin-bottom: var(--spacing-sm);
    color: var(--c-text-main);
}

.hero-header .page-description {
    color: var(--c-text-muted);
}

.beam-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    /* Between image and header card */
}

.interactive-hero-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 768px) {
    .interactive-hero-wrap {
        aspect-ratio: 1/1;
        border-radius: 24px;
    }
}

.library-main {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xxl);
}

.library-header {
    margin-bottom: var(--spacing-xxl) !important;
}

.library-header .page-title {
    font-size: 4rem !important;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: var(--spacing-xs);
    color: var(--c-text-main);
}

.library-header .page-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.5);
}

/* Category Pills */
.category-filter {
    margin-top: var(--spacing-xl) !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.filter-list {
    display: flex;
    justify-content: center;
    gap: 12px !important;
    padding: 0;
    list-style: none;
}

.filter-list a {
    display: block;
    padding: 8px 18px;
    border-radius: 100px;
    background: #f8f9fa;
    color: #666 !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-list a:hover {
    background: #f1f3f5;
}

.filter-list .active-filter a {
    background: #4c6ef5;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(76, 110, 245, 0.2);
}

/* Section Headings */
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #adb5bd;
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: var(--spacing-xs);
    display: block;
}

/* Featured Thinking Grid */
.featured-thinking {
    margin-bottom: var(--spacing-xxl);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.featured-item {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-4px);
}

.featured-image-wrap {
    aspect-ratio: 4/5;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    background: #eee;
}

.featured-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-meta {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #4c6ef5;
    margin-bottom: 4px;
    display: block;
}

.featured-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-text-main);
}

/* All Writing List */
.all-writing-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px var(--spacing-xl);
}

.writing-item {
    display: flex;
    gap: var(--spacing-md);
    text-decoration: none;
    align-items: flex-start;
}

.writing-thumbnail {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.writing-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.writing-content {
    flex: 1;
}

.writing-date {
    font-size: 0.75rem;
    color: #adb5bd;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.writing-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--c-text-main);
}

.writing-excerpt {
    font-size: 0.9rem;
    color: #868e96;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: var(--spacing-xxl);
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 100px;
    background: #fff;
    border: 1px solid #e9ecef;
    color: #495057;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .library-header .page-title {
        font-size: 2.5rem !important;
    }

    .all-writing-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .writing-item {
        flex-direction: column;
    }

    .writing-thumbnail {
        width: 100%;
        aspect-ratio: 16/9;
        height: auto;
    }
}