/* ============================================
   Mesothelioma Research Info - Main Stylesheet
   Version 8.0 - Editorial Warmth with Polish
   ============================================ */

/* === CUSTOM FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

/* === CSS VARIABLES === */
:root {
  /* Colors - Warm Teal + Amber */
  --color-primary: #0d9488;
  --color-primary-light: #2dd4bf;
  --color-primary-dark: #0f766e;
  --color-primary-muted: #99f6e4;
  --color-secondary: #1e293b;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-accent-light: #fef3c7;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;
  --color-info: #0ea5e9;

  --color-bg: #fafaf9;
  --color-bg-warm: #fefdfb;
  --color-bg-alt: #f5f5f4;
  --color-bg-elevated: #ffffff;
  --color-bg-hero: linear-gradient(135deg, #f0fdfa 0%, #fefce8 50%, #fff7ed 100%);

  --color-text: #1c1917;
  --color-text-secondary: #44403c;
  --color-text-muted: #78716c;
  --color-text-light: #a8a29e;
  --color-border: #e7e5e4;
  --color-border-light: #f5f5f4;
  --color-footer: #0c0a09;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Layout */
  --max-width: 1240px;
  --sidebar-width: 340px;
  --header-height: 76px;
  --content-padding: clamp(1rem, 4vw, 2rem);

  /* Shadows - Warm tinted with depth */
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 2px 4px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08), 0 2px 4px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 12px 32px rgba(28, 25, 23, 0.1), 0 4px 8px rgba(28, 25, 23, 0.06);
  --shadow-xl: 0 24px 48px rgba(28, 25, 23, 0.12), 0 8px 16px rgba(28, 25, 23, 0.06);
  --shadow-glow: 0 0 40px rgba(13, 148, 136, 0.12);
  --shadow-accent: 0 4px 16px rgba(245, 158, 11, 0.2);
  --shadow-elevated: 0 8px 30px rgba(28, 25, 23, 0.12), 0 2px 8px rgba(28, 25, 23, 0.06);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  --gradient-warm: linear-gradient(135deg, #fef3c7 0%, #ffedd5 50%, #fed7aa 100%);
  --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13, 148, 136, 0.15) 0%, transparent 50%),
                   radial-gradient(ellipse 60% 40% at 80% 60%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
                   radial-gradient(ellipse 50% 30% at 20% 80%, rgba(14, 165, 233, 0.06) 0%, transparent 50%);
  --gradient-text: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary-dark) 100%);
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.7;
  background-color: var(--color-bg);
  background-image: var(--gradient-hero);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Refined geometric pattern overlay with organic feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(13, 148, 136, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.03) 0%, transparent 50%),
    linear-gradient(30deg, transparent 49.5%, rgba(13, 148, 136, 0.015) 49.5%, rgba(13, 148, 136, 0.015) 50.5%, transparent 50.5%),
    linear-gradient(150deg, transparent 49.5%, rgba(245, 158, 11, 0.01) 49.5%, rgba(245, 158, 11, 0.01) 50.5%, transparent 50.5%);
  background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  animation: fadeInBackground 1s var(--ease-out) forwards;
}

@keyframes fadeInBackground {
  to { opacity: 1; }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

::selection {
  background: var(--color-primary-muted);
  color: var(--color-primary-dark);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-secondary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h4 {
  font-size: 1.125rem;
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.625rem;
  color: var(--color-text-secondary);
}

li::marker {
  color: var(--color-primary);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

/* === HEADER === */
.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(231, 229, 228, 0.8);
  transition: var(--transition);
}

.header-top {
  background: var(--gradient-primary);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.header-top-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.header-top-content::before {
  content: '✦';
  opacity: 0.7;
}

.header-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem var(--content-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
  transition: var(--transition);
}

.logo:hover {
  text-decoration: none;
  color: var(--color-primary);
  transform: translateY(-1px);
}

.logo span {
  color: var(--color-accent);
}

/* === NAVIGATION === */
.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  padding: 0.75rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-item.active > .nav-link {
  color: var(--color-primary);
  background: rgba(13, 148, 136, 0.06);
  text-decoration: none;
}

.nav-chevron {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-item:hover > .nav-link .nav-chevron,
.nav-item.mega-open > .nav-link .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-toggle:hover {
  background: rgba(13, 148, 136, 0.08);
}

/* === MEGA MENU === */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 780px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 2000;
  pointer-events: none;
  overflow: hidden;
}

.mega-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.mega-menu.mega-sm {
  min-width: 520px;
}

.nav-item.has-mega:hover > .mega-menu,
.nav-item.mega-open > .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-inner {
  display: flex;
  gap: 0;
  padding: 1.75rem 0;
}

.mega-col {
  flex: 1;
  padding: 0 1.75rem;
  border-right: 1px solid var(--color-border-light);
}

.mega-col:last-child {
  border-right: none;
}

.mega-heading {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent-light);
}

.mega-col ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
}

.mega-col li {
  margin-bottom: 0;
}

.mega-col a {
  display: block;
  padding: 0.375rem 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
}

.mega-col a:hover {
  color: var(--color-primary);
  padding-left: 6px;
  text-decoration: none;
}

.mega-state-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.mega-see-all {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent) !important;
  transition: var(--transition-fast);
}

.mega-see-all:hover {
  color: var(--color-accent-hover) !important;
  gap: 0.5rem;
}

/* Prevent mega menu from going off-screen on right */
.nav-item:nth-last-child(-n+2).has-mega .mega-menu {
  left: auto;
  right: 0;
  transform: translateY(8px);
}

.nav-item:nth-last-child(-n+2).has-mega:hover > .mega-menu,
.nav-item:nth-last-child(-n+2).mega-open > .mega-menu {
  transform: translateY(0);
}

/* === BREADCRUMBS === */
.breadcrumbs {
  background-color: var(--color-bg-alt);
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.breadcrumbs-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs .separator {
  color: var(--color-text-light);
}

.breadcrumbs .current {
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* === MAIN LAYOUT === */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--content-padding);
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 3rem;
}

@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
    padding: 2rem var(--content-padding);
  }
}

/* === MAIN CONTENT === */
.main-content {
  min-width: 0;
}

/* Article Header - Editorial Hero Style */
.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  animation: slideUp 0.6s var(--ease-out) both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-header::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 0;
  width: 4px;
  height: calc(100% + 1rem);
  background: var(--gradient-primary);
  border-radius: 2px;
  opacity: 0;
  animation: slideInLeft 0.4s var(--ease-out) 0.3s forwards;
}

@keyframes slideInLeft {
  to { opacity: 1; }
}

.article-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: expandLine 0.8s var(--ease-out) 0.4s forwards;
}

@keyframes expandLine {
  to { width: 140px; }
}

.article-header h1 {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.article-intro {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  line-height: 1.85;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  padding-left: 1.25rem;
  border-left: none;
  max-width: 50ch;
}

/* === TABLE OF CONTENTS - Editorial Style === */
.toc {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.6s var(--ease-out) 0.15s both;
}

.toc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-primary));
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.toc-title {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border), transparent);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}

.toc-list li {
  margin-bottom: 0;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.toc-list a::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.toc-list a:hover {
  background: rgba(13, 148, 136, 0.06);
  color: var(--color-primary);
  border-color: rgba(13, 148, 136, 0.15);
  transform: translateX(4px);
}

.toc-list a:hover::before {
  background: var(--color-primary);
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.4);
}

/* === ARTICLE CONTENT === */
.article-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--color-accent);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.article-content h3 a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

.article-content h3 a:hover {
  color: var(--color-primary);
}

.article-content p {
  text-align: left;
}

.article-content a {
  text-decoration: underline;
  text-decoration-color: var(--color-primary-muted);
  text-underline-offset: 2px;
  transition: var(--transition-fast);
}

.article-content a:hover {
  text-decoration-color: var(--color-primary);
}

/* === FIGURES & IMAGES - Premium Treatment === */
figure {
  margin: 3rem 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  background: var(--color-bg-elevated);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

figure:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

figure::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 1;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

figure:hover img {
  transform: scale(1.02);
}

/* SVG-specific styling */
figure img[src$=".svg"] {
  padding: 1.5rem;
  background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
}

figure:hover img[src$=".svg"] {
  transform: none;
}

figcaption {
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
  border-top: 1px solid var(--color-border-light);
  font-style: italic;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg-elevated) 100%);
  position: relative;
}

figcaption::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  opacity: 0.6;
}

/* Hero Images */
.hero-image {
  margin: 3rem 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.hero-image figcaption {
  background-color: var(--color-bg-alt);
}

/* Content Images */
.content-image {
  margin: 2.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  max-width: 100%;
}

/* Diagram Figures - Special treatment for SVG infographics */
.diagram-figure {
  margin: 3.5rem -1rem;
  border-radius: var(--radius-xl);
  border: none;
  background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 50%, #fef7ed 100%);
  box-shadow:
    var(--shadow-elevated),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.diagram-figure::before {
  height: 4px;
  background: linear-gradient(90deg,
    var(--color-primary) 0%,
    var(--color-accent) 50%,
    var(--color-primary) 100%);
}

.diagram-figure img {
  padding: 0;
  background: transparent;
}

.diagram-figure figcaption {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(250, 250, 249, 0.95) 100%);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(13, 148, 136, 0.1);
  font-size: 0.9375rem;
  padding: 1rem 1.5rem;
}

.diagram-figure figcaption::before {
  background: var(--gradient-primary);
  width: 60px;
}

@media (min-width: 768px) {
  .diagram-figure {
    margin-left: -2rem;
    margin-right: -2rem;
  }
}

@media (min-width: 1024px) {
  .diagram-figure {
    margin-left: -3rem;
    margin-right: -3rem;
  }
}

/* === FAQ SECTION - Interactive Cards === */
.faq-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--color-border);
  position: relative;
}

.faq-section::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.faq-item {
  margin-bottom: 1.25rem;
  padding: 1.75rem;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-border);
  transition: background var(--transition);
}

.faq-item:hover {
  border-color: var(--color-primary-muted);
  box-shadow: var(--shadow-elevated);
  transform: translateX(4px);
}

.faq-item:hover::before {
  background: var(--gradient-primary);
}

.faq-question {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-secondary);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-left: 0.5rem;
}

.faq-question::before {
  content: 'Q';
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: white;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.faq-answer {
  color: var(--color-text-secondary);
  padding-left: calc(32px + 1.5rem);
  line-height: 1.75;
}

/* === RESOURCE HUB - Feature Card Grid === */
.resource-hub {
  background: var(--color-bg-elevated);
  padding: 3rem;
  border-radius: var(--radius-xl);
  margin: 4rem 0;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
}

.resource-hub::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-info), var(--color-primary));
  background-size: 300% 100%;
  animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.resource-hub::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.resource-hub h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  border: none;
  position: relative;
}

.resource-hub h2::after {
  display: none;
}

.resource-hub > p {
  font-size: 1.0625rem;
  margin-bottom: 0;
}

.resource-hub h3 {
  color: var(--color-primary-dark);
  margin-bottom: 0.625rem;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resource-hub h3::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Resource hub grid items */
.resource-hub > div[style*="grid"] > div {
  padding: 1.5rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.resource-hub > div[style*="grid"] > div:hover {
  background: var(--color-bg-elevated);
  border-color: var(--color-primary-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* === SIDEBAR === */
.sidebar {
  min-width: 0;
}

.sidebar-sticky {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.sidebar-widget {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.sidebar-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
}

.sidebar-widget h4 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 0;
  padding: 0;
  border-bottom: 1px solid var(--color-border-light);
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.sidebar-nav a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-border);
  transition: var(--transition-fast);
}

.sidebar-nav a:hover {
  color: var(--color-primary);
  padding-left: 0.375rem;
}

.sidebar-nav a:hover::before {
  background: var(--color-primary);
  width: 6px;
  height: 6px;
}

/* === CTA BOX === */
.cta-box {
  background: var(--gradient-primary);
  color: white;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  margin: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 40%);
  pointer-events: none;
}

.cta-box h3 {
  color: white;
  font-size: 1.625rem;
  margin-bottom: 1rem;
  position: relative;
}

.cta-box p {
  margin-bottom: 1.75rem;
  opacity: 0.9;
  color: white;
  position: relative;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: white;
  color: var(--color-primary-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  background-color: var(--color-accent-light);
  color: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* === FOOTER === */
.footer {
  background: var(--color-footer);
  color: #a1a1aa;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-info), var(--color-primary));
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
}

.footer-section p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #a1a1aa;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.625rem;
}

.footer-section a {
  color: #a1a1aa;
  font-size: 0.9375rem;
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.footer-bottom a {
  color: #71717a;
  transition: var(--transition-fast);
}

.footer-bottom a:hover {
  color: white;
}

.footer-disclaimer {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding: 2rem var(--content-padding) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8125rem;
  text-align: center;
  color: #71717a;
}

.footer-disclaimer p {
  margin-bottom: 0.75rem;
  color: #71717a;
}

/* === MOBILE MENU === */
@media (max-width: 1024px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-xl);
    display: none;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2000;
    border-top: 1px solid var(--color-border);
  }

  .nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 0;
  }

  .nav-link {
    padding: 1rem var(--content-padding);
    font-size: 1rem;
    justify-content: space-between;
  }

  .nav-link:hover {
    background: var(--color-bg-alt);
  }

  .nav-item.has-mega > .nav-link {
    cursor: pointer;
  }

  .mega-menu {
    position: static;
    transform: none;
    min-width: 0;
    border: none;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition), visibility var(--transition);
    pointer-events: auto;
    background: var(--color-bg-alt);
  }

  .mega-menu::before {
    display: none;
  }

  .mega-menu.mega-sm {
    min-width: 0;
  }

  .nav-item.has-mega:hover > .mega-menu {
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    transform: none;
  }

  .nav-item.mega-open > .mega-menu {
    visibility: visible;
    max-height: 2000px;
    opacity: 1;
    transform: none;
  }

  .mega-inner {
    flex-direction: column;
    padding: 0.75rem 0;
  }

  .mega-col {
    padding: 0.75rem var(--content-padding);
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
  }

  .mega-col:last-child {
    border-bottom: none;
  }

  .mega-heading {
    font-size: 0.6875rem;
    margin-top: 0.25rem;
  }

  .mega-state-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-chevron {
    transition: transform var(--transition);
  }

  .nav-item.mega-open > .nav-link .nav-chevron {
    transform: rotate(180deg);
  }
}

/* === RELATED CONTENT WIDGETS === */
.related-widget {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2.5rem 0;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.related-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-info);
}

.related-widget h4 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--color-primary-dark);
  font-size: 1rem;
  padding-left: 0.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.related-item:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Category-specific colors */
.related-widget.medical::before { background: var(--color-danger); }
.related-widget.medical .related-item:hover { background: var(--color-danger); }

.related-widget.legal::before { background: var(--color-accent); }
.related-widget.legal .related-item:hover { background: var(--color-accent); }

.related-widget.types::before { background: #8b5cf6; }
.related-widget.types .related-item:hover { background: #8b5cf6; }

.related-widget.state::before { background: var(--color-info); }
.related-widget.state .related-item:hover { background: var(--color-info); }

.related-widget.industry::before { background: var(--color-success); }
.related-widget.industry .related-item:hover { background: var(--color-success); }

.related-widget.veterans::before { background: #059669; }
.related-widget.veterans .related-item:hover { background: #059669; }

.related-widget.support::before { background: #ec4899; }
.related-widget.support .related-item:hover { background: #ec4899; }

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* === E-E-A-T REVIEW BADGES === */
.medical-review-box {
  margin-top: 3rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #a7f3d0;
  position: relative;
  overflow: hidden;
}

.medical-review-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-success);
}

.medical-review-box .review-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.medical-review-box .review-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.medical-review-box h4 {
  margin: 0 0 0.5rem 0;
  color: #065f46;
  font-size: 0.875rem;
}

.medical-review-box .reviewer-name {
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: #065f46;
}

.medical-review-box .reviewer-title {
  color: #047857;
  margin: 0;
  font-size: 0.9375rem;
}

.medical-review-box .review-date {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: #059669;
  font-style: italic;
}

.legal-review-box {
  margin-top: 3rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #fde68a;
  position: relative;
  overflow: hidden;
}

.legal-review-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-accent);
}

.legal-review-box h4 {
  margin: 0 0 0.5rem 0;
  color: #92400e;
  font-size: 0.875rem;
}

.legal-review-box .reviewer-name {
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: #92400e;
}

.legal-review-box .reviewer-title {
  color: #b45309;
  margin: 0;
  font-size: 0.9375rem;
}

/* === CROSS-CATEGORY CTA === */
.cross-category-box {
  margin: 2.5rem 0;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 2px solid;
  position: relative;
  overflow: hidden;
}

.cross-category-box.legal-cta {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: var(--color-accent);
}

.cross-category-box.medical-cta {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: var(--color-success);
}

.cross-category-box h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
}

.cross-category-box p {
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.cross-category-box .cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: white;
  transition: var(--transition-fast);
}

.cross-category-box.legal-cta .cta-link {
  background: var(--color-accent);
}

.cross-category-box.legal-cta .cta-link:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.cross-category-box.medical-cta .cta-link {
  background: var(--color-success);
}

.cross-category-box.medical-cta .cta-link:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* === SOURCES & REFERENCES === */
.sources-box {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  position: relative;
}

.sources-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-secondary);
  border-radius: 2px 0 0 2px;
}

.sources-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--color-secondary);
}

.sources-box ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.8;
}

.sources-box li {
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
}

.sources-box a {
  word-break: break-word;
}

/* === ACCESSIBILITY === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1rem;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  :root {
    --color-primary: #004d40;
    --color-text: #000000;
    --color-border: #000000;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .article-intro {
    font-size: 1.0625rem;
  }

  .main-container {
    padding: 1.5rem 1rem;
  }

  .toc {
    padding: 1.25rem;
  }

  .toc-list {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 2rem 1.5rem;
  }

  .cta-button {
    width: 100%;
    justify-content: center;
  }

  .resource-hub {
    padding: 1.75rem;
  }

  .faq-item {
    padding: 1.25rem;
  }

  .faq-answer {
    padding-left: 0;
  }
}

/* === UTILITY CLASSES === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-primary-muted), var(--color-primary-light));
  border-radius: 5px;
  border: 2px solid var(--color-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary));
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary-muted) var(--color-bg-alt);
}

/* === ENHANCED LINK STYLES === */
.article-content a:not([class]) {
  position: relative;
  text-decoration: none;
  background: linear-gradient(transparent 60%, var(--color-primary-muted) 60%);
  background-size: 100% 100%;
  transition: background-size var(--transition-fast);
}

.article-content a:not([class]):hover {
  background-size: 100% 100%;
  background: linear-gradient(transparent 0%, var(--color-primary-muted) 0%);
}

/* === STAGGER ANIMATION FOR LISTS === */
.article-content section {
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.article-content section:nth-child(1) { animation-delay: 0.1s; }
.article-content section:nth-child(2) { animation-delay: 0.15s; }
.article-content section:nth-child(3) { animation-delay: 0.2s; }
.article-content section:nth-child(4) { animation-delay: 0.25s; }
.article-content section:nth-child(5) { animation-delay: 0.3s; }
.article-content section:nth-child(6) { animation-delay: 0.35s; }
.article-content section:nth-child(7) { animation-delay: 0.4s; }
.article-content section:nth-child(8) { animation-delay: 0.45s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SELECTION HIGHLIGHT === */
::selection {
  background: var(--color-primary-muted);
  color: var(--color-primary-dark);
}

::-moz-selection {
  background: var(--color-primary-muted);
  color: var(--color-primary-dark);
}

/* === PRINT STYLES === */
@media print {
  .header,
  .nav,
  .nav-toggle,
  .header-top,
  .footer,
  .sidebar,
  .toc,
  .ad-container,
  .ad-slot,
  .cross-category-box,
  .related-content-widget,
  .exit-popup,
  .sticky-cta,
  ins.adsbygoogle,
  script,
  .mega-menu,
  .breadcrumb,
  .share-buttons,
  .comment-section {
    display: none !important;
  }

  body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
    margin: 0;
    padding: 0;
  }

  body::before {
    display: none;
  }

  .main-container,
  .main-content,
  article {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  h1 { font-size: 18pt; margin-bottom: 6pt; }
  h2 { font-size: 14pt; margin-top: 12pt; margin-bottom: 4pt; }
  h3 { font-size: 12pt; margin-top: 10pt; margin-bottom: 3pt; }
  p { margin-bottom: 6pt; orphans: 3; widows: 3; }

  .article-content a[href]:not([href^="#"])::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  h1, h2, h3 { page-break-after: avoid; }
  table, figure, img { page-break-inside: avoid; }
  ul, ol { page-break-inside: avoid; }

  img {
    max-width: 400px !important;
    height: auto;
  }

  .review-box,
  .medically-reviewed,
  .legally-reviewed {
    border: 1px solid #999;
    padding: 8pt;
    margin: 8pt 0;
    background: none !important;
  }

  @page {
    margin: 2cm;
  }

  .article-content::after {
    content: "Printed from mesotheliomaresearchinfo.com";
    display: block;
    margin-top: 20pt;
    padding-top: 8pt;
    border-top: 1px solid #999;
    font-size: 9pt;
    color: #666;
    text-align: center;
  }
}