/* Articles section styles */
.articles-section { padding: 16px 0 64px; }
.articles-section h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; margin-bottom: 8px; color: #1d1d1f; letter-spacing: -0.01em; }
.articles-section .articles-subtitle { color: #6e6e73; margin-bottom: 24px; font-size: 1rem; }

.articles-category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.articles-category-chips .chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    border: 1px solid #d2d2d7; background: #fff; color: #1d1d1f;
    text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: all 0.18s ease;
}
.articles-category-chips .chip:hover { border-color: #5A5C64; background: #f5f5f7; color: #000; }
.articles-category-chips .chip.active { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.articles-category-chips .chip .count { color: inherit; opacity: 0.6; font-weight: 400; font-size: 0.8rem; }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.article-card {
    display: flex; flex-direction: column; overflow: hidden; background: #fff;
    border-radius: 14px; border: 1px solid #e5e5ea; text-decoration: none;
    color: #1d1d1f; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); border-color: #d2d2d7; color: #1d1d1f; }
.article-card__cover { aspect-ratio: 16/9; background: #f5f5f7 center/cover no-repeat; display: block; }
.article-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card__cat { font-size: 0.75rem; color: #5A5C64; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.article-card__title { font-size: 1.05rem; font-weight: 600; line-height: 1.35; margin: 0; color: #1d1d1f; }
.article-card__excerpt { font-size: 0.9rem; color: #515154; line-height: 1.5; flex: 1; }
.article-card__meta { display: flex; gap: 12px; font-size: 0.78rem; color: #86868b; margin-top: auto; padding-top: 8px; }
.article-card__meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Article page */
.article-page { padding: 16px 0 64px; }
.article-hero { margin-bottom: 24px; }
.article-hero__cover {
    width: 100%; aspect-ratio: 21/9; max-height: 480px; object-fit: cover;
    border-radius: 16px; background: #f5f5f7;
}
.article-page h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; color: #1d1d1f; line-height: 1.2; margin: 16px 0 12px; letter-spacing: -0.01em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.88rem; color: #6e6e73; margin-bottom: 24px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .cat-pill {
    padding: 3px 10px; background: #f5f5f7; border-radius: 999px;
    color: #1d1d1f; text-decoration: none; font-weight: 500;
}

.article-content { font-size: 1.08rem; line-height: 1.75; color: #1d1d1f; max-width: 1200px; margin: 0 auto; }
.article-content > * { margin-bottom: 1.1em; }
.article-content h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); font-weight: 700; margin: 2em 0 0.6em; color: #1d1d1f; letter-spacing: -0.01em; }
.article-content h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 600; margin: 1.6em 0 0.5em; color: #1d1d1f; }
.article-content h4 { font-size: 1.08rem; font-weight: 600; margin: 1.4em 0 0.4em; color: #1d1d1f; }
.article-content p { margin: 0 0 1em; }
.article-content a { color: #0071e3; text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content blockquote {
    border-left: 3px solid #5A5C64; padding: 8px 0 8px 20px;
    color: #3d3d41; font-style: italic; background: #fafafa; border-radius: 0 8px 8px 0;
}
.article-content ul, .article-content ol { padding-left: 1.3em; }
.article-content li { margin-bottom: 0.35em; }
.article-content pre {
    background: #1d1d1f; color: #f5f5f7; padding: 16px 18px;
    border-radius: 10px; overflow-x: auto; font-size: 0.9rem; line-height: 1.5;
}
.article-content code { background: #f5f5f7; padding: 2px 6px; border-radius: 4px; font-size: 0.92em; }
.article-content pre code { background: transparent; padding: 0; color: inherit; }
.article-content img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 1em auto; }
.article-content figure { margin: 1.6em 0; }
.article-content figcaption { text-align: center; color: #6e6e73; font-size: 0.85rem; margin-top: 8px; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.95rem; }
.article-content th, .article-content td { border: 1px solid #e5e5ea; padding: 10px 14px; text-align: left; }
.article-content th { background: #f5f5f7; font-weight: 600; }

.article-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid #e5e5ea; }
.article-related h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 18px; color: #1d1d1f; }

.articles-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.articles-pagination a, .articles-pagination span {
    min-width: 40px; padding: 8px 14px; border-radius: 10px;
    background: #fff; border: 1px solid #e5e5ea; color: #1d1d1f;
    text-decoration: none; font-size: 0.92rem; text-align: center; font-weight: 500;
}
.articles-pagination a:hover { background: #f5f5f7; border-color: #d2d2d7; }
.articles-pagination .current { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
.articles-pagination .disabled { opacity: 0.4; pointer-events: none; }

.articles-empty { text-align: center; padding: 56px 20px; color: #6e6e73; background: #fafafa; border-radius: 12px; }
.articles-empty .icon { font-size: 2.4rem; margin-bottom: 12px; color: #c7c7cc; }

@media (max-width: 1024px) {
    .article-content { font-size: 1.05rem; line-height: 1.7; }
}

@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; gap: 16px; }
    .article-card__body { padding: 14px 16px 18px; }
    .article-hero__cover { aspect-ratio: 16/9; border-radius: 12px; }
    .article-content { font-size: 1rem; line-height: 1.65; }
    .article-content h2 { margin: 1.6em 0 0.5em; }
    .article-content h3 { margin: 1.3em 0 0.4em; }
}
