body {
  height: 100%;
  margin: 0; 
  padding: 0;
  overflow-x: hidden;
  font-family: monospace;
  color: white;
}
body:not(.index) {
  background-image: url(Images/BackgroundImage.JPG);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 30%;
  background-attachment: fixed;
}
.background {
  position: fixed;
  inset: 0;
  background-image: url(Images/BackgroundImage.JPG);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 30%;  /* starting focus near the top text */
  transform-origin: center 30%;
  z-index: -1;
  transition: transform 0.25s ease-out;
}



.youtube-icon {
  color: red;
  font-size: 36px;
  text-decoration: none;
  display: inline-block;
  margin-top: 5px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.youtube-icon:hover {
  color: #ff4b4b;
  transform: scale(1.3);
}


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

main {
  min-height: 250vh;  /* gives enough scroll space */
  position: relative;
  z-index: 1;         /* ensures content above background */
}

h1 {
  font-size: 70px;
  margin-top: 0;
  margin-bottom: 10px;
  padding: 10px;
}
h2 {
  font-size: 40px;
}

.IntroButton {
  position: fixed;
  top: 62%;
  right: 13%;
  transform: translateY(-50%);
  display: block;
  width: 25%;
  height: 10%;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.6s ease;
  z-index: 10;
  opacity: 0; /* start hidden */
  pointer-events: none; /* not clickable when hidden */
}

.IntroImage {
  width: 100%;
  height: auto;
  display: block;
}

.ScrollImage {
  position: fixed;
  bottom: 1%;
  left: 50%;
  transform: translateX(-50%);
  width: 6%;
  height: auto;
  opacity: 1;
  z-index: 10;
  transition: opacity 0.6s ease; /* smooth fade */
  animation: bounce 2s infinite;
}

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

.IntroButton:hover {
  transform: translateY(-50%) scale(1.05);
}

body.intro-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* ensures the content stays stacked vertically */
  text-align: center;
}

.introduction {
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 25px;
  text-align: center;
  box-sizing: border-box;

  width: min(90vw, 700px);          /* responsive width */

  top: 50%;
  right: 50%;

  padding: clamp(1.5rem, 4vw, 3rem);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
}

.introduction a {
  margin-bottom: 12px;   /* or 15px, 20px if you want more space */
}

.contents{
  background-color: black;
  border-radius: 25px;
  font-size: clamp(20px, 2.3vw, 25px);
  text-align: center;
  opacity: 0.90;
  color: white;

  display: inline-block;
  padding: 40px;

  /* 🔒 More stable positioning across screens */
  position: fixed;
  top: 50%;              /* relative to viewport height */
  left: 4%;             /* relative to viewport width */
  transform: translateY(-50%);  /* vertical centering around that top */

  /* 🔓 Let box grow with links/text */
  width: 20%;
  min-width: 180px;      /* don’t get too tiny on small screens */
  max-width: 260px;
  height: auto;

  box-sizing: border-box;
  word-wrap: break-word;
}



.contentsmb{
  background-color: black;
  border-radius: 25px;
  font-size: clamp(20px, 2.3vw, 32px);
  text-align: center;
  opacity: 0.90;
  color: white;

  display: inline-block;
  padding: 40px;

  /* 🔒 More stable positioning across screens */
  position: fixed;
  top: 50%;              /* relative to viewport height */
  left: 8%;             /* relative to viewport width */
  transform: translateY(-50%);  /* vertical centering around that top */

  /* 🔓 Let box grow with links/text */
  width: 20%;
  min-width: 180px;      /* don’t get too tiny on small screens */
  max-width: 260px;
  height: auto;

  box-sizing: border-box;
  word-wrap: break-word;
}

.explanation {
  background-color: black;
  border-radius: 25px;
  font-size: clamp(20px, 2.3vw, 20px);
  text-align: left;
  opacity: 0.90;
  display: inline-block;
  width: 50%;
  padding: 40px;
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  font-weight: normal;
  overflow: hidden; /* optional: hides overflowing elements if you want */
  height: auto; /* let the box expand with content */
  max-width: 90vw; /* keep it responsive on smaller screens */
  max-height: none; /* no fixed height */
  word-wrap: break-word; /* break long words if necessary */
}


.memorybox{
  background-color: black;
  border-radius: 25px;
  font-size: clamp(20px, 2.3vw, 20px);
  text-align: center;
  opacity: 0.90;
  display: inline-block;
  width: 50%;
  padding: 40px;
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  font-weight: normal;
  overflow: hidden; /* optional: hides overflowing elements if you want */
  height: auto; /* let the box expand with content */
  max-width: 90vw; /* keep it responsive on smaller screens */
  max-height: none; /* no fixed height */
  word-wrap: break-word; /* break long words if necessary */
}

a {
  color:orange;
  text-decoration: none;
  display: inline-block; /* required for transform to work */
  transition: transform 0.2s ease, color 0.2s ease; /* smooth animation */ 
}

a:hover {
  color: rgb(255, 243, 7);
  transform: scale(1.3); /* zoom effect */
}

a:active {
  color: rgb(0, 42, 255);
}



.images{
  background-color: black;
  border: 2px double;
  border-radius: 25px;
  box-sizing: border-box;
  padding: 40px;

  /* ✅ Responsive width & position */
  width: 60vw;                       /* photos box is 60% of screen width */
  margin: 100px 5vw 100px 28vw;      /* top, right, bottom, left */

  min-height: 0;                     /* let height grow with content */
}


.images h1 {
  font-size: 50px;  /* smaller title */
}

.images h2 {
  font-size: 28px;  /* smaller subtitle */
}
.images h1, 
.images h2 {

  text-align: center;
  width: 100%;
  margin-top: 0;
  margin-bottom: 20px;
}

.images figure { 
  margin: 0 0 40px 0; 
  text-align: center; 
}

.images img{
  display: block;
  max-width: 50%;      /* or 60–70% if you want them bigger */         
  height: auto;
  margin: 0 auto;     /* <--- this centers them */
  border-radius: 15px;        
}

.images figcaption{
  margin-top: 8px;
  font-size: 15px;
  color: white;
  opacity: 0.85;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Headings */
  h1 {
    font-size: 36px;
    padding: 5px;
  }
  h2 {
    font-size: 24px;
  }

  /* Stack sidebar and content vertically */
  .contents, .contentsmb {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 90%;
    max-width: none;
    min-width: unset;
    margin: 20px auto;
    padding: 25px;
    font-size: 18px;
  }

  .explanation, .memorybox {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 92%;
    margin: 20px auto;
    padding: 25px;
    font-size: 16px;
  }

  /* Images gallery */
  .images {
    width: 95vw;
    margin: 20px auto;
    padding: 20px;
  }

  .images h1 {
    font-size: 28px;
  }

  .images h2 {
    font-size: 20px;
  }

  .images img {
    max-width: 90%;
  }

  .images figure {
    margin: 0 0 25px 0;
  }

  .images figcaption {
    font-size: 13px;
  }

  /* Intro button - keep on right side but adjust size for mobile */
  .IntroButton {
    position: fixed;
    top: 84%;
    right: 5%;
    left: auto;
    transform: translateY(-50%);
    width: 40%;
    max-width: 200px;
    height: auto;
  }

  /* Scroll indicator */
  .ScrollImage {
    width: 40px;
    min-width: 40px;
  }

  /* Introduction box */
  .introduction {
    width: 95vw;
    padding: 20px;
    font-size: 16px;
  }

  /* YouTube icon - bigger tap target */
  .youtube-icon {
    font-size: 44px;
    padding: 10px;
  }

  /* Links - disable hover zoom on touch */
  a:hover {
    transform: none;
  }

  a:active {
    transform: scale(1.1);
  }
}

/* Even smaller phones */
@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 20px;
  }

  .contents, .contentsmb {
    padding: 18px;
    font-size: 16px;
  }

  .explanation, .memorybox {
    padding: 18px;
    font-size: 14px;
  }

  .images {
    padding: 15px;
  }

  .images h1 {
    font-size: 22px;
  }

  .images h2 {
    font-size: 16px;
  }

  .introduction {
    padding: 15px;
    font-size: 14px;
  }

  /* Bounce animation - smaller on mobile */
  @keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -25px); }
  }
}

