/*
 * styles.css — AI Strategic Horizon
 * Shared styles for all AI Strategic Horizon pages.
 */

/* ── CSS VARIABLES ────────────────────────────────────────────────────── */
:root {
  /* Core palette */
  --navy:      #0a1628;
  --navy2:     #0d1d36;
  --navy3:     #142444;
  --nav-bg:    #10222E;
  --hero-bg:   #152C3B;
  --gold:      #FFD966;
  --gold-lt:   #ffe599;
  --gold-dim:  rgba(255,217,102,.18);

  --cream:     #ffffff;
  --white:     #ffffff;
  --text:      #1a1a1a;
  --muted:     #666666;
  --border:    #e4e4e4;
  --border-dk: rgba(255,255,255,.08);

  /* Accent colours */
  --ai-blue:   #2c5f8a;
  --ai-purple: #5a4a7a;
  --ai-teal:   #2a6b5f;
  --ai-green:  #2c6b4a;

  /* Derived tokens */
  --accent-glow-sm:   rgba(255,217,102,.10);
  --accent-glow-md:   rgba(255,217,102,.18);
  --accent-border:    rgba(255,217,102,.30);
  --accent-border-dk: rgba(255,217,102,.45);
  --sage-glow:        rgba(44,95,138,.10);
  --umber-glow:       rgba(90,74,122,.10);
  --skeleton-a:       #eeeeee;
  --skeleton-b:       #f7f7f7;

  /* Gradients */
  --grad-hero: linear-gradient(160deg, #10222E 0%, #152C3B 55%, #1a3547 100%);
  --grad-gold: linear-gradient(90deg, #FFD966, #ffe599);
  --grad-ai:   linear-gradient(135deg, #2c5f8a, #5a4a7a);

  /* Glow */
  --glow-gold: 0 0 20px rgba(255,217,102,.18);

  /* Shadows */
  --shadow:    0 1px 12px rgba(0,0,0,.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,.09);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.13);
  --glow-gold: 0 0 20px rgba(181,97,74,.18);

  /* Typography */
  --font-serif: 'Bodoni MT', 'Bodoni 72', 'Book Antiqua', Georgia, serif;
  --font-sans:  Arial, 'Helvetica Neue', sans-serif;

  /* Layout */
  --radius:    4px;
  --radius-sm: 3px;
  --radius-xs: 2px;
}

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

/* ── BASE ─────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background: #ffffff;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── HERO BANNER ──────────────────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  padding: 2.2rem 6vw 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,.08);
}

/* hero-pill hidden via HTML — keep rule in case used elsewhere */
.hero-pill { display: none; }

.hero h1 {
  font-family: 'Bodoni MT', 'Bodoni 72', 'Book Antiqua', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 10px;
  position: relative;
  font-weight: 700;
  letter-spacing: -.01em;
}
.hero h1 em {
  color: var(--gold);
  font-style: normal;
  font-weight: 300;
}
.hero p {
  font-family: 'Bookman Old Style', 'Bookman', 'Palatino Linotype', Georgia, serif;
  font-size: .95rem;
  color: rgba(255,255,255,.75);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
  position: relative;
}

/* Hero stats — hidden */
.hero-stats { display: none !important; }

/* ── MAIN CONTAINER ───────────────────────────────────────────────────── */
.main {
  flex: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 48px 48px 64px;
  width: 100%;
}

/* ── SECTION LABEL ────────────────────────────────────────────────────── */
.section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: '';
  display: block;
  width: 18px; height: 1px;
  background: var(--gold);
}

/* ── NEWS CARD GRID ───────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

/* ── NEWS CARD ────────────────────────────────────────────────────────── */
.news-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cccccc;
}
.news-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--navy);
  opacity: 0; transition: opacity .2s;
}
.news-card:hover::after { opacity: 1; }

.news-card__thumb {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden; position: relative;
  background: var(--navy2);
  flex-shrink: 0;
}
.news-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card__thumb img { transform: scale(1.03); }
.news-card__thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy2) 0%, var(--navy3) 100%);
  font-size: 1.8rem; opacity: .4;
}

.news-card__body {
  padding: 16px 18px 14px;
  display: flex; flex-direction: column; flex: 1;
  gap: 8px;
}
.news-card__meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.news-card__date {
  font-size: .65rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.news-card__tag {
  font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 2px;
  background: var(--sage-glow); color: var(--ai-blue);
  border: 1px solid rgba(44,95,138,.15);
}
.news-card__title {
  font-family: Arial, 'Helvetica Neue', sans-serif;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.35;
  font-weight: 700;
}
.news-card__summary {
  font-size: .85rem;
  line-height: 1.68;
  color: var(--muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__cta {
  display: flex; align-items: center; gap: 5px;
  font-size: .76rem; font-weight: 700;
  color: var(--navy);
  margin-top: 4px;
  transition: gap .18s;
}
.news-card:hover .news-card__cta { gap: 9px; }
.news-card__cta svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ── FEATURED NEWS CARD ───────────────────────────────────────────────── */
.news-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  max-height: 280px;
}
.news-card--featured .news-card__thumb {
  width: 40%; aspect-ratio: unset;
  flex-shrink: 0;
}
.news-card--featured .news-card__body {
  padding: 26px 30px;
  justify-content: center;
}
.news-card--featured .news-card__title {
  font-size: 1.55rem;
  line-height: 1.2;
}
.news-card--featured .news-card__summary { -webkit-line-clamp: 4; }

/* ── PORTAL NAVIGATION CARDS ──────────────────────────────────────────── */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}
.portal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  position: relative;
}
.portal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #bbbbbb;
}
.portal-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.portal-card__content { flex: 1; }
.portal-card__label {
  font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 5px;
}
.portal-card__title {
  font-family: Arial, sans-serif; font-size: 1.1rem; font-weight: 700;
  color: var(--navy); line-height: 1.25; margin-bottom: 8px;
}
.portal-card__desc { font-size: .84rem; line-height: 1.68; color: var(--muted); }
.portal-card__arrow {
  font-size: .8rem; font-weight: 700; margin-top: 12px;
  display: flex; align-items: center; gap: 5px;
  transition: gap .18s;
}
.portal-card:hover .portal-card__arrow { gap: 9px; }
.portal-card--caio .portal-card__icon  { background: var(--sage-glow); color: var(--ai-blue); }
.portal-card--caio .portal-card__label { color: var(--ai-blue); }
.portal-card--caio .portal-card__arrow { color: var(--ai-blue); }
.portal-card--ais2e .portal-card__icon  { background: var(--umber-glow); color: var(--ai-purple); }
.portal-card--ais2e .portal-card__label { color: var(--ai-purple); }
.portal-card--ais2e .portal-card__arrow { color: var(--ai-purple); }

/* ── SEARCH & FILTER BAR ──────────────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px; flex-wrap: wrap;
}
.filter-search {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 8px;
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.filter-search:focus-within {
  border-color: var(--navy); box-shadow: 0 0 0 2px rgba(10,22,40,.08);
}
.filter-search svg { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.filter-search input {
  border: none; outline: none; background: transparent;
  font-family: var(--font-sans); font-size: .88rem; color: var(--text);
  width: 100%;
}
.filter-search input::placeholder { color: #aaaaaa; }
.filter-count {
  font-size: .72rem; font-weight: 600; color: var(--muted);
  white-space: nowrap;
  background: #f5f5f5; border: 1px solid var(--border);
  padding: 7px 14px; border-radius: var(--radius-sm);
}
.filter-count span { color: var(--navy); font-weight: 700; font-size: .9rem; }

/* ── LOADING SKELETON ─────────────────────────────────────────────────── */
.skeleton-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.skeleton-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.skeleton-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.skeleton-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.skeleton-line {
  height: 11px; border-radius: 2px;
  background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.skeleton-line--short { width: 38%; }
.skeleton-line--title { height: 17px; width: 86%; }
.skeleton-line--mid   { width: 66%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── EMPTY / ERROR STATE ──────────────────────────────────────────────── */
.empty-state {
  grid-column: 1/-1; text-align: center; padding: 60px 40px; color: var(--muted);
}
.empty-state-icon { font-size: 2.4rem; opacity: .3; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; font-weight: 700; }
.empty-state p  { font-size: .88rem; }

/* ── FOOTER (legacy class — sh-footer in nav.js is the live one) ──────── */
.footer {
  background: #10222E;
  text-align: center; padding: 20px 40px;
  font-family: 'Bodoni MT', 'Bodoni 72', 'Book Antiqua', Georgia, serif;
  font-size: .78rem; color: #ffffff;
  border-top: 1px solid rgba(255,255,255,.10); margin-top: auto;
}
.footer a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer a:hover { color: #FFD966; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .news-grid { grid-template-columns: repeat(2,1fr); }
  .news-card--featured { flex-direction: column; max-height: none; }
  .news-card--featured .news-card__thumb { width: 100%; aspect-ratio: 16/9; }
  .main { padding: 40px 28px 56px; }
}
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .main { padding: 28px 18px 44px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .hero { padding: 1.6rem 5vw 1.4rem; }
  .main { padding: 20px 14px 36px; }
}
