/* =========================================================
   1) IMPORTS
   ========================================================= */
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro');
@import url('https://fonts.googleapis.com/css?family=Raleway');


/* =========================================================
   2) CSS VARIABLES
   ========================================================= */
:root{
  --page-max: 1200px;
  --page-pad: 2rem;

  --green-900: #155e3b;
  --green-700: #237f57;
  --green-600: #295d44;
  --mint-300:  #88c9b0;

  --bg-page:   #f5f9f6;

  --topbar-min-h: 76px;
  --shadow-soft: 0 2px 8px rgba(0,0,0,0.08);
}


/* =========================================================
   3) BASE / TYPOGRAPHY
   ========================================================= */
body {
  font-family: "Raleway", "Source Sans Pro", sans-serif; 
  color: #2d2d2d;
  background-color: var(--bg-page);
  margin: 0;
  padding: 0;

  font-size: 14px;
  min-height:1500px;
}

body.mobile{
  text-size-adjust: 250%;
  -webkit-text-size-adjust: 250%;
}

.container {
            justify-content: center;
            align-items: center;
            text-align: center;
        }

select { 
  font-family: "Raleway", "Source Sans Pro", sans-serif; 
}

a {
  color: #2b7a78;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover { color: #1c4c42; }

p {
  max-width: 800px;
  margin-bottom: 1.5rem;
  text-align: justify;
}

em {
  font-style: italic;
  color: var(--green-600);
}

strong {
  font-weight: bold;
  color: var(--green-700);
}

.devHidden{ display: none; }

@media only screen and ( min-device-width: 1000px ) {
  .mobile-display{ display:none; }
}

@media (max-width: 768px) {
  body { padding: 1rem; }
}


/* =========================================================
   4) GLOBAL LAYOUT WRAPPERS
   ========================================================= */
main, header, footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--page-pad);
}


/* =========================================================
   5) TOPBAR + NAVIGATION (ONE unified system)
   ========================================================= */

/* Fixed topbar container */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  /* IMPORTANT: dropdown must be allowed to overflow */
  height: auto;
  min-height: var(--topbar-min-h);
  overflow: visible;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;

  padding: 10px 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  z-index: 2000;
}

/* Push page content below fixed topbar */
header {
  margin-top: calc(var(--topbar-min-h) + 24px);
}

/* LEFT: methods bar */
#methods-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#methods-bar a {
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #ccc;
  transition: background 0.2s ease, transform 0.2s ease;
  line-height: 1;
  color: var(--green-900);
}

#methods-bar a:hover { 
  background: #ffeeba;
  transform: translateY(-1px);
}

/* CENTER: nav inside topbar (inherits topbar look) */
#topbar nav {
  background: transparent;
  border: none;
  padding: 0;
  position: static;
  box-shadow: none;
  overflow: visible;
}

#topbar nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.1rem;
  overflow: visible;
}

#topbar nav ul li {
  position: relative;
  overflow: visible;
}

#topbar nav ul li a {
  color: var(--green-900);
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#topbar nav ul li a:hover {
  color: var(--green-700);
  border-bottom: 2px solid var(--mint-300);
}

/* RIGHT: logos (NOT fixed) */
#funders-top-right {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  background: none;
  padding: 0;
  border: none;
}

#funders-top-right > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 1;
}

#funders-top-right img {
  max-height: 48px;
  height: auto;
  width: auto;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
  transform-origin: center;
}

#funders-top-right img:hover {
  transform: scale(1.06);
}

/* Responsive topbar */
@media (max-width: 1100px) {
  #topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  #methods-bar,
  #funders-top-right {
    justify-content: center;
  }
  #topbar nav ul {
    justify-content: center;
  }
  header {
    margin-top: calc(var(--topbar-min-h) + 70px);
  }
}




/* =========================================================
   6) DROPDOWN (floating, reliable)
   ========================================================= */
#topbar .dropdown { position: relative; }

#topbar .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;

  background-color: #f9f9f9;
  min-width: 220px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.18);
  padding: 10px 0;
  z-index: 9999;
  list-style: none;
  margin: 0;
  border-radius: 10px;
}

/* Show on hover (desktop) */
#topbar .dropdown:hover > .dropdown-menu {
  display: block;
}

#topbar .dropdown-menu li { padding: 0; }

#topbar .dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--green-900);
  border-bottom: none;
}

#topbar .dropdown-menu a:hover {
  background: rgba(21, 94, 59, 0.08);
  color: var(--green-700);
  text-decoration: none;
}


/* =========================================================
   7) HERO HEADER (logo + title + description like GenomoBase)
   ========================================================= */
 .hero-section h1 {
    color: #88c9b0 !important;  /* mint-300 accent color */
}

.hero-header {
  padding: 3.5rem 2rem 2.5rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-logo img {
  width: 200px;   /* was 120px */
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  margin-top: 0;
}


.hero-text h1 {
  font-size: 3rem;
  margin: 0;
  color: var(--green-900);
  letter-spacing: -1px;
  text-align: left;
}

.hero-tagline {
  margin-top: 1rem;
  font-size: 1.2rem;
  max-width: 650px;
  color: var(--green-600);
  line-height: 1.6;
  text-align: left;
}

@media (max-width: 768px) {
  .hero-container { flex-direction: column; }
  .hero-logo img { width: 90px; }
  .hero-text h1 { font-size: 2.2rem; text-align: center; }
  .hero-tagline { font-size: 1rem; text-align: center; }
}


/* =========================================================
   8) HEADINGS
   ========================================================= */
h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--green-900);
  text-align: center;
}

h2 {
  font-size: 2rem;
  border-bottom: 2px solid #a3d9b1;
  padding-bottom: 0.5rem;
  margin-top: 3rem;
  color: var(--green-700);
}

h3 {
  font-size: 1.4rem;
  color: var(--green-600);
  margin-top: 2rem;
}


/* =========================================================
   9) IMAGES / ROWS
   ========================================================= */
img {
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.image-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-top: 1rem;
}

.image-row img {
  flex: 1 1 auto;
  max-width: 48%;
  height: auto;
}


/* =========================================================
   10) BUTTONS
   ========================================================= */
button {
  background-color: var(--green-700);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #1b6a49;
}


/* =========================================================
   11) EXTERNAL LINKS (kept, but scoped to content areas)
   NOTE: avoids styling your topbar links like buttons.
   ========================================================= */
main a[target="_blank"],
footer a[target="_blank"] {
  display: inline-block;
  margin-top: 1rem;
  background-color: #e0f0eb;
  color: var(--green-900);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

main a[target="_blank"]:hover,
footer a[target="_blank"]:hover {
  background-color: #c7e5da;
}


/* =========================================================
   12) SECTION CONTAINER
   ========================================================= */
#section {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin: 2rem 0;
}


/* =========================================================
   13) TABLES / LEGENDS
   ========================================================= */
table.colourLegend{
  border-collapse: collapse;
  border-spacing: 0px;
}

table.colourLegend tr td{
  margin:0;
  font-size:0.5em;
  border-style:solid;
  border-width:0.1em;
  padding:0em;
  width:2em;
}

table.colourLegend tr td.labelCell {
  vertical-align:top;
  font-size:0.8em;
  border-width:0;
  margin-top: -3em;
  text-align:left;
  padding-right:0.5em;
  padding-left:0.5em;
}


/* =========================================================
   14) BANNER + SHOWCASE COMPONENTS
   ========================================================= */
.banner{
  text-align:left;
  word-break: break-word;

  font-size: 1.2em;
  line-height: 1.5em;

  padding: 2em;
  color: black;
  border-style: solid;
  border-color: var(--green-900);
  border-radius: 0.3em;
  border-width: 0px;
  margin: 2em;

  min-width:200px;
  margin-bottom: 2em;
  margin-right: 2em;
}

.aarsShowcase {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  background: linear-gradient(140deg, #a3d9b10a, #a3d9b115);
  padding: 1.5em;
  max-width: 250px;
  box-shadow: 0.3em 0.25em 0.1em #a3d9b10a;
  border-radius: 0.5em;
  margin: 1em;
  box-sizing: border-box;
  transition: transform 0.2s ease;
}

.aarsShowcase img {
  display: block;
  margin: 0 auto 0.5em auto;
}

.aarsShowcase a {
  color: var(--green-900);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.aarsShowcase a:hover { color: var(--green-700); }

.aarsShowcase:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(163, 217, 177, 0.4);
}

.aarsShowcase table {
  width:100%;
  margin-bottom:0.5em;
  justify-content: center;
}

.aarsShowcase table td{ text-align:center; }

.aarsShowcase table td h3{
  text-align:center;
  margin:0;
  font-size:1.3em;
}


/* =========================================================
   15) FLEX LAYOUTS / STRUCTURE CONTROLS
   ========================================================= */
#structureButtons{
  width:100%;
  text-align:center;
}

#structureButtons select{
  min-width:30em;
}

.flexContainerMain{
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  list-style: none;
}

.flexContainerMain li{ padding: 1.5em; }

.structureCellDiv{ margin-bottom:3em; }

.flexContainerMain>li { margin-bottom:1em; }

.flexContainer_left2 {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-evenly;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  list-style: none;
}

.flexContainer_left2 > li {
  margin: 1em;
  max-width: 400px;
  flex: 1 1 300px;
}


/* =========================================================
   16) SVG / MATRIX / SECONDARY TOOLING
   ========================================================= */
svg { user-select: none; }

#secondary text.selected{
  fill: var(--green-700) !important;
  font-weight: bold;
}

#secondary g[select="na"]{ opacity: 1.0; }
#secondary g[select="false"]{ opacity: 0.4; }
#secondary g[select="true"]{ opacity: 1.0; }

.footnote{ font-size:0.7em; }

svg text.alpha{ fill: var(--green-900); }

g.matrixcell:hover rect{ fill:#a822a1 !important; }
g.matrixcell:hover text{ fill:white !important; }


/* =========================================================
   17) CONTENT-SPECIFIC LINKS
   ========================================================= */
#main{
  padding:0.5em;
}

#main a{
  color: var(--green-900);
}

span.hyperlink{
  color: var(--green-900);
  cursor: pointer;
  text-decoration: underline;
}


/* =========================================================
   18) RESPONSIVE TWEAKS
   ========================================================= */
@media only screen and ( max-device-width: 1200px ) {
  p{ line-height:190% !important; }
  .banner{ line-height: 3em; }
  .aarsShowcase{ max-width: 100%; }
}

@media only screen and (max-device-width: 1200px) {
  .flexContainer_left2 .aarsShowcase img {
    width: 10em;
    margin-right: 2em;
    margin-top: 0.5em;
    justify-content: center;
  }

  .flexContainer_left2 .aarsShowcase div {
    height: auto;
    justify-content: center;
  }
}

/* ==================== NEW: Family Diversity Grid Responsive ==================== */
@media (max-width: 768px) {
  /* Family diversity grid becomes single column */
  #mycoviruses > div:has(.visualization-wrapper) {
    grid-template-columns: 1fr !important;
  }
}

.af-images{
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;   /* bring them closer */
  align-items: center;
  gap: 24px;                 /* controls spacing */
  width: 100%;
  margin-top: 20px;
}


.af-images figure{
  margin: 0;
  width: 200px;
  flex: 0 0 200px;   /* prevents shrinking */
  text-align: center;
}

.af-images img{
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

@media (max-width: 980px){
  .ngl-wrap{
    grid-template-columns: 1fr;
  }
}

.af-images{
  flex-direction: column;
}

.msa-container{ height: 420px; overflow: auto; }

.msa-container{
  overflow: scroll;       /* always show scrollbars */
  width: 100%;
  height: 420px;          /* control how tall the viewport is */
}

:root {
            --primary-color: #237f57;
            --primary-dark: #155e3b;
            --accent-mint: #88c9b0;
            --light-bg: #f5f9f6;
        }
        
        /* Override Bootstrap primary color */
        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }
        .btn-primary:hover {
            background-color: var(--primary-dark);
            border-color: var(--primary-dark);
        }
        
        /* Hero section with custom gradient */
        .hero-section {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
        }
        
        /* Statistics numbers - use custom green instead of Bootstrap colors */
        .stats-section .display-5 {
            color: var(--primary-color) !important;
        }
        
        /* Card styling */
        .card {
            border: 1px solid #e0e0e0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .card-link {
            color: var(--primary-color);
        }
        .card-link:hover {
            color: var(--primary-dark);
        }
        
        /* CTA section */
        .cta-section {
            background-color: var(--primary-color) !important;
        }
        .cta-section .btn-outline-light:hover {
            background-color: rgba(255,255,255,0.1);
        }
        
        /* Features section */
        .feature-card {
            padding: 2rem;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .feature-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 4px 12px rgba(35, 127, 87, 0.15);
        }
        .feature-card h5 {
            color: var(--primary-dark);
            font-weight: 600;
            margin-bottom: 1rem;
        }
        .feature-card p {
            color: #2d2d2d;
            max-width: 100%;
            text-align: center;
        }
        
        /* Navigation bar styling */
        .navbar {
            background-color: #ffffff !important;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .navbar-brand {
            color: var(--primary-dark) !important;
            font-weight: 700;
        }
        .nav-link {
            color: var(--primary-dark) !important;
            font-weight: 500;
            transition: color 0.3s ease;
        }
        .nav-link:hover {
            color: var(--primary-color) !important;
        }
        
        /* Background color */
        body {
            background-color: var(--light-bg);
        }
        
        /* Search section */
        .search-section {
            background-color: #ffffff;
        }
        .search-section .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }
        
        /* Stats section */
        .stats-section {
            background-color: #ffffff;
        }
        
        /* News section cards */
        .news-section .card-title {
            color: var(--primary-dark);
        } 



/* ============================================
  18) MYCOVIROME EXPLORE PAGE STYLES
   ============================================ */

:root {
  --primary-color: #237f57;
  --primary-dark: #155e3b;
  --accent-mint: #88c9b0;
  --light-bg: #f5f9f6;
  --border-color: #ddd;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 12px rgba(35, 127, 87, 0.15);
}

body {
  background-color: var(--light-bg);
  padding-top: 76px;
}

/* ============== HEADER ============== */
.explore-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 2rem;
}

.explore-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.explore-header p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  color: rgba(255,255,255,0.95);
}

/* ============== SEARCH & FILTER SECTION ============== */
.search-filter-section {
  background: white;
  padding: 2rem;
  margin: 0 0 2rem 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-box-wrapper {
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(35, 127, 87, 0.2);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.filter-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-item {
  display: flex;
  flex-direction: column;
}

.filter-item label {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.filter-item select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-item select:hover {
  border-color: var(--primary-color);
}

.filter-item select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(35, 127, 87, 0.2);
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-search {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-search:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-reset {
  background-color: #f0f0f0;
  color: var(--primary-dark);
  border: 1px solid var(--border-color);
  padding: 10px 25px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-reset:hover {
  background-color: #e0e0e0;
}

/* ============== RESULTS SECTION ============== */
.results-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-bottom: 2rem;
}

.results-main {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent-mint);
}

.results-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.view-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ============== DATA GRID VIEW ============== */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.data-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.data-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.data-card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-mint));
  color: white;
  padding: 1rem;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.data-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.data-card-type {
  font-size: 0.8rem;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  padding: 3px 8px;
  border-radius: 3px;
  width: fit-content;
}

.data-card-body {
  padding: 1.5rem;
}

.data-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.meta-label {
  font-weight: 600;
  color: var(--primary-dark);
}

.meta-value {
  color: #666;
}

.data-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background-color: #e8f5e9;
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.data-card-action {
  display: flex;
  gap: 0.5rem;
}

.btn-view {
  flex: 1;
  padding: 8px 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.btn-view:hover {
  background-color: var(--primary-dark);
}

.btn-download {
  flex: 1;
  padding: 8px 12px;
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-download:hover {
  background-color: #f0f0f0;
}

/* ============== SIDEBAR ============== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-mint);
}

.stats-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.stats-label {
  color: #666;
}

.stats-value {
  font-weight: 700;
  color: var(--primary-color);
}

/* ============== MAIN CONTENT SECTION ============== */
main.mycovirome-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

#mycoviruses.banner {
  border-width: 0;
  padding: 2rem;
  margin: 2rem 0;
  background: white;
  box-shadow: var(--shadow);
  border-radius: 8px;
}

#mycoviruses h2 {
  color: var(--primary-color);
  border-bottom: 3px solid var(--accent-mint);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

#mycoviruses h3 {
  color: var(--primary-dark);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

#mycoviruses p {
  text-align: left;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

/* ============== IFRAME STYLING ============== */
.visualization-wrapper {
  margin: 2rem 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow-x: auto;
}

.visualization-wrapper iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.visualization-description {
  color: #666;
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 1rem;
  text-align: center;
}

/* ============== GENOME CARDS ============== */
.flexContainer_left2 {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0;
  margin: 2rem 0;
  list-style: none;
  gap: 1.5rem;
}

.aarsShowcase {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  background: linear-gradient(140deg, #a3d9b10a, #a3d9b115);
  padding: 2rem;
  max-width: 250px;
  box-shadow: var(--shadow);
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.aarsShowcase:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.aarsShowcase img {
  display: block;
  margin: 0 auto 1rem auto;
  max-width: 100px;
  height: auto;
}

.aarsShowcase a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
  line-height: 1.5;
}

.aarsShowcase a:hover {
  color: var(--primary-color);
}

/* ============== PAGINATION ============== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.pagination-btn:hover:not(.disabled) {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
  .results-section {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: column;
  }

  .data-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .explore-header h1 {
    font-size: 1.8rem;
  }

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

  .filter-buttons {
    flex-direction: column;
  }

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

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

  #mycoviruses {
    padding: 1rem !important;
  }

  .visualization-wrapper iframe {
    height: 400px;
  }

  .flexContainer_left2 {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .aarsShowcase {
    max-width: 100%;
    width: 100%;
    max-width: 300px;
  }
}

/* =========================================================
   Utilities (reusable helper classes)
   ---------------------------------------------------------
   .text-justify:
   Applies justified text alignment (straight left/right edges).
   Useful for longer paragraphs in documentation pages.
   Note: justification can create uneven spacing on very narrow
   screens; use sparingly or only on larger viewports if desired.
   ========================================================= */
.text-justify {
  text-align: justify;
  text-justify: inter-word;
}

section.mb-5 > h2.h4 {
  border-bottom: 2px solid #88c9b0;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}