/* 
================================================================================
FILE PATH: assets/css/custom.css
INSTRUCTIONS: Replace your ENTIRE custom.css file with this content
FIX: Added max-width and proper containment to keep text inside grey area
================================================================================
*/

/* Google Fonts imported in custom-head.html */

/* Site-wide text selection color */
::selection {
  background-color: #005EA2;
  color: white;
}

::-moz-selection {
  background-color: #005EA2;
  color: white;
}

:root {
  --accent: #005EA2;
  --accent-dark: #004785;
  --black: 15, 18, 25;
  --gray: 96, 115, 159;
  --gray-light: 229, 233, 240;
  --gray-dark: 34, 41, 57;
  --gray-gradient: rgba(var(--gray-light), 50%), #fff;
  --box-shadow:
    0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%), 0 16px 32px
    rgba(var(--gray), 33%);

  /* Design system variables */
  --bg-primary: #ffffff;
  --text-primary: #161616;
  --text-secondary: #393939;
  --heading-color: #000000;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
}

/* Base styles */
body {
  font-family: var(--font-body) !important;
  margin: 0;
  padding: 0;
  text-align: left;
  background: var(--bg-primary) !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-primary) !important;
  font-size: 18px !important;
  line-height: 1.7 !important;
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* Main content area - full width */
main {
  width: 100%;
  margin: auto;
  padding: 0 !important;
  background: var(--bg-primary) !important;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Hide the default Hextra theme navigation */
.hextra-nav-container {
  display: none !important;
}

body {
  padding-top: 65px !important; /* Account for fixed nav */
}

/* ============================================
   LOGO STYLING - ALL BLACK (excluding breadcrumbs)
   ============================================ */
.logo-text,
.main-title,
.hero-left h1,
.nav-brand a,
.custom-nav .logo-text,
.hextra-nav-container a[href="/"],
.hextra-navbar a[href="/"],
.navbar a[href="/"],
.logo-link,
.logo-link .logo-text,
header .logo-text,
header a[href="/"],
.custom-nav a[href="/"] {
  font-family: 'Playfair Display', serif !important;
  color: #161616 !important; /* BLACK */
  font-weight: 600 !important;
  font-size: 1.5rem !important;
  text-decoration: none !important;
  letter-spacing: -0.01em !important;
}

/* Ampersand styling in logo - also BLACK (not in breadcrumbs) */
.ampersand,
.hextra-nav-container .ampersand,
.navbar .ampersand,
.logo-text .ampersand,
.main-title .ampersand,
.custom-nav .ampersand,
header .ampersand {
  font-style: italic !important;
  font-family: 'Playfair Display', serif !important;
  color: #161616 !important; /* BLACK */
}

/* ============================================
   BREADCRUMB STYLING - CONSISTENT FONTS
   ============================================ */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Sans', sans-serif !important;
}

/* ALL breadcrumb links - uniform styling */
.breadcrumb a,
.breadcrumb-home,
.breadcrumb a[href="/"],
nav.breadcrumb a,
nav.breadcrumb a[href="/"] {
  font-family: 'IBM Plex Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #6f6f6f !important;
  text-decoration: none !important;
  letter-spacing: normal !important;
}

/* All other breadcrumb elements */
.breadcrumb-separator,
.breadcrumb-current,
.breadcrumb span {
  font-family: 'IBM Plex Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #6f6f6f !important;
  text-decoration: none !important;
}

.breadcrumb-separator {
  margin: 0 0.25rem;
  color: #6f6f6f !important;
}

/* Hover states for breadcrumbs */
.breadcrumb a:hover,
nav.breadcrumb a:hover {
  color: #6f6f6f !important;
  text-decoration: underline !important;
  opacity: 1;
}

/* ============================================
   HERO SECTION - FIXED: Proper containment
   ============================================ */

/* Landing page hero */
.hero-section {
  width: 100%;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

.hero-container {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
  position: relative;
}

.hero-inner {
  width: 85%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 4rem 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 280px; /* Video column wider, left column slightly narrower */
  gap: 1.5rem; /* Reduced gap for tighter spacing */
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 580px;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.75rem;
  font-weight: 700;
  margin: 0;
  color: #161616 !important; /* BLACK */
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.main-description {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 360px;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.primary-button {
  background-color: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background-color: var(--accent-dark);
}

.secondary-button {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.secondary-button:hover {
  background-color: rgba(15, 98, 254, 0.08);
}

.arrow-icon {
  margin-left: 0.75rem;
  font-size: 1.1rem;
}

.hero-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  margin: 0;
}

.hero-image-container {
  width: 100%;
  max-width: 640px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15, 18, 25, 0.08);
  margin: 0 auto;
  padding: 0;
}

.hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0;
  padding: 0;
}

/* Video Styles */
.hero-video-container {
  width: 100%;
  max-width: 680px; /* Increased from 640px */
  overflow: visible;
  box-shadow: 0 24px 48px rgba(15, 18, 25, 0.08);
  margin: 0 auto 2rem;
  padding: 0;
  position: relative;
  border-radius: 10px;
}

.hero-video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0;
  padding: 0;
}

.video-caption-left {
  position: absolute;
  bottom: -28px;
  left: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: #161616;
  font-style: italic;
  max-width: 90%;
  word-wrap: break-word;
  line-height: 1.4;
}

.hero-sidebar {
  background: #F8F8F8;
  border-left: 1px solid #e0e0e0;
  padding: 1.25rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  align-items: flex-start;
  text-align: left;
  /* ADDED: Critical fixes for containment */
  width: 280px; /* Fixed width to match grid */
  max-width: 280px; /* Ensure it never exceeds */
  min-width: 280px; /* Ensure it never shrinks */
  box-sizing: border-box; /* Include padding in width calculation */
  overflow: hidden; /* Prevent content overflow */
  align-self: start; /* Keep sidebar at top while other items center */
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--heading-color);
  font-weight: 600;
  margin: 0;
  width: 100%; /* ADDED: Stay within container */
  word-wrap: break-word; /* ADDED: Wrap long words */
}

.research-items {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  align-items: flex-start;
  text-align: left;
  width: 100%; /* ADDED: Stay within container */
}

.research-item {
  border-bottom: 1px solid rgba(0, 67, 206, 0.15);
  padding-bottom: 0.85rem;
  width: 100%; /* ADDED: Stay within container */
  box-sizing: border-box; /* ADDED: Include padding in width */
}

.research-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem; /* REDUCED: Less gap to fit better */
  text-decoration: none;
  color: #0043ce;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  width: 100%; /* ADDED: Stay within container */
  box-sizing: border-box; /* ADDED */
}

.research-link:hover {
  text-decoration: underline;
}

.research-link span:first-child {
  flex: 1;
  text-align: left;
  min-width: 0;
  word-wrap: break-word; /* ADDED: Wrap long titles */
  overflow-wrap: break-word; /* ADDED: Additional wrapping */
}

.research-link span:last-child {
  flex-shrink: 0;
  margin-left: 0.5rem; /* ADDED: Small margin for arrow */
}

.view-all {
  margin-top: 0.95rem;
  width: 100%; /* ADDED: Stay within container */
}

.view-all-link {
  color: #0043ce;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  display: block;
  text-align: left;
  width: 100%; /* ADDED */
  word-wrap: break-word; /* ADDED */
}

.view-all-link:hover {
  text-decoration: underline;
}

/* Featured Work Section - Full Width */
.featured-work {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: white;
  padding: 4rem 0;
  overflow-x: hidden;
}

.featured-work .section-title {
  font-family: var(--font-body);
  font-size: 2.25rem;
  font-weight: 300;
  margin-bottom: 2rem;
  color: var(--heading-color);
  text-align: left;
  width: 85%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.3;
}

.featured-grid {
  width: 85%;
  max-width: 1680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.featured-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blue-gradient {
  background: linear-gradient(135deg, #005EA2 0%, #4589ff 100%);
}

.purple-gradient {
  background: linear-gradient(135deg, #8a3ffc 0%, #be95ff 100%);
}

.teal-gradient {
  background: linear-gradient(135deg, #007d79 0%, #42be65 100%);
}

.orange-gradient {
  background: linear-gradient(135deg, #ff832b 0%, #ffb366 100%);
}

.dark-pattern {
  background: linear-gradient(135deg, #161616 0%, #393939 100%);
  position: relative;
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-type {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #005EA2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.card-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  color: #161616;
  line-height: 1.4;
  flex: 1;
  margin-bottom: 1rem;
}

.card-arrow {
  align-self: flex-start;
  color: var(--accent);
}

/* Key Focus Areas Section - Full Width with Square Images */
.focus-areas-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 4rem 0;
  background: #005EA2;
  overflow-x: hidden;
}

/* Text selection for blue background */
.focus-areas-section ::selection {
  background-color: #ffffff;
  color: #000000;
}

.focus-areas-section ::-moz-selection {
  background-color: #ffffff;
  color: #000000;
}

.focus-areas-section .section-title {
  font-family: var(--font-body);
  font-size: 2.25rem;
  font-weight: 300;
  margin-bottom: 3rem;
  color: white;
  text-align: left;
  width: 85%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.3;
}

.focus-areas-grid {
  width: 85%;
  max-width: 1680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.focus-area-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0;
}

.focus-area-image {
  width: 200px;
  height: 200px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.focus-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CTA Section */
.cta-section {
  background: white;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--heading-color);
}

.cta-title {
  font-family: var(--font-body);
  font-size: 2.25rem;
  font-weight: 300;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.cta-description {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: white;
  text-decoration: none;
}

.focus-area-title {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 500;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.focus-area-description {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: white;
  margin-bottom: 1.5rem;
  flex: 1;
}

.focus-area-link {
  display: inline-block;
  color: white;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.focus-area-link:hover {
  text-decoration: underline;
}

/* Mission Section - No Blue Background */
.mission-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: white;
  padding: 4rem 0;
  margin-top: 3rem;
  text-align: center;
}

.mission-content {
  width: 85%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.mission-content h2 {
  font-family: var(--font-body);
  font-size: 2.25rem;
  font-weight: 300;
  color: #161616;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.mission-content p {
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.7;
  color: #393939;
  margin-bottom: 2rem;
}

.learn-more {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.learn-more:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Topics Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  font-size: 0.95rem !important;
  font-family: var(--font-body) !important;
  color: #161616 !important;
  font-weight: 400 !important;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: white;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.dropdown-content {
  width: 85%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.dropdown-section h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6f6f6f;
  margin-bottom: 1rem;
}

.trending-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.trending-tags .tag {
  padding: 0.25rem 0.75rem;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 0.875rem;
  color: #161616;
  transition: background 0.2s;
  cursor: pointer;
}

.trending-tags .tag:hover {
  background: var(--accent);
  color: white;
}

.topic-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.topic-links a {
  color: #161616;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.topic-links a:hover {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1400px) {
  .focus-areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }

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

/* Reorder hero layout: Video on top, then left content, then sidebar */
@media (max-width: 1300px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-center {
    order: -1; /* Move video to top */
    padding: 0;
    justify-content: flex-start; /* Left-align video */
  }

  .hero-left {
    order: 0;
    max-width: 100%;
  }

  .hero-sidebar {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 1.5rem;
  }

  .hero-video-container {
    max-width: 680px;
    margin: 0; /* Remove auto margin to allow left alignment */
  }
}

/* Intermediate breakpoint for smaller video size */
@media (max-width: 850px) {
  .hero-video-container {
    max-width: 600px;
  }
}

/* Mobile breakpoint - reduce video size further */
@media (max-width: 770px) {
  .hero-video-container {
    max-width: 500px;
  }
}

@media (max-width: 968px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .focus-areas-grid {
    grid-template-columns: 1fr;
  }
  
  .dropdown-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-inner {
    padding: 3rem 0;
  }

  .hero-left {
    margin-top: 3rem;
  }

  .main-title {
    font-size: 2.25rem;
    line-height: 1.15;
  }

  #rotating-title {
    font-size: 1.75rem !important;
  }

  .hero-sidebar {
    padding: 2rem 1.5rem;
  }

  .video-caption-left {
    bottom: -40px;
    font-size: 13px;
  }
}

/* ============================================
   CITATION WIDGET STYLES
   ============================================ */

/* Citation Widget Container */
.citation-widget {
  margin: 3rem 0;
  padding: 2rem;
  background: #f8f8f8;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

.citation-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 1.5rem 0;
}

/* Citation Tabs */
.citation-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.citation-tab {
  background: transparent;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: #6f6f6f;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  bottom: -2px;
}

.citation-tab:hover {
  color: var(--accent);
}

.citation-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Citation Content */
.citation-content {
  position: relative;
}

.citation-text {
  display: none;
}

.citation-text.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.citation-text p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  padding: 1rem;
  background: white;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

/* Copy Button */
.copy-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.copied {
  background: #42be65;
}

/* Citation Links */
.citation-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.citation-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Page Preview Popup (Obsidian-style) */
.page-preview-popup {
  position: absolute;
  width: 450px;
  max-width: 90vw;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10000;
  overflow: hidden;
  pointer-events: auto;
}

.preview-header {
  padding: 1rem 1.25rem;
  background: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
}

.preview-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.preview-meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #6f6f6f;
  margin: 0;
}

.preview-body {
  padding: 1rem 1.25rem;
  max-height: 300px;
  overflow-y: auto;
}

.preview-content,
.preview-citation {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
}

.preview-loading {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #6f6f6f;
  font-style: italic;
  margin: 0;
}

.preview-error {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #da1e28;
  margin: 0;
}

.preview-external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.preview-external-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.preview-external-link svg {
  width: 14px;
  height: 14px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .citation-widget {
    padding: 1.5rem;
  }

  .citation-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .citation-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
  }

  .citation-text p {
    font-size: 0.875rem;
  }

  .page-preview-popup {
    width: 95vw;
    max-width: 95vw;
  }

  .preview-body {
    max-height: 200px;
  }
}

/* ============================================
   END OF CUSTOM.CSS
   ============================================ */

/* Callout styling for quotes */
.callout {
  border-left: 4px solid #005EA2;
  background-color: #f8f9fa; /* Light grey background */
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #393939;
  font-style: italic;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.callout p {
  margin: 0;
  padding: 0;
}

/* ============================================
   RELATED POSTS SECTION - "Other posts of interest"
   ============================================ */

.related-posts-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #005EA2;
  padding: 4rem 0;
}

/* Text selection for blue background containers */
.related-posts-section ::selection {
  background-color: #ffffff;
  color: #000000;
}

.related-posts-section ::-moz-selection {
  background-color: #ffffff;
  color: #000000;
}

.related-posts-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
  align-items: start;
}

.related-posts-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 36px;
  font-weight: 300;
  font-style: normal;
  color: #ffffff;
  line-height: 47px;
  padding-top: 0.5rem;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.related-post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.related-post-card:hover {
  transform: translateY(-4px);
}

.related-post-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #393939;
  border-radius: 3px;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
  transform: scale(1.02);
}

.related-post-image-placeholder {
  background: linear-gradient(135deg, #393939 0%, #525252 100%);
}

.related-post-content {
  padding: 1rem 0;
}

.related-post-date {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.related-post-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  line-height: 28px;
  margin: 0 0 0.5rem 0;
  text-align: left;
}

.related-post-description {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 26px;
  color: #ffffff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive adjustments for related posts */
@media (max-width: 1024px) {
  .related-posts-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .related-posts-title {
    font-size: 1.75rem;
  }

  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .related-posts-section {
    padding: 3rem 0;
  }

  .related-posts-container {
    padding: 0 1rem;
  }

  .related-posts-title {
    font-size: 1.5rem;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .related-post-title {
    font-size: 18px;
    line-height: 24px;
  }

  .related-post-description {
    font-size: 14px;
    line-height: 22px;
  }
}