body {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgb(29, 26, 25) 100%), url('frame134.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: rgb(29, 26, 25);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  height: 100vh;
}

.fading-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgb(29, 26, 25);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
  z-index: -2;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 65%;
  height: 100vh;
  background: linear-gradient(to bottom, rgba(139, 69, 19, 0.6) 5%, rgba(92, 51, 23, 1) 80%);
  pointer-events: none;
  z-index: 2;
}

/* Title styling */
h1 {
  position: absolute;
  top: 50vh;
  left: 5%;
  transform: translateY(-50%);
  color: #f7e7c9;
  font-size: 2.8rem;
  font-family: 'Old Standard TT', serif;
  z-index: 2;
  /* Above the gradient overlay */
  max-width: 40%;
  /* Keeps it from overflowing */
  line-height: 1.2;
}

.infoPage {
  height: auto;
  /* Adjust height to fit content */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 3;
  /* Higher z-index to stay above the Sketchfab model */
  position: relative;
  margin-top: 99vh;
  /* Adjust this value to create space */
  margin-right: 5vh;
  margin-bottom: 0px;
  background: transparent;
  /* Ensure background is transparent */
}

.title2 {
  color: #f4e0bc;
  font-size: 1.8rem;
  font-family: 'Old Standard TT', serif;
  /* Above the gradient overlay */
  /* Keeps it from overflowing */
  line-height: 1.2;
}


/* Menu Styles */
/*Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply the animation */
.fade-in {
  opacity: 0;
  /* Hidden initially */
  animation: fadeIn 1s ease-out forwards;
}

/* Optional: Add a delay for each element */
.fade-in:nth-child(1) {
  animation-delay: 0.2s;
}

.fade-in:nth-child(2) {
  animation-delay: 0.4s;
}

.fade-in:nth-child(3) {
  animation-delay: 0.6s;
}

.title2 {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-in-out;
}

/* Show when scrolled */
.infoPage.show .title2 {
  opacity: 1;
  transform: translateY(0);
}

.info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2vh;
}

.infoText {
  color: #f4e0bc;
  font-family: 'Old Standard TT', serif;
  text-align: justify;
  margin: 5vh;
}

.castleImage1,
.castleImage2 {
  height: 330px;
  object-fit: cover;
  margin: 5vh;
  max-width: 100%;
}


/* Title and Credits Section */
.model-title-credits {
  text-align: center;
  margin-bottom: 0px;
  /* space between title and 3D model */
  padding: 20px;
  background: rgba(29, 26, 25, 0.8);
  /*  lowk transparent background */
  border-radius: 10px;
  /* Rounded corners */
  max-width: 800px;
  /* Limit width for better readability */
  margin-left: auto;
  margin-right: auto;
}

.model-title {
  color: #f7e7c9;
  font-family: 'Old Standard TT', serif;
  font-size: 2rem;
  margin-bottom: 10px;
}

.model-credits {
  color: #f3e4c9;
  font-family: 'Old Standard TT', serif;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}


/*Phone*/

@media (max-width: 787px) {
  .info {
    flex-direction: column;
    align-items: center;
  }

  .infoText {
    font-size: 17px;
  }

  .castleImage2 {
    display: none;
  }
}

@media only screen and (max-width: 787px) {
  body {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 10%, rgb(29, 26, 25) 60%), url('frame135.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: scroll;
    min-height: 100vh;
  }

  .infoPage {
    background: linear-gradient(to bottom, rgb(29, 26, 25) 30%, rgb(29, 26, 25, 0.9) 70%, rgba(29, 26, 25, 0) 100%);
    margin-top: 135vh;
    padding-bottom: 100px;
    min-height: 120vh;
    width: 100%;
    position: relative;
    z-index: 2;
  }

  h1 {
    font-size: 2rem;
    top: 40%;
    max-width: 60%;
    margin-right: 20vw;
    margin-left: 20vw;
  }
}

/* iOS-specific Hack */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll !important
  }
}

@media (min-width: 788px) and (max-width: 878px) {
  .infoText {
    font-size: 16px;
  }

  .castleImage1 .castleImage2 {
    height: 300px;
  }
}

@media (min-width: 879px) {
  .infoText {
    font-size: 18px;
  }
}

.sketchfab-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.sketchfab-container {
  max-width: 900px;
  width: 90%;
}

.model-section {
  /* this doesn't exist in index.html */
  text-align: center;
  padding: 30px;
}
