/* =========================================
   Articles Listing Page
   ========================================= */

/* ── Page Hero ─────────────────────────────────────────────────── */
.articles-page-hero {
    padding: 100px 0 40px;
}

.articles-page-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.articles-page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-dark);
    margin: 10px 0 12px;
    line-height: 1;
}

.articles-page-hero p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.6;
    margin: 0;
}

/* ── Controls bar (sticky) ─────────────────────────────────────── */
.articles-controls-section {
    padding: 0;
    position: sticky;
    top: 64px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 40;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.articles-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    flex-wrap: wrap;
}

/* Search */
.articles-search-wrap {
    position: relative;
    flex: 0 0 280px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}

.articles-search-input {
    width: 100%;
    height: 42px;
    padding: 0 38px 0 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-light, #f8f9fb);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.articles-search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 80, 240, 0.1);
    background: white;
}

.articles-search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.search-clear:hover {
    background: rgba(0, 0, 0, 0.12);
    color: var(--text-dark);
}

.search-clear i {
    width: 13px;
    height: 13px;
}

/* Filters row — holds tabs + date selector */
.articles-filters-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

/* Category tabs */
.articles-filter-tabs {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 1px;
}

.articles-filter-tabs::-webkit-scrollbar {
    display: none;
}

.articles-tab-indicator {
    position: absolute;
    bottom: -1px;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 2px 2px 0 0;
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.articles-tab {
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.articles-tab:hover {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.03);
}

.articles-tab.active {
    color: var(--primary-blue);
}

/* Date filter */
.articles-date-filter {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.date-filter-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.articles-date-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 38px;
    padding: 0 32px 0 34px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-dark);
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.articles-date-select:hover {
    border-color: var(--text-muted);
}

.articles-date-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 80, 240, 0.1);
}

.date-filter-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ── Page section ──────────────────────────────────────────────── */
.articles-page-section {
    padding: 40px 0 96px;
}

/* Results meta */
.articles-results-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    min-height: 16px;
}

/* ── Featured card ─────────────────────────────────────────────── */
.articles-featured-wrap {
    margin-bottom: 56px;
}

.articles-featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: white;
    transition: box-shadow 0.3s, transform 0.3s var(--ease-out-expo);
    min-height: 400px;
}

.articles-featured-card:hover {
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.14);
    transform: translateY(-3px);
}

.articles-featured-img {
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.articles-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.articles-featured-card:hover .articles-featured-img img {
    transform: scale(1.04);
}

.articles-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.25) 0%, transparent 50%);
}

.articles-featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    color: var(--primary-blue);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.articles-featured-body {
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.articles-featured-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(0, 80, 240, 0.08);
    color: var(--primary-blue);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.articles-featured-body h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0;
}

.articles-featured-body p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 460px;
    margin: 0;
}

.articles-featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 16px;
}

.articles-read-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-blue);
    transition: gap 0.2s;
    flex-shrink: 0;
}

.articles-featured-card:hover .articles-read-cta {
    gap: 9px;
}

.articles-read-cta i {
    width: 14px;
    height: 14px;
}

/* ── Grid cards ────────────────────────────────────────────────── */
.articles-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.articles-grid-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: white;
    transition: box-shadow 0.25s, transform 0.25s var(--ease-out-expo);
}

.articles-grid-card:hover {
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.11);
    transform: translateY(-4px);
}

.articles-grid-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light, #f8f9fb);
}

.articles-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out-expo);
}

.articles-grid-card:hover .articles-grid-img img {
    transform: scale(1.05);
}

.articles-grid-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: white;
    color: var(--primary-blue);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.articles-grid-body {
    padding: 22px 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.articles-grid-body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articles-grid-body .article-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex: 1;
    max-width: none;
}

.articles-grid-body .article-date {
    margin: 0;
    margin-top: auto;
}

/* Search highlight */
mark {
    background: rgba(0, 80, 240, 0.12);
    color: var(--primary-blue);
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 600;
}

/* ── Empty state ───────────────────────────────────────────────── */
.articles-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.articles-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.35;
}

.articles-empty p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* ── Responsive ────────────────────────────────────────────────── */

/* Tablets (2 cols) */
@media (max-width: 1024px) {
    .articles-page-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    .articles-featured-card {
        min-height: 340px;
    }

    .articles-featured-body {
        padding: 32px 32px;
    }
}

/* Small tablets and below — stack featured card */
@media (max-width: 768px) {
    .articles-page-hero {
        padding: 88px 0 28px;
    }

    .articles-controls {
        gap: 12px;
        padding: 12px 0;
    }

    .articles-search-wrap {
        flex: 1 1 100%;
        order: -1;
    }

    .articles-filters-row {
        width: 100%;
        gap: 10px;
    }

    .articles-filter-tabs {
        flex: 1 1 auto;
    }

    .articles-date-filter {
        flex-shrink: 0;
    }

    .articles-date-select {
        padding: 0 28px 0 32px;
        font-size: 0.78rem;
    }

    .articles-featured-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .articles-featured-img {
        height: 240px;
        min-height: 0;
    }

    .articles-featured-body {
        padding: 26px 24px 28px;
    }
}

/* Mobile (1 col) */
@media (max-width: 560px) {
    .articles-page-hero {
        padding: 80px 0 24px;
    }

    .articles-page-hero h1 {
        font-size: 2rem;
    }

    .articles-page-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .articles-filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .articles-date-filter {
        width: 100%;
    }

    .articles-date-select {
        width: 100%;
        height: 40px;
    }

    .articles-featured-img {
        height: 200px;
    }

    .articles-featured-body {
        padding: 22px 20px 24px;
    }
}
