/* ═══════════════════════════════════════════
   TrendsToday — shared.css
   All pages use this single stylesheet
═══════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0d0f;
  --surface: #141417;
  --card: #1a1a1f;
  --border: rgba(255,255,255,0.07);
  --text: #f0ede8;
  --muted: #8a8690;
  --accent: #ff5c35;
  --accent2: #ffbd35;
  --accent3: #35c8ff;
  --green: #35ffa0;
  --purple: #b57bff;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Syne', sans-serif;
  --body: 'DM Sans', sans-serif;
  --r: 12px;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* Noise overlay */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; opacity: 0.4;
}
body > * { position: relative; z-index: 1; }

/* ── Header ── */
header { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(20px); background: rgba(13,13,15,0.88); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 24px; }
.logo { font-family: var(--sans); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; flex-shrink: 0; }
nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 11px; border-radius: 6px; color: var(--muted); transition: color 0.2s, background 0.2s; white-space: nowrap; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--text); background: rgba(255,255,255,0.07); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; margin-left: auto; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.mobile-nav { display: none; flex-direction: column; gap: 2px; background: rgba(13,13,15,0.98); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 12px 24px 20px; }
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { font-size: 0.9rem; padding: 10px 14px; }

/* ── Ticker ── */
.ticker-wrap { overflow: hidden; height: 36px; display: flex; align-items: center; background: var(--accent); }
.ticker-label { font-family: var(--sans); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(0,0,0,0.2); padding: 0 16px; height: 100%; display: flex; align-items: center; flex-shrink: 0; color: #fff; white-space: nowrap; }
.ticker-track { display: flex; animation: ticker 45s linear infinite; white-space: nowrap; }
.ticker-track span { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.92); padding: 0 32px; }
.ticker-track span::before { content: '◆'; margin-right: 32px; opacity: 0.55; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Layout helpers ── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { max-width: 1280px; margin: 0 auto; padding: 56px 24px; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; }
.section-title { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }
.section-title span { color: var(--accent); }
.divider { border: none; border-top: 1px solid var(--border); margin: 0 24px; }

/* ── Card grid ── */
.card-grid { display: grid; gap: 24px; }
.g3 { grid-template-columns: repeat(3,1fr); }
.g2 { grid-template-columns: repeat(2,1fr); }
.g4 { grid-template-columns: repeat(4,1fr); }

/* ── Article card ── */
.article-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.article-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.card-thumb { aspect-ratio: 16/9; overflow: hidden; position: relative; flex-shrink: 0; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.article-card:hover .card-thumb img { transform: scale(1.04); }
.card-cat { position: absolute; bottom: 12px; left: 12px; font-family: var(--sans); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 4px; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-family: var(--sans); font-size: 0.97rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { font-size: 0.82rem; color: var(--muted); line-height: 1.65; margin-bottom: 16px; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-author { font-size: 0.78rem; color: var(--muted); }
.card-author strong { color: var(--text); font-weight: 500; }
.card-read-time { font-family: var(--sans); font-size: 0.7rem; font-weight: 600; color: var(--muted); }

/* ── Colour badges ── */
.c-tech  { background: rgba(53,200,255,0.15); color: var(--accent3); }
.c-ai    { background: rgba(181,123,255,0.15); color: var(--purple); }
.c-life  { background: rgba(53,255,160,0.15);  color: var(--green); }
.c-money { background: rgba(255,189,53,0.15);  color: var(--accent2); }
.c-ent   { background: rgba(255,92,53,0.15);   color: var(--accent); }
.c-prod  { background: rgba(255,255,255,0.09); color: var(--muted); }

/* ── Page hero banner (category pages) ── */
.page-hero { max-width: 1280px; margin: 0 auto; padding: 48px 24px 32px; }
.page-hero-inner { border-radius: 20px; padding: 52px 48px; position: relative; overflow: hidden; }
.page-hero-inner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,0.04) 0%, transparent 70%); }
.page-hero-eyebrow { font-family: var(--sans); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 14px; }
.page-hero-title { font-family: var(--serif); font-size: clamp(2rem,4.5vw,3.4rem); line-height: 1.08; letter-spacing: -0.025em; margin-bottom: 16px; }
.page-hero-sub { font-size: 1rem; line-height: 1.75; max-width: 520px; opacity: 0.7; margin-bottom: 28px; }
.page-hero-stats { display: flex; gap: 32px; }
.stat-num { font-family: var(--sans); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.78rem; opacity: 0.6; margin-top: 4px; }
.hero-icon { position: absolute; right: 48px; top: 50%; transform: translateY(-50%); font-size: 7rem; opacity: 0.07; line-height: 1; pointer-events: none; }

/* ── Content + sidebar layout ── */
.content-sidebar { max-width: 1280px; margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.sidebar-sticky { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }

/* ── Sidebar widgets ── */
.widget { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.widget-header { padding: 14px 20px; border-bottom: 1px solid var(--border); font-family: var(--sans); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.widget-item { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; cursor: pointer; transition: background 0.2s; }
.widget-item:last-child { border-bottom: none; }
.widget-item:hover { background: rgba(255,255,255,0.03); }
.widget-num { font-family: var(--serif); font-size: 1.3rem; line-height: 1; color: rgba(255,255,255,0.07); flex-shrink: 0; min-width: 22px; }
.widget-title { font-family: var(--sans); font-size: 0.83rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.widget-title a:hover { color: var(--accent); }
.widget-cat { font-size: 0.7rem; color: var(--muted); margin-top: 3px; }

/* ── Ad spaces ── */
.ad-banner { background: linear-gradient(135deg,#1a1a22,#13131a); border: 1px dashed rgba(255,255,255,0.1); border-radius: var(--r); padding: 22px 28px; display: flex; align-items: center; justify-content: center; gap: 16px; text-align: center; margin: 32px 0; flex-wrap: wrap; }
.ad-label { font-family: var(--sans); font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); border: 1px solid var(--border); padding: 3px 8px; border-radius: 4px; flex-shrink: 0; }
.ad-content { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.ad-content strong { color: var(--text); display: block; margin-bottom: 2px; }
.ad-sidebar { background: linear-gradient(135deg,#1a1a22,#13131a); border: 1px dashed rgba(255,255,255,0.1); border-radius: var(--r); padding: 22px; text-align: center; }

/* ── Tags ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; }
.tag { font-family: var(--sans); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 5px 11px; border-radius: 4px; background: rgba(255,255,255,0.06); color: var(--muted); transition: all 0.2s; cursor: pointer; }
.tag:hover { background: rgba(255,255,255,0.12); color: var(--text); }

/* ── Highlight quote ── */
.highlight-block { background: linear-gradient(135deg,rgba(53,200,255,0.07),rgba(181,123,255,0.04)); border-left: 3px solid var(--accent3); border-radius: 0 12px 12px 0; padding: 26px 30px; margin: 32px 0; }
.highlight-text { font-family: var(--serif); font-size: 1.2rem; font-style: italic; line-height: 1.55; color: var(--text); }
.highlight-source { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; color: var(--accent3); margin-top: 10px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Footer ── */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 24px 28px; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand .logo { margin-bottom: 12px; display: inline-block; }
.footer-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.7; max-width: 260px; }
.footer-col-title { font-family: var(--sans); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 0.83rem; color: var(--muted); transition: color 0.2s; }
.footer-link:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-link { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; transition: background 0.2s; }
.social-link:hover { background: rgba(255,255,255,0.1); }

/* ── Animations ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
.reveal { opacity:0; transform:translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity:1; transform:none; }

/* ── Article page styles ── */
.article-hero { max-width:1280px; margin:0 auto; padding:48px 24px 0; }
.article-hero-inner { position:relative; border-radius:20px; overflow:hidden; aspect-ratio:21/8; min-height:320px; }
.article-hero-inner img { width:100%; height:100%; object-fit:cover; }
.article-hero-overlay { position:absolute; inset:0; background:linear-gradient(to top,rgba(13,13,15,0.96) 0%,rgba(13,13,15,0.3) 55%,transparent 100%); }
.article-hero-content { position:absolute; bottom:0; left:0; right:0; padding:36px 44px; }
.article-cat-pill { display:inline-flex; align-items:center; gap:6px; padding:5px 14px; border-radius:20px; font-family:var(--sans); font-size:0.68rem; font-weight:800; text-transform:uppercase; letter-spacing:0.1em; margin-bottom:14px; }
.article-h1 { font-family:var(--serif); font-size:clamp(1.7rem,3.8vw,2.8rem); line-height:1.1; letter-spacing:-0.025em; max-width:760px; margin-bottom:14px; }
.article-meta-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap; font-size:0.82rem; color:var(--muted); }
.article-meta-row strong { color:var(--text); font-weight:500; }
.article-dot { opacity:0.3; }
.article-layout { max-width:1280px; margin:0 auto; padding:44px 24px 60px; display:grid; grid-template-columns:1fr 300px; gap:52px; align-items:start; }
.article-body { max-width:700px; }
.article-lead { font-size:1.08rem; line-height:1.8; color:rgba(240,237,232,0.82); border-left:3px solid var(--accent); padding-left:20px; margin-bottom:36px; font-style:italic; }
.article-body h2 { font-family:var(--serif); font-size:1.55rem; letter-spacing:-0.02em; margin:38px 0 14px; line-height:1.2; }
.article-body h3 { font-family:var(--sans); font-size:1rem; font-weight:700; margin:26px 0 10px; color:var(--text); }
.article-body p { font-size:0.96rem; line-height:1.85; color:rgba(240,237,232,0.82); margin-bottom:16px; }
.article-body ul, .article-body ol { padding-left:22px; margin-bottom:16px; }
.article-body li { font-size:0.96rem; line-height:1.8; color:rgba(240,237,232,0.82); margin-bottom:6px; }
.article-img { border-radius:12px; overflow:hidden; margin:28px 0; }
.article-img img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.article-img figcaption { font-size:0.73rem; color:var(--muted); padding:7px 0 0; text-align:center; font-style:italic; }
.tool-card { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:18px 22px; margin:14px 0; border-left:3px solid var(--accent); }
.tool-name { font-family:var(--sans); font-size:0.92rem; font-weight:800; color:var(--text); margin-bottom:5px; }
.tool-desc { font-size:0.85rem; color:var(--muted); line-height:1.7; }
.tip-box { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:18px 22px; margin:18px 0; border-left:3px solid var(--accent2); }
.tip-box strong { font-family:var(--sans); font-size:0.88rem; color:var(--accent2); display:block; margin-bottom:5px; }
.share-row { display:flex; align-items:center; gap:10px; padding:22px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); margin:36px 0; }
.share-label { font-family:var(--sans); font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--muted); }
.share-btn { font-family:var(--sans); font-size:0.73rem; font-weight:700; padding:6px 14px; border-radius:6px; border:1px solid var(--border); color:var(--muted); cursor:pointer; transition:all 0.2s; }
.share-btn:hover { background:rgba(255,255,255,0.06); color:var(--text); }
.related-title { font-family:var(--serif); font-size:1.35rem; margin-bottom:22px; margin-top:44px; }

/* ── Responsive ── */
@media (max-width:1100px) {
  .content-sidebar { grid-template-columns:1fr; }
  .sidebar-sticky { position:static; }
  .article-layout { grid-template-columns:1fr; }
  .article-body { max-width:100%; }
  .footer-grid { grid-template-columns:1fr 1fr; gap:32px; }
  .g4 { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px) {
  nav { display:none; }
  .hamburger { display:flex; }
  .g3,.g2 { grid-template-columns:1fr; }
  .g4 { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-bottom { flex-direction:column; gap:12px; text-align:center; }
  .page-hero-inner { padding:32px 24px; }
  .hero-icon { display:none; }
  .page-hero-stats { gap:20px; }
}

/* ── Mobile hero image optimization ── */
.article-hero-inner {
  aspect-ratio: 16/9;
  min-height: 200px;
}
.article-hero-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 768px) {
  .article-hero-inner {
    aspect-ratio: 4/3;
    border-radius: 12px;
  }
  .article-hero-content {
    padding: 18px 20px !important;
  }
  .article-h1 {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
  }
  .article-cat-pill {
    font-size: 0.62rem !important;
    padding: 4px 10px !important;
    margin-bottom: 10px !important;
  }
  /* Card thumb optimized */
  .card-thumb {
    aspect-ratio: 16/9;
  }
  .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
  /* Page hero on mobile */
  .page-hero { padding: 20px 16px 16px; }
  .page-hero-inner { padding: 28px 20px !important; border-radius: 14px; }
  .page-hero-title { font-size: 1.8rem !important; }
  .page-hero-sub { font-size: 0.88rem !important; }
  /* Section padding tighter on mobile */
  .section { padding: 32px 16px; }
  .content-sidebar { padding: 0 16px 40px; gap: 28px; }
  .article-layout { padding: 28px 16px 40px; gap: 32px; }
  .article-body h2 { font-size: 1.3rem !important; }
  /* Index hero */
  .hero-grid { grid-template-columns: 1fr !important; }
  /* Wrap padding */
  .wrap { padding: 0 16px; }
  .header-inner { padding: 0 16px; }
  .divider { margin: 0 16px; }
  footer { padding: 40px 16px 24px; }
}
@media (max-width: 480px) {
  .article-hero-inner { aspect-ratio: 3/2; }
  .logo { font-size: 1.2rem; }
  .card-grid.g3, .card-grid.g2 { grid-template-columns: 1fr; }
}
