/* =============================================================
   ifSingle v4 — Design System
   Loaded after style.css; overrides legacy styles for all
   .v4-* components while leaving form/table rules intact.
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

/* ─────────────────────────────────────────
   LEGACY OVERRIDE
   style.css (loaded before this file) has global A:link, UL,LI
   and STRONG rules that pollute v4 components. The rules below
   match or beat their specificity since this file loads last.
───────────────────────────────────────── */

/* A:link in style.css is specificity 0-1-1 — match it here so
   the cascade (last-declared wins) gives v4 the clean default. */
a:link, a:visited, a:active {
  color: inherit;
  text-decoration: none;
  padding-left: 0;
  padding-right: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
}
a:hover { color: inherit; text-decoration: none; }

/* UL,LI in style.css is specificity 0-0-2.
   "ul li" is 0-0-3, so it wins. */
ul li {
  list-style: none;
  list-style-image: none;
  padding-top: 0;
  padding-bottom: 0;
  padding-right: 0;
  font-size: inherit;
  font-family: inherit;
  color: inherit;
  vertical-align: baseline;
}

/* STRONG in style.css is 0-0-1 — match with same selector, last wins. */
strong { color: inherit; font-family: inherit; font-size: inherit; }

:root {
  --bg:      #0B0914;
  --surface: #12101C;
  --raised:  #1C1828;
  --border:  rgba(124,58,237,0.18);
  --purple:  #7C3AED;
  --orange:  #F97316;
  --pink:    #EC4899;
  --text:    #F1F0F5;
  --muted:   #9CA3AF;
  --faint:   #4B5563;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'Segoe UI', Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0; padding: 0;
}

a { color: inherit; text-decoration: none; }

.v4-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ─────────────────────────────────────────
   NAVBAR
───────────────────────────────────────── */
.v4-nav {
  position: sticky; top: 0; z-index: 100;
  height: 66px; display: flex; align-items: center;
  background: rgba(11,9,20,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.v4-nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; width: 100%;
}
.v4-nav-logo img { height: 38px; display: block; }

/* nav-links is output by nav_main.cfm */
ul.nav-links {
  display: flex; gap: 4px; list-style: none;
  font-size: 12.5px; font-weight: 600;
  margin: 0; padding: 0;
}
ul.nav-links li a {
  display: block; padding: 6px 13px; border-radius: 20px;
  color: var(--muted); transition: all 0.15s;
}
ul.nav-links li a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
ul.nav-links li a.is-active { color: var(--orange); }

.v4-nav-actions { display: flex; align-items: center; gap: 10px; }
.v4-btn-ghost {
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14); background: transparent;
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  cursor: pointer; display: inline-block;
}
.v4-btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.v4-btn-primary {
  padding: 7px 18px; border-radius: 20px;
  background: var(--orange); border: none;
  color: white; font-size: 12.5px; font-weight: 700;
  cursor: pointer; display: inline-block;
}
.v4-btn-primary:hover { background: #ea6d15; }

/* ─────────────────────────────────────────
   HOME HERO — full-height with photo
───────────────────────────────────────── */
.v4-hero {
  min-height: 580px; display: flex; align-items: center;
  position: relative; overflow: hidden;
  background: var(--bg);
}
.v4-hero-photo {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 50%; overflow: hidden; pointer-events: none;
}
.v4-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v4-hero-photo::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(11,9,20,0.7) 30%, rgba(11,9,20,0.15) 70%, transparent 100%);
}
.v4-hero-content {
  position: relative; z-index: 2;
  padding: 88px 0; max-width: 600px;
}
.v4-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.28);
  border-radius: 20px; padding: 4px 14px 4px 10px;
  font-size: 12px; font-weight: 700; color: #C4B5FD;
  letter-spacing: 0.4px; margin-bottom: 22px;
}
.v4-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple); display: inline-block;
  animation: v4pulse 2.2s ease-in-out infinite;
}
@keyframes v4pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(.7); }
}
.v4-hero-content h1 {
  font-size: 54px; font-weight: 900; line-height: 1.07;
  letter-spacing: -1.5px; margin-bottom: 18px;
}
.v4-grad-text {
  background: linear-gradient(90deg, var(--purple) 0%, var(--pink) 55%, var(--orange) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.v4-hero-content > p {
  font-size: 17px; color: var(--muted); line-height: 1.65;
  max-width: 460px; margin-bottom: 36px;
}
.v4-hero-btns { display: flex; gap: 12px; align-items: center; margin-bottom: 52px; }
.v4-btn-grad {
  background: linear-gradient(90deg, var(--purple), var(--orange));
  color: white; border: none; padding: 13px 30px; border-radius: 28px;
  font-size: 15px; font-weight: 700; cursor: pointer; display: inline-block;
  box-shadow: 0 4px 24px rgba(124,58,237,0.28);
}
.v4-btn-grad:hover { opacity: 0.9; }
.v4-btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.15);
  padding: 12px 26px; border-radius: 28px;
  font-size: 15px; font-weight: 600; cursor: pointer; display: inline-block;
}
.v4-btn-outline:hover { border-color: rgba(255,255,255,0.35); }
.v4-hero-stats {
  display: flex; gap: 40px; padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.v4-stat-num {
  font-size: 24px; font-weight: 900;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.v4-stat-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ─────────────────────────────────────────
   INNER PAGE HERO — compact title bar
───────────────────────────────────────── */
.v4-page-hero {
  padding: 52px 0 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.v4-page-hero h1 {
  font-size: 34px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 6px;
}
.v4-page-hero p { font-size: 15px; color: var(--muted); }

/* ─────────────────────────────────────────
   GRADIENT DIVIDER
───────────────────────────────────────── */
.v4-grad-bar {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--pink), var(--orange), transparent);
  opacity: 0.5;
}

/* ─────────────────────────────────────────
   SECTION COMMON
───────────────────────────────────────── */
.v4-section { padding: 72px 0; }
.v4-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--orange); margin-bottom: 8px;
}
.v4-section-title {
  font-size: 28px; font-weight: 900; letter-spacing: -0.3px;
}
.v4-section-header {
  display: flex; align-items: flex-end;
  justify-content: space-between; margin-bottom: 32px;
}
.v4-see-all { font-size: 13px; font-weight: 600; color: var(--orange); }

/* ─────────────────────────────────────────
   CATEGORY BUTTONS — colorful image tiles
───────────────────────────────────────── */
.v4-cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.v4-cat-btn {
  display: block; border-radius: 16px; overflow: hidden;
  cursor: pointer; transition: all 0.22s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.v4-cat-btn:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(124,58,237,0.45);
  border-color: rgba(255,255,255,0.3);
}
.v4-cat-btn img { width: 100%; height: 150px; object-fit: cover; display: block; }

/* ─────────────────────────────────────────
   ARTICLES + SIDEBAR
───────────────────────────────────────── */
.v4-articles-layout {
  display: grid; grid-template-columns: 1fr 1fr 1fr 284px;
  gap: 18px; align-items: start;
}
.v4-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  cursor: pointer; transition: all 0.2s ease; display: block;
}
.v4-card:hover {
  border-color: rgba(124,58,237,0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.35);
}
.v4-card-img {
  height: 164px; overflow: hidden; position: relative;
}
.v4-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v4-chip {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  padding: 3px 10px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--orange);
}
.v4-card-body { padding: 16px 18px 20px; }
.v4-card-meta { font-size: 11px; color: var(--faint); margin-bottom: 8px; }
.v4-card-title { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.v4-card-excerpt { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ─────────────────────────────────────────
   SIDEBAR WIDGETS
───────────────────────────────────────── */
.v4-sidebar { display: flex; flex-direction: column; gap: 14px; }
.v4-widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.v4-widget-head {
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--muted);
}
.v4-widget-body { padding: 16px 18px; }
.v4-avatars { display: flex; margin-bottom: 12px; }
.v4-av {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--surface); margin-left: -8px;
}
.v4-av:first-child { margin-left: 0; }
.v4-av1 { background: linear-gradient(135deg, var(--purple), var(--pink)); }
.v4-av2 { background: linear-gradient(135deg, var(--pink), var(--orange)); }
.v4-av3 { background: linear-gradient(135deg, #3B82F6, var(--purple)); }
.v4-av4 { background: linear-gradient(135deg, #10B981, #3B82F6); }
.v4-widget-body p { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.45; }
.v4-btn-full {
  display: block; width: 100%; padding: 10px;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  color: white; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer; text-align: center;
}
.v4-disc-row {
  display: flex; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.v4-disc-row:last-child { border-bottom: none; padding-bottom: 0; }
.v4-disc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple); margin-top: 5px; flex-shrink: 0;
}
.v4-disc-row a { color: var(--muted); }
.v4-disc-row a:hover { color: var(--text); }

/* ─────────────────────────────────────────
   CTA BAND
───────────────────────────────────────── */
.v4-cta-band {
  padding: 80px 0; text-align: center;
  background: linear-gradient(135deg,
    rgba(124,58,237,0.13) 0%,
    rgba(236,72,153,0.07) 50%,
    rgba(249,115,22,0.10) 100%);
  border-top: 1px solid rgba(124,58,237,0.18);
  border-bottom: 1px solid rgba(249,115,22,0.12);
}
.v4-cta-band h2 {
  font-size: 36px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 14px;
}
.v4-cta-band p { font-size: 16px; color: var(--muted); margin-bottom: 28px; }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.v4-footer { background: var(--surface); border-top: 1px solid var(--border); }
.v4-footer-top {
  padding: 48px 0 36px;
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 32px;
  border-bottom: 1px solid var(--border);
}
.v4-footer-tagline { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.v4-footer-col h4 {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--faint); margin-bottom: 14px;
}
.v4-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; padding: 0; margin: 0; }
.v4-footer-col li a { font-size: 13px; color: var(--muted); }
.v4-footer-col li a:hover { color: var(--text); }
.v4-footer-bottom {
  padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--faint);
}
.v4-socials { display: flex; gap: 8px; }
.v4-soc {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--raised); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); cursor: pointer;
}
.v4-soc:hover { border-color: var(--purple); color: var(--text); }

/* ─────────────────────────────────────────
   INNER SECTION LAYOUT
───────────────────────────────────────── */
.v4-inner-layout {
  display: grid;
  grid-template-columns: 1fr 284px;
  gap: 32px; align-items: start;
  padding: 52px 0 72px;
}
.v4-section-desc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 28px; margin-bottom: 24px;
  font-size: 15px; color: var(--muted); line-height: 1.7;
}
.v4-section-desc h2 { color: var(--text); font-size: 20px; margin-bottom: 10px; }
.v4-subsection-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.v4-subsection-link {
  display: block; padding: 18px 20px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all 0.18s ease;
}
.v4-subsection-link:hover {
  border-color: rgba(124,58,237,0.45); color: var(--text);
  background: var(--raised); transform: translateY(-2px);
}

/* ─────────────────────────────────────────
   MAIN WRAPPER (replaces old content-wrap-v1)
───────────────────────────────────────── */
main { display: block; }

/* ─────────────────────────────────────────
   HAMBURGER BUTTON
───────────────────────────────────────── */
.v4-hamburger {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}
.v4-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.v4-nav.is-open .v4-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.v4-nav.is-open .v4-hamburger span:nth-child(2) { opacity: 0; }
.v4-nav.is-open .v4-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────
   RESPONSIVE — TABLET  ≤ 1100px
───────────────────────────────────────── */
@media (max-width: 1100px) {
  ul.nav-links { gap: 0; }
  ul.nav-links li a { padding: 6px 9px; font-size: 11.5px; }

  .v4-hero-content h1 { font-size: 46px; }

  .v4-articles-layout {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  /* sidebar spans full width below the 2 article columns */
  .v4-articles-layout > .v4-sidebar {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }
  .v4-articles-layout > .v4-sidebar > .v4-widget {
    flex: 1 1 260px;
  }

  .v4-inner-layout { grid-template-columns: 1fr 260px; }
  .v4-subsection-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────────────────
   RESPONSIVE — MOBILE  ≤ 768px
───────────────────────────────────────── */
@media (max-width: 768px) {
  .v4-container { padding: 0 16px; }

  /* ── Nav ── */
  .v4-nav { height: auto; align-items: flex-start; }
  .v4-nav > .v4-container { width: 100%; }
  .v4-nav-inner {
    flex-wrap: wrap;
    padding: 10px 0;
    min-height: 52px;
    align-items: center;
  }

  /* Hamburger visible, Sign In hidden to save room */
  .v4-hamburger { display: flex; }
  .v4-signin-btn { display: none; }

  /* Nav links: hidden by default, drop down when open */
  ul.nav-links {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0 6px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }
  .v4-nav.is-open ul.nav-links { display: flex; }
  ul.nav-links li a {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
  }

  .v4-nav-actions { gap: 6px; margin-left: auto; }
  .v4-btn-primary { font-size: 12px; padding: 6px 14px; }
  .v4-nav-logo img { height: 32px; }

  /* ── Hero — stack photo above text ── */
  .v4-hero {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }
  .v4-hero-photo {
    position: relative;
    width: 100%;
    height: 220px;
    right: auto; top: auto; bottom: auto;
  }
  .v4-hero-photo::before {
    background: linear-gradient(180deg, rgba(11,9,20,0.1) 0%, var(--bg) 100%);
  }
  .v4-hero-content {
    padding: 24px 0 52px;
    max-width: 100%;
  }
  .v4-hero-content h1 { font-size: 36px; letter-spacing: -0.8px; margin-bottom: 14px; }
  .v4-hero-content > p { font-size: 15px; max-width: 100%; margin-bottom: 28px; }
  .v4-hero-btns { flex-wrap: wrap; margin-bottom: 36px; }
  .v4-hero-stats { gap: 24px; }

  /* ── Inner page hero ── */
  .v4-page-hero { padding: 28px 0 22px; }
  .v4-page-hero h1 { font-size: 24px; }

  /* ── Sections ── */
  .v4-section { padding: 44px 0; }
  .v4-section-title { font-size: 22px; }
  .v4-section-header { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 20px; }

  /* ── Category grid: 2 columns ── */
  .v4-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .v4-cat-btn img { height: 120px; }

  /* ── Articles: single column ── */
  .v4-articles-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .v4-articles-layout > .v4-sidebar {
    grid-column: 1;
    flex-direction: column;
  }

  /* ── CTA ── */
  .v4-cta-band { padding: 52px 0; }
  .v4-cta-band h2 { font-size: 26px; }
  .v4-cta-band p { font-size: 14px; }

  /* ── Inner section layout: stack ── */
  .v4-inner-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 0 48px;
  }
  .v4-subsection-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* ── Footer ── */
  .v4-footer-top {
    flex-direction: column;
    gap: 24px;
    padding: 32px 0 24px;
  }
  .v4-footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — SMALL PHONES  ≤ 480px
───────────────────────────────────────── */
@media (max-width: 480px) {
  .v4-hero-content h1 { font-size: 30px; }
  .v4-hero-stats { flex-wrap: wrap; gap: 16px; }

  .v4-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .v4-cat-btn img { height: 100px; }

  .v4-subsection-grid { grid-template-columns: 1fr; }

  .v4-cta-band h2 { font-size: 22px; }
  .v4-btn-grad { width: 100%; text-align: center; }
}
