body {
  margin: 0;
  font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
}

.nav-toggle-button {
    position: fixed;
    top: 20px;
    right:-15px;
    z-index: 1000;
    background-color: transparent; 
    color: transparent; 
    font-size: 0;
    width: 100px;
    height: 50px;
    border: none;
    border-radius: 5px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-toggle-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nav-toggle-button:hover {
    transform: scale(1.05);
}

.nav-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background-color: rgba(30, 30, 30, 0.95); 
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.8); 
    z-index: 999;
    transform: translateX(300px); 
    transition: transform 0.4s ease-in-out;
    padding-top: 80px; /* Space for the top toggle button */
}

/* State to show the menu */
.nav-wrapper.open {
    transform: translateX(0); 
}

.bookmark {
    width: 100%;
    padding: 10px 15px; 
    border-radius: 4px;
    text-align: left;
    display: block; 
    text-decoration: none; 
    color: #ffcc70; 
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Create the Bullet Point (using pseudo-element) */
.bookmark span::before {
    content: '•'; /* The bullet character */
    color: #ffcc70; /* Bullet color */
    font-size: 1.2em;
    margin-right: 15px; /* Space between bullet and text */
    display: inline-block;
    width: 15px; /* Give it a fixed width for alignment */
}

.bookmark:hover {
    background-color: rgba(255, 204, 112, 0.25);
    transform: scale(1.05);
}

.bookmark span {
    opacity: 1; 
    color: #f7e2b3;
    font-weight: normal;
    font-size: 13px;
    display: inline; 
}


/* Back background (behind everything) */
.bg-back {
  position: fixed;       /* stays fixed on screen */
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/chap2bg.webp') no-repeat center center;
  background-size: cover;
  z-index: 0;            /* behind content */
}


section {
  width: 100%;
  min-height: 100vh; /* full screen height */
  position: relative;
  padding: 20px;
  box-sizing: border-box;
}

#tableau-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tableauPlaceholder {
  width: 90%;
  max-width: 1350px;
  height: 700px;
}

.dashboard {
  display: flex;
  height: 100vh;
  justify-content: space-between;
  padding: 20px;
}

.top-image {
  position: absolute;
  top: 20px;
  left: 50%;        
  transform: translateX(-50%); 
  z-index: 5;        
}

.top-image img {
  width: 750px;
  height: auto;
}

/* Make other sections appear above the background */
.left-section, .middle-section, .right-section {
  position: relative;
  z-index: 1;
}

/* Left Section */
.left-section, .middle-section, .right-section {
 position: relative;
  width: 40%; 
  height: 100%;
}

.webp-wrapper {
  position: absolute;
  cursor: pointer;
  transition: transform 0.3s;
}

.left-section .webp-wrapper:nth-child(1) {
  top: 80px;
  left: 80px;
}

.left-section .webp-wrapper:nth-child(2) {
  bottom: 60px;
  left: 80px;
}

.middle-section .webp-wrapper {
  top: 100px;
  left: 95px;
}

.right-section .webp-wrapper {
  bottom: 250px;
  left: 290px;
  width: 4px;
}

#title1 img {
  width: 175px;
  bottom: 50px;
  z-index: 10;
}

#title2 img {
  width: 150px;
  position: absolute; 
  bottom: 300px;
  left: 30px;
  z-index: 10;
}

.progress-icon {
  position: absolute; 
  top: 360px;          
  left: 130px;         
  z-index: 2;         
}

.progress-icon img {
  width: 130px;         /* size of the icon */
  height: auto;
}
.webp-wrapper img {
  width: 450px;
  height: auto;
  transition: transform 0.3s;
}

.webp-wrapper:hover img {
  transform: scale(1.1);
}

.tooltip {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 12px;
  pointer-events: none;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  display: none; /* hide initially */
  width: 220px;   /* fixed width */
  height: 100px;  /* fixed height */
  overflow: auto; /* scroll if content exceeds */
  line-height: 1.4;
  z-index: 5;
}


.progress-wrapper {
  position: relative;
  width: 110px;     /* width of the bar */
  height: 450px;   /* height of the bar */
  top: 250px;
  left: 180px;
}

.progress-bar {
  width: 100%;
  height: 90%;
  background: #fbacac;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  position: absolute;
  bottom: 0;          /* start at bottom */
  width: 100%;
  height: 0%;         /* start empty */
  background: #911a1a;
  border-radius: 10px 10px 0 0;  /* round top corners only */
  transition: height 1s ease-in-out;
}

.progress-text {
  position: absolute;
  left: 130%;
  top: 370px; /* above the bar */
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 24px;
  color: #94d3e9;
}

.progress-ring-wrapper {
  position: absolute;
  top: 20px;       /* position above the progress bar */
  left: 155px;     /* align with the bar */
  width: 80px;
  height: 80px;
  cursor: pointer;
  z-index: 3;
}

.ring-current {
  position: absolute;
  top: 60%;       /* center inside fill */
  left: 180%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  color: #005184; /* same as fill color */
}

.ring-total {
  position: absolute;
  top: 150px;     /* above the ring */
  left: -10%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: bold;
  color: #41b8d5; /* same as ring color */
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke-width: 35;
  stroke-linecap: round;
}

.progress-ring-fill {
  stroke-width: 35;
  stroke-linecap: round;
  stroke-dasharray: 2 * 3.1416 * 50;
  stroke-dashoffset: 2 * 3.1416 * 50;
  transition: stroke-dashoffset 1s ease;
}

.progress-ring-text {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
}

.title-img img {
  width: 500px; 
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
}

#heal-section {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* align tops */
  gap: 25px; /* space between left, chart, right */
  width: 100%;
  padding: 40px 20px; /* optional: add vertical spacing */
  box-sizing: border-box;
}

.heal-side-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; 
}

.heal-side-image img {
  width: 350px; 
  height: auto;
  pointer-events: none; 
}

/* === LEFT SIDE IMAGE === */
.heal-side-image.left-side {
  /* Adjust vertical alignment if needed */
  align-self: flex-start; /* or center, flex-end, etc. */
}

.heal-side-image.left-side img {
  width: 500px;        /* Set your desired width */
  height: auto;
  /* Optional: offset position */
  margin-top: 70px;    /* Push down */
  margin-left: 0;      /* No extra left margin */
}

/* === RIGHT SIDE IMAGE === */
.heal-side-image.right-side {
  align-self: flex-start;
}

.heal-side-image.right-side img {
  width: 200px;        /* Different size if desired */
  height: auto;
  margin-top: 400px;    /* Less offset than left */
  margin-right: 0;
}

.chart-container {
  width: 700px;
  margin: auto;
  margin: 0;
  min-width: 700px;
  max-width: 750px;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.bar {
  height: 40px;
  width: 0;
  background: #04d1a0;
  border-radius: 8px;
  transition: width 0.4s ease-out, box-shadow 0.2s;
  position: relative;
}

.bar-label {
  width: 50px;
  text-align: right;
  font-weight: bold;
  color: antiquewhite;
}

.bar-number {
  width: 70px;
  text-align: left;
  color: antiquewhite;
}

.pump-btn {
  width: 50px;
  height: 45px;
  background: #4d0585;
  border: none;
  border-radius: 70px; /* half of height for pill shape */
  cursor: pointer;
  box-shadow: 0 5px #9754cb;
  color: antiquewhite;
  font-weight: bold;
  font-size: 25px;
  transition: all 0.1s;
}

.pump-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px #9754cb;
}

.reset-btn {
  width: 40px;
  height: 45px;
  background: #6c757d;
  border: none;
  border-radius: 70px;
  cursor: pointer;
  box-shadow: 0 5px #5a6268;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.1s;
  margin-left: 8px;
}

.reset-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px #5a6268;
}

.reset-btn:hover {
  background: #5a6268;
}

@media (max-width: 1100px) {
  #heal-section {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .heal-side-image img {
    width: 180px;
  }

  .chart-container {
    min-width: 100%;
    max-width: 800px;
  }
}

/* Fade-in animation */
.fade-in {
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

/* Initially hidden */
.fade-in-target {
  opacity: 0;
}

/* === Projector Controller === */
#controller {
  position: relative;
  width: 450px;
  height: 350px;
  top: 150px;
  left: 500px;
}

.projector {
  width: 100%;
  height: auto;
}

.play-button {
  position: absolute;
  top: 43%;
  left: 63%;
  transform: translate(-50%, -50%);
  width: 210px;
  cursor: pointer;
  z-index: 5;
}

/* === Projector Screen === */
.screen-hidden {
  display: none;
}

.screen-visible {
  display: block;
  width: 920px;
  height: 700px;
  background: white;
  margin: 20px auto;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: rollDown 1s ease-out;
  z-index: 10;
}

@keyframes rollDown {
  from { height: 0; }
  to { height: 700px; }
}

/* === Timeline Adjustments === */
.timeline {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 3px dotted #888;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 1;
  transition: opacity 0.4s ease;
}


.milestone {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 280px;
  text-align: center;
}


/* Active milestone – centered */
.milestone.active {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 3;
}

/* Previous – partially visible on left */
.milestone.prev {
  opacity: 0.5;
  transform: translate(-100%, -50%) scale(0.8); /* shifted left */
  left: 20%;
  z-index: 2;
}

/* Next – partially visible on right */
.milestone.next {
  opacity: 0.5;
  transform: translate(0%, -50%) scale(0.8); /* shifted right */
  left: 80%;
  z-index: 2;
}

/* Content styling */
.milestone-content {
  padding: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10;
}

.milestone img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.milestone h3 {
  margin: 8px 0 4px;
  font-size: 1.4em;
  color: #2c3e50;
}

.milestone p {
  font-size: 0.95em;
  color: #555;
  line-height: 1.4;
}

.milestone.active .timeline-line {
  opacity: 1;
}

.milestone.prev .timeline-line,
.milestone.next .timeline-line {
  opacity: 0.5;
}

/* Navigation Arrows */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 5;
}

.nav-btn:hover {
  background: rgba(0,0,0,0.8);
}

.prev { left: 20px; }
.next { right: 20px; }

/* === Exit Button === */
.exit-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exit-btn:hover {
  background: white;
}

.top-decoration {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
  pointer-events: none;
}

.bottom-decoration {
  position: absolute;
  bottom: 45%;
  right: 25%;
  width: 150px;
  pointer-events: none;
  z-index: 1;
}

.fade-out {
  opacity: 0;
  transition: opacity 1s ease;
}

.music-toggle {
  position: fixed;
  top: 20px;
  right: 100px; /* to the left of nav-toggle (which is at right: -15px) */
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  padding: 0;
  width: auto;
  height: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent; /* removes tap highlight on mobile */
}

.next-button {
  position: fixed;
  bottom: 40px;
  right: -30px;
  width: 140px;
  height: 125px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0; /* Starts hidden */
  pointer-events: none;
  visibility: visible;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
  z-index: 100;
  padding: 0;
  outline: none;
}

.next-button:hover {
  opacity: 0.9; /* or apply a filter if you prefer */
}

.next-btn-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.next-button:hover {
  /* Scale the button up by 10% (1.1) */
  transform: scale(1.2);
  /* Slightly increase the opacity for emphasis (optional, you already have one) */
  opacity: 1; 
}


