/* ============================================================
   SpinMac CN — Blog Listing Page Styles
   Design: blue-corporate editorial (matches index.html / pricing.html)
   Nav / footer styles handled by components.js — not here.
   ============================================================ */

:root {
    --tc-blue:       #0052D9;
    --tc-blue-dark:  #003399;
    --tc-blue-pale:  #7eb3ff;
    --tc-dark:       #1A1C1F;
    --tc-dark-panel: #24272C;
    --tc-gray-bg:    #F4F5F7;
    --tc-text-main:  #111111;
    --tc-text-muted: #7A828A;
    --tc-border:     #E8EBEF;

    --font-family: 'Inter', "PingFang SC", "Microsoft YaHei",
                   -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --max-width:   1400px;
    --nav-height:  64px;
    --transition:  all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    color: var(--tc-text-main);
    background-color: #fff;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a  { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* ---- Layout ---- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ---- Arrow text link ---- */
.link-arrow {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 300;
    color: var(--tc-text-main);
}
.link-arrow::after {
    content: '→';
    margin-left: 8px;
    font-family: Arial, sans-serif;
    transition: transform 0.3s ease;
}
.link-arrow:hover           { color: var(--tc-blue); }
.link-arrow:hover::after    { transform: translateX(5px); }
.link-arrow.light           { color: #fff; }
.link-arrow.light:hover     { color: rgba(255,255,255,0.7); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
    font-family: var(--font-family);
    transition: var(--transition);
}
.btn-primary             { background-color: var(--tc-blue); color: #fff; }
.btn-primary:hover       { background-color: var(--tc-blue-dark); box-shadow: 0 8px 20px rgba(0,82,217,0.2); }
.btn-outline             { border-color: var(--tc-text-main); color: var(--tc-text-main); background: transparent; }
.btn-outline:hover       { background: var(--tc-text-main); color: #fff; }
.btn-outline-light       { border: 1px solid rgba(255,255,255,0.45); color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--tc-blue); }

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   1. HERO — dark photo backdrop, left-aligned editorial header
   ============================================================ */
.blog-hero {
    padding-top:    calc(var(--nav-height) + 100px);
    padding-bottom: 100px;
    color: #fff;
    position: relative;
    overflow: hidden;
    background-image: url('../../resources/image/pricing-hero-bg.jpg');
    background-size: cover;
    background-position: 65% center;
    background-color: #080c18;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgba(6, 10, 28, 0.98) 0%,
        rgba(6, 10, 28, 0.94) 35%,
        rgba(6, 10, 28, 0.75) 55%,
        rgba(6, 10, 28, 0.35) 75%,
        rgba(6, 10, 28, 0.10) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 50% 60% at 3% 100%,
        rgba(0, 82, 217, 0.20) 0%,
        transparent 60%
    );
    z-index: 1;
    pointer-events: none;
}

.blog-hero-inner {
    position: relative;
    z-index: 2;
}

/* Section label above H1 */
.blog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.blog-eyebrow-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--tc-blue);
    box-shadow: 0 0 8px rgba(0,82,217,0.9);
    flex-shrink: 0;
}

.blog-hero h1 {
    font-size: 56px;
    font-weight: 300;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 700px;
}

.blog-hero-sub {
    font-size: 16px;
    font-weight: 300;
    color: rgba(255,255,255,0.55);
    max-width: 560px;
    line-height: 1.9;
    margin-bottom: 56px;
}

/* Stats strip */
.blog-stats {
    display: flex;
    align-items: center;
    gap: 40px;
}
.blog-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.blog-stat .stat-num {
    font-size: 32px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1;
}
.blog-stat .stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 1px;
}
.blog-stat-div {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.12);
}

/* ============================================================
   2. TOPIC TICKER — subtle scrolling tag strip
   ============================================================ */
.ticker-strip {
    background: var(--tc-dark);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 14px 0;
    overflow: hidden;
    white-space: nowrap;
}
.ticker-track {
    display: inline-flex;
    align-items: center;
    animation: ticker-scroll 32s linear infinite;
    will-change: transform;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.30);
    margin-right: 40px;
    flex-shrink: 0;
}
.ticker-item svg { flex-shrink: 0; }
.ticker-sep {
    display: inline-block;
    width: 3px; height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    margin-right: 40px;
    flex-shrink: 0;
}

/* ============================================================
   3. ARTICLE LISTING AREA
   ============================================================ */
.blog-listing {
    background: #fff;
    padding: 80px 0 120px;
}

.listing-head {
    margin-bottom: 40px;
    max-width: 640px;
}

.listing-head h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--tc-text-main);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.listing-head p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--tc-text-muted);
    margin: 0;
}

/* Filter toolbar */
.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 400;
    color: var(--tc-text-muted);
    background: transparent;
    border: 1px solid var(--tc-border);
    border-radius: 2px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.cat-pill:hover              { background: var(--tc-gray-bg); color: var(--tc-text-main); border-color: #d0d5db; }
.cat-pill.active             { background: var(--tc-text-main); color: #fff; border-color: var(--tc-text-main); }
.cat-pill .count             { font-size: 11px; opacity: 0.65; }

/* Result count */
.result-count {
    font-size: 13px;
    font-weight: 300;
    color: var(--tc-text-muted);
    white-space: nowrap;
}
.result-count strong { color: var(--tc-text-main); font-weight: 400; }

/* ============================================================
   4. HERO ARTICLE CARD — latest article, full-width editorial
   ============================================================ */
.article-hero {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    border: 1.5px solid var(--tc-border);
    border-left: 4px solid var(--tc-blue);
    margin-bottom: 0;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    background: linear-gradient(135deg, #f6f9ff 0%, #fff 55%);
    overflow: hidden;
}
.article-hero:hover {
    border-color: rgba(0,82,217,0.30);
    border-left-color: var(--tc-blue);
    box-shadow: 0 16px 48px rgba(0,82,217,0.07), 0 4px 12px rgba(0,0,0,0.03);
    background: linear-gradient(135deg, #eef4ff 0%, #fff 60%);
}

.article-hero-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--tc-dark);
    color: #fff;
    text-align: center;
    gap: 2px;
    flex-shrink: 0;
}
.article-hero-date .date-day {
    font-size: 44px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -1px;
}
.article-hero-date .date-sep {
    font-size: 14px;
    color: rgba(255,255,255,0.25);
    line-height: 1;
    margin: 2px 0;
}
.article-hero-date .date-month {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.70);
}
.article-hero-date .date-year {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    margin-top: 6px;
}

.article-hero-body {
    padding: 44px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.latest-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--tc-blue);
}
.latest-badge::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--tc-blue);
}

.cat-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--tc-text-muted);
    padding: 4px 10px;
    border: 1px solid var(--tc-border);
}

.article-hero-body h2 {
    font-size: 30px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--tc-text-main);
    margin-bottom: 16px;
}
.article-hero-body h2 a       { color: inherit; }
.article-hero-body h2 a:hover { color: var(--tc-blue); }

.article-hero-body .article-excerpt {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.85;
    color: var(--tc-text-muted);
    margin-bottom: 28px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: var(--tc-text-muted);
    font-weight: 300;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.article-meta svg { vertical-align: middle; margin-right: 4px; }

/* ============================================================
   5. ARTICLE LIST — remaining articles, text-only rows
   ============================================================ */
.articles-grid {
    display: flex;
    flex-direction: column;
    border: 1.5px solid var(--tc-border);
    border-top: none;
}

.article-card {
    display: grid;
    grid-template-columns: 88px 1fr 40px;
    align-items: center;
    gap: 0 28px;
    padding: 28px 32px;
    background: #fff;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
    border-bottom: 1px solid var(--tc-border);
}
.article-card:last-child { border-bottom: none; }
.article-card:hover {
    background: var(--tc-gray-bg);
}
.article-card.no-link { cursor: default; }
.article-card.no-link:hover { background: #fff; }
.article-card.no-link .article-card-arrow { opacity: 0; }

.article-card-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    flex-shrink: 0;
}
.article-card-date .date-day {
    font-size: 28px;
    font-weight: 300;
    color: var(--tc-text-main);
    letter-spacing: -0.5px;
}
.article-card-date .date-sep {
    display: none;
}
.article-card-date .date-month {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--tc-text-muted);
    margin-top: 4px;
}
.article-card-date .date-year {
    font-size: 11px;
    font-weight: 300;
    color: var(--tc-text-muted);
    opacity: 0.6;
    margin-top: 2px;
}

.article-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.article-card-body .cat-chip {
    margin-bottom: 10px;
    align-self: flex-start;
}

.article-card-body h3 {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--tc-text-main);
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.article-card-body h3 a       { color: inherit; }
.article-card-body h3 a:hover { color: var(--tc-blue); }

.article-card-body .article-excerpt {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--tc-text-muted);
    margin-bottom: 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-card-meta {
    font-size: 11px;
    color: var(--tc-text-muted);
    font-weight: 300;
}

.article-card-arrow {
    font-size: 18px;
    color: var(--tc-text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
    text-align: right;
    flex-shrink: 0;
}
.article-card:hover .article-card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--tc-blue);
}

/* ============================================================
   6. EMPTY STATE
   ============================================================ */
.articles-empty {
    display: none;
    text-align: center;
    padding: 80px 40px;
}
.articles-empty .empty-icon {
    width: 56px; height: 56px;
    border: 1px solid var(--tc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tc-text-muted);
    margin: 0 auto 24px;
}
.articles-empty h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 10px;
}
.articles-empty p {
    font-size: 14px;
    color: var(--tc-text-muted);
    font-weight: 300;
    margin-bottom: 28px;
}
.articles-empty .btn-reset {
    padding: 10px 28px;
    border: 1px solid var(--tc-border);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    background: transparent;
    font-family: var(--font-family);
    color: var(--tc-text-main);
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
}
.articles-empty .btn-reset:hover { background: var(--tc-text-main); color: #fff; }

/* ============================================================
   7. CTA — bottom call to action
   ============================================================ */
.blog-cta {
    background: var(--tc-dark);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}
.blog-cta h2 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 16px;
}
.blog-cta p {
    font-size: 16px;
    font-weight: 300;
    color: rgba(255,255,255,0.45);
    max-width: 500px;
    margin: 0 auto 44px;
    line-height: 1.85;
}
.blog-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .article-hero {
        grid-template-columns: 1fr;
    }
    .article-hero-date {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 20px 28px;
    }
    .article-hero-date .date-day { font-size: 32px; }
    .article-hero-date .date-sep { margin: 0 4px; }
    .article-hero-date .date-year { margin-top: 0; margin-left: 8px; }
    .article-hero-body { padding: 32px 28px; }
    .article-hero-body h2 { font-size: 24px; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .blog-hero { padding-bottom: 72px; background-position: 70% center; }
    .blog-hero h1 { font-size: 38px; letter-spacing: 1px; }
    .blog-hero-sub { font-size: 15px; }
    .blog-stats { gap: 28px; }
    .blog-stat .stat-num { font-size: 26px; }
    .blog-stat-div { display: none; }
    .article-card {
        grid-template-columns: 64px 1fr 28px;
        gap: 0 16px;
        padding: 22px 20px;
    }
    .article-card-date .date-day { font-size: 22px; }
    .filter-toolbar { flex-direction: column; align-items: flex-start; }
    .blog-cta h2 { font-size: 32px; }
}

@media (max-width: 480px) {
    .blog-hero h1 { font-size: 30px; }
    .article-hero-body { padding: 24px 20px; }
    .article-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .article-card-date {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .article-card-date .date-month,
    .article-card-date .date-year { margin-top: 0; }
    .article-card-arrow {
        display: none;
    }
}
