body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  padding-top: 70px;
  font-family: 'Rubik';
}

.header-content {
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgb(255, 111, 20);
  padding: 10px 20px;
  z-index: 1000;
}

header h1 {
  margin-top: 5px;
  margin-bottom: 5px;
  font-family: 'Bebas Neue', cursive;
  font-size: 36px;
  margin-left: 20px;
}

header h1 a {
  text-decoration: none;
  color: black;
}

nav {
  display: flex;
  justify-content: center;
  margin-left: 35%;
  flex-grow: 1;
}

nav ul {
  list-style-type: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

nav ul li {
  padding: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 1.5em;
  font-family: 'Bebas Neue', cursive;
}

nav ul li:last-child {
  margin-left: auto;
  padding-right: 20px;
}

.hero-image {
  background-image: url('/images/leboncoin-jaiunpotedanslacom-min.png');
  height: 102vh;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -110px;
}

main {
  background-color: #f2f2f2;
}

main h2 {
  text-align: start;
  margin-left: 10%;
  margin-bottom: 50px;
  margin-top: 100px;
}

main #post-ad h2 {
  margin-top: 50px;
}

#top-categories, 
#post-ad {
  opacity: 0;
  visibility: visible;
  position: sticky;
  top: 0;
  padding: 20px;
  transition: opacity 2.5s ease-in-out;
}

#top-categories {
  text-align: center;
  padding: 20px 0;
}

.categories-carousel {
  display: flex;
  overflow-x: auto;
  margin: 0 auto;
  max-width: 80%;
  gap: 10px;
}

.categories-carousel::-webkit-scrollbar {
  display: none;
}

.category-item {
  min-width: 300px;
  margin-right: 10px;
  flex: 0 0 auto;
  width: 300px;
  position: relative;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
}

.category-item img {
  width: 100%;
  height: 100%;
  display: block;
}

.category-item p {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 5px 0;
  background: linear-gradient(to top, black, rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 1.2em;
  margin: 0;
}

.carousel-container {
  position: relative;
}

#prevBtn, #nextBtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  position: absolute;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  top: 50%;
  transform: translateY(-50%);
  border: none;
  cursor: pointer;
}

#prevBtn i, #nextBtn i {
  font-size: 28px;
}

#prevBtn {
  left: 100px;
}

#nextBtn {
  right: 100px;
}

.categories-carousel {
  display: flex;
  position: relative;
}

#post-ad span {
  text-align: center;
  font-size: 18px;
}

.button-style {
  background-color: #FFA500;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 22px;
  margin-left: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.button-style:hover {
  background-color: peru;
}

footer {
  text-align: center;
  background-color: peru;
  margin-top: -10px;
  padding: 5px;
}

@media only screen and (max-width: 768px) {
  header h1 {
    font-size: 24px;
    margin-left: 10px;
  }

  nav {
    justify-content: flex-start;
    margin-left: 0;
  }

  nav ul {
    justify-content: flex-start;
  }

  nav ul li a {
    font-size: 14px;
  }
}

@media only screen and (max-width: 480px) {
  header h1 {
    font-size: 20px;
  }

  nav ul li a h2 {
    font-size: 12px;
    margin-bottom: 3px;
  }
}