/* ============================================================
   TrendPulse USA — Main Stylesheet
   ============================================================ */

:root {
  --red:       #d62828;
  --navy:      #003049;
  --orange:    #f77f00;
  --bg:        #ffffff;
  --bg-alt:    #f4f5f7;
  --text:      #111827;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ────────────────────────────────────────────── */
h1,h2,h3,h4,h5 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

/* ── Top Bar ───────────────────────────────────────────────── */
.top-bar {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.top-bar a { color: #94a3b8; margin-left: 16px; transition: color .2s; }
.top-bar a:hover { color: #fff; }
.breaking-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}
.breaking-label {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-text { color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Header ────────────────────────────────────────────────── */
header {
  background: #fff;
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--navy);
}
.logo span { color: var(--red); }
.logo sup {
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: .08em;
  vertical-align: super;
}

nav { display: flex; align-items: center; gap: 4px; }
nav a {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--muted);
  transition: all .2s;
  text-transform: uppercase;
  letter-spacing: .04em;
}
nav a:hover, nav a.active { color: var(--red); background: #fef2f2; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-notify {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-notify:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-notify svg { width: 14px; height: 14px; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ── Category Pill ─────────────────────────────────────────── */
.cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.cat-music     { background: #fef3c7; color: #92400e; }
.cat-movies    { background: #ede9fe; color: #5b21b6; }
.cat-tv        { background: #d1fae5; color: #065f46; }
.cat-celebrity { background: #fee2e2; color: #991b1b; }
.cat-viral     { background: #ffedd5; color: #9a3412; }
.cat-trending  { background: #e0f2fe; color: #075985; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 32px 0;
}
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; }
.hero-main img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  padding: 40px 28px 28px;
  color: #fff;
}
.hero-overlay h1 { font-size: 28px; margin-bottom: 10px; }
.hero-overlay p  { font-size: 14px; color: rgba(255,255,255,.8); margin-bottom: 12px; }
.hero-meta { font-size: 12px; color: rgba(255,255,255,.6); }
.hero-meta span { margin-right: 12px; }

.hero-sidebar { display: flex; flex-direction: column; gap: 16px; }
.hero-side-card {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.hero-side-card:last-child { border-bottom: none; }
.hero-side-card img {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.hero-side-card h3 { font-size: 14px; font-weight: 700; line-height: 1.3; }
.hero-side-card .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Category Nav ──────────────────────────────────────────── */
.cat-nav {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cat-nav-inner {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav a {
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
.cat-nav a:hover, .cat-nav a.active {
  color: var(--red);
  border-bottom-color: var(--red);
  background: rgba(214,40,40,.04);
}

/* ── Section Header ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--red);
}
.section-header h2 {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.section-header a {
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}
.section-header a:hover { text-decoration: underline; }

/* ── Article Cards ─────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card-img-lg  { height: 220px; }
.card-img-sm  { height: 150px; }

.card-body { padding: 16px; }
.card-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.card-body p  { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.card-meta    { font-size: 11px; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ── Featured Row (large left + stacked right) ─────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.featured-main { border-radius: var(--radius); overflow: hidden; position: relative; }
.featured-main img { width: 100%; height: 360px; object-fit: cover; }
.featured-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  padding: 32px 22px 22px;
  color: #fff;
}
.featured-overlay h2 { font-size: 22px; }
.featured-overlay p  { font-size: 13px; margin-top: 6px; opacity: .8; }
.featured-stack { display: flex; flex-direction: column; gap: 16px; }
.stack-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.stack-card:hover { box-shadow: var(--shadow); }
.stack-card img { width: 90px; height: 68px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.stack-card h3  { font-size: 14px; font-weight: 700; line-height: 1.3; }
.stack-card .meta { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ── Trending Numbers ──────────────────────────────────────── */
.trending-list { display: flex; flex-direction: column; gap: 0; }
.trending-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }
.trending-num {
  font-size: 32px;
  font-weight: 900;
  color: #e5e7eb;
  line-height: 1;
  min-width: 36px;
}
.trending-item h3 { font-size: 14px; font-weight: 700; line-height: 1.35; }
.trending-item .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Ad Banner Placeholder ─────────────────────────────────── */
.ad-banner {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 10px;
}
.ad-banner-728 { height: 90px; margin: 24px 0; }
.ad-banner-300 { height: 250px; }

/* ── Two-column layout (main + sidebar) ────────────────────── */
.layout-main-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0;
}

/* ── Sidebar Widgets ───────────────────────────────────────── */
.widget { margin-bottom: 32px; }
.widget-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--red);
  margin-bottom: 16px;
}

/* ── Newsletter ────────────────────────────────────────────── */
.newsletter-box {
  background: var(--navy);
  color: #fff;
  padding: 32px;
  border-radius: var(--radius);
  text-align: center;
  margin: 40px 0;
}
.newsletter-box h2 { font-size: 22px; margin-bottom: 8px; }
.newsletter-box p  { font-size: 14px; opacity: .8; margin-bottom: 20px; }
.newsletter-form   { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  outline: none;
}
.newsletter-form button {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter-form button:hover { background: #b91c1c; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: #fff; font-size: 24px; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.footer-col a  { display: block; font-size: 13px; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.footer-bottom a { margin-left: 20px; transition: color .2s; }
.footer-bottom a:hover { color: #fff; }
.social-icons { display: flex; gap: 14px; }
.social-icons a {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  transition: all .2s;
}
.social-icons a:hover { background: var(--red); color: #fff; }

/* ── Push Prompt Modal ─────────────────────────────────────── */
.push-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 0 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.push-overlay.show { opacity: 1; pointer-events: all; }
.push-modal {
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 28px 24px 32px;
  max-width: 480px;
  width: 100%;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.32,.72,0,1);
}
.push-overlay.show .push-modal { transform: translateY(0); }
.push-modal-icon {
  width: 52px; height: 52px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}
.push-modal h3 { font-size: 18px; margin-bottom: 8px; }
.push-modal p  { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.push-modal-btns { display: flex; gap: 10px; }
.push-modal-btns button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.btn-allow { background: var(--red); color: #fff; }
.btn-allow:hover { background: #b91c1c; }
.btn-later { background: var(--bg-alt); color: var(--muted); }
.btn-later:hover { background: var(--border); }

/* ── Article Page ──────────────────────────────────────────── */
.article-hero { position: relative; height: 480px; overflow: hidden; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.75));
  display: flex; align-items: flex-end;
  padding: 40px;
}
.article-hero-text { color: #fff; max-width: 800px; }
.article-hero-text h1 { font-size: 36px; margin-bottom: 12px; }
.article-meta { font-size: 13px; opacity: .8; display: flex; gap: 16px; flex-wrap: wrap; }

.article-body {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 20px;
}
.article-body p { font-size: 17px; line-height: 1.8; margin-bottom: 22px; color: #374151; }
.article-body h2 { font-size: 24px; margin: 36px 0 16px; }
.article-body h3 { font-size: 20px; margin: 28px 0 12px; }
.article-body blockquote {
  border-left: 4px solid var(--red);
  padding: 12px 20px;
  background: var(--bg-alt);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 18px;
  margin: 28px 0;
  color: var(--navy);
}
.article-body ul { margin: 16px 0 22px 20px; }
.article-body ul li { font-size: 16px; margin-bottom: 8px; color: #374151; list-style: disc; }
.article-share {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 32px 0;
}
.article-share span { font-weight: 700; font-size: 13px; }
.share-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.share-fb    { background: #1877f2; color: #fff; }
.share-tw    { background: #000; color: #fff; }
.share-copy  { background: var(--bg-alt); color: var(--text); }

/* ── Tags ──────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all .2s;
}
.tag:hover { border-color: var(--red); color: var(--red); }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
  display: flex;
  gap: 6px;
  align-items: center;
}
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: var(--border); }

/* ── Privacy/About pages ───────────────────────────────────── */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.page-content h1 { font-size: 36px; margin-bottom: 8px; }
.page-content .updated { font-size: 13px; color: var(--muted); margin-bottom: 36px; }
.page-content h2 { font-size: 22px; margin: 36px 0 12px; }
.page-content p  { font-size: 16px; color: #374151; line-height: 1.8; margin-bottom: 18px; }
.page-content ul { margin: 12px 0 18px 24px; }
.page-content ul li { font-size: 15px; color: #374151; margin-bottom: 8px; list-style: disc; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-sidebar { display: none; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .layout-main-sidebar { grid-template-columns: 1fr; }
  .layout-main-sidebar aside { display: none; }
  nav { display: none; }
  .hamburger { display: block; }
  .btn-notify span { display: none; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-hero { height: 300px; }
  .article-hero-overlay { padding: 20px; }
  .article-hero-text h1 { font-size: 22px; }
  .hero-main img { height: 280px; }
}

@media (max-width: 480px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .logo { font-size: 22px; }
}

/* ── Utility ───────────────────────────────────────────────── */
.text-red    { color: var(--red); }
.text-muted  { color: var(--muted); }
.font-bold   { font-weight: 700; }
.mt-8  { margin-top: 8px;  }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
