/* === Global === */
body { 
  padding-top: 70px; 
  font-family: 'Lexend', sans-serif; 
  background-color: white;
}

/* === Loader === */
#loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.8s ease;
}
#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}
#loader img {
  width: 300px;
}

/* === Scroll Progress Bar === */
#scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 16px;
  z-index: 9999; /* below navbar */
}
#scroll-progress-bar {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: #8e44ad;
  border-radius: 0 8px 8px 0;
  transition: width 0.1s ease-out;
}

/* === Floating Bacteria === */
#scroll-bacteria {
  position: fixed;
  top: 50px; /* below navbar */
  left: 0;
  width: 60px;
  pointer-events: none;
  opacity: 0;
  animation: bounce 1s infinite ease-in-out;
  transition: left 0.1s ease-out, opacity 0.6s ease;
  z-index: 9000;
}
#scroll-bacteria.show { opacity: 1; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* === Scroll-to-Top === */
#up-arrow {
  position: fixed;
  bottom: 20px; right: 20px;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#up-arrow.show {
  opacity: 1;
  pointer-events: auto;
}
#up-arrow img {
  width: 50px;
  opacity: 0.9;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#up-arrow img:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* === Header Characters === */
.header-character-left,
.header-character-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  z-index: 2;
}
.header-character-left { left: 0; margin-left: 10px; }
.header-character-right { right: 0; margin-right: 10px; }
.header-text {
  position: relative;
  z-index: 1;
  margin-left: 220px;  /* largeur ≈ image gauche */
  margin-right: 220px; /* largeur ≈ image droite */
}


/* === Team Logo Flower Menu === */
#team-logo-menu {
  position: relative;
  text-align: center;
  margin: 1rem auto 4rem;
}
#team-logo-menu .team-logo {
  width: 200px;
  display: block;
  margin: 0 auto;
}
#team-logo-menu .circle {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  border-radius: 50%;
  font-size: 0.8rem;
  display: flex;
  align-items: center; justify-content: center;
  color: white; text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease, opacity 0.5s ease;
}
#team-logo-menu .circle.show {
  opacity: 1;
  transform: scale(1);
}
footer img.team-logo { margin-bottom: 40px; }

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0; width: 100%;
  background: white !important;
  z-index: 10000; /* above progress bar */
}
.navbar .logo { height: 50px; }
.navbar .dropdown-menu { z-index: 10006 !important; }

/* === Sponsor Slider === */
.sponsor-container {
  overflow: hidden;
  width: 100%;
  height: 120px;
  margin-top: 1rem;
  white-space: nowrap;
}
.sponsor-track {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  animation: scroll-sponsors 20s linear infinite;
}
.sponsor-track img {
  max-height: 100px;
  object-fit: contain;
}
@keyframes scroll-sponsors {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === Big Counter === */
.big-counter {
  font-size: 10rem;
  font-weight: bold;
  margin: 1rem 0;
  color: #8e44ad !important;
  opacity: 1 !important;
  transform: scale(1);
  z-index: 20000 !important;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.big-counter.visible { opacity: 1; transform: scale(1); }

/* === Abstract Box === */
.abstract-box {
  background: #8e44ad;
  color: white;
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
  border-radius: 12px;
}
.abstract-box h3 { margin: 0 0 1rem; }
.abstract-box p { margin: 0; }

/* === TOC === */
#toc h5 { color: #228e85; font-weight: bold; }
#toc .nav a {
  color: #228e85 !important;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
  display: block;
}
#toc .nav a:hover {
  color: #8e44ad !important;
  background: rgba(142, 68, 173, 0.1);
}
#toc .nav .active > a {
  font-weight: bold;
  color: #228e85 !important;
  background: rgba(34, 142, 133, 0.15);
  border-left: 4px solid #228e85;
}

/* === Footer Links === */
footer a {
  color: white !important;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}
footer a:hover {
  color: #f1f1f1 !important;
  text-decoration: underline;
}

/* === Map Section === */
#map-section { position: relative; width: 100%; }
#map-container {
  position: relative;
  width: 100%; height: 90vh;
  overflow: hidden;
}
#map-container.fixed {
  position: fixed;
  top: 70px; left: 0;
  width: 100%; height: 90vh;
  z-index: 5000;
}
.map-placeholder { height: 300vh; }
.map-layer {
  position: absolute;
  top: 50%; left: 50%;
  width: auto; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.map-layer.active { opacity: 1; }

.big-text-pfas-intro,
.big-text-pfas-prop,
.big-text-pfas-spread {
  font-weight: 500;
  line-height: 1.4;
  color: #228e85;
}
.big-text-pfas-intro { font-size: 1.8rem; }
.big-text-pfas-prop,
.big-text-pfas-spread { font-size: 2.2rem; }




/* === River Scroll === */
#river-scroll {
  position: relative;
  width: 100%;
  background: linear-gradient(to bottom, #dbeeea 0%, #ddebe5 100%);
  overflow: visible;
}

#river-scroll img {
  width: 100%;
  display: block;
}
/* River Scroll fade-out */
#river-scroll::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 200px;
  background: linear-gradient(to bottom, transparent, #ddebe5); /* fade into light blue */
  pointer-events: none;
}
/* New section picks up same blue */
#post-fade-section {
  background-color: #ddebe5; /* same as fade target */
  padding-top: 2rem;
  padding-bottom: 2rem;
}



/* River Text Overlays */
.river-text {
  position: absolute;
  color: #228e85;   /* now black */
  font-size: 3rem;
  font-weight: bold;
  text-shadow: none; /* remove glow/shadow for normal text */
  width: 100%;
  padding: 1rem;
  z-index: 2;
}

.top-right { top: 5%; right: 5%; text-align: right; }
.quarter-left { top: 25%; left: 5%; text-align: left; }
.quarter-right { top: 50%; right: 5%; text-align: right; }
.quarter-center { top: 75%; text-align: center; }
.pfas-large {
  font-size: 4rem;
  margin-top: 1rem;
  color: #ffeb3b;
  display: block;
  text-shadow: 0 0 15px rgba(255,235,59,0.8),
               0 0 30px rgba(255,235,59,0.6),
               0 0 45px rgba(255,235,59,0.4);
}


/* === Cloud Factory === */
#cloud-factory-container {
  position: relative;
  width: 100%;
  background: #8ba8a1; /* color band matches the image */
  overflow: visible;    /* allow the fade to extend below */
  padding-bottom: 400px; /* extra space so fade doesn't cover diver */
}

#cloud-factory-container img {
  width: 100%;
  display: block;
  transition: opacity 0.3s linear;
}

/* Fade overlay on factory */
#cloud-factory-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 500px; /* controls fade height */
  background: linear-gradient(to bottom, transparent, #ddebe5); /* factory fade → SAME blue */
  pointer-events: none;
}

/* Sections after fade */
#after-fade-sections,
#locate-pfas-section,
#mission-bonds-section {
  background-color: #ddebe5; /* seamless continuation */
}


/* === Full-width overrides ONLY for home page === */
body.home-page,
html.home-page {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important; /* Kill side scrollbars */
  padding-top: 90px; /* ⬅️ more breathing space under navbar */
}

/* Reset Bootstrap spacing */
body.home-page .container,
body.home-page .container-fluid {
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.home-page .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.home-page .col-12,
body.home-page .col-md-4,
body.home-page .col-md-6,
body.home-page .col-md-8 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Strict image control */
body.home-page img,
body.home-page img.img-fluid {
  max-width: 100% !important;
  height: auto;
  display: block;
}

/* Center text blocks inside rows */
body.home-page .row.text-center p,
body.home-page .row.text-center div {
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: 900px;   /* keeps paragraphs nicely centered */
  margin-left: auto;
  margin-right: auto;
}

/* Hide native scrollbar ONLY on home page */
body.home-page {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE/Edge */
}
body.home-page::-webkit-scrollbar {
  display: none;              /* Chrome, Safari, Opera */
}

/* === Final overflow kill for home page === */
html.home-page,
body.home-page {
  width: 100vw;              /* Force exact viewport width */
  max-width: 100vw;
  overflow-x: clip !important; /* Modern, cleaner than hidden */
}


/* Bacteria + text section */
#bacteria-text-section {
  background-color: #8ba8a1; /* full-width colored band */
  padding: 4rem 2rem;
  position: relative;
}

/* Row container: flex layout for larger screens */
#bacteria-text-section .row {
  display: flex;
  align-items: center; /* vertically center bacteria + rectangle */
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

/* Bacteria image column */
#bacteria-text-section .col-md-4 {
  display: flex;
  justify-content: center; /* center bacteria image */
}

/* Orange rectangle column */
#bacteria-text-section .col-md-6 {
  display: flex;
  justify-content: flex-start; /* left inside column */
}

/* Smaller rectangle with text on the right of the image */
.bacteria-text-rectangle {
  background-color: #f39b27; /* orange rectangle */
  padding: 3rem 3.5rem;       /* bigger padding */
  color: white;
  font-size: 1.9rem;          /* larger text */
  font-weight: bold;
  border-radius: 12px;
  max-width: 500px;           /* allow it to grow wider */
  text-align: left;
  margin-left: auto;           /* stick to right of image */
}


/* Mission Section inside fade */
#mission-section {
  position: relative;       /* instead of absolute */
  bottom: auto;             /* reset */
  left: auto;               /* reset */
  transform: none;          /* reset */
  margin-top: 12rem;         /* spacing after bacteria section */
  text-align: center;
  width: 100%;
  z-index: 5;               /* keep it above fade background */
}


/* Purple title */
.mission-title {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 2rem;
  line-height: 1.2;
  color: #8e4594;
}

/* Orange rectangle */
.mission-rectangle {
  display: inline-block;
  background-color: #f39b27;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  padding: 2rem 3rem;
  border-radius: 12px;
  text-align: center;
  max-width: 700px;
}



/* Mission + Bonds section */
#mission-bonds-section {
  background-color: #ddebe5; /* same blue as bottom of vertical-river */
  position: relative;
  overflow: hidden;
}


/* === Locate PFAS Section === */
#locate-pfas-section {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.locate-text-rectangle {
  background-color: #f39b27; /* same orange */
  color: white;
  font-size: 2rem;
  font-weight: bold;
  padding: 2rem 3rem;
  border-radius: 12px;
  text-align: center;
  max-width: 600px;
}

/* Background color continues after fade */
#after-fade-sections {
  background-color: #ddebe5; /* must match fade bottom color */
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Big question over cloud factory, left side */
.big-question-left {
  position: absolute;
  top: 40%;          /* moved up from 50% to ~4/10 */
  left: 5%;          /* keep on left side */
  transform: translateY(-50%);
  font-size: 4rem;   /* same as .mission-title */
  font-weight: bold;
  color: #8e4594;
  line-height: 1.2;
  z-index: 10;       /* above the image */
  text-align: left;
}

.cloud-factory-right-rectangle {
  position: absolute;
  top: 54%;           /* tiny nudge upward from before */
  right: 5%;
  transform: translateY(-50%);
  background-color: #f39b27;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  padding: 1.2rem 3rem; /* reduced height */
  border-radius: 12px;
  max-width: 650px;   /* longer width */
  text-align: left;
  z-index: 10;
  line-height: 1.3;
}




/* ✨ Hover card base */
.hover-card-prop,
.hover-card-un {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hover-card-prop img,
.hover-card-un img {
  width: 260px;
  height: 260px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Slight zoom on hover */
.hover-card-prop:hover img,
.hover-card-un:hover img {
  transform: scale(1.08);
}

/* Hidden text for popup (read by JS) */
.hover-text {
  display: none;
}

/* Popup tooltip */
.hover-popup {
  position: fixed;
  background: #ffffff;          /* white background */
  color: #228e85;               /* dark green text */
  border: 2px solid #228e85;    /* thin green border */
  padding: 0.8rem 1rem;
  border-radius: 8px;
  max-width: 280px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 20000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hover-popup.show {
  opacity: 1;
}

/* Add space around the PFAS props row */
.props-row {
  margin-top: 5rem;   /* more space above */
  margin-bottom: 10rem; /* more space below */
}

/* Force UN goals in a single row */
.un-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
  padding: 0 2rem;
  margin-bottom: 10rem;   /* adds space below the 5 icons */
}

.hover-card-un {
  width: 220px;           /* a bit smaller so 5 fit comfortably */
  /* height removed to allow natural scaling */
  overflow: visible;      /* let images grow outside the box */
}


.un-row .col-auto {
  flex: 0 0 auto;     /* don’t stretch */
}

#diver-section .col-md-8 p.big-text-pfas-intro {
    max-width: 90%;   /* text will stop before reaching the right margin */
    line-height: 1.6; /* improves readability */
}

/* Add margin to the bacteria PFAS image on the right */
#locate-pfas-section img[alt="Bacteria PFAS"] {
  margin-right: 2rem;   /* adjust spacing */
}




/* Loupe starts offscreen right */
#loupe-static {
  position: absolute;
  top: 46%;
  left: 120%; /* start offscreen */
  transform: translateY(-50%);
  width: 800px;
  height: auto;
  z-index: 10;
  transition: left 2s ease-out; /* slower slide */
}

/* Loupe final position with bounce */
#loupe-static.in-place {
  left: 36%; /* final position */
  animation: loupe-bounce 0.6s ease-out 1; /* small bounce */
}

/* Bounce keyframes */
@keyframes loupe-bounce {
  0%   { transform: translateY(-50%) translateX(0); }
  50%  { transform: translateY(-52%) translateX(0); } /* move slightly up */
  70%  { transform: translateY(-48%) translateX(0); } /* down */
  100% { transform: translateY(-50%) translateX(0); } /* settle */
}

/* Bacteria hidden initially */
#bacteria-loupe {
  position: absolute;
  top: 26%;
  left: 28%;
  width: 260px !important;
  height: auto !important;
  max-width: none !important;
  opacity: 0; /* hidden initially */
  transition: opacity 3s ease-in; /* slower fade-in */
  z-index: 11;
}




/* PFAS Objects Carousel */
.pfas-carousel-container {
  background-color: #8e4594;
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 300px;       /* container height */
  padding: 1rem 0;     /* top/bottom purple padding */
  box-sizing: border-box; /* include padding in height calculation */
  margin-top: 4rem;
}

.pfas-carousel-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
  animation: scroll-pfas 5s linear infinite; /* adjust speed */
}


.pfas-carousel-track img {
  height: 100%;             /* fills track height */
  max-height: 100%;          /* safeguard to not overflow */
  object-fit: contain;
  transition: transform 0.3s ease;
}

.pfas-carousel-track img:hover {
  transform: scale(1.2);
}

@keyframes scroll-pfas {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* scroll exactly first set */
}



/* Health risks on left side after big jump */
#pfas-health-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;  /* all left-aligned */
  margin-left: 5%;          /* left margin to sit nicely */
  margin-bottom: 6rem;      /* spacing before next section */
  max-width: 500px;         /* keeps content tidy */
}

/* Title */
.pfas-health-title-left {
  font-size: 2rem;           /* smaller than “But today…” */
  font-weight: bold;
  color: #8e4594;            /* purple */
  margin-bottom: 1rem;
}

/* Image below title, half size */
.pfas-health-img-left img {
  width: 180px;              /* half original size */
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

/* First line of text below image */
.pfas-health-subtitle-left {
  font-size: 1.5rem;
  font-weight: bold;
  color: #222;
  white-space: nowrap;
  margin-bottom: 0.5rem;
}

/* Second line of text */
.pfas-health-details-left {
  font-size: 1.3rem;
  color: #222;
  white-space: nowrap;
}


.edu-button {
    display: inline-block;
    background-color: #228e85;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    margin: 5px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.edu-button:hover {
    background-color: #1b756f;
    transform: scale(1.05);
}


/* === Header Titles Centered === */
.header-text h1,
.header-text h2,
.header-text h3,
.header-text p {
    text-align: center;
}


/* === TOC Styling === */

/* Top-level TOC items */
#toc .nav .toc-h2 {
    margin-left: 0;  
    font-size: 1rem; 
}

/* h3 sub-level */
#toc .nav .toc-h3 {
    margin-left: 15px; 
    font-size: 0.9rem;
}

/* h4 sub-level */
#toc .nav .toc-h4 {
    margin-left: 30px; 
    font-size: 0.85rem;
}

/* Active section: green highlight */
#toc .nav a.active {
    font-weight: bold;
    color: #228e85 !important; /* green */
    background: rgba(34, 142, 133, 0.15);
    border-left: 4px solid #228e85;
}

/* Hover effect: lighter green */
#toc .nav a:hover {
    color: #228e85 !important;
    background: rgba(34, 142, 133, 0.1);
}

/* Global spacing before headings */
h2 { margin-top: 50px; }
h3 { margin-top: 35px; }
h4 { margin-top: 20px; }

/* Consistent bottom spacing */
h2, h3, h4 { margin-bottom: 15px; }



/* HP River container */
.hp-river-container {
  position: relative;      /* needed for absolutely positioned points later */
  width: 100%;             /* full width */
  overflow: visible;       /* allow points to go outside container if needed */
}

/* The image inside container */
.hp-river-container .hp-river-img {
  width: 100%;             /* image fills width */
  height: auto;            /* maintains aspect ratio */
  display: block;          /* removes unwanted bottom gap */
}


/* ========================= */
/* Overview colored squares  */
/* ========================= */
.hp-overview-container {
  display: flex;
  flex-wrap: nowrap;       /* prevent wrapping to new line */
  gap: 15px;               /* spacing between squares */
  margin: 30px 0;
  justify-content: center; /* center the squares horizontally */
}

.hp-overview-container .hp-square {
  flex: 0 0 120px;         /* fixed width */
  height: 120px;           /* fixed height */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;      /* center text inside */
  padding: 10px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
  
  word-wrap: break-word;   /* allow long words to break */
  overflow-wrap: break-word;
  white-space: normal;     /* allow text to go onto multiple lines */
  line-height: 1.2;        /* tighter line spacing for nicer fit */
}

.hp-square:hover {
  transform: scale(1.05);
}



/* ========================= */
/* HP River Titles           */
/* ========================= */
.hp-river-titles {
  display: flex;
  flex-direction: column; /* stack titles vertically */
  gap: 20px;
  margin: 40px 0;
}

.hp-river-title {
  width: 25vw;  /* default width for titles */
  height: auto;
  display: block; /* ensure margin auto works */
}

/* Left and right alignment */
.hp-river-title.left {
  margin-left: 0;
  margin-right: auto;
}

.hp-river-title.right {
  margin-left: auto;
  margin-right: 0;
}

/* One Health title - twice as big */
#onehealth .hp-river-title {
  width: 75vw;  /* double width */
}

/* Responsive: smaller screens */
@media (max-width: 768px) {
  .hp-river-title {
    width: 50vw;
  }
  #onehealth .hp-river-title {
    width: 90vw; /* nearly full width on small screens */
  }
}



  /* Accordion */
  .accordion {
    width: 100%;
    padding: 20px;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: 0.3s;
    background-color: #8e4594;
    color: white;
  }

  .accordion:hover {
    background-color: #bc6bc4;
  }

  .accordion h2 {
      margin: 0;
      font-size: 1.2rem; 
    }

  .panel {
    display: none;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: black;
  }

.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}



/* ========================= */
/* One Health Semi-Circle - Pulled WAY UP + Larger Icons */
/* ========================= */

/* One Health title + icons container spacing */
.one-health-title-container {
  position: relative;
  margin-bottom: 200px; /* increase space below the icons and title */
}

/* Container for semi-circle */
.one-health-circle {
  position: relative;
  width: 100%;
  height: 170px;      /* radius of the semi-circle */
  margin-top: -200px;  /* pull the circle far over the title */
}

/* Icons */
.one-health-icon {
  position: absolute;
  width: 140px;       /* larger icons */
  cursor: pointer;
  transition: transform 0.2s;
}

/* Hover effect - fixed for center icon */
.one-health-icon:hover {
  transform: scale(1.3);
}

/* Downward semi-circle positions */
.one-health-icon:nth-child(1) { /* top-left */
  left: 25%;
  top: 0; /* highest point */
}

.one-health-icon:nth-child(2) { /* bottom-center */
  left: 45%;
  top: 95%; /* lowest point */
}

.one-health-icon:nth-child(3) { /* top-right */
  right: 15%;
  top: 0; /* highest point */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .one-health-circle {
    height: 140px;
    margin-top: -170px;
  }
  .one-health-icon {
    width: 100px;
  }
}

@media (max-width: 768px) {
  .one-health-circle {
    height: 120px;
    margin-top: -140px;
  }
  .one-health-icon {
    width: 80px;
  }
}

@media (max-width: 480px) {
  .one-health-circle {
    height: 100px;
    margin-top: -120px;
  }
  .one-health-icon {
    width: 60px;
  }
}




/* ========================= */
/* Modal Styles              */
/* ========================= */

.modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  backdrop-filter: blur(4px);
  margin-bottom: 50px; /* space below modal */
}

.modal-content { 
  background-color: white; 
  margin: 15% 5% 15% auto;   /* top, right(auto), bottom, left(5%) */
  padding: 20px; 
  border-radius: 12px; 
  width: 80%; 
  max-width: 900px; 
  color: #333; 
  text-align: center; 
  position: relative; 
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}


/* Close button */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}





.hp-river-container {
  position: relative;
  width: 100%;
}

.hp-river-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* Base style for all points */
.point {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.point:hover {
  transform: scale(1.2);
}

/* Colors */
.purple .point { background-color: #9b59b6; }
.orange .point { background-color: #f39c12; }
.blue .point   { background-color: #3498db; }
.green .point  { background-color: #27ae60; }


/* Pokémon modal */
.pokemon-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0; /* shorthand for top, left, right, bottom = 0 */
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.3);
  overflow-y: auto; /* allows scrolling if image is tall */
  padding-top: 40px; /* keeps space for the close button */
  justify-content: center;
  align-items: flex-start; /* ensures it starts from top instead of centering */
}

.pokemon-modal img {
  display: block;
  max-width: 500px;
  width: 80%;
  margin: 80px auto 60px; /* centers image and gives breathing room */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.pokemon-modal .close {
  position: fixed; /* stays visible even if you scroll */
  top: 20px;
  right: 40px;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2100; /* above everything */
}




/* Floating hint text on top-right of the river image */
.river-hint {
  position: absolute;
  top: 20px;
  right: 50px;            /* pushed a bit further to the right */
  background: rgba(255, 255, 255, 0.85);
  color: #8e4594;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;       /* better line spacing for two lines */
  text-align: right;      /* looks cleaner for two-line text */
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
  z-index: 1200;
}

/* Optional gentle hover animation */
.river-hint:hover {
  transform: scale(1.03);
  transition: transform 0.2s ease;
}



/* Centered sentences */
.ens-quote {
  text-align: center;
  margin: 40px 0 20px;
  font-size: 1.2rem;
  color: #333;
}

.ens-quote em {
  display: block;
  margin-bottom: 8px;
  font-style: italic;
}

.ens-quote strong {
  display: block;
  font-weight: 700;
  color: #8e4594;
}

/* Image styling */
.pfas-image-container {
  text-align: center;
  margin: 40px 0 20px;
}

.pfas-image {
  max-width: 500px;
  width: 80%;
  height: auto;
}



/* Reusable PFAS-style table container */
.pfas-table-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

/* Base Table Styles (same as before) */
.pfas-table {
  border-collapse: collapse;
  width: 90%;
  max-width: 900px;
  table-layout: fixed;
  background-color: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-size: 1rem;
}

.pfas-table th,
.pfas-table td {
  padding: 14px 20px;
  text-align: left;
  width: 50%;
  word-wrap: break-word;
}

.pfas-table tr:nth-child(even) {
  opacity: 0.95;
}

.pfas-table tr:hover {
  transition: 0.2s ease;
}

/* ============================= */
/* COLOR VARIANTS                */
/* ============================= */

/* Purple (default / existing) */
.pfas-table--purple th {
  background-color: #8e4594;
  color: white;
}
.pfas-table--purple tr:nth-child(even) {
  background-color: #f2e6f5;
}
.pfas-table--purple tr:hover {
  background-color: #e6d4ec;
}

/* Orange variant */
.pfas-table--orange th {
  background-color: #f39b27;
  color: white;
}
.pfas-table--orange tr:nth-child(even) {
  background-color: #fff3e0;
}
.pfas-table--orange tr:hover {
  background-color: #ffe0b3;
}

/* Teal/Green variant */
.pfas-table--teal th {
  background-color: #228e85;
  color: white;
}
.pfas-table--teal tr:nth-child(even) {
  background-color: #d2f0ec;
}
.pfas-table--teal tr:hover {
  background-color: #b7e6e0;
}

/* General link style for table links */
.pfas-table a {
  text-decoration: none;
  font-weight: 500;
}

.pfas-table a:hover {
  text-decoration: underline;
}

/* Match each table’s header color */
.pfas-table--purple a {
  color: #8e4594; /* same as your purple header color */
}

.pfas-table--orange a {
  color: #f39b27; /* same as your orange header color */
}

.pfas-table--teal a {
  color: #228e85; /* same as your teal header color */
}







.ethical-matrix-container {
  position: relative;
  width: 100%;
}

.ethical-matrix-img {
  width: 100%;
  height: auto;
  display: block;
}



/* Figures used in parts.html */
.figureparts {
  display: flex;
  flex-direction: column;
  align-items: center;         /* center horizontally */
  justify-content: center;
  text-align: center;          /* center caption text */
  margin: 2rem auto;           /* add vertical spacing + center block */
  width: 100%;                 /* take full container width */
}

.figureparts img {
  max-width: 80%;              /* responsive width */
  height: auto;
  border-radius: 8px;          /* same rounded corners you had */
  display: block;
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* optional soft shadow */
}

.figureparts figcaption {
  margin-top: 8px;
  font-style: italic;
  color: #555;
  text-align: center;
  max-width: 80%;
}

.equation {
  display: block;          /* ensures it's treated as a block element */
  width: fit-content;      /* shrink-wrap to the content width */
  margin: 1.5rem auto;     /* vertical spacing + horizontal centering */
  font-size: 1.5rem;
  color: #8e4594;
  text-align: center;      /* centers multi-line content inside the block */
}




.construction-section {
  text-align: center;
  margin: 60px 0;
}

/* Title styling */
.construction-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 40px 0 20px;
}

.construction-title.purple {
  color: #8e4594;
}

/* Top section: video + side images */
.construction-media {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* closer spacing */
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Rotated side images */
.construction-media.rotated img {
  transform: rotate(90deg);
  transform-origin: center center;
  max-width: 15%; /* smaller so video stands out */
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

/* Bigger video in center */
.construction-media iframe {
  width: 55%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 10px;
}

/* Bottom section: two centered normal images */
.construction-images {
  display: flex;
  justify-content: center;
  align-items: flex-end; /* align images by their bottom edge */
  gap: 20px;
  margin-top: 40px;
}

.construction-images img {
  height: 350px; /* fixed height for both images */
  width: auto;   /* auto width to maintain aspect ratio */
  border-radius: 10px;
  object-fit: contain;
}

/* Responsive fixes */
@media (max-width: 900px) {
  .construction-media {
    flex-direction: column;
  }

  .construction-media.rotated img {
    transform: none; /* remove rotation on mobile */
    max-width: 70%;
  }

  .construction-media iframe {
    width: 80%;
  }

  .construction-images img {
    max-width: 80%;
  }
}



/* tweak sizes to match your real h3/h4 (adjust values to fit your theme) */
.fake-h3 {
  font-size: 1.25rem;    /* same as your h3 */
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: inherit;
}

.fake-h4 {
  font-size: 1rem;       /* same as your h4 */
  font-weight: 600;
  margin: 1rem 0 0.4rem;
  color: inherit;
}




/* Diver Section */
#diver-section {
  background-color: #ddebe5;
  padding: 60px 20px;   /* top/bottom + small horizontal padding */
  width: 100vw;
  display: flex;
  justify-content: center;
  box-sizing: border-box; /* prevent padding from overflowing */
}

#diver-section .diver-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 1200px;
  gap: 40px;  /* space between image and text */
  width: 100%;
}

#diver-section .diver-image {
  flex: 1 1 300px;  /* responsive: min 300px, grows as needed */
  display: flex;
  justify-content: center;
}

#diver-section .diver-image img {
  max-width: 100%;
  height: auto;
}

#diver-section .diver-text {
  flex: 2 1 400px; /* responsive: min 400px, grows as needed */
  display: flex;
  align-items: center;
}

#diver-section .diver-text p {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.6;
  color: #228e85;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  #diver-section .diver-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #diver-section .diver-text {
    flex: 1 1 100%;
  }
}

/* Force diver section background */
body.home-page #diver-section {
    background-color: #ddebe5 !important; /* or your desired hex */
}


/* ===========================
   WAVE DIVIDER
   =========================== */

.wave-divider {
  position: relative;
  width: 100%;
  height: 160px;          /* hauteur visible */
  overflow: hidden;
  margin: 0;
  line-height: 0;
  z-index: 2;
}

/* Both wave SVGs */
.wave-divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  display: block;
  pointer-events: none;
  transform-origin: center;
}

/* Front wave — lighter blue */
.wave-divider .wave-front path {
  fill: #ddebe5;
}

.wave-divider .wave-front {
  animation: waveMoveFront 6s linear infinite;
}

/* Back wave — darker blue */
.wave-divider .wave-back path {
  fill: #91beb4;
}

.wave-divider .wave-back {
  animation: waveMoveBack 12s linear infinite;
}

/* Animations */
@keyframes waveMoveFront {
  from { transform: translateX(0) scaleY(-1); }
  to   { transform: translateX(-50%) scaleY(-1); }
}

@keyframes waveMoveBack {
  from { transform: translateX(0) scaleY(-1); }
  to   { transform: translateX(-50%) scaleY(-1); }
}


/* --- White section (UN goals etc.) --- */
#white-section {
  position: relative;
  background-color: white !important;
  color: #000;
  z-index: 3;
  margin: 0;
  padding: 0;
}

/* --- Horizontal river (below white section) --- */
.horizontal-river {
  position: relative;
  width: 100%;
  height: auto;
  margin-top: 0;
  overflow: hidden;
  background: white;
  z-index: 4; /* sits above waves and blue section */
}

.horizontal-river img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
}

/* Centered purple text */
.horizontal-river-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8e4594;
  font-weight: 700;
  line-height: 1.3;
  z-index: 5;
  padding: 0 1rem;
  font-size: clamp(1.6rem, 4vw, 3rem);
  pointer-events: none;
}

/* --- Responsive tweaks --- */
@media (max-width: 576px) {
  .wave-divider { height: 110px; }
  .horizontal-river { height: 60vh; }
  .horizontal-river-text { font-size: clamp(1.4rem, 6vw, 2rem); }
}

/* ===========================
   POP-UP JAMBOREE (UPDATED)
   =========================== */

/* Overlay */
.popup-jamboree {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.5s ease;
}

/* When visible */
.popup-jamboree.visible {
  display: flex !important;
  opacity: 1 !important;
  justify-content: center;
  align-items: center;
}

/* Window — more rectangular */
.popup-jamboree-content {
  position: relative;
  padding: 35px 45px;

  width: 85%;
  max-width: 780px;

  background: #ffffff;
  border-radius: 16px;
  border: 6px solid #8e3fa3;  /* deeper purple */
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);

  animation: popupFadeIn 0.35s ease-out;
}

/* Title */
.popup-jamboree-title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: #7a2c8d; /* deeper purple */
  margin-bottom: 22px;
}

/* Close button */
.popup-jamboree-close {
  position: absolute;
  right: 20px;
  top: 15px;

  font-size: 34px;
  font-weight: bold;
  color: #7a2c8d;
  cursor: pointer;
  transition: 0.2s ease;
}
.popup-jamboree-close:hover {
  color: #f39b27;
}

/* Section titles */
.popup-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;

  background: linear-gradient(90deg, #7a2c8d, #f39b27);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Cards layout */
.popup-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

/* Individual card — wider & shorter */
.popup-card {
  display: flex;                 /* Activate flexbox */
  flex-direction: column;        /* Image above text */
  justify-content: flex-start;   /* Keep items at top */
  align-items: center;           /* PERFECT horizontal centering */

  text-align: center;
  padding: 15px 10px;

  background: rgba(149, 229, 212, 0.25);
  border-radius: 12px;
  width: 180px;
  height: 155px;

  border: 2px solid #228e85;
  transition: 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}


.popup-card:hover {
  transform: translateY(-4px);
  background: #95e5d4;
}

.popup-card img {
  width: 40px;     
  height: auto;
  display: block;
  margin-bottom: 4px;  /* spacing above the text */
}

.popup-card p {
  margin-top: 8px;
  font-weight: 600;
  color: #228e85;
  font-size: 15px;
  text-decoration: none;
}

/* Fade-in animation */
@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


main {
  overflow-x: hidden !important;
}

.hp-river-container,
.hp-overview-container {
  max-width: 100%;
}
