/* Modern sMRD Design System - Replicated from React App */

/* CSS Custom Properties (Variables) */
:root {
  /* Clinical white and light grays for medical credibility */
  --background: #fefefe;
  --foreground: #1a1a1a;

  /* Card and surface colors */
  --card: #ffffff;
  --card-foreground: #1a1a1a;
  --popover: #ffffff;
  --popover-foreground: #1a1a1a;

  /* Muted Stanford red as primary - professional and clinical */
  --primary: #8b2635;
  --primary-foreground: #ffffff;

  /* Soft blue accent for scientific credibility */
  --secondary: #4a90a4;
  --secondary-foreground: #ffffff;

  /* Muted neutrals */
  --muted: #f5f5f5;
  --muted-foreground: #6b7280;
  --accent: #f0f9ff;
  --accent-foreground: #1a1a1a;

  /* Destructive kept minimal */
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;

  /* Borders and inputs - subtle */
  --border: #e5e7eb;
  --input: #e5e7eb;
  --ring: #8b2635;

  /* Chart colors for data visualization */
  --chart-1: #8b2635;
  --chart-2: #4a90a4;
  --chart-3: #059669;
  --chart-4: #0891b2;
  --chart-5: #7c3aed;

  --radius: 0.5rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll; /* Always show vertical scrollbar to prevent layout shift */
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header/Navbar */
.modern-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(254, 254, 254, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 4rem;
}

.modern-header .container {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 1rem;
  width: 100%;
  max-width: none;
}

@media (min-width: 768px) {
  .modern-header .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1200px) {
  .modern-header .container {
    padding: 0 3rem;
  }
}

.modern-header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--foreground);
  text-decoration: none;
  margin-left: 0;
  justify-self: start;
}

.modern-header .logo-main-image {
  height: 2rem;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.modern-header .logo-image {
  height: 1.5rem;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.modern-nav {
  display: none;
  justify-self: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .modern-nav {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.modern-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.modern-nav a:hover,
.modern-nav a.active {
  color: var(--foreground);
}

.modern-nav a.active {
  color: var(--primary);
}

.modern-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-right: 0;
  justify-self: end;
}

/* Ensure buttons stay on far right on mobile */
@media (max-width: 767px) {
  .modern-header-actions {
    justify-content: flex-end !important;
    margin-right: 0 !important;
    margin-left: auto !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  outline: none;
  padding: 0.5rem 1rem;
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  border: none !important;
  box-shadow: none !important;
}

.btn-primary:hover {
  background-color: rgba(139, 38, 53, 0.9) !important;
  box-shadow: none !important;
}

.btn-primary:focus {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  box-shadow: none !important;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background-color: rgba(74, 144, 164, 0.8);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  border: none;
  box-shadow: none;
}

.btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
  box-shadow: none;
}

.btn-outline {
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

.btn-md {
  height: 2.25rem;
  padding: 0 1rem;
}

.btn-lg {
  height: 2.5rem;
  padding: 0 1.5rem;
  font-size: 1rem;
}

.btn-xl {
  height: auto;
  padding: 1.5rem 2rem;
  font-size: 1.125rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 4rem;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.hero-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(254, 254, 254, 0.5), rgba(254, 254, 254, 0.8), rgba(254, 254, 254, 1));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 64rem;
  margin: 0 auto;
  padding: 4rem 1rem 4rem;
}

.hero-logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-accent {
  height: 0.25rem;
  width: 6rem;
  background-color: var(--primary);
  margin: 1rem auto 1rem;
  border-radius: 9999px;
}

.hero-logo-image {
  display: block;
  margin: 0 auto;
  max-height: 2.5rem;
  height: auto;
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .hero-logo-image {
    max-height: 10rem;
  }
}

.hero-tagline {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-tagline {
    font-size: 1.5rem;
  }
}

.hero-description {
  font-size: 1rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.125rem;
  }
}

.hero-cta {
  margin-top: 1rem;
  margin-bottom: 4rem;
}

.hero-video-thumbnail {
  margin-top: 3rem;
}

.video-placeholder {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background-color: var(--card);
}

.video-placeholder-content {
  aspect-ratio: 16 / 9;
  background-color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
}

.video-placeholder-content:hover {
  background-color: rgba(245, 245, 245, 0.8);
}

.video-placeholder-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 38, 53, 0.1), rgba(74, 144, 164, 0.1));
}

.video-play-button {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.video-play-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: rgba(139, 38, 53, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.video-placeholder-content:hover .video-play-icon {
  transform: scale(1.1);
}

.video-play-icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--primary-foreground);
  margin-left: 0.25rem;
}

.video-play-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

/* Sections */
.section {
  margin-top: 6rem;
  margin-bottom: 4rem;
}

.section-muted {
  background-color: rgba(245, 245, 245, 0.3);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
}

/* Cards */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: rgba(139, 38, 53, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.card-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--primary);
}

.card-title {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--card-foreground);
  margin-bottom: 0.5rem;
  text-align: center;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.75;
  text-align: center;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.grid-cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* @media (max-width: 1023px) {
  .grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
} */

@media (min-width: 1024px) {
  .lg\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* @media (max-width: 767px) {
  .grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
} */

/* Feature Grid */
.feature-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature-item {
  display: flex;
  gap: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background-color: rgba(74, 144, 164, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--secondary);
}

.feature-content h3 {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.feature-content p {
  color: var(--muted-foreground);
  line-height: 1.75;
}

/* Vision Statement */
.vision-statement {
  background: linear-gradient(135deg, rgba(139, 38, 53, 0.05), rgba(74, 144, 164, 0.05));
  border-radius: 0.5rem;
  padding: 2rem;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .vision-statement {
    padding: 3rem;
  }
}

.vision-statement h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .vision-statement h3 {
    font-size: 1.875rem;
  }
}

.vision-statement p {
  color: var(--muted-foreground);
  line-height: 1.75;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.vision-statement .attribution {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
}

/* Image Grid */
.image-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 4rem;
}

@media (min-width: 768px) {
  .image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.image-card {
  aspect-ratio: 1;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--card);
}

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

/* Footer container / surface — TSX: bg-muted/30 border-t py-12 */
.modern-footer {
  background-color: rgba(245, 245, 245, 0.3);
  border-top: 1px solid var(--border);
  padding: 3rem 0; /* ~py-12 */
}

/* Constrain width like max-w-4xl */
.max-w-4xl {
  max-width: 56rem; /* 896px */
}

/* Centering helper */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* --- Core layout to match TSX --- */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem; /* space-y-6 */
}

/* Branding block spacing (TSX space-y-2) */
.branding {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* TSX: text-2xl font-semibold tracking-tight */
.footer-title {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  margin: 0;
}

/* TSX: text-sm text-muted-foreground max-w-md leading-relaxed */
.footer-tagline {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  max-width: 28rem;
  margin: 0 auto;
}

/* Legal links row — TSX: flex flex-wrap items-center justify-center gap-6 */
.legal {
  padding-top: 0rem; /* pt-4 */
  padding-bottom: 1rem; /* pt-4 */
}
.legal-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem; /* gap-6 */
  list-style: none;
  padding: 0;
  margin: 0;
}
.legal-link {
  font-size: 0.875rem; /* text-sm */
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}
.legal-link:hover,
.legal-link:focus {
  color: var(--foreground);
  outline: none;
}
.legal-link:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--foreground) 40%, transparent);
  border-radius: 4px;
}

/* TSX: text-muted-foreground/40 */
.legal-sep {
  color: color-mix(in srgb, var(--muted-foreground) 40%, transparent);
  user-select: none;
}

/* Bottom bar — keep your previous behavior (stack -> row at md) */
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}
.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu ul li {
  margin-bottom: 0.5rem;
}

.mobile-menu ul li a {
  display: block;
  padding: 0.5rem 0;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a.active {
  color: var(--foreground);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-balance {
  text-wrap: balance;
}

.leading-relaxed {
  line-height: 1.75;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-6xl {
  max-width: 72rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-8 {
  padding-top: 2rem;
}

.pt-12 {
  padding-top: 3rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-8 > * + * {
  margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-tagline {
    font-size: 1.125rem;
  }
  
  .section-title {
    font-size: 1.875rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero-content {
    padding: 4rem 1rem;
  }
  
  .modern-header .logo-main-image {
    height: 1.5rem;
  }
  
  .modern-header .logo-image {
    height: 1rem;
  }
  
  .modern-header .logo {
    gap: 0.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .btn-xl {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

/* Additional utility classes for better compatibility */
.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md\:block {
    display: block;
  }
  
  .md\:flex {
    display: flex;
  }
  
  .md\:hidden {
    display: none;
  }
}

/* Ensure proper z-index stacking */
.modern-header {
  z-index: 1000;
}

/* Ensure content starts below fixed navbar */
body {
  padding-top: 0 !important;
}

main {
  padding-top: 6rem !important;
  margin-top: 0 !important;
}

/* Ensure proper spacing for all modern pages */
.modern-header + main,
.modern-header ~ main {
  padding-top: 6rem !important;
}

/* Override for specific pages that need different padding */
.modern-login-page main,
.modern-register-page main {
  padding-top: 6rem !important;
}

.dropdown-menu {
  z-index: 1001;
}

/* Ensure modals appear above everything else and are hidden by default */
.modal {
  z-index: 1050 !important;
  transition: opacity 0.3s ease-out;
}

.modal.fade {
  transition: opacity 0.3s ease-out;
}

.modal.fade:not(.show) {
  opacity: 0;
}

.modal.show {
  opacity: 1;
}

/* Hide modals by default - only show when explicitly activated */
/* Use high specificity to override Bootstrap and other CSS */
html body .modal.hide,
html body .modal.fade:not(.show):not(.in),
html body div.modal.hide,
html body div.modal.fade:not(.show):not(.in),
html body div[id^="myModal"].modal.hide,
html body div[id^="myModal"].modal.fade:not(.show):not(.in),
html body .modal:not(.show):not(.in) {
  display: none !important;
  visibility: hidden !important;
  opacity: 1;
  pointer-events: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Show modals only when they have show or in class (Bootstrap modal states) */
html body .modal.show,
html body .modal.in,
html body div.modal.show,
html body div.modal.in {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1050 !important;
}

/* Modal dialog animation - slides down from top when opening */
.modal.fade:not(.show):not(.in) .modal-dialog {
  transform: translateY(-250px);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease-out;
}

/* Only apply final state if not animating (no inline transform) */
.modal.show .modal-dialog:not([style*="transform"]),
.modal.in .modal-dialog:not([style*="transform"]) {
  transform: translateY(0);
  opacity: 1;
}

html body .hide,
html body div.hide {
  display: none !important;
  visibility: hidden !important;
}

.modal-backdrop {
  z-index: 1040 !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease-out;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.fade.in,
.modal-backdrop.show {
  opacity: 1;
}

/* License Modal Styling */
.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  max-width: 1000px;
  z-index: 1051;
  transition: transform 0.4s ease-out, opacity 0.3s ease-out;
}

.modal-lg {
  max-width: 1000px;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modal-header .close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.modal-header > div:not(.close) {
  flex: 1;
  text-align: center;
}

.modal-header .close {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0.5;
}

.modal-header .close:hover {
  opacity: 1;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* Fix for Bootstrap compatibility */
.btn {
  font-family: inherit;
}

/* Override Bootstrap button styles */
.btn,
.btn:hover,
.btn:focus,
.btn:active,
.btn.active,
.btn.disabled,
.btn[disabled] {
  background-image: none !important;     /* kill gradient */
  filter: none !important;                /* kill IE filters if any */
  -webkit-box-shadow: none !important;    /* consistency */
  box-shadow: none !important;
  border-image: none !important;
}

/* Make .btn-primary use your design tokens in every state */
a.btn.btn-primary,
button.btn.btn-primary,
input[type="button"].btn.btn-primary,
input[type="submit"].btn.btn-primary,
.btn-primary,
.btn-primary:link,
.btn-primary:visited,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
}

.btn-primary:hover,
.btn-primary:focus:hover,
.btn-primary:active:hover,
.btn-primary.active:hover {
  background-color: rgba(139, 38, 53, 0.9) !important; /* your hover */
  border-color: rgba(139, 38, 53, 0.9) !important;
  color: var(--primary-foreground) !important;
}

/* Ensure proper text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Fix for video background */
.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ensure proper image loading */
img {
  max-width: 100%;
  height: auto;
}

/* Fix for dropdown positioning */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 160px;
  z-index: 1000;
  display: none;
}

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

/* Reduce vertical spacing between hero text elements */
.hero-content .space-y-8 > * + * {
  margin-top: 1rem; /* was 2rem */
}

.hero-logo {
  margin-bottom: 0.25rem; /* bring tagline closer to 'sMRD' */
}

.hero-tagline {
  margin-top: 0.25rem;    /* small top margin to balance */
  margin-bottom: 1rem;    /* tighten bottom spacing too */
}

/* Responsive grid layout for 'How It Works' section */
.grid {
  display: grid;
  gap: 1.5rem; /* controls space between cards */
}

/* 1 column on small screens */
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* 2 columns on medium screens (>=768px) */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 4 columns on large screens (>=1024px) */
@media (min-width: 1024px) {
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Additional utility classes for form elements */
.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.flex {
  display: flex;
}

.flex-1 {
  flex: 1 1 0%;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

.w-full {
  width: 100%;
}

.max-w-sm {
  max-width: 24rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-20 {
  margin-bottom: 5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-16 {
  margin-top: 2rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-6xl {
  font-size: 3.75rem;
  line-height: 1;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

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

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

.leading-relaxed {
  line-height: 1.75;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-border {
  border-color: var(--border);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.bg-background {
  background-color: var(--background);
}

.bg-card {
  background-color: var(--card);
}

.bg-muted {
  background-color: var(--muted);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-primary\/10 {
  background-color: rgba(139, 38, 53, 0.1);
}

.bg-secondary\/10 {
  background-color: rgba(74, 144, 164, 0.1);
}

.bg-destructive\/10 {
  background-color: rgba(220, 38, 38, 0.1);
}

.bg-muted\/50 {
  background-color: rgba(245, 245, 245, 0.5);
}

.text-foreground {
  color: var(--foreground);
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-destructive {
  color: var(--destructive);
}

.text-primary-foreground {
  color: var(--primary-foreground);
}

.placeholder-muted-foreground::placeholder {
  color: var(--muted-foreground);
}

.hover\:bg-primary\/90:hover {
  background-color: rgba(139, 38, 53, 0.9);
}

.hover\:text-primary:hover {
  color: var(--primary);
}

.hover\:underline:hover {
  text-decoration: underline;
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-2:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-primary:focus {
  --tw-ring-color: var(--primary);
}

.focus\:border-transparent:focus {
  border-color: transparent;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.object-cover {
  object-fit: cover;
}

.overflow-hidden {
  overflow: hidden;
}

.cursor-pointer {
  cursor: pointer;
}

/* Responsive grid utilities */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.badge-default {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: transparent;
}

.badge-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: transparent;
}

.badge-destructive {
  background-color: var(--destructive);
  color: white;
  border-color: transparent;
}

.badge-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.badge svg {
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.25rem;
}

/* Dialog/Modal Component - Enhanced for cohort explorer */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}

.dialog-overlay.hidden {
  display: none;
}

.dialog-content {
  position: fixed;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  display: grid;
  width: calc(100% - 2rem);
  max-width: 80rem;
  max-height: calc(100vh - 5.5rem);
  gap: 1rem;
  border-radius: var(--radius);
  background-color: var(--card);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  overflow-y: auto;
  animation: zoomIn 0.2s ease;
}

@media (max-width: 767px) {
  .dialog-content {
    top: 5rem;
    max-height: calc(100vh - 6rem);
  }
}

.dialog-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .dialog-header {
    text-align: left;
  }
}

.dialog-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--foreground);
}

.dialog-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.dialog-close {
  border-radius: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Absolute positioning only for dialog-close buttons NOT in the top buttons container */
.dialog-content > .dialog-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.dialog-close:hover {
  opacity: 1;
}

.dialog-close svg {
  width: 2rem !important;
  height: 2rem !important;
}

/* Ensure icon-x class is also 32px (2rem) */
.dialog-close .icon-x,
.icon-x {
  width: 2rem !important;
  height: 2rem !important;
}

/* Top-right button container for Export and Close buttons */
#caseModalTopButtons {
  position: absolute;
  right: 1rem;
  top: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  z-index: 10;
}

/* Export Report button styling - text button matching old design */
#caseModalTopButtons .export-report-btn {
  min-width: 120px;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Responsive styles for mobile devices */
@media (max-width: 767px) {
  #caseModalTopButtons {
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  #caseModalTopButtons .export-report-btn {
    min-width: 100px;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.25rem;
  }
}

/* Hide Export Report button in print preview */
@media print {
  #caseModalTopButtons {
    display: none !important;
  }
  
  .export-report-btn {
    display: none !important;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

/* Input Component */
.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--input);
  background-color: var(--background);
  padding: 0 2.5rem 0 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(139, 38, 53, 0.1);
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input-search-container {
  position: relative;
  width: 100%;
}

.input-search-container svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  pointer-events: none;
}

.input-search-container .input {
  padding-left: 2.5rem;
}

/* Button variants for filters */
.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

.btn[data-active="true"] {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn[data-active="relapsing"] {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn[data-active="non-relapsing"] {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

/* Grid utilities for cohort explorer */
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Card hover effects */
.card-hover {
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-hover:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: scale(1.02);
}

.card-image {
  aspect-ratio: 1 / 1;
  background-color: var(--muted);
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.card-hover:hover .card-image img {
  transform: scale(1.05);
}

/* Aspect ratio utilities */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

/* Text utilities */
.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-4xl {
  font-size: 2.25rem;
}

.text-5xl {
  font-size: 3rem;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* Spacing utilities */
.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-12 {
  padding: 3rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

/* Max width utilities */
.max-w-7xl {
  max-width: 80rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

/* Flex utilities */
.flex-wrap {
  flex-wrap: wrap;
}

.flex-col {
  flex-direction: column;
}

@media (min-width: 768px) {
  .md\:flex-row {
    flex-direction: row;
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Position utilities */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

/* Top/Right/Bottom/Left utilities */
.top-2 {
  top: 0.5rem;
}

.right-2 {
  right: 0.5rem;
}

.top-4 {
  top: 1rem;
}

.right-4 {
  right: 1rem;
}

/* Z-index utilities */
.z-50 {
  z-index: 50;
}

/* Leading utilities */
.leading-relaxed {
  line-height: 1.75;
}

/* Opacity utilities */
.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Group hover utilities */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* Gradient backgrounds */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-background {
  --tw-gradient-from: var(--background);
  --tw-gradient-to: transparent;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-muted\/30 {
  --tw-gradient-to: rgba(245, 245, 245, 0.3);
}

.from-primary\/5 {
  --tw-gradient-from: rgba(139, 38, 53, 0.05);
  --tw-gradient-to: transparent;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-primary\/10 {
  --tw-gradient-to: rgba(139, 38, 53, 0.1);
}

.border-primary\/20 {
  border-color: rgba(139, 38, 53, 0.2);
}

.from-secondary\/5 {
  --tw-gradient-from: rgba(74, 144, 164, 0.05);
  --tw-gradient-to: transparent;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-secondary\/10 {
  --tw-gradient-to: rgba(74, 144, 164, 0.1);
}

.border-secondary\/20 {
  border-color: rgba(74, 144, 164, 0.2);
}

.bg-muted\/30 {
  background-color: rgba(245, 245, 245, 0.3);
}

/* Floating button for cohort explorer link */
.cohort-explorer-button {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 40;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.cohort-explorer-button:hover {
  background-color: rgba(139, 38, 53, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.cohort-explorer-button svg {
  width: 1rem;
  height: 1rem;
}

/* remove UA underline for all links */
a, a:link, a:visited, :any-link {
  text-decoration: none;
  color: inherit;            /* optional: inherit the parent color */
}
a:hover, a:focus-visible {
  text-decoration: none;     /* keep off on hover/focus */
}

/* FAQ Section Styles */
#faq-section {
  margin-top: 5rem;
}

#faq-section .inline-flex {
  display: inline-flex;
}

#faq-section .items-center {
  align-items: center;
}

#faq-section .justify-center {
  justify-content: center;
}

#faq-section .w-14 {
  width: 3.5rem;
}

#faq-section .h-14 {
  height: 3.5rem;
}

#faq-section .faq-icon-bg {
  background-color: rgba(139, 38, 53, 0.1);
}

#faq-section .rounded-full {
  border-radius: 9999px;
}

#faq-section .mb-4 {
  margin-bottom: 1rem;
}

#faq-section .mb-12 {
  margin-bottom: 3rem;
}

#faq-section .mb-10 {
  margin-bottom: 2.5rem;
}

#faq-section .mb-6 {
  margin-bottom: 1.5rem;
}

#faq-section .text-center {
  text-align: center;
}

#faq-section .max-w-4xl {
  max-width: 56rem;
}

#faq-section .mx-auto {
  margin-left: auto;
  margin-right: auto;
}

#faq-section .max-w-2xl {
  max-width: 42rem;
}

#faq-section .w-7 {
  width: 1.75rem;
}

#faq-section .h-7 {
  height: 1.75rem;
}

#faq-section .text-primary {
  color: var(--primary);
}

#faq-section .text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

#faq-section .font-bold {
  font-weight: 700;
}

#faq-section .text-foreground {
  color: var(--foreground);
}

#faq-section .text-muted-foreground {
  color: var(--muted-foreground);
}

/* FAQ Search Bar */
#faq-section .relative {
  position: relative;
}

#faq-section #faq-search {
  width: 100%;
  padding-left: 3rem;
  padding-right: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

#faq-section #faq-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 38, 53, 0.2);
}

#faq-section #faq-search::placeholder {
  color: var(--muted-foreground);
}

#faq-section .absolute {
  position: absolute;
}

#faq-section .left-4 {
  left: 1rem;
}

#faq-section .right-4 {
  right: 1rem;
}

#faq-section .top-1\/2 {
  top: 50%;
}

#faq-section .-translate-y-1\/2 {
  transform: translateY(-50%);
}

#faq-section .w-5 {
  width: 1.25rem;
}

#faq-section .h-5 {
  height: 1.25rem;
}

#faq-section #faq-search-clear {
  font-size: 0.875rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

#faq-section #faq-search-clear:hover {
  color: var(--foreground);
}

#faq-section .text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

#faq-section .text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* FAQ Results Count */
#faq-results-count {
  display: none;
}

/* FAQ Categories and Items */
#faq-section .space-y-8 > * + * {
  margin-top: 2rem;
}

#faq-section .space-y-3 > * + * {
  margin-top: 0.75rem;
}

#faq-section .faq-category h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

#faq-section .faq-item {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

#faq-section .faq-item:hover {
  border-color: rgba(139, 38, 53, 0.3);
}

#faq-section .faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

#faq-section .faq-question:focus {
  outline: none;
}

#faq-section .faq-question .font-medium {
  font-weight: 500;
}

#faq-section .faq-question .pr-4 {
  padding-right: 1rem;
}

#faq-section .faq-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

#faq-section .faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

#faq-section .faq-answer {
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  max-height: 0;
}

#faq-section .faq-item.active .faq-answer {
  max-height: 600px;
}

#faq-section .faq-answer > div {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-bottom: 1.25rem;
  padding-top: 0;
}

#faq-section .faq-answer .border-t {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

#faq-section .faq-answer .whitespace-pre-line {
  white-space: pre-line;
}

#faq-section .faq-answer a {
  color: var(--primary);
  text-decoration: underline;
}

#faq-section .faq-answer a:hover {
  text-decoration: underline;
}

/* FAQ No Results */
#faq-no-results {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

#faq-no-results .w-12 {
  width: 3rem;
}

#faq-no-results .h-12 {
  height: 3rem;
}

#faq-no-results .mx-auto {
  margin-left: auto;
  margin-right: auto;
}

#faq-no-results .mb-4 {
  margin-bottom: 1rem;
}

#faq-no-results .text-muted-foreground\/50 {
  color: rgba(107, 114, 128, 0.5);
}

#faq-no-results #faq-clear-search-btn {
  margin-top: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  text-decoration: underline;
  font-family: inherit;
  font-size: inherit;
}

#faq-no-results #faq-clear-search-btn:hover {
  text-decoration: underline;
}

/* Hide categories with no visible items (only when explicitly hidden by JS) */
#faq-section .faq-category.hidden-category {
  display: none;
}

/* Additional utility classes for FAQ section */
#faq-section .shrink-0 {
  flex-shrink: 0;
}

#faq-section .uppercase {
  text-transform: uppercase;
}

#faq-section .tracking-wider {
  letter-spacing: 0.05em;
}

/* FAQ Modal Styles - Reuse FAQ section styles with modal prefix */
#faq-modal-section .inline-flex {
  display: inline-flex;
}

#faq-modal-section .items-center {
  align-items: center;
}

#faq-modal-section .justify-center {
  justify-content: center;
}

#faq-modal-section .w-14 {
  width: 3.5rem;
}

#faq-modal-section .h-14 {
  height: 3.5rem;
}

#faq-modal-section .faq-icon-bg {
  background-color: rgba(139, 38, 53, 0.1);
}

#faq-modal-section .rounded-full {
  border-radius: 9999px;
}

#faq-modal-section .mb-4 {
  margin-bottom: 1rem;
}

#faq-modal-section .mb-8 {
  margin-bottom: 2rem;
}

#faq-modal-section .mb-10 {
  margin-bottom: 2.5rem;
}

#faq-modal-section .mb-6 {
  margin-bottom: 1.5rem;
}

#faq-modal-section .text-center {
  text-align: center;
}

#faq-modal-section .max-w-2xl {
  max-width: 42rem;
}

#faq-modal-section .mx-auto {
  margin-left: auto;
  margin-right: auto;
}

#faq-modal-section .w-7 {
  width: 1.75rem;
}

#faq-modal-section .h-7 {
  height: 1.75rem;
}

#faq-modal-section .text-primary {
  color: var(--primary);
}

#faq-modal-section .text-foreground {
  color: var(--foreground);
}

#faq-modal-section .text-muted-foreground {
  color: var(--muted-foreground);
}

#faq-modal-section .relative {
  position: relative;
}

#faq-modal-section #faq-modal-search {
  width: 100%;
  padding-left: 3rem;
  padding-right: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 1.125rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

#faq-modal-section #faq-modal-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 38, 53, 0.2);
}

#faq-modal-section #faq-modal-search::placeholder {
  color: var(--muted-foreground);
}

#faq-modal-section .absolute {
  position: absolute;
}

#faq-modal-section .left-4 {
  left: 1rem;
}

#faq-modal-section .right-4 {
  right: 1rem;
}

#faq-modal-section .top-1\/2 {
  top: 50%;
}

#faq-modal-section .-translate-y-1\/2 {
  transform: translateY(-50%);
}

#faq-modal-section .w-5 {
  width: 1.25rem;
}

#faq-modal-section .h-5 {
  height: 1.25rem;
}

#faq-modal-section #faq-modal-search-clear {
  font-size: 0.875rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

#faq-modal-section #faq-modal-search-clear:hover {
  color: var(--foreground);
}

#faq-modal-section .text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

#faq-modal-section .text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

#faq-modal-section .space-y-8 > * + * {
  margin-top: 2rem;
}

#faq-modal-section .space-y-3 > * + * {
  margin-top: 0.75rem;
}

#faq-modal-section .faq-modal-category h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

#faq-modal-section .faq-modal-item {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

#faq-modal-section .faq-modal-item:hover {
  border-color: rgba(139, 38, 53, 0.3);
}

#faq-modal-section .faq-modal-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

#faq-modal-section .faq-modal-question:focus {
  outline: none;
}

#faq-modal-section .faq-modal-question .font-medium {
  font-weight: 500;
}

#faq-modal-section .faq-modal-question .pr-4 {
  padding-right: 1rem;
}

#faq-modal-section .faq-modal-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  max-width: 1.25rem;
  max-height: 1.25rem;
}

#faq-modal-section .faq-modal-item.active .faq-modal-chevron {
  transform: rotate(180deg);
}

#faq-modal-section .faq-modal-answer {
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  max-height: 0;
}

#faq-modal-section .faq-modal-item.active .faq-modal-answer {
  max-height: 600px;
}

#faq-modal-section .faq-modal-answer > div {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-bottom: 1.25rem;
  padding-top: 0;
}

#faq-modal-section .faq-modal-answer .border-t {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

#faq-modal-section .faq-modal-answer .whitespace-pre-line {
  white-space: pre-line;
}

#faq-modal-section .faq-modal-answer a {
  color: var(--primary);
  text-decoration: underline;
}

#faq-modal-section .faq-modal-answer a:hover {
  text-decoration: underline;
}

#faq-modal-section .faq-modal-category.hidden-category {
  display: none;
}

#faq-modal-section .shrink-0 {
  flex-shrink: 0;
}

#faq-modal-section .uppercase {
  text-transform: uppercase;
}

#faq-modal-section .tracking-wider {
  letter-spacing: 0.05em;
}

#faq-modal-section #faq-modal-no-results {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

#faq-modal-section #faq-modal-no-results .w-12 {
  width: 3rem;
}

#faq-modal-section #faq-modal-no-results .h-12 {
  height: 3rem;
}

#faq-modal-section #faq-modal-no-results .mx-auto {
  margin-left: auto;
  margin-right: auto;
}

#faq-modal-section #faq-modal-no-results .mb-4 {
  margin-bottom: 1rem;
}

#faq-modal-section #faq-modal-no-results .text-muted-foreground\/50 {
  color: rgba(107, 114, 128, 0.5);
}

#faq-modal-section #faq-modal-clear-search-btn {
  margin-top: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  text-decoration: underline;
  font-family: inherit;
  font-size: inherit;
}

#faq-modal-section #faq-modal-clear-search-btn:hover {
  text-decoration: underline;
}