/* ============================================================
   research.css — Shared styles for all EasWrk Research pages
   ============================================================ */

/* --- Reset & Root Variables --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand: #5BA3DC;
  --brand-600: #4A93CC;
  --brand-700: #3A82BA;
  --brand-800: #2A6EA0;
  --brand-400: #7ABDE8;
  --brand-300: #9CCDED;
  --brand-100: #E0F0FA;
  --navy-900: #01080f;
  --navy-800: #03101c;
  --navy-700: #071828;
  --navy-600: #0b2035;
  --navy-500: #133050;
  --white: #ffffff;
  --off: #f0f8ff;
  --text: #0d1a26;
  --text-mid: #2e4057;
  --text-dim: #587590;
  --border: #d6e8f5;
  --font: 'Nunito Sans', sans-serif;
  --font-alt: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  line-height: 1.7;
  padding-top: 114px;
}

/* --- Top Bar --- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 201;
  height: 38px;
  background: #020b15;
  border-bottom: 1px solid rgba(91, 163, 220, .14);
  display: flex;
  align-items: center;
  padding: 0 60px;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.top-bar a {
  color: rgba(255, 255, 255, .48);
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0 16px;
  border-left: 1px solid rgba(255, 255, 255, .08);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .18s, background .18s;
  white-space: nowrap;
}

.top-bar a:last-child {
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.top-bar a:hover {
  color: rgba(255, 255, 255, .88);
  background: rgba(91, 163, 220, .07);
}

.top-bar a i {
  font-size: .62rem;
  opacity: .75;
}

.top-bar-account {
  background: rgba(91, 163, 220, .07) !important;
  color: rgba(91, 163, 220, .85) !important;
  border-left: 1px solid rgba(91, 163, 220, .18) !important;
  border-right: 1px solid rgba(91, 163, 220, .18) !important;
}

.top-bar-account:hover {
  background: rgba(91, 163, 220, .15) !important;
  color: #5BA3DC !important;
}

.top-bar-account i {
  opacity: 1 !important;
}

/* --- Nav --- */
nav {
  position: fixed;
  top: 38px;
  left: 0;
  right: 0;
  z-index: 200;
  height: 76px;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #01080f;
  border-bottom: 1px solid rgba(91, 163, 220, .15);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, .65);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  transition: color .2s;
  white-space: nowrap;
  position: relative;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: #5BA3DC;
  border-radius: 1px;
  opacity: .85;
}

.nav-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.btn-nav-cta {
  background: var(--brand);
  color: #fff;
  padding: 9px 18px;
  font-size: .85rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s;
}

.btn-nav-cta:hover {
  background: var(--brand-600);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, .8);
  border-radius: 2px;
  transition: all .3s;
}

/* --- Nav Drawer --- */
.nav-drawer {
  display: none;
  position: fixed;
  top: 114px;
  left: 0;
  right: 0;
  z-index: 199;
  background: #02080f;
  border-bottom: 1px solid rgba(91, 163, 220, .2);
  padding: 16px 20px 24px;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}

.nav-drawer.open {
  display: flex;
}

.nav-drawer a {
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: color .2s;
}

.nav-drawer a:last-child {
  border-bottom: none;
}

.nav-drawer a:hover {
  color: #fff;
}

.nav-drawer .drawer-cta {
  margin-top: 12px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(91, 163, 220, .3);
  border-bottom: none;
}

.drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, .09);
  margin: 6px 0;
}

/* --- Hub Hero (index.html) --- */
.hero {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 100%);
  padding: 130px 60px 72px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(91, 163, 220, .15);
  color: var(--brand-300);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(91, 163, 220, .25);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  max-width: 820px;
  margin: 0 auto 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, .55);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Hub Grid --- */
.grid-section {
  padding: 72px 60px;
  max-width: 1320px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .2s, transform .2s;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(91, 163, 220, .12);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.card p {
  font-size: .875rem;
  color: var(--text-dim);
  line-height: 1.7;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--text-dim);
}

.card-meta i {
  color: var(--brand);
  font-size: .75rem;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: 4px;
  transition: gap .2s;
}

.read-link:hover {
  gap: 10px;
}

/* --- Category Pills (shared + hub variants) --- */
.cat-pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}

.cat-society   { background: #f3e8ff; color: #7c3aed; }
.cat-industry  { background: #dbeafe; color: #1d4ed8; }
.cat-commerce  { background: #dcfce7; color: #15803d; }
.cat-business  { background: #ffedd5; color: #c2410c; }
.cat-media     { background: #fee2e2; color: #b91c1c; }
.cat-health    { background: #ccfbf1; color: #0f766e; }
.cat-education { background: #e0e7ff; color: #3730a3; }
.cat-finance   { background: #e0f0fa; color: #1e6fa0; }
.cat-law       { background: #fef3c7; color: #92400e; }
.cat-economy   { background: #ffe4e6; color: #be123c; }

/* --- Article Hero --- */
.article-hero {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 100%);
  padding: 152px 60px 60px;
}

.breadcrumb {
  font-size: .8rem;
  color: rgba(255, 255, 255, .4);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: rgba(255, 255, 255, .4);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb span {
  margin: 0 2px;
}

.article-hero .cat-pill {
  margin-bottom: 20px;
}

.article-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  max-width: 820px;
  margin-bottom: 20px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .45);
  font-size: .82rem;
}

.meta-item i {
  color: var(--brand);
  font-size: .8rem;
}

/* --- Article Layout --- */
.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 60px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}

.main-content {
  order: 1;
  min-width: 0;
}

/* --- Article Typography --- */
.main-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  margin: 48px 0 18px;
  padding-top: 8px;
}

.main-content h2:first-child {
  margin-top: 0;
}

.main-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-mid);
  margin: 28px 0 12px;
}

.main-content p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.main-content p strong {
  color: var(--text);
  font-weight: 700;
}

.main-content strong {
  color: var(--text);
  font-weight: 700;
}

.main-content ul,
.main-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.main-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.main-content blockquote {
  border-left: 3px solid var(--brand);
  padding: 16px 24px;
  background: var(--off);
  border-radius: 0 8px 8px 0;
  margin: 28px 0;
}

.main-content blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-mid);
}

/* Pull quote variant */
.pullquote {
  border-left: 4px solid var(--brand);
  background: var(--off);
  padding: 20px 24px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
}

.pullquote p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  margin: 0;
  line-height: 1.7;
}

/* Stat block */
.stat-block {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  display: block;
}

.stat-label {
  font-size: .78rem;
  color: rgba(255, 255, 255, .55);
  margin-top: 4px;
  line-height: 1.4;
}

/* Case box */
/* --- Info Box --- */
.info-box {
  background: var(--brand-100);
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  margin: 32px 0;
}

.info-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-800);
  margin-bottom: 10px;
}

.info-box p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0;
}

/* --- Exposure Table --- */
.exposure-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.92rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.exposure-table thead tr {
  background: var(--navy-900);
  color: #fff;
}

.exposure-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.exposure-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  vertical-align: top;
}

.exposure-table tbody tr:last-child td {
  border-bottom: none;
}

.exposure-table tbody tr:nth-child(even) {
  background: var(--off);
}

.risk-high {
  font-weight: 700;
  color: #c2410c;
}

.risk-med {
  font-weight: 700;
  color: #b45309;
}

.risk-low {
  font-weight: 700;
  color: #15803d;
}

/* --- Case Box --- */
.case-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 28px 0;
}

.case-box h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-box p {
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text-mid);
  margin: 0;
}

/* --- References --- */
.refs-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.refs-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.refs-list {
  list-style: decimal;
  margin-left: 20px;
}

.refs-list li {
  font-size: .875rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 10px;
}

/* Legacy .references class support */
.references {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.references h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.references ol {
  padding-left: 20px;
}

.references li {
  font-size: .875rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 10px;
}

/* --- Further Reading --- */
.further-reading {
  margin-top: 40px;
  padding: 28px;
  background: var(--off);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.further-reading h3 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.further-reading ul {
  list-style: none;
}

.further-reading li {
  margin-bottom: 10px;
}

.further-reading a {
  color: var(--brand);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
}

.further-reading a:hover {
  text-decoration: underline;
}

/* Further reading grid cards variant */
.fr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fr-card {
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  transition: all .2s;
  display: block;
}

.fr-card:hover {
  border-color: var(--brand);
  background: #e8f4fb;
}

.fr-cat {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

.fr-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

/* --- ToC Sidebar --- */
.toc-sidebar {
  order: 2;
  position: sticky;
  top: 120px;
}

.toc-box {
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.toc-box h4,
.toc-box h3 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 2px;
}

.toc-list a {
  display: block;
  font-size: .85rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 6px;
  line-height: 1.4;
  transition: all .2s;
}

.toc-list a:hover {
  color: var(--brand);
  background: rgba(91, 163, 220, .07);
}

.toc-num {
  display: inline-block;
  width: 20px;
  font-size: .75rem;
  color: var(--brand);
  font-weight: 700;
  flex-shrink: 0;
}

.toc-cta {
  margin-top: 24px;
  background: var(--brand);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 700;
  display: block;
  text-align: center;
  transition: background .2s;
}

.toc-cta:hover {
  background: var(--brand-600);
}

/* --- Footer --- */
footer {
  background: #01080f;
  border-top: 1px solid rgba(91, 163, 220, .1);
  padding: 64px 60px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .footer-desc {
  color: rgba(255, 255, 255, .45);
  font-size: .85rem;
  line-height: 1.7;
  margin-top: 16px;
  max-width: 240px;
}

.fsocial {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.fsocial a {
  color: rgba(255, 255, 255, .4);
  font-size: .9rem;
  transition: color .2s;
}

.fsocial a:hover {
  color: var(--brand);
}

.footer-col h5 {
  color: rgba(255, 255, 255, .9);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, .45);
  text-decoration: none;
  font-size: .875rem;
  transition: color .2s;
}

.footer-col ul li a:hover {
  color: var(--brand);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: rgba(255, 255, 255, .3);
  font-size: .8rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, .45);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--brand);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .top-bar {
    display: none;
  }

  nav {
    top: 0;
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-drawer {
    top: 76px;
  }

  body {
    padding-top: 76px;
  }

  /* Hub hero */
  .hero {
    padding: 72px 24px 60px;
  }

  .grid-section {
    padding: 48px 24px;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Article hero */
  .article-hero {
    padding: 48px 24px 40px;
  }

  /* Article layout */
  .content-wrap {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 32px;
  }

  .toc-sidebar {
    position: static;
    order: 0;
    margin-bottom: 8px;
  }

  .main-content {
    order: 1;
  }

  .stat-block {
    grid-template-columns: 1fr;
  }

  .fr-grid {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 48px 24px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .article-hero h1 {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
