:root {
    --primary: #B71C1C;
    --primary-dark: #8f1515;
    --secondary: #111111;
    --bg: #F7F7F7;
    --card: #FFFFFF;
    --accent: #D4AF37;
    --border: #e6e6e6;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --radius: 4px;
}

* { box-sizing: border-box; }

body.site {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.site a { color: inherit; text-decoration: none; }
.site h1, .site h2, .site h3, .site h4 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    margin: 0;
    font-weight: 700;
    color: var(--secondary);
}

.site-container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Utility bar ---------- */
.site-utility { background: var(--secondary); color: #d1d1d1; font-size: 12px; }
.site-utility .site-container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.site-utility a { color: #d1d1d1; }
.site-utility a:hover { color: #fff; }
.util-left { display: flex; align-items: center; gap: 10px; }
.util-sep { color: #444; }
.util-right { display: flex; align-items: center; gap: 16px; }
.util-currency strong { color: var(--accent); font-weight: 700; }

.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.site-header .site-container { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px; gap: 20px; }
.site-logo img { height: 56px; display: block; }
.site-header-actions { display: flex; align-items: center; gap: 22px; font-size: 13px; font-weight: 600; color: var(--secondary); }
.site-header-actions a:hover { color: var(--primary); }

/* ---------- Nav ---------- */
.site-nav-wrap { background: var(--secondary); border-top: 3px solid var(--primary); }
.site-nav-wrap .pub-nav { background: transparent; }
.site-nav-wrap .pub-menu { max-width: 1180px; padding: 0 16px; }
.site-nav-wrap .pub-menu-item > a { padding: 13px 16px; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; font-weight: 700; }
.site-nav-wrap .pub-menu-item > a:hover { background: var(--primary); color: #fff; }
.site-nav-fallback { display: flex; list-style: none; margin: 0 auto; padding: 0 16px; max-width: 1180px; }
.site-nav-fallback li a { display: block; padding: 13px 16px; color: #e5e7eb; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.site-nav-fallback li a:hover { background: var(--primary); color: #fff; }

/* ---------- Breaking ticker ---------- */
.breaking-bar { background: var(--card); border-bottom: 1px solid var(--border); }
.breaking-bar .site-container { display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.breaking-label { background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 5px 12px; border-radius: var(--radius); flex-shrink: 0; text-transform: uppercase; }
.breaking-track { overflow: hidden; flex: 1; white-space: nowrap; }
.breaking-track ul { display: inline-flex; gap: 48px; list-style: none; margin: 0; padding: 0; animation: ticker 28s linear infinite; }
.breaking-track a { font-size: 13.5px; font-weight: 600; color: var(--secondary); }
.breaking-track a:hover { color: var(--primary); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .breaking-track ul { animation: none; } }

/* ---------- Hero + sidebar ---------- */
.hero-section { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; margin: 20px 0; }
.hero-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--secondary); min-height: 420px; display: flex; align-items: flex-end; }
.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.hero-card-body { position: relative; padding: 26px; color: #fff; }
.hero-tag { display: inline-block; background: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: var(--radius); text-transform: uppercase; margin-bottom: 12px; }
.hero-card h1 { font-size: 28px; line-height: 1.25; color: #fff; }
.hero-excerpt { color: #e3e3e3; font-size: 13.5px; margin-top: 10px; max-width: 90%; }
.hero-meta { margin-top: 10px; font-size: 12.5px; color: #d8d8d8; }

.hero-sidebar { display: flex; flex-direction: column; gap: 12px; }
.small-card { display: flex; gap: 10px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 9px; }
.small-card img { width: 72px; height: 56px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; background: #eee; }
.small-card .cat { font-size: 10px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .03em; }
.small-card h4 { font-size: 12.5px; line-height: 1.3; margin-top: 2px; }
.small-card .time { font-size: 10.5px; color: var(--text-muted); margin-top: 5px; }

.most-read-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.most-read-title { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--primary); font-size: 15px; margin-bottom: 8px; border-bottom: 2px solid var(--secondary); padding-bottom: 6px; }
.most-read-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.mr-num { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--accent); font-size: 16px; width: 18px; flex-shrink: 0; }
.most-read-row h5 { font-size: 12.5px; font-weight: 600; line-height: 1.35; margin: 0; color: var(--text); }

/* ---------- 3-column row: Latest / ePaper / Trending ---------- */
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin: 30px 0; }
.list-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.list-row img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; background: #eee; }
.list-row h4 { font-size: 13px; line-height: 1.35; }
.list-row .time { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }

.trending-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.trending-row:last-child { border-bottom: none; }
.trending-num { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: var(--accent); width: 24px; flex-shrink: 0; }
.trending-row h4 { font-size: 12.5px; line-height: 1.35; }
.trending-row .views { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }

.epaper-mini { display: block; background: var(--secondary); border-radius: var(--radius); overflow: hidden; text-align: center; }
.epaper-mini img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.epaper-mini-body { padding: 14px; }
.epaper-mini-body h4 { color: #fff; font-size: 14px; }
.epaper-mini-body p { color: #b8b8b8; font-size: 11.5px; margin: 5px 0 10px; }
.btn-gold { display: inline-block; background: var(--accent); color: var(--secondary); font-weight: 800; font-size: 11.5px; padding: 8px 16px; border-radius: var(--radius); text-transform: uppercase; }
.btn-gold:hover { background: #c29d2e; }

/* ---------- Category strip (5-up) ---------- */
.cat-strip-section { margin: 30px 0; }
.cat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.cat-strip-col { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.cat-strip-title { font-size: 12px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--secondary); padding-bottom: 8px; margin-bottom: 10px; }
.cat-strip-top { display: block; margin-bottom: 10px; }
.cat-strip-top img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); margin-bottom: 8px; background: #eee; }
.cat-strip-top h4 { font-size: 13.5px; line-height: 1.35; }
.cat-strip-top .time { font-size: 10.5px; color: var(--text-muted); margin-top: 5px; }
.cat-strip-list { list-style: none; margin: 0; padding: 0; }
.cat-strip-list li { padding: 6px 0; border-top: 1px solid var(--border); font-size: 12px; }
.cat-strip-list a:hover { color: var(--primary); }
.cat-strip-more { display: block; margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; }

/* ---------- Section headings ---------- */
.section-title { font-size: 18px; color: var(--primary); border-bottom: 2px solid var(--secondary); padding-bottom: 8px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.section-title .view-all { font-family: 'Source Sans 3', sans-serif; font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.section-title .view-all:hover { color: var(--primary); }

.empty-note { color: var(--text-muted); font-size: 13px; padding: 20px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--secondary); color: #b8b8b8; margin-top: 40px; padding: 0 0 18px; font-size: 13px; }
.newsletter-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--primary); padding: 26px 16px; margin-bottom: 30px; flex-wrap: wrap; }
.newsletter-band h4 { color: #fff; font-size: 18px; margin-bottom: 4px; }
.newsletter-band p { color: #f3d6d6; font-size: 13px; margin: 0; }
.newsletter-form { display: flex; gap: 0; flex-shrink: 0; }
.newsletter-form input[type="email"] { width: 260px; padding: 11px 14px; border: none; border-radius: var(--radius) 0 0 var(--radius); font-family: inherit; font-size: 14px; }
.newsletter-form button { background: var(--secondary); color: #fff; border: none; padding: 0 22px; font-weight: 700; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; text-transform: uppercase; font-size: 12.5px; letter-spacing: .03em; }
.newsletter-form button:hover { background: #000; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 0 16px 24px; border-bottom: 1px solid #2a2a2a; }
.footer-brand img { height: 34px; margin-bottom: 10px; filter: brightness(0) invert(1); }
.footer-brand p { color: #8a8a8a; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; font-family: 'Source Sans 3', sans-serif; }
.footer-col a { display: block; color: #b8b8b8; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 16px; color: #7a7a7a; font-size: 12px; }

/* ---------- Generic public pages (news list / article / epaper) ---------- */
.page-heading { font-size: 24px; margin: 24px 0 18px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 30px; }
.post-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.15s; }
.post-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.post-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #eee; }
.post-card-body { padding: 18px; }
.post-category { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; letter-spacing: .03em; }
.post-card h3 { font-size: 16px; line-height: 1.35; margin-bottom: 8px; }
.post-excerpt { margin: 0 0 10px; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.post-meta { margin: 0; font-size: 12px; color: #9ca3af; }

.article-container { max-width: 760px; margin: 0 auto; padding: 30px 16px 50px; }
.article-featured-img { width: 100%; border-radius: var(--radius); margin-bottom: 24px; }
.article-body h1 { font-size: 30px; line-height: 1.3; margin-bottom: 14px; }
.article-text { font-size: 16px; line-height: 1.75; color: #2b2b2b; }
.article-text img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; margin: 18px auto; }
.article-text p { margin-bottom: 1.1em; }

.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.issue-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.issue-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.issue-edition, .issue-date, .issue-pages { font-size: 12.5px; color: var(--text-muted); margin: 4px 0; }

.reader-page-nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.reader-page-nav-item { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 13px; font-weight: 700; }
.reader-page-nav-item.active { background: var(--primary); color: #fff; }
.reader-container { display: flex; justify-content: center; padding: 20px; background: #e5e5e5; min-height: 60vh; }
.reader-canvas { position: relative; display: inline-block; max-width: 100%; background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.reader-canvas img { display: block; max-width: 100%; height: auto; }
.reader-regions { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.reader-region { position: absolute; cursor: pointer; transition: background 0.15s; box-sizing: border-box; }
.reader-region:hover { background: rgba(183,28,28,0.14); outline: 2px solid rgba(183,28,28,0.5); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-section, .three-col, .footer-grid { grid-template-columns: 1fr; }
    .site-header .site-container { flex-wrap: wrap; }
    .site-utility .site-container { flex-wrap: wrap; height: auto; padding: 6px 16px; gap: 4px; }
}
