/* ============================================
   NASDAQ.LTD - Main Stylesheet (BBC-Inspired)
   ============================================ */

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

:root {
    --primary: #b80000;
    --primary-dark: #8b0000;
    --primary-light: #ff1a1a;
    --text: #141414;
    --text-secondary: #545658;
    --text-light: #6e6e73;
    --bg: #ffffff;
    --bg-secondary: #f6f6f6;
    --bg-dark: #1a1a1a;
    --border: #e6e6e6;
    --border-light: #f0f0f0;
    --accent: #0068c9;
    --accent-light: #e6f0fa;
    --success: #0a7e07;
    --warning: #d48400;
    --max-width: 1260px;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: Georgia, "Times New Roman", serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* Top Bar */
.top-bar {
    background: var(--bg-dark);
    color: #ccc;
    font-size: 12px;
    padding: 4px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar a { color: #ccc; }
.top-bar a:hover { color: #fff; }
.top-bar .edition { margin-left: 16px; color: #888; }

/* Header */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.header-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
}
.logo { display: inline-block; }
.logo img { height: 96px; width: auto; }

/* Main Navigation */
.main-nav { border-top: 1px solid var(--border-light); }
.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.main-nav li a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}
.main-nav li a:hover,
.main-nav li a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Breaking News */
.breaking-news {
    background: var(--primary);
    color: #fff;
    padding: 8px 0;
}
.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.breaking-label {
    background: #fff;
    color: var(--primary);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 2px;
}
.breaking-ticker {
    overflow: hidden;
    white-space: nowrap;
}
.breaking-ticker a {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-right: 40px;
}
.breaking-ticker a:hover { text-decoration: underline; }

/* Main Content */
.main-content { padding: 24px 0 48px; min-height: 60vh; }

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.hero-main { position: relative; border-radius: 4px; overflow: hidden; }
.hero-main a { display: block; position: relative; }
.hero-main .hero-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    background: var(--bg-secondary);
}
.hero-main .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 24px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
}
.hero-main h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    line-height: 1.3;
    margin: 8px 0;
    color: #fff;
}
.hero-main p { font-size: 15px; opacity: 0.9; margin-bottom: 8px; }

.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.hero-item { border-radius: 4px; overflow: hidden; flex: 1; }
.hero-item a { display: block; position: relative; }
.hero-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: var(--bg-secondary);
}
.hero-item .hero-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 16px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}
.hero-item h3 { font-size: 16px; line-height: 1.3; color: #fff; font-weight: 600; }

.category-tag {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
}
.category-tag.large { font-size: 13px; padding: 4px 12px; }

.article-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}
.article-meta .separator { opacity: 0.5; }

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}
.main-column { min-width: 0; }

/* Section Block */
.section-block { margin-bottom: 32px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}
.section-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--text);
    position: relative;
}
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}
.see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}
.see-all:hover { text-decoration: underline; }

/* News List */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.news-item:last-child { border-bottom: none; }
.news-thumb { flex-shrink: 0; width: 200px; }
.news-thumb img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-secondary);
}
.news-body { flex: 1; min-width: 0; }
.news-body h3 { font-size: 17px; line-height: 1.3; margin-bottom: 6px; font-weight: 600; }
.news-body h3 a:hover { color: var(--primary); }
.news-body p { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.news-body .article-meta { color: var(--text-light); }
.news-body .category-tag { background: var(--accent); font-size: 10px; }

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.category-card { border-radius: 4px; overflow: hidden; }
.category-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-secondary);
    margin-bottom: 10px;
}
.category-card h3 { font-size: 15px; line-height: 1.3; margin-bottom: 6px; font-weight: 600; }
.category-card .article-meta { color: var(--text-light); margin-top: 4px; }

/* Articles Grid (Category Page) */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.article-card {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.article-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.article-card .card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-secondary);
}
.article-card .card-body { padding: 14px; }
.article-card h3 { font-size: 16px; line-height: 1.3; margin: 8px 0; font-weight: 600; }
.article-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.article-card .article-meta { color: var(--text-light); margin-top: 6px; }

/* Sidebar */
.sidebar { position: sticky; top: 120px; align-self: start; }
.sidebar-widget {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}
.widget-title {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

/* Most Read */
.most-read-list { list-style: none; }
.most-read-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.most-read-list li:last-child { border-bottom: none; }
.most-read-list .rank {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    min-width: 28px;
    font-family: var(--font-heading);
}
.most-read-list a { font-size: 14px; font-weight: 500; line-height: 1.3; }

/* Latest List */
.latest-list { list-style: none; }
.latest-list li { padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.latest-list li:last-child { border-bottom: none; }
.latest-list a { font-size: 14px; font-weight: 500; display: block; margin-bottom: 3px; }
.latest-list .time { font-size: 12px; color: var(--text-light); }

/* Newsletter */
.newsletter-widget p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.newsletter-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 8px;
}
.newsletter-form button {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--primary-dark); }

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: #ccc;
    padding: 40px 0 0;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #333;
}
.footer-col h4 {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #aaa; font-size: 13px; }
.footer-col ul li a:hover { color: #fff; }
.footer-about p { font-size: 13px; line-height: 1.7; color: #999; }
.footer-logo { margin-bottom: 14px; filter: brightness(10); }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-links a { color: #aaa; font-size: 13px; }
.social-links a:hover { color: #fff; }
.footer-bottom {
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* ============================================
   Article Detail Page
   ============================================ */
.article-page .content-grid {
    grid-template-columns: 1fr 300px;
}

.article-detail { max-width: 720px; }

.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

.article-header { margin-bottom: 24px; }
.article-header h1 {
    font-family: var(--font-heading);
    font-size: 36px;
    line-height: 1.2;
    margin: 12px 0;
    color: var(--text);
}
.article-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}
.article-meta-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-secondary);
}
.meta-left { display: flex; gap: 12px; align-items: center; }
.meta-right { display: flex; gap: 12px; align-items: center; }
.meta-right time { color: var(--text-light); }
.views { color: var(--text-light); }

.article-cover { margin-bottom: 24px; }
.article-cover img {
    width: 100%;
    border-radius: 6px;
}

.article-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
}
.article-body h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin: 28px 0 14px;
}
.article-body h3 { font-size: 20px; margin: 22px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin-bottom: 16px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 20px 0;
    background: var(--bg-secondary);
    font-style: italic;
    color: var(--text-secondary);
}
.article-body img {
    border-radius: 6px;
    margin: 16px 0;
}
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.article-body th {
    background: var(--bg-secondary);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--border);
}
.article-body td {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
}
.article-body pre {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}
.article-body code {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 14px;
}
.article-body figcaption {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    margin-top: 6px;
}

/* Article Tags */
.article-tags {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.article-tags span { font-weight: 600; font-size: 14px; }
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.tag:hover { background: var(--accent); color: #fff; }

/* Article Share */
.article-share {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.article-share span { font-weight: 600; }
.article-share a {
    padding: 6px 14px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}
.article-share a:hover { background: var(--accent); color: #fff; }

/* Article End Logo */
.article-end-logo {
    text-align: center;
    margin: 40px 0 24px;
    padding: 24px 0 0;
    border-top: 1px solid var(--border);
}
.article-end-logo img {
    display: block;
    margin: 0 auto 8px;
    border-radius: 8px;
}
.article-end-logo span {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* Related Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.related-card { border-radius: 4px; }
.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-secondary);
    margin-bottom: 10px;
}
.related-card h3 { font-size: 15px; line-height: 1.3; margin-bottom: 4px; }
.related-card .time { font-size: 12px; color: var(--text-light); }

/* Category Header */
.category-header {
    padding: 24px 0 8px;
    margin-bottom: 24px;
    border-bottom: 3px solid var(--primary);
}
.category-header h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    margin-bottom: 6px;
}
.category-header p { color: var(--text-secondary); font-size: 15px; }

/* Search */
.search-header { padding: 24px 0 8px; }
.search-header h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 16px;
}
.search-form-large { display: flex; gap: 8px; margin-bottom: 24px; }
.search-form-large input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}
.search-form-large input:focus { outline: none; border-color: var(--primary); }
.search-form-large button {
    padding: 14px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.search-form-large button:hover { background: var(--primary-dark); }
.results-count { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.search-results-list { display: flex; flex-direction: column; gap: 16px; }
.search-result-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.result-thumb { flex-shrink: 0; width: 180px; }
.result-thumb img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-secondary);
}
.result-body { flex: 1; }
.result-body h3 { font-size: 17px; margin: 8px 0 6px; }
.result-body p { font-size: 14px; color: var(--text-secondary); }
.result-body .article-meta { color: var(--text-light); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.page-num, .page-prev, .page-next {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.page-num:hover, .page-prev:hover, .page-next:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-num.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Static Page Content (About, Contact, Privacy, Terms) */
.page-content { max-width: 800px; }
.page-content h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    margin-bottom: 24px;
}
.page-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
}
.page-body h2 {
    font-family: var(--font-heading);
    margin: 24px 0 12px;
    font-size: 22px;
}
.page-body h3 { font-size: 19px; margin: 20px 0 10px; }
.page-body p { margin-bottom: 16px; }
.page-body ul, .page-body ol { padding-left: 24px; margin-bottom: 16px; }
.page-body li { margin-bottom: 6px; }
.page-body a { color: var(--accent); text-decoration: underline; }
.page-body a:hover { color: var(--primary); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light);
}
.empty-state p { font-size: 16px; }

/* ============================================
   Responsive Design - Mobile First Enhancements
   ============================================ */

/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
    .hero-section { grid-template-columns: 1fr; }
    .hero-main .hero-img { height: 300px; }
    .hero-secondary { flex-direction: row; }
    .hero-item img { height: 160px; }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .article-page .content-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .articles-grid { grid-template-columns: 1fr 1fr; }
    .article-detail { max-width: 100%; }
}

/* ---------- Small Tablet / Large Phone (≤768px) ---------- */
@media (max-width: 768px) {
    html { font-size: 15px; }

    /* Header */
    .header-main { padding: 10px 0; }
    .logo img { height: 54px; }
    .site-header { position: sticky; top: 0; }

    /* Navigation - scrollable tabs */
    .main-nav ul {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .main-nav ul::-webkit-scrollbar { display: none; }
    .main-nav li a { padding: 10px 14px; font-size: 13px; white-space: nowrap; }

    /* Top Bar */
    .top-bar { font-size: 11px; padding: 3px 0; }
    .top-bar .container { flex-wrap: wrap; gap: 2px; }
    .top-bar .edition { display: none; }

    /* Hero */
    .hero-main .hero-img { height: 240px; }
    .hero-main .hero-content { padding: 40px 16px 16px; }
    .hero-main h1 { font-size: 22px; }
    .hero-main p { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .hero-secondary { flex-direction: column; gap: 8px; }
    .hero-item img { height: 140px; }
    .hero-item h3 { font-size: 15px; }

    /* Content */
    .main-content { padding: 16px 0 32px; }
    .container { padding: 0 12px; }

    /* Section */
    .section-block { margin-bottom: 24px; }
    .section-header h2 { font-size: 18px; }
    .section-header h2::after { bottom: -12px; width: 32px; height: 2px; }

    /* News List */
    .news-item { flex-direction: column; gap: 10px; }
    .news-thumb { width: 100%; }
    .news-thumb img { height: 200px; }
    .news-body h3 { font-size: 16px; }

    /* Category & Article Grids */
    .category-grid { grid-template-columns: 1fr; gap: 16px; }
    .category-card img { height: 200px; }
    .articles-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .article-card .card-image img { height: 140px; }
    .article-card h3 { font-size: 14px; }

    /* Related */
    .related-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .related-card img { height: 120px; }
    .related-card h3 { font-size: 14px; }

    /* Search */
    .search-form-large input { padding: 12px 14px; font-size: 15px; }
    .search-form-large button { padding: 12px 20px; font-size: 15px; }
    .search-result-item { flex-direction: column; }
    .result-thumb { width: 100%; }
    .result-thumb img { height: 180px; }
    .result-body h3 { font-size: 16px; }

    /* Pagination */
    .pagination { gap: 4px; }
    .page-num, .page-prev, .page-next { padding: 6px 10px; font-size: 13px; }

    /* Sidebar */
    .sidebar { margin-top: 24px; }
    .sidebar-widget { padding: 14px; }

    /* Footer */
    .site-footer { padding: 28px 0 0; margin-top: 32px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 24px; }
    .footer-logo { height: 28px; }
    .footer-col h4 { font-size: 13px; margin-bottom: 10px; }
    .footer-col ul li { margin-bottom: 6px; }
    .footer-col ul li a { font-size: 12px; }

    /* ===== Article Detail (768px) ===== */
    .article-page .main-content { padding: 12px 0 32px; }

    .breadcrumb { font-size: 12px; margin-bottom: 10px; }

    .article-header h1 { font-size: 24px; line-height: 1.3; margin: 10px 0; }
    .article-subtitle { font-size: 16px; }

    .article-meta-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 12px;
        padding: 10px 0;
    }
    .meta-left, .meta-right { flex-wrap: wrap; gap: 8px; }

    .article-body { font-size: 16px; line-height: 1.75; }
    .article-body h2 { font-size: 21px; margin: 24px 0 12px; }
    .article-body h3 { font-size: 18px; margin: 20px 0 10px; }
    .article-body blockquote { padding: 10px 14px; margin: 16px 0; }
    .article-body ul, .article-body ol { padding-left: 20px; }

    .article-share { flex-wrap: wrap; }
    .article-share a { padding: 5px 12px; font-size: 12px; }

    .article-end-logo { margin: 32px 0 20px; padding: 20px 0 0; }
    .article-end-logo img { width: 64px; height: 64px; }

    /* Static Pages */
    .page-content h1 { font-size: 26px; }
    .page-body { font-size: 16px; }
    .page-body h2 { font-size: 20px; }
}

/* ---------- Phone (≤480px) ---------- */
@media (max-width: 480px) {
    html { font-size: 14px; }

    /* Header */
    .header-main { padding: 8px 0; }
    .logo img { height: 45px; }
    .main-nav li a { padding: 8px 12px; font-size: 12px; }

    /* Top Bar - simplify */
    .top-bar .date { display: none; }
    .top-bar .top-bar-left::after { content: 'International Edition'; font-size: 11px; color: #888; }

    /* Hero */
    .hero-section { margin-bottom: 20px; }
    .hero-main .hero-img { height: 200px; }
    .hero-main .hero-content { padding: 30px 12px 12px; }
    .hero-main h1 { font-size: 19px; }
    .hero-main p { font-size: 13px; }
    .hero-item img { height: 120px; }
    .hero-item .hero-item-content { padding: 24px 10px 10px; }
    .hero-item h3 { font-size: 14px; }
    .category-tag { font-size: 10px; padding: 2px 6px; }
    .category-tag.large { font-size: 11px; padding: 3px 8px; }

    /* Breaking News */
    .breaking-news { padding: 6px 0; }
    .breaking-label { font-size: 10px; padding: 1px 6px; }
    .breaking-ticker a { font-size: 12px; margin-right: 24px; }

    /* News List */
    .news-thumb img { height: 170px; }
    .news-body h3 { font-size: 15px; }
    .news-body p { font-size: 13px; }
    .article-meta { font-size: 11px; }

    /* Category Grid */
    .category-card img { height: 180px; }
    .category-card h3 { font-size: 14px; }

    /* Article Grid */
    .articles-grid { grid-template-columns: 1fr; }
    .article-card .card-image img { height: 180px; }

    /* Related Grid */
    .related-grid { grid-template-columns: 1fr; }
    .related-card img { height: 160px; }

    /* Search */
    .search-header h1 { font-size: 22px; }
    .search-form-large { flex-direction: column; }
    .search-form-large button { width: 100%; }
    .result-thumb img { height: 160px; }

    /* Pagination */
    .page-num, .page-prev, .page-next { padding: 5px 8px; font-size: 12px; }

    /* Sidebar */
    .widget-title { font-size: 16px; }
    .most-read-list .rank { font-size: 18px; min-width: 24px; }
    .most-read-list a, .latest-list a { font-size: 13px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .site-footer { padding: 24px 0 0; }
    .footer-bottom { font-size: 11px; padding: 12px 0; }

    /* Newsletter */
    .newsletter-widget p { font-size: 12px; }
    .newsletter-form input[type="email"] { padding: 8px 10px; font-size: 13px; }
    .newsletter-form button { padding: 8px; font-size: 13px; }

    /* ===== Article Detail (480px) ===== */
    .article-header h1 { font-size: 20px; }
    .article-subtitle { font-size: 14px; }

    .article-body {
        font-size: 15px;
        line-height: 1.7;
    }
    .article-body h2 { font-size: 19px; margin: 20px 0 10px; }
    .article-body h3 { font-size: 17px; margin: 16px 0 8px; }
    .article-body p { margin-bottom: 12px; }
    .article-body blockquote { padding: 8px 12px; margin: 12px 0; font-size: 14px; border-left-width: 3px; }
    .article-body ul, .article-body ol { padding-left: 18px; }

    /* Article images: full width on small screens */
    .article-cover { margin: 0 -12px 16px; }
    .article-cover img { border-radius: 0; }

    /* Make embedded images in article body expand beyond padding */
    .article-body img {
        width: calc(100% + 24px);
        max-width: calc(100% + 24px);
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
    }

    /* Responsive table wrapper */
    .article-body table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 12px;
    }
    .article-body table th,
    .article-body table td {
        padding: 6px 8px;
        white-space: nowrap;
    }

    /* Responsive iframe (YouTube, etc.) */
    .article-body iframe,
    .article-body video,
    .article-body embed {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9;
    }

    /* Make figure/captions responsive */
    .article-body figure {
        margin: 0 -12px 16px;
    }
    .article-body figure img {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
    .article-body figcaption {
        padding: 0 12px;
        font-size: 12px;
    }

    /* Pre/code blocks */
    .article-body pre {
        margin: 0 -12px 12px;
        border-radius: 0;
        padding: 12px;
        font-size: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .article-body code {
        font-size: 13px;
        word-break: break-all;
    }

    /* Article Tags */
    .article-tags { margin-top: 24px; padding-top: 12px; gap: 6px; }
    .article-tags span { font-size: 13px; }
    .tag { padding: 3px 10px; font-size: 11px; }

    /* Article Share */
    .article-share { gap: 6px; }
    .article-share span { font-size: 13px; }
    .article-share a { padding: 4px 10px; font-size: 11px; }

    /* Article End Logo */
    .article-end-logo { margin: 24px 0 16px; padding: 16px 0 0; }
    .article-end-logo img { width: 56px; height: 56px; }
    .article-end-logo span { font-size: 12px; }

    /* Category Header */
    .category-header h1 { font-size: 24px; }
    .category-header p { font-size: 14px; }

    /* Static Pages */
    .page-content h1 { font-size: 22px; margin-bottom: 16px; }
    .page-body { font-size: 15px; line-height: 1.7; }
    .page-body h2 { font-size: 18px; margin: 18px 0 10px; }
    .page-body h3 { font-size: 16px; }
    .page-body ul, .page-body ol { padding-left: 20px; }
    .page-body p { margin-bottom: 12px; }
}

/* ---------- Extra Small (≤360px) ---------- */
@media (max-width: 360px) {
    .logo img { height: 39px; }
    .main-nav li a { padding: 7px 10px; font-size: 11px; }
    .hero-main .hero-img { height: 170px; }
    .hero-main h1 { font-size: 17px; }
    .hero-item img { height: 100px; }
    .article-header h1 { font-size: 18px; }
    .article-body { font-size: 14px; }
    .article-body h2 { font-size: 17px; }
    .article-body h3 { font-size: 15px; }
}

/* ---------- Landscape Phone Fix ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-main .hero-img { height: 160px; }
    .site-header { position: static; }
    .sidebar { position: static; }
}

/* ---------- Touch-Friendly Enhancements ---------- */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets for touch */
    .main-nav li a { padding: 12px 16px; }
    .page-num, .page-prev, .page-next { padding: 8px 12px; min-width: 36px; text-align: center; }
    .article-share a { padding: 6px 14px; }
    .tag { padding: 5px 12px; }
    .search-form-large button { min-height: 44px; }

    /* Remove hover states that stick on mobile */
    .news-item:hover, .article-card:hover, .category-card:hover {
        box-shadow: none;
    }

    /* Add active (tap) state */
    .news-item:active, .article-card:active, .category-card:active {
        background: var(--bg-secondary);
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .top-bar, .site-header, .sidebar, .site-footer, .article-share,
    .article-tags, .related-grid, .section-block, .breaking-news {
        display: none !important;
    }
    .content-grid { display: block !important; }
    .article-detail { max-width: 100% !important; }
    .article-body { font-size: 13px; line-height: 1.5; }
    .article-header h1 { font-size: 22px; }
}
