/* ============================================================
   TrendTrivia Blog — shared stylesheet
   Matches the main site (v13): app-blue gradient, Bebas Neue +
   Nunito, gold accents, translucent glass cards.
   Linked by /blog/index.html and every /blog/<post>.html.
   ============================================================ */

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

:root {
  --blue-deep: #0D2E8A;
  --blue: #1B4FD8;
  --blue-mid: #1340B8;
  --blue-bright: #3E74F0;
  --gold: #FFB800;
  --gold-light: #FFD04D;
  --white: #FFFFFF;
  --white-80: rgba(255,255,255,0.82);
  --white-70: rgba(255,255,255,0.72);
  --white-60: rgba(255,255,255,0.6);
  --white-10: rgba(255,255,255,0.12);
  --card: rgba(255,255,255,0.10);
  --card-2: rgba(255,255,255,0.05);
  --card-border: rgba(255,255,255,0.16);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  /* solid fallback guarantees full coverage; gradient paints over the whole page.
     No background-attachment:fixed — it's buggy on mobile Safari and on long pages. */
  background-color: var(--blue-mid);
  background-image: linear-gradient(180deg, var(--blue-deep) 0%, var(--blue) 55%, var(--blue-mid) 100%);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--gold-light); }

.container { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav (mirrors main site) ---------- */
nav {
  padding: 16px 0; position: sticky; top: 0; z-index: 100;
  background: rgba(11,32,100,0.72); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--white-10);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.nav-brand { display: flex; align-items: center; text-decoration: none; }
.nav-brand img { height: 42px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: var(--white-80); text-decoration: none;
  font-weight: 700; font-size: 14px; transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--gold) !important; color: var(--blue-deep) !important;
  padding: 10px 22px; border-radius: 12px; font-weight: 800 !important;
  font-size: 14px !important; transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(255,184,0,0.35);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,184,0,0.5); }

/* ---------- Blog index header ---------- */
.blog-head { padding: 64px 0 32px; text-align: center; }
.blog-eyebrow {
  font-family: 'Bebas Neue', sans-serif; font-size: 14px; letter-spacing: 3px;
  color: var(--gold-light); text-transform: uppercase; margin-bottom: 12px;
}
.blog-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: 1px;
}
.blog-h1 .gold { color: var(--gold); }
.blog-lede {
  font-size: 18px; font-weight: 600; color: var(--white-70);
  max-width: 620px; margin: 16px auto 0; text-wrap: balance;
}

/* ---------- Post cards (index) ---------- */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px; padding: 24px 0 72px;
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 28px; text-decoration: none; color: var(--white);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.post-card:hover {
  transform: translateY(-4px); border-color: rgba(255,208,77,0.55);
  background: rgba(255,255,255,0.13);
}
.post-tag {
  display: inline-block; align-self: flex-start;
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 1.5px; font-size: 12px;
  color: var(--blue-deep); background: var(--gold-light);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.post-card h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: 26px; line-height: 1.1;
  letter-spacing: 0.5px; margin-bottom: 10px;
}
.post-card p { color: var(--white-70); font-size: 15px; font-weight: 600; }
.post-meta { margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--white-60); font-weight: 700; }

/* ---------- Article (post pages) ---------- */
.article { padding: 56px 0 40px; }
.article-tag {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 1.5px; font-size: 13px;
  color: var(--blue-deep); background: var(--gold-light);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
}
.article h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(34px, 5.2vw, 56px); line-height: 1.04; letter-spacing: 0.5px;
  margin-bottom: 14px; text-wrap: balance;
}
.article-meta { color: var(--white-60); font-size: 14px; font-weight: 700; margin-bottom: 36px; }
.article-body { font-size: 17px; color: var(--white-80); }
.article-body p { margin: 0 0 20px; }
.article-body h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: 0.5px;
  color: var(--white); margin: 40px 0 14px; line-height: 1.1;
}
.article-body h3 {
  font-size: 20px; font-weight: 800; color: var(--white); margin: 28px 0 10px;
}
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 24px; }
.article-body li { margin-bottom: 10px; color: var(--white-80); }
.article-body strong { color: var(--white); }
.article-body a { color: var(--gold-light); font-weight: 700; }
.article-body blockquote {
  margin: 24px 0; padding: 16px 22px; border-left: 3px solid var(--gold);
  background: var(--card-2); border-radius: 0 12px 12px 0;
  color: var(--white); font-weight: 600; font-style: italic;
}

/* ---------- In-article CTA box ---------- */
.cta-box {
  margin: 44px 0 8px; padding: 32px; text-align: center;
  background: var(--card); border: 1px solid rgba(255,208,77,0.4);
  border-radius: 22px;
}
.cta-box h3 {
  font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: 0.5px;
  margin-bottom: 8px; color: var(--white);
}
.cta-box p { color: var(--white-70); font-weight: 600; margin-bottom: 20px; }
.cta-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-badges img { height: 52px; width: auto; }

/* ---------- Back link ---------- */
.back-link {
  display: inline-block; margin: 8px 0 0; font-weight: 800; font-size: 14px;
  color: var(--white-70); text-decoration: none;
}
.back-link:hover { color: var(--gold-light); }

/* ---------- Footer (mirrors main site) ---------- */
footer { border-top: 1px solid var(--white-10); padding: 40px 0; text-align: center; margin-top: 40px; }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: var(--white-60); text-decoration: none; font-weight: 700; font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.4); line-height: 1.7; }

@media (max-width: 600px) {
  .nav-links { gap: 18px; }
  .nav-links .nav-link-text { display: none; }
  .nav-brand img { height: 32px; }
  .nav-cta { padding: 8px 16px; font-size: 12px !important; }
  .post-grid { grid-template-columns: 1fr; }
}
