/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

/* Main Section */
main {
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Item Styling */
.item {
  width: 200px;
  height: 300px;
  list-style-type: none;
  position: absolute;
  top: 50%;
  /* Center the carousel items vertically */
  transform: translateY(-50%);
  /* Adjust the vertical positioning */
  z-index: 1;
  background-position: center;
  background-size: cover;
  border-radius: 20px;
  box-shadow: 0 20px 30px rgba(255, 255, 255, 0.3) inset;
  transition: transform 0.1s, left 1.75s, top 1.75s, width 1.75s, height 1.75s;
}

/* Center the first two items */
.item:nth-child(1),
.item:nth-child(2) {
  left: 50%;
  /* Align the items horizontally */
  transform: translateX(-50%) translateY(-50%);
  /* Center horizontally and vertically */
  width: 100%;
  height: 100%;
  opacity: 1;
  border-radius: 0;
  box-shadow: none;
}

/* Adjust the position of subsequent items */
.item:nth-child(3) {
  left: calc(50% + 220px);
  /* Shift the third item to the right */
  transform: translateX(-50%) translateY(-50%);
}

.item:nth-child(4) {
  left: calc(50% + 440px);
  /* Shift the fourth item further right */
  transform: translateX(-50%) translateY(-50%);
}

.item:nth-child(5) {
  left: calc(50% + 660px);
  /* Shift the fifth item */
  transform: translateX(-50%) translateY(-50%);
}

.item:nth-child(6) {
  left: calc(50% + 880px);
  /* Shift the sixth item */
  opacity: 0;
  transform: translateX(-50%) translateY(-50%);
}


/* Content Styling */
.content {
  width: min(30vw, 400px);
  position: absolute;
  top: 50%;
  left: 3rem;
  transform: translateY(-50%);
  font: 400 0.85rem helvetica, sans-serif;
  color: white;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  display: none;
}

.content .title {
  font-family: "arial-black";
  text-transform: uppercase;
}

.content .description {
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
  font-size: 1.5rem;
}

.content button {
  width: fit-content;
  background-color: rgba(0, 0, 0, 0.1);
  color: white;
  border: 2px solid white;
  border-radius: 0.25rem;
  padding: 0.75rem;
  cursor: pointer;
}

/* Content Animation */
.item:nth-of-type(2) .content {
  display: block;
  animation: show 0.75s ease-in-out 0.3s forwards;
}

@keyframes show {
  0% {
    filter: blur(5px);
    transform: translateY(calc(-50% + 75px));
    /* Adjust for desktop */
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    /* End at normal position */
  }
}

/* Navigation Buttons (Scroller) */
.scroller {
  position: fixed;
  /* Keep it fixed at the bottom */
  bottom: 1rem;
  /* Position 1rem above the bottom of the viewport */
  left: 50%;
  /* Center the navigation horizontally */
  transform: translateX(-50%);
  z-index: 5;
  /* Ensure it stays above other elements */
  user-select: none;
}

.scroller .btn {
  background-color: rgba(255, 255, 255, 0.5);
  /* Semi-transparent background */
  color: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.6);
  margin: 0 0.25rem;
  /* Add spacing between buttons */
  padding: 0.75rem;
  /* Adjust size of buttons */
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.scroller .btn:hover {
  background-color: rgba(255, 255, 255, 0.7);
  /* Slightly lighter on hover */
}


/* Header and Navbar Styling */
header.navbar {
  position: fixed;
  /* Ensure the navbar stays at the top */
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: black;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  /* Ensure it stays above other elements */
}

.navbar a {
  color: white;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px;
  position: relative;
  transition: all 0.3s ease;
  text-align: center;
}

.navbar a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #1434A4;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

.navbar a:hover::before {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.navbar-item:hover {
  color: #1434A4 !important;
}

.navbar-burger {
  color: white !important;
}

/* Header content styling */
.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 20px;
  padding-left: 20px;
}

/* Header styles */
header h1 {
  font-family: 'Coiny', sans-serif;
  font-size: 30px;
  background-image: linear-gradient(to right, rgb(0, 140, 255), cyan, blue, rgba(0, 0, 0, 0.817));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-animation 150s linear infinite;
  opacity: 0.9;
  text-align: center;
  padding: 10px;
  margin: 0 auto;
  font-size: 1.8rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}


@keyframes rainbow-animation {
  to {
    background-position: 4500vh;
  }
}

/* Media Query for 768px and below */
@media (max-width: 768px) {

  /* Body Styling */
  body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
  }

  /* Main Section Styling */
  main {
    height: auto;
    /* Allow main to grow based on content */
    box-shadow: none;
  }

  /* Item Styling */
  .item {
    width: 100vw;
    /* Take the full width of the viewport */
    height: auto;
    left: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    transition: transform 0.5s, opacity 0.5s;
    /* Smooth transitions */
  }

  .item:nth-child(1) {
    display: block;
    /* Ensure the first item is visible */
    opacity: 1;
  }

  /* Hide items from 2nd to 6th */
  .item:nth-child(2),
  .item:nth-child(3),
  .item:nth-child(4),
  .item:nth-child(5),
  .item:nth-child(6) {
    display: none;
    /* Hide all other images on mobile */
  }

  /* Content Styling */
  .content {
    position: relative;
    /* Make content flow within the document */
    width: calc(100% - 2rem);
    /* Add some padding */
    margin: 1rem auto;
    text-align: left;
    /* Align text to the left */
    top: 0;
    left: 0;
    transform: none;
    display: block;
    /* Ensure content is displayed */
    opacity: 1;
    /* Make text visible */
    animation: show 0.75s ease-in-out forwards;
    /* Apply animation */
    padding-left: 1rem;
    /* Add some padding to the left */
    padding-top: 20rem;
    /* Add top padding to move the content down */
  }

  /* Content Title Styling */
  .content .title {
    font-size: 1.2rem;
    /* Increase size for readability */
    margin-bottom: 0.5rem;
    /* Add space below the title */
  }

  /* Content Description Styling */
  .content .description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    /* Add space below the description */
  }

  /* Content Button Styling */
  .content button {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    /* Add space above the button */
  }

  /* Scroller Button Styling */
  .scroller .btn {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  /* Navbar Styling */
  header.navbar {
    padding: 1rem;
    font-size: 0.9rem;
  }

  /* Navbar Link Styling */
  .navbar a {
    padding: 0.5rem;
    color: white !important;
    font-size: 0.8rem;
  }

  /* Header Styling */
  header h1 {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
  }
}