/* Fixed Header Sticky Behavior */
.header {
  position: relative;
  transition: all 0.5s ease;
}

.header.sticky-top {
  position: relative;
}

.scrolled .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 997;
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
}

.scrolled .header .topbar {
  height: 0;
  visibility: hidden;
  overflow: hidden;
  transition: all 0.5s;
}

.header .navbar {
  position: relative;
  z-index: 999;
  background-color: #ffffff;
}

.header .main-navigation {
  position: relative;
  z-index: 998;
  margin-bottom: 30px;
}

/* Ensure smooth transition */
.scrolled .header .navbar,
.scrolled .header .main-navigation {
  position: relative;
}

/* Add padding to body when header is fixed to prevent content jump */
body.scrolled {
  padding-top: 0;
}

/* Hero Carousel Styles */
#heroCarousel {
  width: 100%;
  max-width: 100%;
  position: relative;
}

#heroCarousel .carousel-item {
  height: 500px;
  max-height: 500px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

#heroCarousel .carousel-item img {
  object-fit: cover;
  object-position: center;
  height: 100%;
  width: 100%;
}

#heroCarousel .carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

#heroCarousel .carousel-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding: 0 15px;
  text-align: center;
}

#heroCarousel .carousel-caption h1 {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s;
  margin-bottom: 1rem;
}

#heroCarousel .carousel-caption p {
  color: #fff;
  font-size: 1.25rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.5rem;
}

#heroCarousel .carousel-caption .btn {
  padding: 12px 40px;
  font-size: 1.1rem;
  border-radius: 50px;
  transition: all 0.3s;
}

#heroCarousel .carousel-caption .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#heroCarousel .carousel-indicators {
  bottom: 30px;
  z-index: 3;
}

#heroCarousel .carousel-indicators button.active {
  background-color: #fff;
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.4);
}

#heroCarousel .carousel-control-prev {
  left: 20px;
}

#heroCarousel .carousel-control-next {
  right: 20px;
}

#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next {
  opacity: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section Full Width - Fixed approach */
.hero.section {
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #heroCarousel .carousel-item {
    height: auto;
    max-height: 400px;
    padding: 10px 0;
  }

  #heroCarousel .carousel-item img{
    object-fit: contain;
  }

  #heroCarousel .carousel-caption h1 {
    font-size: 1.75rem;
  }

  #heroCarousel .carousel-caption p {
    font-size: 1rem;
  }

  #heroCarousel .carousel-caption .btn {
    padding: 10px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  #heroCarousel .carousel-item {
    height: auto;
    max-height: 350px;
    padding: 10px 0;
  }

  #heroCarousel .carousel-item img{
    object-fit: contain;
  }

  #heroCarousel .carousel-caption h1 {
    font-size: 1.5rem;
  }

  #heroCarousel .carousel-caption p {
    font-size: 0.9rem;
  }

  #heroCarousel .carousel-caption .btn {
    padding: 8px 25px;
    font-size: 0.9rem;
  }
}
