@font-face {
  font-family: Abel;
  src: url(Abel-Regular.ttf);
}

body {
margin: 0;
background-image: linear-gradient(#9EC9F6,rgba(32, 57, 61, 1) );
font-family: Abel;
}

.heading {
text-align: center;
color: #F5F5DC;
margin: 50px 0;
font-size: 27px;

}

.heading h1{
  font-size: 70px;
  font-family: Abel;
  color: #F5F5DC;
  margin: 0;
  padding: 0;
  margin-top: -5%;
  margin-bottom: 5%;
}


#slider {
position: relative;
width: 50%;
height: 30vw;
min-height: 25vw; /* Consistent with container min-height */
max-height: 40vh; /* Prevent excessive height on very wide screens */
margin-left: 25%;
margin-top: 2%;
margin-bottom: 15vh;
perspective: 1400px;
transform-style: preserve-3d;
}

/* Radio button container */
.radio-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 3vh;
  position: relative;
  z-index: 10;
}

input[type=radio] {
position: relative;
width: 18px;
height: 18px;
cursor: pointer;
opacity: 0.6;
transition: opacity 0.3s ease;
}


input[type=radio]:checked {
opacity: 1;
filter: grayscale(1)
}


#slider label {
position: absolute;
width: 100%; 
height: 100%;
top: 0;
display: flex;
align-items: center;
justify-content: center;
transition: transform 400ms ease;
}

#video1container, #video2container, #video3container, #video4container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 25vw; /* Consistent minimum height */
  color: #F5F5DC;
  font-size: 20px;
  text-align: center;
  padding: 20px;
  background-color: #9EC9F6;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: hidden; /* Prevent content from breaking layout */
}

/* Ensure videos fit properly within containers */
#video1container video, 
#video2container video, 
#video3container video, 
#video4container video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Maintain aspect ratio while filling container */
  border-radius: 4px;
}

p {
  margin: 0; /* Removes default margin from paragraph elements */
}


/* Shadow element underneath the boxes */

/* Main Slide - Bring to the front and center */
#s1:checked ~ #slide1,
#s2:checked ~ #slide2,
#s3:checked ~ #slide3,
#s4:checked ~ #slide4 {
    transform: translate3d(0%, 0, 0px);
}

/* Slide 2 - Position to the right and slightly back */
#s1:checked ~ #slide2,
#s2:checked ~ #slide3,
#s3:checked ~ #slide4,
#s4:checked ~ #slide1 {
    transform: translate3d(20%, 0, -100px);
}

/* Slide 3 - Position further to the right and further back */
#s1:checked ~ #slide3,
#s2:checked ~ #slide4,
#s3:checked ~ #slide1,
#s4:checked ~ #slide2 {
    transform: translate3d(40%, 0, -250px);
}

/* Slide 4 - Position to the left and further back (mirroring Slide 3's behavior) */
#s1:checked ~ #slide4,
#s2:checked ~ #slide1,
#s3:checked ~ #slide2,
#s4:checked ~ #slide3 {
    transform: translate3d(-40%, 0, -250px);
}



.hoverbutton:hover{
  background-color: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  border: 1px solid rgb(0, 0, 0);

  font-size: 20px;

  font-family: Avenir;
  padding: 10px;
  margin: 10px;
  cursor: pointer;
  transition: 0.5s;
}

  #hp  {
    float: right;    
     margin: 0 10px 100px 5px;
    }


    /* create a fadeout animation where the .fade disappears completely after 10 seconds */
    .fade {
      animation: fadeout 10s;
      animation-fill-mode: forwards;
      -moz-animation: fadeout 10s; /* Firefox */
      -moz-animation-fill-mode: forwards;
      -webkit-animation: fadeout 10s; /* Safari and Chrome */
      -webkit-animation-fill-mode: forwards;
      -o-animation: fadeout 10s; /* Opera */
      -o-animation-fill-mode: forwards;
    }

    /* create the keyframe that will fade out the .fade element */
    @keyframes fadeout {
      from { opacity: 1; }
      to   { opacity: 0; }
    }

    /* Firefox */
    @-moz-keyframes fadeout {
      from { opacity: 1; }
      to   { opacity: 0; }
    }

    /* Safari and Chrome */
    @-webkit-keyframes fadeout {
      from { opacity: 1; }
      to   { opacity: 0; }
    }

    /* Opera */
    @-o-keyframes fadeout {
      from { opacity: 1; }
      to   { opacity: 0; }
    }

/* Video description styling */
.video-description {
  width: 100%;
  text-align: center;
  margin-top: 2vh;
  padding: 10px 0;
  color: #F5F5DC;
  font-family: Abel;
  font-size: 1.2rem;
}

.video-description h3 {
  margin: 0;
  padding: 10px 0;
  font-size: 1.5rem;
}

/* Responsive Design - Ensure one-page layout on all screens */
@media screen and (max-height: 800px) {
  .heading {
    margin: 30px 0;
    font-size: 22px;
  }
  
  .heading h1 {
    font-size: 50px;
    margin-bottom: 3%;
  }
  
  #slider {
    height: 25vw;
    min-height: 20vw;
    max-height: 30vh;
    margin-bottom: 10vh;
  }
  
  #video1container, #video2container, #video3container, #video4container {
    min-height: 20vw;
    font-size: 18px;
    padding: 15px;
  }
}

@media screen and (max-height: 600px) {
  .heading {
    margin: 20px 0;
    font-size: 18px;
  }
  
  .heading h1 {
    font-size: 35px;
    margin-bottom: 2%;
  }
  
  #slider {
    height: 20vw;
    min-height: 18vw;
    max-height: 25vh;
    margin-bottom: 8vh;
  }
  
  #video1container, #video2container, #video3container, #video4container {
    min-height: 18vw;
    font-size: 16px;
    padding: 10px;
  }
  
  .video-description {
    margin-top: 1vh;
    font-size: 1rem;
  }
  
  .video-description h3 {
    font-size: 1.2rem;
  }
}

/* Mobile devices */
@media screen and (max-width: 768px) {
  .heading {
    margin: 20px 0;
    font-size: 16px;
  }
  
  .heading h1 {
    font-size: 30px;
    margin-bottom: 3%;
  }
  
  #slider {
    width: 70%;
    margin-left: 15%;
    height: 45vw;
    min-height: 40vw;
    max-height: 35vh;
    margin-bottom: 12vh;
  }
  
  #video1container, #video2container, #video3container, #video4container {
    min-height: 40vw;
    font-size: 16px;
    padding: 15px;
  }
  
  .radio-buttons {
    gap: 15px;
    margin-top: 2vh;
  }
  
  input[type=radio] {
    width: 16px;
    height: 16px;
  }
}

/* Very small screens */
@media screen and (max-width: 480px) {
  .heading {
    margin: 15px 0;
    font-size: 14px;
  }
  
  .heading h1 {
    font-size: 24px;
    margin-bottom: 2%;
  }
  
  #slider {
    width: 80%;
    margin-left: 10%;
    height: 50vw;
    min-height: 45vw;
    max-height: 30vh;
    margin-bottom: 10vh;
  }
  
  #video1container, #video2container, #video3container, #video4container {
    min-height: 45vw;
    font-size: 14px;
    padding: 12px;
  }
  
  .video-description {
    font-size: 0.9rem;
  }
  
  .video-description h3 {
    font-size: 1.1rem;
  }
}
