/* ==========================================================================
   Biofilms Structural Database - Modern Scientific UI System (2026 Edition)
   BioSIM (FMUP, Univ. Porto) & BIA Lab (CERES, Univ. Coimbra)
   Visual Identity Harmonized with bialab.pt
   ========================================================================== */

:root {
  /* Core Colors matching bialab.pt */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-viewer: #f8fafc;

  --text-main: #0f172a;       /* Slate 900 */
  --text-primary: #0f172a;
  --text-secondary: #475569;  /* Slate 600 */
  --text-muted: #94a3b8;      /* Slate 400 */
  --text-light: #cbd5e1;
  --text-white: #ffffff;

  /* Brand Accents matching bialab.pt */
  --accent-teal: #0284c7;     /* BIA Lab Tech Blue / Cyan */
  --accent-purple: #7c3aed;   /* BIA Lab Brand Purple */
  --accent-magenta: #e11d48;  /* Rose Accent */
  --accent-orange: #ea580c;   /* High-contrast brand orange */

  /* Theme semantic mappings */
  --primary: #0f172a;         /* Deep slate navy */
  --primary-light: #1e293b;
  --primary-dark: #020617;
  --secondary: #0284c7;       /* BIA Lab Tech Blue */
  --secondary-light: #e0f2fe;
  --accent: #0284c7;          /* Primary interactive accent */
  --accent-hover: #0369a1;

  /* Gradients matching bialab.pt */
  --gradient-primary: linear-gradient(135deg, #0284c7 0%, #7c3aed 100%);
  --gradient-accent: linear-gradient(135deg, #0284c7 0%, #7c3aed 50%, #e11d48 100%);
  --gradient-glow: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(124, 58, 237, 0.12) 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
  --gradient-orange: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);

  /* Borders & Shadows */
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-color: #e2e8f0;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px -1px rgba(15, 23, 42, 0.07), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 6px 12px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 8px 24px rgba(2, 132, 199, 0.22);

  /* Radii matching bialab.pt */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Backward compatibility aliases */
  --background: #f8fafc;
  --black: #0f172a;
  --white: #ffffff;
  --darkcolor: #0f172a;
  --lightcolor: #0284c7;
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-main);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Editorial & Content Text Justification */
.text-justify,
.hero-lead,
.gateway-subtitle,
.pillar-desc,
.audience-desc,
.paper-spotlight-authors,
.timeline-stage-desc,
.direct-chem-desc,
.identified-ligand-card p,
.identified-ligand-body,
.modern-card p,
.organism-card p,
.pathway-card p,
.about-text,
.bio-callout,
.apo-structure-notice {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

/* Page Container */
#pageContainer {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 24px 28px 80px 28px;
  flex: 1;
}

/* Navigation & Top Bar (Harmonized with bialab.pt) */
.top-header-bar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  padding: 12px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.2s ease;
}

.top-header-inner {
  max-width: 1640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand-logo:hover {
  transform: scale(1.03);
}

/* BIA Lab (bialab.pt) Brand Identity */
.bialab-nav-badge {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-section:hover .bialab-nav-badge {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.38);
}

.bialab-footer-badge {
  width: 42px;
  height: 42px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.bialab-footer-badge:hover {
  transform: scale(1.06);
}

.bialab-wordmark {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bialab-wordmark span {
  color: var(--secondary);
}

.brand-divider {
  color: var(--border-subtle);
  font-weight: 300;
  margin: 0 2px;
}

/* Soft Icon Container matching bialab.pt */
.soft-icon-container {
  width: 50px;
  height: 50px;
  background: var(--gradient-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-teal);
  font-size: 1.5rem;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-title {
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-title-badge {
  background: var(--gradient-primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  margin: 0;
}

/* Main Navigation Menu */
#topmenu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

#topmenu li a,
#topmenu li button.nav-dropdown-toggle {
  color: var(--text-secondary);
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: normal;
  box-sizing: border-box;
}

#topmenu li a:hover,
#topmenu li button.nav-dropdown-toggle:hover,
#topmenu li.is-open > button.nav-dropdown-toggle {
  background-color: rgba(2, 132, 199, 0.08);
  color: var(--accent-teal);
}

#topmenu li a.active,
#topmenu li button.nav-dropdown-toggle.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(124, 58, 237, 0.12) 100%);
  color: var(--accent-teal);
  font-weight: 700;
}

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

/* Invisible bridge so mouse hover doesn't break when moving pointer down */
.nav-item-dropdown::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
  background: transparent;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 285px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  padding: 8px 0;
  list-style: none;
  z-index: 10000;
  border: 1px solid var(--border-light);
  margin-top: 0;
  animation: navDropdownFade 0.16s ease-out;
}

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

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu,
.nav-item-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

.nav-item-dropdown.is-open > .nav-dropdown-toggle i.fa-caret-down,
.nav-item-dropdown:hover > .nav-dropdown-toggle i.fa-caret-down {
  transform: rotate(180deg);
}

.nav-dropdown-toggle i.fa-caret-down {
  transition: transform 0.2s ease;
}

.nav-dropdown-menu li {
  width: 100%;
}

.nav-dropdown-menu li a {
  color: var(--text-main) !important;
  padding: 9px 18px !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem !important;
  font-weight: 500 !important;
  border-radius: 0 !important;
  background: transparent !important;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

.nav-dropdown-menu li a:hover {
  background-color: #f8fafc !important;
  color: var(--accent-teal) !important;
  font-weight: 600 !important;
}

.nav-dropdown-menu .dropdown-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 18px 4px 18px;
}

.nav-dropdown-menu .dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

#searchbarmenu {
  margin-left: 10px;
}

.search-form-nav {
  display: flex;
  align-items: center;
  background-color: #f1f5f9;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px 6px 3px 12px;
  transition: all 0.2s ease;
}

.search-form-nav:focus-within {
  background-color: #ffffff;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.search-form-nav input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  width: 140px;
  transition: width 0.2s ease;
}

.search-form-nav:focus-within input {
  color: var(--text-primary);
  width: 190px;
}

.search-form-nav input::placeholder {
  color: var(--text-muted);
}

.search-form-nav button {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: transform 0.15s ease;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.search-form-nav button:hover {
  transform: scale(1.08);
}

/* Mobile Menu Toggle */
.show-menu, #show-menu {
  display: none;
}

/* Card System (Harmonized with bialab.pt) */
.modern-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modern-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.modern-card:hover::before {
  opacity: 1;
}

.modern-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.modern-card-title {
  margin: 0;
  font-size: 1.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-gram-pos {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-gram-neg {
  background-color: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.badge-mech-qs {
  background-color: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-mech-eps {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-mech-motility {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-mech-sig {
  background-color: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.badge-default {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.badge-accent {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Priority & Pathogen Level Badges */
.badge-priority-critical {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-priority-high {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}

.badge-priority-clinical {
  background-color: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.badge-priority-model {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-priority-plant {
  background-color: #f7fee7;
  color: #4d7c0f;
  border: 1px solid #d9f99d;
}

.badge-priority-industrial {
  background-color: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

/* Interactive Target Pills inside Bacteria Cards */
.target-pill-interactive {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 2px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.target-pill-interactive:hover {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.target-pill-interactive .pill-count {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 1px 5px;
  font-size: 0.68rem;
  font-weight: 800;
}

.target-pill-interactive:hover .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.org-card-phenotype {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-main);
}

/* Buttons (Harmonized with bialab.pt) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.btn-accent {
  background: var(--gradient-orange);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

.btn-accent:hover {
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.4);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.78rem;
  padding: 6px 12px;
}

/* Member & Leadership Portrait Styling (Harmonized with bialab.pt) */
.bialab-avatar-wrapper {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff), var(--gradient-primary);
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2);
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bialab-avatar-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.3);
}

.bialab-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.bialab-avatar-img.sergio {
  object-position: right center;
  transform: scale(1.08);
}

.bialab-avatar-wrapper:hover .bialab-avatar-img.sergio {
  transform: scale(1.16);
}

.bialab-avatar-img.simoes {
  object-position: center center;
  transform: scale(1.02);
}

.bialab-avatar-wrapper:hover .bialab-avatar-img.simoes {
  transform: scale(1.10);
}

/* Molecular Viewer Styling */
.ngl-viewer-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.ngl-toolbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.ngl-mode-selector {
  display: flex;
  align-items: center;
  background-color: #f1f5f9;
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.ngl-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.ngl-mode-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.ngl-tools-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ngl-tool-btn {
  background-color: #f8fafc;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.ngl-tool-btn:hover {
  background-color: #f1f5f9;
  border-color: var(--border-subtle);
  color: var(--primary);
}

.ngl-tool-btn.active {
  background-color: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

.ngl-canvas-container {
  width: 100%;
  height: 520px;
  background-color: var(--bg-viewer);
  position: relative;
}

.ngl-status-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 38, 66, 0.9);
  color: #ffffff;
  backdrop-filter: blur(4px);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  z-index: 10;
}

.ngl-help-caption {
  padding: 10px 16px;
  font-size: 0.76rem;
  color: var(--text-muted);
  background-color: #fafafa;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Modern Data Table */
.data-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table thead th {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 14px;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  border: none;
  font-size: 0.83rem;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease;
}

.data-table thead th:hover {
  background-color: var(--primary-light);
}

.data-table thead th.sort-asc::after {
  content: ' ▲';
  font-size: 0.68rem;
  color: var(--accent);
}

.data-table thead th.sort-desc::after {
  content: ' ▼';
  font-size: 0.68rem;
  color: var(--accent);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

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

.data-table tbody td {
  padding: 11px 14px;
  color: var(--text-main);
  vertical-align: middle;
  font-size: 0.85rem;
}

.data-table tbody td a {
  color: var(--secondary);
  font-weight: 600;
}

.data-table tbody td a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.code-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  background-color: #f1f5f9;
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

/* Filter Controls Toolbar */
.filter-toolbar {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.filter-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.filter-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.filter-search-box input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.filter-pill-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  background-color: #f8fafc;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover,
.filter-pill.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Hero Section (Harmonized with bialab.pt & High-Fidelity 3D Panoramic Background) */
.hero-section {
  position: relative;
  background-color: #070d18;
  background-image:
    radial-gradient(ellipse 90% 70% at 50% -20%, rgba(2, 132, 199, 0.28) 0%, rgba(124, 58, 237, 0.18) 50%, rgba(7, 13, 24, 0) 100%),
    linear-gradient(180deg, rgba(7, 13, 24, 0.72) 0%, rgba(7, 13, 24, 0.92) 100%),
    url('../images/hero_bg_panoramic.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(2, 132, 199, 0.15);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/bg_grid_pattern.svg');
  opacity: 0.55;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.28) 0%, rgba(124, 58, 237, 0.16) 50%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.35);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  color: #ffffff;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 16px;
  max-width: 900px;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.hero-search-container {
  max-width: 680px;
  position: relative;
  margin-bottom: 24px;
}

.hero-search-input {
  width: 100%;
  padding: 16px 120px 16px 50px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  outline: none;
}

.hero-search-container i.fa-search {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-search-btn {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0 24px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

.hero-search-btn:hover {
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.5);
  transform: scale(1.02);
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: left;
  transition: background-color 0.2s ease;
}

.hero-stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Metadata Property Grid */
.props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.prop-item {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prop-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.prop-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

/* External Link Badges */
.ext-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.ext-link-badge:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ==========================================================================
   Modern Scientific Footer (4-Column Portal Architecture)
   ========================================================================== */
footer {
  background: linear-gradient(180deg, #090e1a 0%, #050811 100%);
  color: #94a3b8;
  padding: 56px 24px 32px;
  margin-top: auto;
  border-top: 2px solid transparent;
  background-image: linear-gradient(180deg, #090e1a, #050811), linear-gradient(90deg, #0284c7 0%, #7c3aed 50%, #06d6a0 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-inner {
  max-width: 1640px;
  margin: 0 auto;
}

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

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

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

.footer-col-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e2e8f0;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-col-title i {
  color: var(--secondary);
}

.footer-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.6;
  text-align: justify;
  text-justify: inter-word;
}

.footer-col-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links li {
  margin: 0;
  padding: 0;
}

.footer-col-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.footer-col-links a i {
  font-size: 0.72rem;
  color: #64748b;
  transition: color 0.15s ease;
}

.footer-col-links a:hover {
  color: #38bdf8;
  transform: translateX(3px);
}

.footer-col-links a:hover i {
  color: #38bdf8;
}

.footer-citation-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.footer-citation-card:hover {
  border-color: rgba(2, 132, 199, 0.4);
  background: rgba(2, 132, 199, 0.04);
}

.footer-citation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.footer-citation-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(2, 132, 199, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.footer-citation-text {
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin: 0 0 10px 0;
  text-align: justify;
  text-justify: inter-word;
}

.footer-citation-text em {
  color: #ffffff;
}

.footer-citation-doi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
}

.footer-citation-doi:hover {
  color: #ffffff;
}

.footer-open-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-open-actions a {
  font-size: 0.76rem;
  padding: 5px 10px;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.78rem;
  color: #64748b;
}

.footer-bottom-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-title {
    font-size: 1.9rem;
  }
  .ngl-canvas-container {
    height: 420px;
  }
  #topmenu {
    display: none;
    width: 100%;
    order: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 14px;
    background: var(--primary-dark);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .show-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.25rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  #show-menu:checked ~ #topmenu {
    display: flex;
  }
  #topmenu li {
    width: 100%;
  }
  #topmenu li a,
  #topmenu li button.nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 10px 14px;
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin: 4px 0 8px 0;
    padding: 4px 0;
    min-width: unset;
  }
  .nav-dropdown-menu li a {
    color: #ffffff !important;
    padding: 8px 14px !important;
  }
  .nav-dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--accent) !important;
  }
  .nav-dropdown-menu .dropdown-header {
    color: rgba(255, 255, 255, 0.6) !important;
  }
  .nav-dropdown-menu .dropdown-divider {
    background: rgba(255, 255, 255, 0.1) !important;
  }
  #searchbarmenu {
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
  }
  .search-form-nav {
    width: 100%;
  }
  .search-form-nav input {
    width: 100%;
  }
}

/* ==========================================================================
   Scientific Cross-Reference Hub & Visual Enhancements (V3.0)
   ========================================================================== */

/* Cross-Reference Pills with Branded Styles */
.cross-ref-hub {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.db-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
  border: 1px solid transparent;
}

.db-pill i {
  font-size: 0.85rem;
}

.db-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.db-pill-uniprot {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
.db-pill-uniprot:hover {
  background: #0284c7;
  color: #ffffff;
}

.db-pill-alphafold {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.db-pill-alphafold:hover {
  background: #4f46e5;
  color: #ffffff;
}

.db-pill-rcsb {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
.db-pill-rcsb:hover {
  background: #002642;
  color: #ffffff;
}

.db-pill-pdbe {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.db-pill-pdbe:hover {
  background: #16a34a;
  color: #ffffff;
}

.db-pill-interpro {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.db-pill-interpro:hover {
  background: #059669;
  color: #ffffff;
}

.db-pill-string {
  background: #faf5ff;
  color: #6b21a8;
  border-color: #e9d5ff;
}
.db-pill-string:hover {
  background: #7e22ce;
  color: #ffffff;
}

.db-pill-pubchem {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.db-pill-pubchem:hover {
  background: #2563eb;
  color: #ffffff;
}

.db-pill-chembl {
  background: #fdf2f8;
  color: #be185d;
  border-color: #fbcfe8;
}
.db-pill-chembl:hover {
  background: #db2777;
  color: #ffffff;
}

.db-pill-drugbank {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.db-pill-drugbank:hover {
  background: #d97706;
  color: #ffffff;
}

.db-pill-bindingdb {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}
.db-pill-bindingdb:hover {
  background: #0d9488;
  color: #ffffff;
}

.db-pill-kegg {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.db-pill-kegg:hover {
  background: #ea580c;
  color: #ffffff;
}

.db-pill-taxonomy {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.db-pill-taxonomy:hover {
  background: #d97706;
  color: #ffffff;
}

/* Biofilm Developmental Lifecycle Interactive Pathway Bar */
.biofilm-lifecycle-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.biofilm-timeline-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  position: relative;
  margin-top: 16px;
}

.timeline-stage-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.timeline-stage-card:hover, .timeline-stage-card.active {
  background: #ffffff;
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.timeline-stage-card.active {
  border-top: 3px solid var(--accent);
}

.timeline-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.timeline-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-stage-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.timeline-stage-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 10px 0;
}

.timeline-targets-preview {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.timeline-target-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
}

.timeline-target-pill:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* 3D Viewer Toolbar Upgrades */
.ngl-color-select {
  padding: 5px 10px;
  font-size: 0.82rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.ngl-color-select:focus {
  outline: none;
  border-color: var(--secondary);
}

/* Resource Partner Ribbon */
.partner-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
}

.partner-logo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.partner-logo-item:hover {
  color: var(--primary);
  background: var(--bg-subtle);
}

/* Interactive Modal for LigPlot inspection */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  text-align: center;
}

/* Organism Micrograph Cards (Free Scientific Imagery) */
.org-card-img-wrap {
  position: relative;
  height: 165px;
  overflow: hidden;
  border-radius: calc(var(--radius-md) - 2px) calc(var(--radius-md) - 2px) 0 0;
  margin: -24px -24px 16px -24px;
  background: #0f172a;
}

.org-micrograph-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: block;
}

.modern-card:hover .org-micrograph-img {
  transform: scale(1.06);
}

.org-card-img-attrib {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #f1f5f9;
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Biological Properties Panel (aa, oligomer, cofactors) */
.bio-props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.bio-prop-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.bio-prop-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.bio-prop-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

/* ==========================================================================
   Landing Gateway: Scientific Mission & Target Audiences (Trends in Biotech)
   ========================================================================== */
.landing-mission-gateway {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 36px 32px;
  margin-bottom: 34px;
  position: relative;
  overflow: hidden;
}

.landing-mission-gateway::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.gateway-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.gateway-title-group {
  max-width: 820px;
}

.gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  color: var(--secondary);
  border: 1px solid rgba(2, 132, 199, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.gateway-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.25;
  margin: 0 0 10px 0;
}

.gateway-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* 3 Core Scientific Pillars */
.mission-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.mission-pillar-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.mission-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
  background: #ffffff;
}

.pillar-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.pillar-icon-crisis {
  background: #fee2e2;
  color: #dc2626;
}

.pillar-icon-paradigm {
  background: #e0e7ff;
  color: #4338ca;
}

.pillar-icon-hub {
  background: #e0f2fe;
  color: #0284c7;
}

.pillar-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 8px 0;
}

.pillar-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  align-self: flex-start;
}

.pillar-stat-pill.crisis {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.pillar-stat-pill.paradigm {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.pillar-stat-pill.hub {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.pillar-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

/* Audience Role Selector Tabs */
.audience-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.audience-role-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-pill-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.role-pill-btn:hover {
  background: #e2e8f0;
  color: var(--primary);
}

.role-pill-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* Target Audiences 4-Column Grid */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.audience-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.audience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-light);
  transition: background 0.25s ease;
}

.audience-card.active-role {
  border-color: var(--accent-teal);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.18);
  transform: translateY(-3px);
}

.audience-card.active-role::before,
.audience-card:hover::before {
  background: var(--gradient-primary);
}

.audience-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.audience-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.audience-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.aud-comp { background: #e0f2fe; color: #0369a1; }
.aud-med  { background: #fce7f3; color: #be185d; }
.aud-bio  { background: #f3e8ff; color: #7e22ce; }
.aud-clin { background: #dcfce7; color: #15803d; }

.audience-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.25;
}

.audience-role-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audience-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 14px 0;
}

.audience-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  font-size: 0.82rem;
  color: var(--text-main);
  flex: 1;
}

.audience-features li {
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.audience-features li i {
  color: var(--accent-teal);
  font-size: 0.78rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.audience-action-btn {
  margin-top: auto;
  width: 100%;
}

/* Paper Spotlight Callout Box */
.paper-spotlight-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.03) 0%, rgba(2, 132, 199, 0.05) 100%);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-teal);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.paper-spotlight-content {
  max-width: 820px;
}

.paper-journal-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.paper-spotlight-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 6px 0;
}

.paper-spotlight-authors {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.paper-spotlight-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .landing-mission-gateway {
    padding: 24px 18px;
  }
  .gateway-title {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   Direct Chemical Cross-References & Ligand Info (PubChem, ChEMBL, PDB CCD)
   ========================================================================== */
.direct-chem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.direct-chem-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.direct-chem-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: #ffffff;
  border-color: #cbd5e1;
}

.direct-chem-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.direct-chem-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.direct-chem-logo.pubchem { background: #eff6ff; color: #1d4ed8; }
.direct-chem-logo.chembl  { background: #fdf2f8; color: #be185d; }
.direct-chem-logo.rcsb    { background: #f1f5f9; color: #0f172a; }
.direct-chem-logo.drugbank{ background: #fef3c7; color: #b45309; }

.direct-chem-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
}

.direct-chem-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.direct-chem-body {
  margin-bottom: 14px;
  flex: 1;
}

.direct-chem-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-bottom: 8px;
}

.direct-chem-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.direct-chem-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.direct-chem-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.direct-chem-actions {
  margin-top: auto;
}

/* =========================================================================
   Structure Split Layout (Left: 3D Viewer, Right: Details & Identified Ligands)
   ========================================================================= */
.structure-split-container {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}

@media (max-width: 1024px) {
  .structure-split-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.sticky-viewer-pane {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 20;
}

.sticky-viewer-pane .ngl-viewer-card {
  margin-bottom: 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sticky-viewer-pane .ngl-canvas-container {
  height: 640px;
  min-height: 500px;
  background: #f8fafc;
}

@media (max-width: 1024px) {
  .sticky-viewer-pane {
    position: static;
  }
  .sticky-viewer-pane .ngl-canvas-container {
    height: 480px;
  }
}

@media (max-width: 640px) {
  .sticky-viewer-pane .ngl-canvas-container {
    height: 380px;
  }
}

.structure-details-pane {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Identified Ligands Cards */
.identified-ligand-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.identified-ligand-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.identified-ligand-card.active-ligand {
  border-color: var(--secondary);
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.28), var(--shadow-sm);
}

.identified-ligand-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.identified-ligand-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.15rem;
  background: #f1f5f9;
  color: var(--primary);
  border: 1px solid var(--border-medium);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.identified-ligand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 4px 0 2px 0;
}

.identified-ligand-formula {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.identified-ligand-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.identified-ligand-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.apo-structure-notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

/* LigPlot Modal Lightbox */
.ligplot-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.ligplot-modal.active {
  display: flex;
}

.ligplot-modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-medium);
  padding: 24px;
  position: relative;
}

.ligplot-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.ligplot-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.ligplot-modal-close:hover {
  color: var(--primary);
}

/* =========================================================================
   Blender 3D Biofilm Hero Showcase
   ========================================================================= */
.biofilm-blender-showcase {
  margin: -8px 0 32px 0;
}

.blender-showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.blender-showcase-card:hover {
  box-shadow: var(--shadow-lg);
}

.blender-img-wrapper {
  position: relative;
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: #0a101d;
}

.blender-hero-img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.blender-showcase-card:hover .blender-hero-img {
  transform: scale(1.02);
}

.blender-img-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 2;
}

.blender-render-badge {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.blender-spec-badge {
  background: rgba(2, 132, 199, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.blender-showcase-caption {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
}

.blender-caption-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.blender-caption-title {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.blender-caption-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
  max-width: 900px;
}

.blender-quick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* =========================================================================
   Biofilm Lifecycle Stages Panoramic Infographic Card
   ========================================================================= */
.lifecycle-infographic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.lifecycle-infographic-card:hover {
  box-shadow: var(--shadow-lg);
}

.lifecycle-img-wrapper {
  position: relative;
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  background: #070d18;
}

.lifecycle-hero-img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.lifecycle-infographic-card:hover .lifecycle-hero-img {
  transform: scale(1.015);
}

.lifecycle-caption-wrap {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
}

.lifecycle-caption-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 6px 0 0 0;
  text-align: justify;
  text-justify: inter-word;
}




