/* Carousel Header */
.carousel-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px; /* Fixed height for header */
  background: #111;
  z-index: 100; /* Ensure header stays on top */
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-header button {
  color: white;
  background: none;
  border: none;
  margin: 5px 10px;
  font-size: 16px;
  cursor: pointer;
}

.carousel-header button:hover {
  text-decoration: underline;
}

@media (min-aspect-ratio: 1/1) {

  /* Carousel Container */
  .carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: visible;
    font-family: sans-serif;
    margin-top: 60px; /* Adjust this for spacing between header and carousel */
    overflow-x: hidden;
    overflow-y: hidden;
  }

  /* Track & Slides */
  .carousel-track-container {
   position: relative;
    overflow: visible;
   width: 100%;
  }

  .carousel-track {
   display: flex;
   transition: transform 0.5s ease;
   width: 100%;
   position: relative;
   list-style: none;
   margin: 0;
   padding: 0;
  }

  .carousel-slide {
    width: 100%;
    height: calc(100vh - 60px);
    flex: 0 0 100%;   /* Prevent shrinking/growing */
    position: relative;
    top: 0;
    left: 0;
  }

  .carousel-slide img,
  .carousel-slide video {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 60px); 
    object-fit: cover;
  }

  /* Overlay Content */
  .overlay {
    position: absolute;
    bottom: 10%;
    left: 5%;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 1em;
    border-radius: 5px;
    max-width: 80%;
  }

  .overlay h2 {
   font-size: 1.5rem;
   margin-bottom: 10px;
  }

  .carousel-slide:nth-child(1) .overlay {
   top: 40%;
   left: 50%;
   bottom: auto;
   right: auto;
   transform: translate(-50%, -50%);
   text-align: center;
   max-width: 90%;
  }

  .carousel-slide:nth-child(2) .overlay {
   top: 50%;
   left: 50%;
   bottom: auto;
   right: auto;
   transform: translate(-50%, -50%);
   text-align: center;
   max-width: 90%;
  }

  .carousel-slide:nth-child(3) .overlay {
   top: 60%;
   left: 50%;
   bottom: auto;
   right: auto;
   transform: translate(-50%, -50%);
   text-align: center;
   max-width: 90%;
  }

  .overlay button {
   padding: 10px 15px;
   border: none;
   /* background: #ff5c5c;  */
   background: #2D2363;
   color: white;
   cursor: pointer;
   border-radius: 5px;
   font-size: 1rem;
  }

  /* Navigation Arrows */
  .carousel-button {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   background: rgba(0,0,0,0.5);
   border: none;
   color: white;
   font-size: 2rem;
   cursor: pointer;
   padding: 0.5em 0.8em;
   z-index: 2;
   border-radius: 50%;
   width: 48px;
   height: 48px;
   display: flex;
   align-items: center;
   justify-content: center;
  }

  .carousel-button.prev {
   left: 10px;
  }

  .carousel-button.next {
   right: 10px;
  }

}

@media (max-aspect-ratio: 0.99/1) {

  /* Carousel Container */
  .carousel {
    position: relative;
    height: 100vh;
    width: auto;
    overflow: visible;
    font-family: sans-serif;
    margin-top: 60px; /* Adjust this for spacing between header and carousel */
    overflow-x: hidden;
    overflow-y: hidden;
  }

  /* Track & Slides */
  .carousel-track-container {
   position: relative;
   overflow: hidden;
   height: 100vh;
  }

  .carousel-track {
   display: flex;
   transition: transform 0.5s ease;
   height: 100vh;
   width: relative;
   list-style: none;
   margin: 0;
   padding: 0;
  }

  .carousel-slide {
   height: 100vh;
   width: 100%;
   flex: 0 0 100%;   /* Prevent shrinking/growing */
   position: relative;
   top: 0;
   left: 0;
  }

  .carousel-slide img,
  .carousel-slide video {
    height: 100vh;
    width: auto;
    max-height: calc(100vh - 60px); 
    object-fit: cover;
  }

  /* Overlay Content */
  .overlay {
    position: absolute;
    bottom: 10%;
    left: 5%;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 1em;
    border-radius: 5px;
    max-width: 80%;
  }

  .overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .carousel-slide:nth-child(1) .overlay {
    top: 20%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 90%;
  }

  .carousel-slide:nth-child(2) .overlay {
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 90%;
  }

  .carousel-slide:nth-child(3) .overlay {
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 90%;
  }

  .overlay button {
    padding: 10px 15px;
    border: none;
    /* background: #ff5c5c; */
    background: #2D2363;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
  }

  /* Navigation Arrows */
  .carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5em 0.8em;
    z-index: 2;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .carousel-button.prev {
    left: 10px;
  }

  .carousel-button.next {
    right: 10px;
  }

}

/*  RESPONSIVE STYLES */

/* Small tablets and phones */
@media (max-width: 768px) {
  .carousel-slide {
    height: 50vh;
  }

  .overlay {
    bottom: 5%;
    left: 5%;
    right: 5%;
    padding: 0.8em;
    padding: 0.8em;
    font-size: 0.9rem;
    max-width: 90%;
  }

  .overlay h2 {
    font-size: 1.2rem;
  }

  .overlay button {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  .carousel-button {
    font-size: 1.5rem;
    padding: 0.3em 0.6em;
  }
}

/* Very small phones */
@media (max-width: 480px) {
  .carousel-slide {
    height: 45vh;
  }

  .overlay h2 {
    font-size: 1rem;
  }

  .overlay button {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .carousel-button {
    font-size: 1.3rem;
  }
}
