/* ============================================================
   TopFactHub — homepage layout
   ============================================================ */

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 56px 0 130px;
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 30px; align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 {
  font-family: 'Baloo 2', sans-serif; font-weight: 800;
  font-size: clamp(2.8rem, 5vw, 4.6rem); line-height: 0.98; letter-spacing: -1px;
  margin: 22px 0 20px;
}
.hero h1 .l3 { display: block; }
.hero p.lede {
  color: var(--text-soft); font-size: 1.06rem; max-width: 470px; margin-bottom: 30px;
}
.hero-ctas { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

.hero-art {
  position: relative; height: 460px; border-radius: var(--r-xl);
  background:
    radial-gradient(420px 360px at 60% 40%, rgba(236,63,147,0.45), transparent 70%),
    radial-gradient(420px 420px at 85% 60%, rgba(255,79,168,0.35), transparent 70%),
    linear-gradient(135deg, #3a1450, #5a1240 60%, #2a0f30);
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(236,63,147,0.4);
}
.hero-art .ph { position: absolute; inset: 0; background: none; }
.hero-art .ph::after { background: rgba(10,6,16,0.4); }
.hero-art .sparkle {
  position: absolute; color: rgba(255,255,255,0.85); width: 18px; height: 18px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

/* hero wave divider */
.hero-wave { position: absolute; left: 0; right: 0; bottom: 4px; width: 100%; height: 120px; z-index: 2; filter: drop-shadow(0 0 12px rgba(236,63,147,0.55)) drop-shadow(0 0 4px rgba(177,59,214,0.6)); }

/* ---------- CATEGORY BAR ---------- */
.cat-bar-wrap { max-width: 1460px; margin: -34px auto 0; padding: 0 24px; position: relative; z-index: 5; }
.cat-bar {
  display: flex; align-items: stretch; flex-wrap: nowrap;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); padding: 6px; box-shadow: var(--shadow);
  overflow-x: auto; scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-item {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px; flex: 1 1 auto;
  position: relative; transition: background .15s ease; border-radius: 12px;
}
.cat-item:not(:last-child)::after {
  content: ''; position: absolute; right: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line);
}
.cat-item:hover { background: rgba(255,255,255,0.03); }
.cat-icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
}
.cat-icon i { width: 18px; height: 18px; }
.cat-item .ct-title { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 0.85rem; line-height: 1.15; white-space: nowrap; }
.cat-item .ct-sub { font-size: 0.67rem; color: var(--text-muted); white-space: nowrap; }
.cat-item.view-all {
  background: var(--grad); color: #fff; min-width: 104px; flex: 0 0 auto;
}
.cat-item.view-all::after { display: none; }
.cat-item.view-all .va-label { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 0.9rem; line-height: 1.1; white-space: nowrap; }
.cat-item.view-all .va-circle {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.18);
  display: grid; place-items: center; margin-left: auto;
}
.cat-item.view-all i { width: 18px; height: 18px; }

/* ---------- MAIN GRID ---------- */
.home-grid {
  display: grid; grid-template-columns: 1fr 1.1fr 0.85fr; gap: 28px;
  margin-top: 56px;
  align-items: start;
}

/* latest stories */
.story-list { display: flex; flex-direction: column; gap: 14px; }
.story-card {
  display: flex; gap: 16px; padding: 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  position: relative; transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.story-card:hover { border-color: var(--line-strong); transform: translateY(-3px); background: var(--surface-2); }
.story-thumb { width: 104px; height: 104px; border-radius: 12px; flex-shrink: 0; }
.story-body { flex: 1; min-width: 0; padding-right: 24px; }
.story-body .cat-tag { display: block; margin-bottom: 7px; }
.story-body h3 {
  font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 1.04rem; line-height: 1.2;
  margin-bottom: 10px;
}
.story-card:hover h3 { color: var(--pink); }
.story-meta { display: flex; align-items: center; gap: 16px; color: var(--text-muted); font-size: 0.76rem; }
.story-meta span { display: inline-flex; align-items: center; gap: 5px; }
.story-meta i { width: 13px; height: 13px; }
.bookmark {
  position: absolute; top: 14px; right: 14px; color: var(--text-muted);
  transition: color .15s ease;
}
.bookmark:hover { color: var(--pink); }
.bookmark i { width: 17px; height: 17px; }

/* editor's spotlight */
.spotlight-col { display: flex; flex-direction: column; }
.spotlight {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  flex: 1 1 auto; min-height: 540px; border: 1px solid var(--line);
}
.spotlight .ph { position: absolute; inset: 0; }
.spotlight-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,6,16,0.55) 60%, rgba(10,6,16,0.96) 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 32px;
}
.spotlight .cat-pill {
  align-self: flex-start; margin-bottom: 16px;
  background: var(--c-ent); color: #fff; padding: 6px 13px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
}
.spotlight h3 {
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.85rem; line-height: 1.08;
  margin-bottom: 14px;
}
.spotlight p { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 22px; max-width: 90%; }
.spotlight-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.spotlight-foot .meta { display: flex; gap: 18px; color: var(--text-soft); font-size: 0.82rem; }
.spotlight-foot .meta span { display: inline-flex; align-items: center; gap: 6px; }
.spotlight-foot .meta i { width: 14px; height: 14px; }
.spotlight-foot .btn-grad { margin-left: auto; padding: 11px 22px; font-size: 0.9rem; }
.spot-arrow {
  position: absolute; top: 44%; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10,6,16,0.55); border: 1px solid var(--line-strong); backdrop-filter: blur(6px);
  display: grid; place-items: center; color: #fff; transition: background .15s ease;
}
.spot-arrow:hover { background: rgba(236,63,147,0.6); }
.spot-arrow.prev { left: 16px; } .spot-arrow.next { right: 16px; }
.spot-arrow i { width: 20px; height: 20px; }
.spot-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.spot-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: all .2s ease; }
.spot-dots span.on { width: 22px; border-radius: 5px; background: var(--grad); }

/* hot topics */
.hot-list { display: flex; flex-direction: column; gap: 10px; }
.hot-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s ease, transform .15s ease;
}
.hot-item:hover { border-color: var(--line-strong); transform: translateX(3px); }
.hot-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 1.05rem; }
.hot-item .tag { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 0.95rem; flex: 1; }
.trend-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
}
.trend-badge.trending { color: var(--trend); background: rgba(251,146,60,0.14); }
.trend-badge.rising { color: var(--rise); background: rgba(52,211,153,0.14); }
.trend-badge i { width: 11px; height: 11px; }
.spark { width: 44px; height: 22px; flex-shrink: 0; }
.explore-trends { display: block; text-align: right; font-size: 0.84rem; font-weight: 700; color: var(--pink); margin-top: 14px; }
.explore-trends:hover { text-decoration: underline; }

/* newsletter card */
.newsletter {
  margin-top: 22px; padding: 24px; border-radius: var(--r-lg);
  background:
    radial-gradient(300px 200px at 100% 0%, rgba(236,63,147,0.25), transparent 70%),
    linear-gradient(150deg, #2a1547, #3a1854);
  border: 1px solid var(--line-strong);
}
.newsletter .nl-head { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.newsletter .nl-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--grad); color: #fff;
}
.newsletter .nl-ico i { width: 22px; height: 22px; }
.newsletter h4 { font-family: 'Baloo 2', sans-serif; font-size: 1.15rem; font-weight: 700; line-height: 1.1; }
.newsletter p { color: var(--text-soft); font-size: 0.84rem; margin: 6px 0 18px; }
.nl-form { display: flex; gap: 8px; background: rgba(0,0,0,0.3); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 5px 5px 18px; }
.nl-form input {
  flex: 1; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 0.88rem; min-width: 0;
}
.nl-form input::placeholder { color: var(--text-muted); }
.nl-form button { background: var(--grad); color: #fff; font-weight: 700; padding: 10px 20px; border-radius: 999px; font-size: 0.85rem; }
.nl-form button:hover { filter: brightness(1.08); }

/* social cta spacing */
.social-section { margin-top: 50px; }

@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
  .hot-col { grid-column: 1 / -1; }
  .hot-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 320px; }
  .main-nav { display: none; }
}
@media (max-width: 720px) {
  .home-grid { grid-template-columns: 1fr; }
  .hot-col-grid { grid-template-columns: 1fr; }
}
