/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 87.5%; line-height: 1.5; -webkit-text-size-adjust: 100%; }
@media (min-width: 800px) { html { font-size: 100%; } }
body { font-family: 'Open Sans', Arial, sans-serif; font-size: 1rem; line-height: 1.5; color: #111; background: #f5f5f5; }
a { color: inherit; text-decoration: none; }
img { border: 0; display: block; max-width: 100%; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.3; }

/* ── Accessibility ───────────────────────────────────────────── */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 300; background: #db0000; color: #fff; padding: 10px 16px; font-weight: 700; }
.skip-link:focus { left: 0; }
:focus { outline: 2px solid #db0000; outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid #db0000; outline-offset: 2px; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 2px solid #000; }
.header-top { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; padding: 0 20px; }
.site-logo { font-size: 1.5rem; font-weight: 800; color: #000; display: flex; align-items: center; }
.site-logo span { color: #666; }
.search-btn { background: none; border: none; cursor: pointer; color: #000; padding: 8px; }
.burger-btn { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; }
.burger-line { display: block; width: 28px; height: 2px; background: #000; border-radius: 1px; transition: transform .3s, opacity .3s; }
.burger-btn.active .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.active .burger-line:nth-child(2) { opacity: 0; }
.burger-btn.active .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Main Nav ───────────────────────────────────────────────── */
.main-nav { background: #000; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav ul { display: flex; gap: 0; white-space: nowrap; }
.main-nav a { display: block; padding: 14px 20px; color: #fff; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; transition: background .2s; }
.main-nav a:hover,
.main-nav a.active { background: #db0000; }

/* ── Search Overlay ─────────────────────────────────────────── */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 200; align-items: flex-start; justify-content: center; padding-top: 120px; }
.search-overlay.open { display: flex; }
.search-overlay-inner { width: 100%; max-width: 600px; padding: 0 20px; position: relative; }
.search-form { display: flex; gap: 10px; }
.search-form input { flex: 1; padding: 14px 20px; border: none; border-radius: 6px; font-size: 1rem; outline: none; }
.search-form button { background: #000; border: none; border-radius: 6px; padding: 14px 20px; color: #fff; cursor: pointer; }
.search-form button:hover { background: #db0000; }
.search-close { position: absolute; top: -50px; right: 20px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }
.search-results { margin-top: 16px; max-height: 400px; overflow-y: auto; }
.search-results a { display: block; padding: 14px 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.15); font-size: .95rem; }
.search-results a:hover { background: rgba(255,255,255,.08); }

/* ── Breaking News Ticker ───────────────────────────────────── */
.ticker { background: #111; display: flex; align-items: center; overflow: hidden; height: 42px; }
.ticker-label { background: #db0000; color: #fff; font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; padding: 0 16px; height: 100%; display: flex; align-items: center; flex-shrink: 0; }
.ticker-live-dot { display: inline-block; width: 8px; height: 8px; background: #fff; border-radius: 50%; margin-right: 8px; animation: livePulse 1.5s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-content { display: inline-flex; align-items: center; animation: tickerScroll 25s linear infinite; white-space: nowrap; }
.ticker-content a { color: #fff; font-size: 14px; padding: 0 16px; text-decoration: none; }
.ticker-content a:hover { text-decoration: underline; color: #db0000; }
.ticker-content span { color: #555; }
@keyframes tickerScroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ── Ad Placeholders ────────────────────────────────────────── */
.ad { text-align: center; margin: 20px 0; position: relative; }
.ad-label { display: block; font-size: 11px; color: #666; font-weight: 600; margin-bottom: 4px; letter-spacing: 1px; text-transform: uppercase; }
.ad-placeholder { background: #eee; border: 1px dashed #bbb; padding: 40px 20px; color: #555; font-size: 14px; border-radius: 4px; }

/* ── Breaking Row ───────────────────────────────────────────── */
.breaking-row { display: flex; align-items: center; gap: 14px; background: #111; color: #fff; padding: 12px 16px; border-radius: 4px; margin: 20px 0; border-left: 4px solid #db0000; }
.breaking-badge { background: #db0000; color: #fff; font-weight: 700; font-size: 11px; letter-spacing: 1px; padding: 4px 10px; border-radius: 2px; text-transform: uppercase; flex-shrink: 0; animation: livePulse 1.7s ease-in-out infinite; }
.breaking-link { color: #fff; font-size: .95rem; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.breaking-link:hover { color: #ffe57b; }
.breaking-time { margin-left: auto; font-size: .75rem; color: #d6d6d6; white-space: nowrap; flex-shrink: 0; }

/* ── Most Shared ────────────────────────────────────────────── */
.shared-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 30px; }
@media (min-width: 560px) { .shared-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .shared-grid { grid-template-columns: repeat(3, 1fr); } }
.shared-card { background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); position: relative; }
.shared-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.shared-card .headline-sm { padding: 10px 14px 6px; font-size: .9rem; }
.shared-card .card-info { justify-content: space-between; }
.shared-rank { position: absolute; top: 8px; right: 8px; background: #000; color: #fff; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-weight: 800; border-radius: 4px; z-index: 2; font-size: .8rem; }
.info-share { color: #db0000; font-weight: 600; }

/* ── Reading time / meta ────────────────────────────────────── */
.info-read { color: #555; }
.meta-read { color: #555; }

/* ── Hero Section ───────────────────────────────────────────── */
.hero-section { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.hero-main { position: relative; }
.hero-main-wrapper { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 610px) {
  .hero-section { flex-direction: row; flex-wrap: wrap; }
  .hero-main { width: calc(75% - 10px); }
  .hero-main-wrapper { width: calc(25% - 10px); }
}
@media (min-width: 1024px) {
  .hero-main { width: calc(75% - 15px); }
  .hero-main-wrapper { width: calc(25% - 15px); }
}
.hero-grid { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
@media (min-width: 610px) { .hero-grid { flex-direction: row; } }
.hero-left, .hero-right { flex: 1; display: flex; flex-direction: column; gap: 16px; }

/* ── Cards ──────────────────────────────────────────────────── */
.card { display: block; position: relative; transition: transform .15s; }
.card-main { background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card-main:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.news-img { position: relative; overflow: hidden; background: #ddd; }
.news-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.ratio-16x9 { --r: 56.25%; }
.ratio-16x9::before { content: ''; display: block; padding-bottom: var(--r); }
.thumb { width: 95px; min-width: 95px; height: 76px; border-radius: 4px; flex-shrink: 0; }
@media (min-width: 610px) { .thumb { width: 120px; min-width: 120px; height: 85px; } }
.img-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #333, #000); color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: 1px; }
.category-tag { position: absolute; bottom: -10px; left: 10px; background: var(--cat-color, #111); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 3px; z-index: 2; text-transform: uppercase; letter-spacing: .5px; }
.headline-main { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 1.25rem; font-weight: 700; color: #111; padding: 14px 16px 8px; }
.headline-main:hover { color: #db0000; }
.headline { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 1rem; font-weight: 700; color: #111; padding: 10px 14px 6px; }
.headline:hover { color: #db0000; }
.headline-sm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; font-weight: 700; color: #111; line-height: 1.4; }
.headline-sm:hover { color: #db0000; }
.desc { color: #555; font-size: .875rem; padding: 0 16px 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-info { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 12px; font-size: .75rem; color: #757575; align-items: center; }
.info-category { background: #f0f0f0; padding: 2px 8px; border-radius: 3px; font-weight: 600; color: #333; }

/* ── Card Horizontal ────────────────────────────────────────── */
.card-horizontal { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #e0e0e0; }
.card-horizontal:last-child { border-bottom: none; }
.card-horizontal .news-img { flex-shrink: 0; }
.card-horizontal .headline-sm { flex: 1; }
.card-horizontal .card-info { padding: 4px 0 0; font-size: .7rem; }

/* ── Article Card ───────────────────────────────────────────── */
.article-card { background: #fff; border-radius: 4px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.article-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }

/* ── Section Headline ───────────────────────────────────────── */
.section-headline { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid #000; margin: 30px 0 20px; padding-bottom: 10px; }
.section-title { font-size: 1rem; font-weight: 700; color: #000; text-transform: uppercase; letter-spacing: 1px; }
.section-link { font-size: .8rem; font-weight: 600; color: #000; }
.section-link:hover { text-decoration: underline; color: #db0000; }

/* ── Featured Card Collection ───────────────────────────────── */
.featured-collection { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 30px; }
@media (min-width: 520px) { .featured-collection { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1001px) { .featured-collection { grid-template-columns: repeat(4, 1fr); } }
.featured-card { background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.featured-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.featured-card .headline { font-size: .95rem; }
.featured-card .category-tag { position: absolute; bottom: auto; top: 10px; left: 10px; }

/* ── Two Column ─────────────────────────────────────────────── */
.two-column { display: flex; flex-direction: column; gap: 30px; margin: 20px 0; }
@media (min-width: 768px) { .two-column { flex-direction: row; } }
.main-column { flex: 1; min-width: 0; }
.sidebar { width: 100%; }
@media (min-width: 768px) { .sidebar { width: 340px; flex-shrink: 0; } }

/* ── Article Column ─────────────────────────────────────────── */
.article-column .article-card { margin-bottom: 20px; }

/* ── Trending ───────────────────────────────────────────────── */
.trending-list { margin-bottom: 20px; }
.trending-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid #e0e0e0; }
.trending-item:last-child { border-bottom: none; }
.trending-number { font-size: 1.75rem; font-weight: 800; color: #000; line-height: 1; min-width: 32px; text-align: center; }
.trending-item .headline-sm { flex: 1; font-size: .9rem; }

/* ── Newsletter ─────────────────────────────────────────────── */
.newsletter-box { background: linear-gradient(135deg, #111, #000); color: #fff; padding: 28px 24px; border-radius: 8px; margin-top: 20px; }
.newsletter-box h3 { font-size: 1.15rem; margin-bottom: 6px; }
.newsletter-box p { font-size: .85rem; opacity: .9; margin-bottom: 14px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input { padding: 12px 14px; border: none; border-radius: 5px; font-size: .9rem; outline: none; }
.btn { background: #000; color: #fff; border: none; padding: 12px 24px; font-weight: 700; font-size: .9rem; border-radius: 5px; cursor: pointer; text-transform: uppercase; letter-spacing: .5px; transition: background .2s; }
.btn:hover { background: #db0000; }
.form-msg { font-size: .85rem; margin-top: 8px; }
.form-msg.success { color: #fff; }
.form-msg.error { color: #ff8a80; }

/* ── Sidebar Ad ─────────────────────────────────────────────── */
.sidebar-ad { margin-top: 20px; }

/* ── Page: Category ─────────────────────────────────────────── */
.page-hero { text-align: center; padding: 30px 0 10px; }
.page-hero h1 { font-size: 1.6rem; color: #111; text-transform: uppercase; }
.page-hero p { color: #757575; margin-top: 6px; }

/* ── Page: Author ───────────────────────────────────────────── */
.author-hero { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: left; }
.author-hero h1 { text-transform: none; }
.author-avatar { width: 72px; height: 72px; border-radius: 50%; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; letter-spacing: .5px; flex-shrink: 0; }
.author-link { color: #000; font-weight: 600; text-decoration: underline dotted; }
.author-link:hover { color: #db0000; }

.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding: 20px 0 40px; }
.author-card { border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; text-align: center; background: #fff; transition: box-shadow .2s, transform .2s; display: block; color: #111; }
.author-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-2px); color: #111; }
.author-card h3 { font-size: .95rem; margin: 10px 0 4px; }
.author-card p { font-size: .78rem; color: #757575; }

/* ── Page: Article ──────────────────────────────────────────── */
.breadcrumb { padding: 16px 0; font-size: .8rem; color: #757575; }
.breadcrumb a { color: #000; }
.breadcrumb a:hover { color: #db0000; }
.breadcrumb .sep { margin: 0 6px; color: #bbb; }
.article-header { margin-bottom: 24px; }
.article-header h1 { font-size: 1.6rem; color: #111; margin: 12px 0; line-height: 1.4; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: #757575; margin-top: 8px; }
.article-featured-img { margin-bottom: 24px; border-radius: 6px; overflow: hidden; }
.article-featured-img img { width: 100%; border-radius: 6px; }
.article-img-fb { min-height: 250px; }
.article-body { font-size: 1.05rem; line-height: 1.75; color: #333; }
.article-body .lead { font-size: 1.15rem; font-weight: 600; color: #111; margin-bottom: 20px; }
.article-body p { margin-bottom: 16px; }
.article-body h2 { font-size: 1.2rem; margin: 28px 0 12px; color: #111; }
.article-body ul { margin: 12px 0 16px 20px; list-style: disc; }
.article-body li { margin-bottom: 8px; }
.article-share { display: flex; align-items: center; gap: 12px; padding: 20px 0; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; margin: 24px 0; font-size: .9rem; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .8rem; }
.share-x { background: #000; }
.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.related-articles { margin: 30px 0; }
.related-articles h2 { font-size: 1.2rem; color: #111; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

/* ── Page: Static (About, Contact, etc.) ────────────────────── */
.page-static { max-width: 800px; padding-top: 40px; padding-bottom: 60px; min-height: 60vh; }
.page-static h1 { font-size: 1.8rem; color: #111; margin-bottom: 20px; }
.page-static h2 { font-size: 1.2rem; color: #000; margin: 24px 0 10px; }
.page-static p { margin-bottom: 14px; color: #444; line-height: 1.7; }
.page-static a { color: #000; text-decoration: underline; }
.page-static a:hover { color: #db0000; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { background: #111; color: #ccc; margin-top: 40px; border-top: 3px solid #db0000; }
.footer-top { padding: 40px 20px; }
.footer-inner { display: flex; flex-direction: column; gap: 30px; }
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }
.footer-col { flex: 1; }
.footer-logo { font-size: 1.3rem; font-weight: 800; color: #fff; display: inline-block; margin-bottom: 12px; }
.footer-logo span { color: #db0000; }
.footer-col p { font-size: .85rem; line-height: 1.6; color: #aaa; }
.footer-col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .85rem; color: #aaa; transition: color .2s; }
.footer-col ul li a:hover { color: #db0000; }
.social-links { display: flex; gap: 10px; margin-bottom: 16px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-weight: 700; font-size: .75rem; transition: background .2s; }
.social-links a:hover { background: #db0000; }
.footer-contact a { color: #db0000; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 20px; text-align: center; font-size: .8rem; color: #777; }

/* ── Load More ──────────────────────────────────────────────── */
.load-more-wrap { text-align: center; margin: 30px 0; }

/* ── Responsive Adjustments ─────────────────────────────────── */
@media (max-width: 609px) {
  .hero-main-wrapper { flex-direction: row; flex-wrap: wrap; }
  .hero-main-wrapper .card-main { width: 100%; }
}
@media (min-width: 1024px) {
  .hero-main-wrapper { width: calc(25% - 15px); flex-direction: column; }
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.article-card, .card-main, .featured-card { animation: fadeIn .35s ease; }

/* Honor users who prefer reduced motion: pause scrolling animations */
@media (prefers-reduced-motion: reduce) {
  .ticker-content { animation: none; white-space: normal; overflow-x: auto; }
  .ticker-live-dot, .breaking-badge { animation: none; }
  .article-card, .card-main, .featured-card { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ── Back to top ────────────────────────────────────────────── */
.back-to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: #db0000; color: #fff; border: none; font-size: 1.3rem; font-weight: 800; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .25s, visibility .25s; z-index: 150; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #000; }

/* ── Mobile Nav Toggle ──────────────────────────────────────── */
.main-nav.collapsed ul { display: none; }
.main-nav.collapsed ul.open { display: flex; flex-direction: column; }
.main-nav.collapsed ul.open a { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.15); }
@media (min-width: 1024px) {
  .main-nav ul { display: flex !important; flex-direction: row; }
  .burger-btn { display: none; }
}