/* ============================================
   甫東科技 — Articles / Industry News
   Listing + Detail Page Styles
   ============================================ */

:root {
    --primary: #2563eb;
    --accent: #d15b27;
    --accent-light: #fb923c;
    --bg-cream: #f6f1eb;
    --bg-white: #fafaf9;
    --bg-dark: #0f1923;
    --text-dark: #1c1917;
    --text-muted: #78716c;
    --text-light: #a8a29e;
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(255, 255, 255, 0.1);
    --ink-blue: #0f1923;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Outfit', 'Noto Sans TC', sans-serif;
    --font-zh: 'Noto Sans TC', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --radius: 12px;
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg-white); color: var(--text-dark); font-family: var(--font-sans); overflow-x: hidden; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link { position: absolute; top: -100%; left: 16px; z-index: 100001; padding: 12px 24px; background: var(--accent); color: #fff; font-weight: 700; border-radius: 0 0 8px 8px; transition: top 0.2s; }
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- Navbar ---- */
.navbar { position: fixed; top: 0; width: 100%; padding: 16px 48px; z-index: 1000; background: rgba(250,250,249,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--border); }
.nav-container { width: 100%; max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 36px; width: auto; }
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-link { font-size: 0.9rem; letter-spacing: 0.5px; font-weight: 500; position: relative; transition: color 0.3s; }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.3s var(--ease-out); }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link.active::after { width: 100%; }
.btn-contact { border: 1.5px solid var(--text-dark); padding: 8px 24px; border-radius: 30px; transition: background 0.3s, color 0.3s; }
.btn-contact:hover, .btn-contact:focus-visible { background: var(--text-dark); color: #fff; }
.btn-contact::after { display: none; }

.menu-toggle { display: none; background: none; border: none; width: 28px; height: 20px; position: relative; cursor: pointer; z-index: 1001; padding: 0; }
.menu-toggle span { display: block; width: 100%; height: 2px; background: var(--text-dark); position: absolute; left: 0; transition: all 0.4s var(--ease-out); border-radius: 2px; }
.menu-toggle span:first-child { top: 2px; }
.menu-toggle span:last-child { bottom: 2px; }
.menu-toggle.active span:first-child { top: 50%; transform: translateY(-50%) rotate(45deg); }
.menu-toggle.active span:last-child { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Mobile menu */
.mobile-menu { position: fixed; inset: 0; z-index: 999; background: var(--bg-cream); opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease-out); overflow-y: auto; }
.mobile-menu::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(ellipse at 30% 20%, rgba(209,91,39,0.06), transparent 50%), radial-gradient(ellipse at 80% 80%, rgba(37,99,235,0.04), transparent 50%); }
.mobile-menu.active { opacity: 1; pointer-events: all; }
.mobile-menu-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 100px 28px 40px; gap: 36px; position: relative; z-index: 1; }
.mm-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 28px; border-bottom: 1px solid rgba(28,25,23,0.08); }
.mm-brand-en { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 400; font-style: italic; color: var(--text-dark); letter-spacing: 0.5px; }
.mm-brand-zh { font-size: 0.8rem; font-weight: 500; letter-spacing: 3px; color: var(--text-muted); }
.mm-nav { display: flex; flex-direction: column; gap: 2px; }
.mm-link { display: flex; align-items: center; gap: 16px; padding: 18px 14px; border-radius: 12px; transition: background 0.25s var(--ease-out); color: var(--text-dark); opacity: 0; transform: translateX(-16px); }
.mobile-menu.active .mm-link { opacity: 1; transform: translateX(0); }
.mm-link:hover { background: rgba(28,25,23,0.04); }
.mm-link-active { background: rgba(209,91,39,0.07); }
.mm-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); opacity: 0.7; }
.mm-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.mm-label { font-family: var(--font-serif); font-size: 0.65rem; font-style: italic; letter-spacing: 1px; color: var(--text-light); }
.mm-title { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.3px; }
.mm-arrow { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-light); opacity: 0.4; transition: color 0.25s, transform 0.25s; }
.mm-link:hover .mm-arrow { color: var(--accent); opacity: 1; transform: translateX(3px); }
.mm-cta { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 28px; background: var(--text-dark); color: #fff; border-radius: 50px; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.5px; transition: all 0.3s var(--ease-out); opacity: 0; transform: translateY(8px); }
.mobile-menu.active .mm-cta { opacity: 1; transform: translateY(0); }
.mm-cta:hover { background: var(--accent); }
.mm-cta-icon { width: 18px; height: 18px; }
.mm-footer { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 20px; border-top: 1px solid rgba(28,25,23,0.06); opacity: 0; }
.mobile-menu.active .mm-footer { opacity: 1; }
.mm-footer a, .mm-footer span { font-size: 0.75rem; color: var(--text-light); letter-spacing: 0.5px; }
.mm-footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-light); opacity: 0.3; display: inline-block; }

/* ============================================
   ARTICLES HERO
   ============================================ */
.articles-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--ink-blue);
    padding: 160px 24px 80px;
}

.articles-hero .hero-label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(20px);
}

.articles-hero .hero-title {
    font-family: var(--font-zh);
    font-weight: 700;
    font-size: clamp(32px, 5vw, 56px);
    color: var(--bg-cream);
    margin-bottom: 16px;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(20px);
}

.articles-hero .hero-subtitle {
    font-family: var(--font-zh);
    font-size: 17px;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto 20px;
    line-height: 1.75;
    opacity: 0;
    transform: translateY(20px);
}
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateY(16px);
    animation: heroFadeUp 0.7s 0.7s var(--ease-out) forwards;
}
.hero-stats strong { color: var(--accent); font-weight: 700; }
.stat-sep { color: var(--text-light); }
@keyframes heroFadeUp { to { opacity: 1; transform: none; } }

/* ============================================
   CATEGORY FILTER PILLS
   ============================================ */
.articles-filter {
    background: var(--bg-white);
    padding: 32px 24px;
    position: sticky;
    top: 68px;
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

.articles-filter-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.articles-filter-inner::-webkit-scrollbar { display: none; }

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    background: transparent;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    text-decoration: none;
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.filter-pill .pill-count {
    font-size: 12px;
    opacity: 0.7;
}

/* ============================================
   ARTICLES GRID
   ============================================ */
.articles-grid-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 32px 80px;
}

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

.articles-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
    font-size: 17px;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
@keyframes skeletonShimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #ede9e4 25%, #f5f2ef 50%, #ede9e4 75%);
    background-size: 600px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}

.articles-skeleton {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    transition: opacity 0.4s ease;
}

.articles-skeleton.hidden {
    display: none;
}

.skeleton-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(90deg, #ede9e4 25%, #f5f2ef 50%, #ede9e4 75%);
    background-size: 600px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

.skeleton-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-meta {
    width: 55%;
    height: 10px;
    background: linear-gradient(90deg, #ede9e4 25%, #f5f2ef 50%, #ede9e4 75%);
    background-size: 600px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-title {
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, #ede9e4 25%, #f5f2ef 50%, #ede9e4 75%);
    background-size: 600px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-title.sk-short { width: 70%; }

.skeleton-text {
    width: 100%;
    height: 11px;
    background: linear-gradient(90deg, #ede9e4 25%, #f5f2ef 50%, #ede9e4 75%);
    background-size: 600px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text.sk-xs { width: 50%; }

/* ── Grid loading overlay (filter click) ── */
.articles-grid-section.grid-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(246, 241, 235, 0.72);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.articles-grid-section {
    position: relative;
}

/* ---- Article Card ---- */
.article-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
    opacity: 0;
    transform: translateY(30px);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.article-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.article-card:hover .article-card-img img {
    transform: scale(1.06);
}

.article-badge-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    letter-spacing: 1px;
}

.article-card-body {
    padding: 18px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.article-card-category {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card-meta time {
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.3px;
}

.article-card-title {
    font-family: var(--font-zh);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.article-card:hover .article-card-title {
    color: var(--accent);
}

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

/* Card footer (more + views) */
.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.article-card-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.22s var(--ease-out);
}
.article-card:hover .article-card-more {
    gap: 9px;
}
.article-card-views {
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.3px;
}

/* Featured card variant */
.article-card--featured {
    border: 2px solid rgba(209,91,39,0.20);
}
.article-card--featured .article-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(209,91,39,0.08), transparent);
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   PAGINATION
   ============================================ */
.article-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
    padding: 24px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1.5px solid var(--border);
    text-decoration: none;
    transition: all 0.25s var(--ease-out);
    cursor: pointer;
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    pointer-events: none;
}

.page-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.page-ellipsis {
    color: var(--text-light);
    padding: 0 4px;
    font-size: 14px;
}

/* Results info bar */
.articles-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto 0;
    padding: 14px 32px 0;
    font-size: 13px;
    color: var(--text-light);
}

.articles-results-bar strong {
    color: var(--accent);
}

/* Grid loading overlay spinner */
.articles-grid-section.grid-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(246, 241, 235, 0.8);
    backdrop-filter: blur(3px);
    z-index: 20;
    border-radius: 8px;
    animation: fadeInOverlay 0.2s ease forwards;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================
   CTA SECTION
   ============================================ */
.articles-cta {
    background: var(--ink-blue);
    padding: 80px 24px;
    text-align: center;
}

.articles-cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.articles-cta h2 {
    font-family: var(--font-zh);
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 700;
    color: var(--bg-cream);
    margin-bottom: 24px;
    line-height: 1.4;
}

.articles-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out);
    text-decoration: none;
}

.articles-cta .cta-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.articles-cta .cta-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   FOOTER (same as other pages)
   ============================================ */
.footer { background: var(--ink-blue); color: rgba(255,255,255,0.6); padding: 80px 48px 32px; }
.footer-main { max-width: 1280px; margin: 0 auto; }
.footer-logo { font-family: var(--font-serif); font-size: clamp(48px, 8vw, 100px); color: rgba(255,255,255,0.04); letter-spacing: 8px; font-weight: 900; text-align: center; margin-bottom: 48px; user-select: none; display: flex; justify-content: center; gap: 4px; }
.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: 0.5px; }
.footer-col address p, .footer-col nav a { font-size: 13px; line-height: 2; display: block; transition: color 0.2s; }
.footer-col nav a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 12px; }

/* ============================================
   ARTICLE DETAIL — HERO
   ============================================ */
.article-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 160px 24px 60px;
    overflow: hidden;
    color: #fff;
}

.article-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.article-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(15, 25, 35, 0.92) 0%, rgba(15, 25, 35, 0.5) 50%, rgba(15, 25, 35, 0.3) 100%);
}

.article-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.article-hero-category {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 50px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.article-hero-title {
    font-family: var(--font-zh);
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--bg-cream);
}

.article-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.article-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-hero-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* ============================================
   ARTICLE DETAIL — BREADCRUMB
   ============================================ */
.article-breadcrumb {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px;
    font-size: 13px;
    color: var(--text-light);
}

.article-breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.article-breadcrumb a:hover {
    color: var(--accent);
}

.article-breadcrumb .sep {
    margin: 0 8px;
    opacity: 0.4;
}

.article-breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* ============================================
   ARTICLE DETAIL — LAYOUT
   ============================================ */
.article-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

/* ---- Content Area ---- */
.article-content {
    flex: 1;
    min-width: 0;
}

.article-content-section {
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(24px);
}

.article-content-section h2 {
    font-family: var(--font-zh);
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    color: var(--text-dark);
    line-height: 1.4;
}

.article-field {
    margin-bottom: 20px;
}

.article-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.article-field p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-field img {
    border-radius: var(--radius);
    margin: 12px 0;
    box-shadow: var(--shadow-card);
}

/* ---- Sidebar ---- */
.article-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-card-title {
    font-family: var(--font-zh);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
}

/* Related articles */
.related-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.2s;
}

.related-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-card:hover {
    opacity: 0.75;
}

.related-card-img {
    width: 72px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-body {
    flex: 1;
    min-width: 0;
}

.related-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.related-card-date {
    font-size: 12px;
    color: var(--text-light);
}

/* Sidebar categories */
.sidebar-cat-list {
    list-style: none;
}

.sidebar-cat-list li {
    margin-bottom: 0;
}

.sidebar-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

.sidebar-cat-list li:last-child a {
    border-bottom: none;
}

.sidebar-cat-list a:hover {
    color: var(--accent);
}

.sidebar-cat-count {
    font-size: 12px;
    color: var(--text-light);
    background: rgba(0,0,0,0.04);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ============================================
   LOADER (same as other pages)
   ============================================ */
#loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

body:not(.loading) #loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content { text-align: center; }
.loader-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.loader-en { font-family: var(--font-serif); font-size: 20px; font-style: italic; color: var(--text-dark); letter-spacing: 1px; }
.loader-divider { width: 1px; height: 20px; background: var(--text-light); opacity: 0.3; }
.loader-zh { font-family: var(--font-zh); font-size: 14px; font-weight: 500; color: var(--text-muted); letter-spacing: 3px; }
.loader-bar { width: 160px; height: 2px; background: rgba(0,0,0,0.06); border-radius: 2px; overflow: hidden; }
.loader-bar-fill { width: 0; height: 100%; background: var(--accent); border-radius: 2px; animation: loaderFill 1.2s var(--ease-out) forwards; }
@keyframes loaderFill { to { width: 100%; } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1280px) {
    .articles-grid,
    .articles-skeleton {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .articles-grid-section {
        padding: 40px 24px 72px;
    }

    .article-layout {
        gap: 32px;
    }

    .article-sidebar {
        width: 260px;
    }
}

@media (max-width: 900px) {
    .articles-grid,
    .articles-skeleton {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .navbar { padding: 14px 20px; }
    .nav-links { display: none; }
    .menu-toggle { display: block; }

    .articles-hero { padding: 120px 20px 60px; min-height: 40vh; }

    .articles-filter { top: 56px; padding: 20px; }

    .articles-grid,
    .articles-skeleton {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .articles-grid-section {
        padding: 28px 16px 56px;
    }

    .article-card-title { font-size: 15px; }
    .article-card-body { padding: 14px; }

    /* Detail */
    .article-hero { min-height: 45vh; padding: 120px 20px 40px; }
    .article-hero-title { font-size: clamp(24px, 6vw, 36px); }
    .article-hero-meta { flex-wrap: wrap; gap: 10px; font-size: 13px; }

    .article-breadcrumb { padding: 16px 20px; }

    .article-layout {
        flex-direction: column;
        padding: 0 20px 60px;
    }

    .article-sidebar {
        width: 100%;
        position: static;
    }

    .article-content-section h2 { font-size: 22px; }

    /* Footer */
    .footer { padding: 60px 20px 24px; }
    .footer-content { grid-template-columns: 1fr; gap: 32px; }

    /* CTA */
    .articles-cta { padding: 60px 20px; }
}

@media (max-width: 540px) {
    .articles-grid,
    .articles-skeleton {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .article-card-title { font-size: 17px; }
    .article-card-body { padding: 16px; }
}

@media (max-width: 480px) {
    .article-card-img { aspect-ratio: 16 / 9; }
    .article-pagination { gap: 4px; }
    .page-btn { min-width: 36px; height: 36px; font-size: 13px; }
}
