body {
      color: aquamarine;
      background-color: #001f4d;
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
      color: white;
      overflow-x: hidden;
    }


.navbar {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 9999;
  font-family: inherit;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: #0a2a3a79;
  color: #fff;
  padding: 12px 24px;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s;
}

.dropbtn:hover {
  background: #176b87;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #ffffff;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  border-radius: 8px;
  overflow: hidden;
}

.dropdown-content a {
  color: #0a2a3a;
  padding: 12px 18px;
  text-decoration: none;
  display: block;
  font-size: 1em;
  transition: background 0.15s;
}

.dropdown-content a:hover {
  background: #e8e8e8;
}

.dropdown:hover .dropdown-content {
  display: block;
}
    .page-1, .page-2, .page-3, .page-4, .page-5, .page-6, .last-page{
      position: relative;
      width: 100vw;
      height: 100vh;
    }

     a {
      color: aquamarine;
      font-style: italic;
      font-size: 1rem;
      font-weight: bold;
      text-decoration: none;
      text-shadow: 0 1px 8px #003c4d;
      transition: color 0.2s;
    }
    
    a:hover {
      color: #f3fc00;
      text-shadow: 0 1px 8px #003c4d;
      text-decoration: underline;
    }

    .page-1 {
      background: linear-gradient(to right, black 30%, #001f4d);
      display: flex;
      justify-content: center;
      align-items: center;
    }

.page-1 {
      background-image: url(images/bg/3d-reef.jpg);
      background-size: cover;         
      background-position: center;   
      background-repeat: no-repeat;  
      display: flex;
      justify-content: center;
      align-items: center;
    }

.page-1 .xcard-note {
      position: absolute;
      right: 5vw;
      bottom: 3vw;
      top: auto;
      z-index: 20;
      font-size: 1.05vw;
      color: #fff;
      padding: 0.5em 1.2em;
      border-radius: 12px;
      font-weight: 500;
      letter-spacing: 0.02em;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
      background-color :#0038418e;
      transition: color 0.3s ease-in-out, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

  .page-1 .xcard-note:hover {
    font-style: bold;
    color: aquamarine;
    transform: scale(1.15) translateX(-55px);
  }


  .whale-wrapper {
    position: relative; /* or remove position */
    right: 5vw;
    top: auto;
    transform: none;
    width: 60vw;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(-5%);
  }

    .whale {
    height: auto;
    max-width: 125%;
    max-height: 130%;  
    z-index: 5;
    --whale-scale: 1;
    animation: whale-float 5s ease-in-out infinite;
    transition: transform 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0) scale(var(--whale-scale));
    pointer-events: none;
    transform-style: preserve-3d;
    }

    .whale-wrapper:hover .whale {
    --whale-scale: 1.05;

    }

    @keyframes whale-float {
      0%   { transform: translateY(0) scale(var(--whale-scale)); }
      50%  { transform: translateY(-20px) scale(var(--whale-scale)); }
      100% { transform: translateY(0) scale(var(--whale-scale)); }
    }

    .big-text {
      position: absolute;
      z-index: 1;
      font-size: 6vw;
      font-weight: bold;
      color: white;
      line-height: 0.9;
      text-transform: uppercase;
    }

    .text-human {
      color:aquamarine;
      top: 4%;
      left: 2%;
    }

    .text-destroyer {
      top: 18%;
      left: 2%;
    }

    .text-oceans {
      color: white;
      bottom: 0;
      left: 2%;
    }

    .action-text {
      position: absolute;
      right: 5%;
      top: 25%;
      z-index: 1;
      max-width: 30%;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .action-text h2 {
      background-color: rgba(25, 121, 255, 0.17);
      border-radius: 13px;
      padding: 0.5vw;
      font-size: 1.5vw;
      margin-bottom: 0.5vw;
      color: white;
    }

    .action-text p {
      background-color: rgba(25, 121, 255, 0.17);
      border-radius: 13px;
      padding: 0.5vw;
      font-size: 1vw;
      color: #b0c4de;
    }

.action-text h2,
.action-text p {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-text h2:hover,
.action-text p:hover {
  transform: scale(1.08);
}

.action-text p:hover {
  color: aquamarine;
}

  .sdg {
    position: relative; /* Ensure the container is positioned */
    width: auto;
    height: auto;
    right: 8%;
    top: 5%;
    /* lower transparency */
    opacity: 0.9; /* Adjust as needed */
  }
  
  .sdg img {
    position: absolute;
    top: 0;
    width: 400px;      
    height: auto;     
    max-width: 23vw;  
    max-height: 23vw; 
    z-index: 2;
    object-fit: contain; 
    border-radius: 10px; 
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  }

.sdg:hover img {
  transform: scale(1.08);
  opacity: 1;
}


/* Page 2 */
    .page-2 {
    background-image: url(images/bg//tubbataha-reef6.jpg);
    /* background: linear-gradient(to right, green 30%, #001f4d); */
      /* justify-content: center; */
      /* align-items: center; */
      background-size: cover;         
      background-position: center;   
      background-repeat: no-repeat;  
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .page-2 .card-note {
      position: absolute;
      left: 2vw;
      bottom: 3vw;
      top: auto;
      z-index: 10;
      font-size: 1.05vw;
      color: #fff;
      padding: 0.5em 1.2em;
      border-radius: 12px;
      opacity: 0.82;
      font-weight: 500;
      letter-spacing: 0.02em;
      animation: flashFade 3.5s infinite;
      background: none;
    }
    
    @keyframes flashFade {
      0%   { opacity: 0.2; }
      50%  { opacity: 1; }
      100% { opacity: 0.2; }
    }

    .page-2 p {
      font-size: 1.2vw;
      top: 1rem;
      left: clamp(2vw, 3%, 10vw);
      position: absolute;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .page-2 .line {
      position: absolute;
      width: 30%;
      top: 9.5%;
      left: clamp(2vw, 3%, 10vw);
      border-bottom: 1px solid #fff;
    }

    .page-2 .line::after {
      content: '';
      position: absolute;
      right: .5rem;       
      top: -0.5rem;    
      width: 0;        
      height: 1rem;
      border-left: 1px solid #fff;
    }
    .page-2 h4 {
      font-size: 1.2vw;
      position: absolute;
      top: 2.5rem;
      left: clamp(2vw, 3%, 10vw);
    }

    .text-reefs {
      position: absolute;
      top: 25%;
      left: 3%;
      /* line-height: 1.5; */
      color: white;
      background-color: rgba(0, 36, 52, 0.2);
      padding: 0.5vw;
      border-radius: 7px;
      z-index: 1;
      
      font-size: 5vw;
      padding: 0.3vw;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .text-resources {
      position: absolute;
      top: 40%;
      left: 3%;
      /* line-height: 1.5; */
      color: white;
      background-color: rgba(0, 36, 52, 0.2);
      padding: 0.5vw;
      border-radius: 7px;
      z-index: 1;      
      font-size: 5vw;
      padding: 0.3vw;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .text-resilience {
      position: absolute;
      top: 55%;
      left: 3%;
      /* line-height: 1.5; */
      color: white;
      background-color: rgba(0, 36, 52, 0.2);
      padding: 0.5vw;
      border-radius: 7px;
      z-index: 1;      
      font-size: 5vw;
      padding: 0.3vw;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .info-box {
      display: flex;
      position: absolute;
      overflow: auto;
      right: 3%;
      top: 15%;
      z-index: 1;
      width: 750px;      /* Fixed width */
      height: 500px;     /* Fixed height */
      max-width: 50%;
      max-height: 80%;
      background-color: rgba(117, 211, 255, 0.5);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      padding: 1rem;
      border-radius: 10px;
      box-sizing: border-box;
    }

  /* smooth scaling animations */
    .text-reefs,
    .text-resources,
    .text-resilience {
      transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .text-reefs:hover,
    .text-resources:hover,
    .text-resilience:hover {
      color: aquamarine;
      transform: scale(1.15);
    }

  /* Add this near your other .text-reefs:hover rules */
  .topic-active {
    color: aquamarine !important;
    transform: scale(1.08);
  }

    .info-box h3 {
      /* how can i make it centered */
      position: absolute;
      top: 5%;
      left: 45%;
      font-size: 2em;
      color: #001f4d;
    }

    .info-box p {
      top: -1%;
      left: 1%;;
      padding: 0.5rem;
      font-size: 1em;
      line-height: 1.5;
      color: white;
    }

    .info-box b {
    color: rgb(236, 255, 62); font-weight: bold; text-shadow: 0 1px 3px #003c4d;
    font-weight: bold;
    }

    .info-box img {
      display: block;
      margin-left: auto;
      margin-left: 4rem;
      margin-bottom: 1rem;
      height: 50%;
      width: 30em;
      border-radius: 10px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    }
    .info-box::-webkit-scrollbar {
      width: 8px; /* Width of the scrollbar */
    }

    .info-box::-webkit-scrollbar-thumb {
      background-color: #63ffffa3; /* Color of the scrollbar thumb */
      border-radius: 10px; /* Rounded corners for the scrollbar thumb */
    }
    
/* Page 3 */
    .page-3 {
      background-image: url(images/bg/colorful_reef.jpg);;

      background-size: cover;         
      background-position: center;   
      background-repeat: no-repeat;  
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .page-3 .card-note {
      position: absolute;
      left: 2vw;
      bottom: 3vw;
      top: auto;
      z-index: 100;
      font-size: 1.05vw;
      color: #fff;
      padding: 0.5em 1.2em;
      border-radius: 12px;
      opacity: 0.82;
      font-weight: 500;
      letter-spacing: 0.02em;
      animation: flashFade 3.5s infinite;
      background: none;
    }
    
    @keyframes flashFade {
      0%   { opacity: 0.2; }
      50%  { opacity: 1; }
      100% { opacity: 0.2; }
    }

    .page-3 p {
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      font-size: 1.2vw;
      top: 1rem;
      left: clamp(2vw, 3%, 10vw);
      position: absolute;
    }

    .page-3 .line {
      position: absolute;
      width: 30%;
      top: 9.5%;
      left: clamp(2vw, 3%, 10vw);
      border-bottom: 1px solid #fff;
    }

    .page-3 .line::after {
      content: '';
      position: absolute;
      right: .5rem;       
      top: -0.5rem;    
      width: 0;        
      height: 1rem;
      border-left: 1px solid #fff;
    }
    .page-3 h4 {
      font-size: 1.2vw;
      position: absolute;
      top: 2.5rem;
      left: clamp(2vw, 3%, 10vw);
    }

    .icon-row {
      position: relative;
      width: 100%;
      height: 220px; /* Adjust as needed */
    }

    /* Make them float aniamtion slowly */
    .icon-heart, .icon-plate, .icon-fish ,.icon-algae{
      animation: float 6s ease-in-out infinite;
    }
    @keyframes float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
    }

.icon-wrapper {
  position: absolute;
}

.icon-heart-wrapper { top: 65%; left: 26%; width: 20%; max-width: 140px; }
.icon-plate-wrapper { top: 65%; left: 58%; width: 55%; max-width: 300px; }
.icon-fish-wrapper { top: -25%; left: 55%; width: 400px; }
.icon-algae-wrapper { top: -48%; left: 22.5%; width: 45%; max-width: 220px;}

.icon-heart, .icon-plate, .icon-fish, .icon-algae {
  width: 100%;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 2;
  position: relative;
}

.icon-fact-box {
  position: absolute;
  top: -1em; left: -3.5em;
  width: 150%; height: 105%;
  background: rgba(0, 142, 92, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  border-radius: 12px;
  display: flex;;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: opacity 0.4s, transform 0.4s;
  z-index: 3;
  overflow-y: scroll;
}

.icon-wrapper:hover .icon-fact-box {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* .icon-wrapper:hover img {
  opacity: 0;
  transform: scale(0.8);
} */

.icon-fact-box h3 {
  color: rgb(236, 255, 62); font-weight: bold; text-shadow: 0 1px 3px #003c4d;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

.icon-fact-box p {
  left: 1%;
  top: 5%;
  line-height: 1.2;
  padding: 0.5em;
}

.icon-fact-box::-webkit-scrollbar {
    width: 8px; /* Width of the scrollbar */
    }

.icon-fact-box::-webkit-scrollbar-thumb {
    background: rgba(0, 174, 113, 0.6);
    border-radius: 10px; /* Rounded corners for the scrollbar thumb */
    }

  
/* Page 4 */

      .page-4 .card-note {
      position: absolute;
      left: 2vw;
      bottom: 1vw;
      top: auto;
      z-index: 10;
      font-size: 1.05vw;
      color: #fff;
      padding: 0.5em 1.2em;
      border-radius: 12px;
      opacity: 0.82;
      font-weight: 500;
      letter-spacing: 0.02em;
      animation: flashFade 3.5s infinite;
      background: none;
    }
    
    @keyframes flashFade {
      0%   { opacity: 0.2; }
      50%  { opacity: 1; }
      100% { opacity: 0.2; }
    }
    .page-4 {
      /* Remove background-image here, use slider image as background */
      position: relative;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }
    .page-4::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 0;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      filter: blur(8px) brightness(0.7);
      transition: background-image 0.5s;
    }

    .slider-container, .info-panel, .page-4 .line, .page-4 h4, .page-4 p {
      position: relative;
      z-index: 1;
    }

    .page-4 p {
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      font-size: 1.2vw;
      top: 1rem;
      left: clamp(2vw, 3%, 10vw);
      /* position: absolute; */
    }

    .page-4 .line {
      position: absolute;
      width: 30%;
      top: 9.5%;
      left: clamp(2vw, 3%, 10vw);
      border-bottom: 1px solid #fff;
    }

    .page-4 .line::after {
      content: '';
      position: absolute;
      right: .5rem;       
      top: -0.5rem;    
      width: 0;        
      height: 1rem;
      border-left: 1px solid #fff;
    }

    .page-4 h4 {
      font-size: 1.2vw;
      position: absolute;
      top: 2.5rem;
      left: clamp(2vw, 3%, 10vw);
    }

    /* Slider Styles */
    .slider-container {
      position: absolute;
      left: 5%;
      top: 20%;
      width: 45%;
      height: 60%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .slider {
      position: relative;
      width: 100%;
      height: 100%;
      overflow: hidden;
      border-radius: 15px;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }

    .slide {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      transition: opacity 0.8s ease-in-out;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      color: white;
    }

    .slide.active {
      opacity: 1;
    }

    /* Backgrounds for each slide */
    .page-4.bg1::before {
      background-image: url(images/bg/wps.jpg);
    }
    .page-4.bg2::before {
      background-image: url(images/bg/ocean-acidification4.jpg);
    }
    .page-4.bg4::before {
      background-image: url(images/bg/coastal_livelihood.jpg)
    }
    .page-4.bg3::before {
      background-image: url(images/bg/dead-reef.jpg);
    }

    .slide:nth-child(1) {
      background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                  url('images/bg/wps.jpg') center/cover;
    }

    .slide:nth-child(2) {
      background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                  url('images/bg/ocean-acidification4.jpg') center/cover;
    }

    .slide:nth-child(4) {
      background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                  url('images/bg/coastal_livelihood.jpg') center/cover;
    }

    .slide:nth-child(3) {
      background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                  url('images/bg/dead-reef.jpg') center/cover;
    }

    .info-panel .content img {
      max-width: 420px;
      width: 100%;
      height: auto;
      display: block;
      margin: 0.5em auto;
      border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    }

    .slide h2 {
      font-size: 3.5vw;
      font-weight: bold;
      margin-bottom: 1rem;
      text-transform: uppercase;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .slide .location {
      font-size: 1.5vw;
      font-weight: 300;
      margin-bottom: 1rem;
      border-bottom: 2px solid white;
      padding-bottom: 0.5rem;
    }

    .slide .tagline {
      font-size: 1.2vw;
      font-style: italic;
      opacity: 0.9;
    }

    /* Navigation arrows */
    .nav-arrow {
      position: absolute;
      top: 70%;
      transform: translateY(-50%);
      background: rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(10px);
      border: none;
      color: white;
      font-size: 2rem;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.3s ease;
      z-index: 10;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nav-arrow:hover {
      background: rgba(255, 255, 255, 0.3);
      transform: translateY(-50%) scale(1.1);
    }

    .nav-arrow.prev {
      left: 10px; /* Move inside the slider */
    }

    .nav-arrow.next {
      right: 10px; /* Move inside the slider */
    }

    /* Static text box on the right */
    .info-panel {
      position: absolute;
      right: 5%;
      top: 20%;
      width: 40%;
      height: 60%;
      background: rgba(129, 221, 255, 0.525);
      backdrop-filter: blur(10px);
      border-radius: 10px;
      padding: 2rem;
      box-sizing: border-box;
      overflow-y: auto;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }


   .info-panel h3 {
      font-size: 2.2vw;
      color: aquamarine;
      margin-bottom: 1rem;
      text-align: center;
      text-transform: uppercase;
      margin-top: -.5em; /* Move header higher */
    }

    .info-panel .content {
      display: none;
      opacity: 1;
      transform: none;
      transition: none;
      margin-top: -.5em; /* Move content higher */
    }

    .info-panel .content.active {
      display: block;
      opacity: 1;
      transform: none;
      transition: none;
      margin-top: -2em; /* Move content higher */
      margin-left: -.5em;
    }

    .info-panel p {
      font-size: 1rem;
      line-height: 1.5em;
      color: white;
      margin-top: -.5em; /* Move paragraphs higher */
      margin-left: -2em;
    }

    .info-panel b {
      color: rgb(236, 255, 62); font-weight: bold; text-shadow: 0 1px 3px #003c4d;
      font-weight: bold;
    }

    /* Slide indicators */
    .slide-indicators {
      position: absolute;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 10px;
      z-index: 10;
    }

    .indicator {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.4);
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .indicator.active {
      background: aquamarine;
      transform: scale(1.2);
    }

    /* Scrollbar styling for info panel */
    .info-panel::-webkit-scrollbar {
      width: 8px;
    }

    .info-panel::-webkit-scrollbar-thumb {
      background-color: #63ffffa3; 
      border-radius: 10px;
    }

/* Page 5 */
.page-5 {
  background-image: url(images/underwater1.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  position: relative;
}

.card-note {
  position: absolute;
  top: 1.2vw;
  right: 2vw;
  z-index: 10;
  font-size: 1.05vw;
  color: #fff;
  background: rgba(0,0,0,0.18);
  padding: 0.5em 1.2em;
  border-radius: 12px;
  text-shadow: 0 2px 8px #002b3a, 0 0 2px #000, 0 0 8px #000;
  opacity: 0.82;
  pointer-events: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.card-note1 {
  text-align: center;
  justify-content: center;
  position: absolute;
  top: 13vw;
  left: .4vw;
  z-index: 10;
  font-size: 1.05vw;
  color: #fff;
  background: rgba(245, 0, 0, 0.18);
  padding: 0.5em 1.2em;
  border-radius: 12px;
  text-shadow: 0 2px 8px #3a0027, 0 0 2px #000, 0 0 8px #000;
  opacity: 0.82;
  pointer-events: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.card-note2 {
  text-align: center;
  justify-content: center;
  position: absolute;
  top: 29vw;
  left: .4vw;
  z-index: 10;
  font-size: 1.05vw;
  color: #fff;
  background: rgba(64, 0, 255, 0.18);
  padding: 0.5em 1.2em;
  border-radius: 12px;
  text-shadow: 0 2px 8px #002b3a, 0 0 2px #000, 0 0 8px #000;
  opacity: 0.82;
  pointer-events: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}


.page-5 p {
  font-size: 1.2vw;
  top: 1rem;
  left: clamp(2vw, 3%, 10vw);
  position: absolute;
}

.page-5 .line {
  position: absolute;
  width: 32.5%;
  top: 9.5%;
  left: clamp(2vw, 3%, 10vw);
  border-bottom: 1px solid #fff;
}

.page-5 .line::after {
  content: '';
  position: absolute;
  right: .5rem;
  top: -0.5rem;
  width: 0;
  height: 1rem;
  border-left: 1px solid #fff;
}
.page-5 h4 {
  font-size: 1.2vw;
  position: absolute;
  top: 2.5rem;
  left: clamp(2vw, 3%, 10vw);
}

/* Cards Grid for Page 5 */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2vw 2vw;
  width: 92vw;
  height: 80vh;
  margin: 8vw auto 0 4.4vw;
  position: relative;
  z-index: 2;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  box-shadow: 0 6px 32px rgba(0,0,0,1.18);
  font-size: 1.1vw;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  min-height: 10vh;
  min-width: 0;
  max-width: 40vw;
  transition: transform 0.22s, box-shadow 0.22s;
  overflow: hidden;
  background-clip: padding-box;
}

/* Make card text not selectable for better UX */
.card, .card * {
  user-select: none;
}


.card-blue {
  /* background: linear-gradient(135deg, #1e90ff 80%, #63e0ff 100%); */
  color: #fff;
}
.card-red {
  /* background: linear-gradient(135deg, #e74c3c 80%, #ffb3b3 100%); */
  color: #fff;
}

.card-placeholder {
  position: absolute;
  left: 0; right: 0;
  top: 90%;
  transform: translateY(-50%);
  z-index: 2;
  text-align: center;
  padding: 1vw 0.5vw;
  transition: top 0.32s cubic-bezier(0.4,0,0.2,1), transform 0.32s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  text-shadow: 0 2px 8px #002b3a, 0 0 2px #000, 0 0 8px #000;
}
.card-active {
  opacity: 0;
  position: absolute;
  left: 0; right: 0;
  top: 70%;
  transform: translateY(40%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1vw 0.5vw;
  font-size: 0.95vw;
  font-weight: normal;
  color: #fff;
  border-radius: 18px;
  pointer-events: none;
  z-index: 2; /* Ensure text is above overlay */
  transition: opacity 0.32s cubic-bezier(0.4,0,0.2,1), top 0.32s cubic-bezier(0.4,0,0.2,1), transform 0.32s cubic-bezier(0.4,0,0.2,1);
  text-shadow: 0 2px 8px #002b3a, 0 0 2px #000, 0 0 8px #000;
}
.card {
  /* ...existing code... */
  position: relative;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 18px;
  background: rgba(0,0,0,0);
  transition: background 0.28s cubic-bezier(0.4,0,0.2,1);
  z-index: 0; /* Place overlay below text */
  pointer-events: none;
}
.card:hover {
  /* transform: scale(1.02); */
  box-shadow: 0 16px 44px rgba(0,0,0,0.28);
}

.card:hover::after {
  background: rgba(0,0,0,0.32);
}

.card:hover .card-placeholder {
  color: #fff700;
  text-shadow: 0 1px 8px #003c4d;
  font-style: bold;
  top: 1%;
  transform: translateY(0);
}
.card:hover .card-active {
  opacity: 1;
  top: 55%;
  transform: translateY(-50%);
  pointer-events: auto;
}

.card.card-blue:nth-child(1) {
  background-image: url('images/card/1.jpg');
  background-size: cover;
  background-position: center;
}
.card.card-blue:nth-child(2) {
  background-image: url('images/card/2.jpg');
  background-size: cover;
  background-position: center;
}
.card.card-blue:nth-child(3) {
  background-image: url('images/card/3.jpg');
  background-size: cover;
  background-position: center;
}
.card.card-blue:nth-child(4) {
  background-image: url('images/card/4.2.jpg');
  background-size: cover;
  background-position: center;
}
.card.card-red:nth-child(5) {
  background-image: url('images/card/5.jpg');
  background-size: cover;
  background-position: center;
}
.card.card-red:nth-child(6) {
  background-image: url('images/card/6.jpg');
  background-size: cover;
  background-position: center;
}
.card.card-red:nth-child(7) {
  background-image: url('images/card/7.jpg');
  background-size: cover;
  background-position: center;
}
.card.card-red:nth-child(8) {
  background-image: url('images/card/8.jpg');
  background-size: cover;
  background-position: center;
}

/* Page 6 */
.page-6 {
  /* background-image: url(images/bg/ocean-threats.jpg); */
  background: linear-gradient(to right, rgba(186, 0, 37, 0.8), rgba(0, 36, 52, 0.8));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}


.page-6 p {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-size: 1.2vw;
  top: 1rem;
  left: clamp(2vw, 3%, 10vw);
  position: absolute;
}

.page-6 .line {
  position: absolute;
  width: 30%;
  top: 9.5%;
  left: clamp(2vw, 3%, 10vw);
  border-bottom: 1px solid #fff;
}

.page-6 .line::after {
  content: '';
  position: absolute;
  right: .5rem;       
  top: -0.5rem;    
  width: 0;        
  height: 1rem;
  border-left: 1px solid #fff;
}

.page-6 h4 {
  font-size: 1.2vw;
  position: absolute;
  top: 2.5rem;
  left: clamp(2vw, 3%, 10vw);
}

/* --- Page 6 Threats Section --- */
.page-6 .big-text {
  position: absolute;
  left: 3%;
  color: rgb(255, 122, 122);
  background-color: rgba(0, 36, 52, 0.2);
  padding: 0.5vw;
  border-radius: 7px;
  z-index: 1;
  font-size: 3.5vw;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-6 .text-overfishing { top: 22%; }
.page-6 .text-pollution { top: 36%; }
.page-6 .text-climate { top: 50%; }
.page-6 .text-invasive { top: 64%; }
.page-6 .text-policy { top: 78%; }
.page-6 .big-text:hover,
.page-6 .big-text.threat-active {
  color: rgb(255, 43, 43);
  transform: scale(1.13);
}

#threatInfoBox {
  display: flex;
  position: absolute;
  overflow: auto;
  right: 3%;
  top: 10%;
  z-index: 1;
  width: 750px;
  height: 700px;
  max-width: 50%;
  max-height: 85%;
  background-color: rgba(255, 64, 102, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1rem;
  border-radius: 10px;
  box-sizing: border-box;
  scrollbar-color: rgba(255, 64, 102, 0.5) transparent; /* Custom scrollbar color */
  overflow-x: hidden;
}

#threatInfoBox p {
  top: 53%;
  left: 1%;
}

#threatInfoBox img {
  display: block;
  position: absolute;
  margin: 0 auto 1em auto;
  left: 5%;
  width: 570px;
  height: 250px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: -1;
}

/* last page */
.last-page {
  /* background is a gradient of aqua and dark blue (earlier hex); */
  background-image: linear-gradient(to right, rgba(0, 36, 52, 0.8), rgba(0, 179, 255, 0.8));

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;

  overflow-y: hidden;
  overflow-x: hidden;
}

.last-page p {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-size: 1.2vw;
  top: 1rem;
  left: clamp(2vw, 3%, 10vw);
  line-height: 1.5;
  position: absolute;
  max-width: 50%;
  z-index: 2;
}

.last-page b {
  color: aqua; font-weight: bold;
}

/* at the center right and fill */
/* .last-page img {
  z-index: 1;
  position: absolute;
  right: 5%;
  top: 20%;
  width: 40vw;
  height: auto;
  max-height: 60vh;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
} */

.whale-shark-bg {
  position: absolute;
  left: 90%;
  bottom: -5%;
  width: 800px;
  animation: whaleFloat 4s ease-in-out infinite;
  transform: translateX(-50%) scaleX(-1); /* flip horizontally */
}

@keyframes whaleFloat {
  0%   { transform: translateX(-50%) translateY(0) scaleX(-1) rotate(12deg); }
  50%  { transform: translateX(-50%) translateY(-10px) scaleX(-1) rotate(12deg); }
  100% { transform: translateX(-50%) translateY(0) scaleX(-1) rotate(12deg); }
}

.video-box {
  background: #f7fcff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  position: absolute;
  top: 5%;
  right: 13%;
  z-index: 10;
  /* Remove fixed width/height */
  width: 395px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-box:hover::after {
    content: "I interviewed Roderick Suarez, a relative from a fishermen family at Talim Island. He noted that fish stocks from the island became less over the years because of pollution from nearby factories. He also mentioned that during the pandemic, the fish stocks were able to recover for some period of time because of less human activities.";
    position: absolute;
    bottom: -10rem; /* Adjust as needed */
    left: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    z-index: 10;
}

.video-box iframe {
  width: 100%;
  height: 230px;
  border-radius: 12px;
  border: none;
}

#loader {
  position: fixed;
  z-index: 99999;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #eaf6fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 8px solid #b3e0f7;
  border-top: 8px solid #176b87;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 18px;
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

.loader-text {
  font-size: 1.3em;
  color: #176b87;
  letter-spacing: 1px;
}

.last-page .interview-note {
  position: absolute;
  font-size: 1.05vw;
  color: #fff;
  padding: 0.5em 1.2em;
  border-radius: 12px;
  opacity: 0.82;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: none;

  top: 6.2vw;
  right: 3.4vw;
  z-index: 10;
  text-shadow: 0 2px 8px #002b3a, 0 0 2px #000, 0 0 8px #000;
}

.last-page .interview-note {
    position: relative;
    cursor: pointer;
}

.last-page .interview-note:hover::after {
    content: "I interview Mr. Suarez from a fishermen family at Talim Island.";
    position: absolute;
    bottom: -50px; /* Adjust as needed */
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    z-index: 10;
}

.last-page .last-card-note {
  position: absolute;
  font-size: 1.05vw;
  color: #fff;
  padding: 0.5em 1.2em;
  border-radius: 12px;
  opacity: 0.82;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: none;

  top: 6.2vw;
  right: 3.4vw;
  z-index: 10;
  text-shadow: 0 2px 8px #002b3a, 0 0 2px #000, 0 0 8px #000;
}