* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  transition: opacity 0.3s ease;
  opacity: 1;
}



#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('images/BG.webp') center center no-repeat;
  background-size: cover;
  z-index: -2;
}

#foreground-container {
  min-height: 120vh;
  background: url('images/FP_FG.webp') center top no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  background-size: contain;
}

#banner {
  max-width: 100%;
  height: auto;
  margin-bottom: 30px;
}

#content {
  width: 90%;
  max-width: 1000px;
  text-align: center;
}

.ribbon-container {
  position: relative;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  margin-top: 20px;
}

.ribbon-image {
  width: 100%;
  height: auto;
  display: block;
}

.start-here-link {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-size: 3.2rem;
  color: #2b1a00;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
}

.discord-button-link {
  position: absolute;
  bottom: 17%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 60px;
  cursor: pointer;
  z-index: 5;
}

.category-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.category-link {
  position: relative;
  display: inline-block;
  width: 280px;
  height: auto;
  transition: transform 0.2s ease-in-out;
}

.category-link img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.category-row-Large {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.category-link-Large img {
  width: 100%;
  height: auto;
  transition: transform 0.2s ease-in-out;
}

.category-link-Large img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.NAV-BACK-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 10px;
  flex-wrap: wrap;
}

.NAV-BACK-link {
  position: relative;
  display: inline-block;
  transform: scale(0.60); /* 75% of original size */
  transform-origin: center;
  transition: transform 0.2s ease-in-out;
}

.NAV-BACK-link img:hover {
  transform: scale(1.05);
  cursor: pointer;
}


/* Hide with fade */
.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

/* Show with fade */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.footer-banner {
  position: relative;
  width: 100%;
  max-width: 813px;
  margin: 30px auto 0px;
  text-align: center;
}

.footer-scroll {
  width: 100%;
  height: auto;
  display: block;
}

.footer-links {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 60px;
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
}

.footer-links a {
  text-decoration: none;
  color: #3b1d00;
  transition: color 0.2s ease-in-out;
}

.footer-links a:hover {
  color: #900C3F;
}



/* //////// MAP POPUP /////// */

#map-popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99999;
  display: none;
  justify-content: center;
  align-items: center;
}

#map-popup-overlay.active {
  display: flex;
  animation: zoomIn 0.3s ease forwards;
}

#map-popup {
  position: relative;
  width: 80vw;
  height: 80vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 50px #000;
}

#map-popup iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#map-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #111;
  color: #fff;
  border: none;
  font-size: 1.4rem;
  padding: 4px 12px;
  cursor: pointer;
  z-index: 2;
  border-radius: 6px;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}



/* ////////////////MOBILE SECTION /////////////////////////////*/
@media (max-width: 768px) {
  /* Remove the fixed background image on mobile */
  #background {
    display: none;
  }

  /* Keep the foreground image active and responsive */
 #foreground-container {
    background-image: url('images/FP_FG_Mobile.webp');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }


  #banner {
    align-items: center;
	width: 90%;
    max-width: 90vw;
    margin-bottom: 10px;
	padding: 0px 0px 0px 45px;
  }

  .ribbon-container {
    margin-top: 10px;
  }

  .start-here-link {
    font-size: 2rem;
    padding: 4px 8px;
  }

  .discord-button-link {
    width: 200px;
    height: 50px;
  }

  .category-row {
	flex-direction: column;
    align-items: center;
    gap: 0px; 
	  
  }
  .category-row-Large {
    flex-direction: column;
    align-items: center;
    gap: 10px;
	
  }

  .category-link {
  transform: scale(0.80); /* 75% of original size */
  transform-origin: center;
  flex-direction: row;
  }
  .category-link-Large {
	width: 90%;
  }
  
  
  .NAV-BACK-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 10px;
  flex-wrap: wrap;
}

.NAV-BACK-link {
  position: relative;
  display: inline-block;
  transform: scale(0.25); /* 75% of original size */
  transform-origin: center;
  transition: transform 0.2s ease-in-out;
}


  .footer-banner {
    margin-top: 40px;
    margin-bottom: 0px;
  }

  .footer-links {
    flex-direction: row;
    gap: 20px;
    font-size: 1rem;
    top: 50%;
  }
}
