/* Interactive Hero Background Styles */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg-custom {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.bg-top {
  flex: 5;
  background-color: #ffffff;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px; /* Space for navbar */
  transition: padding-top 0.3s;
}

.bg-bottom {
  flex: 5;
  background-color: #004d26; /* Dark Green */
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  margin-top: -20px;
  z-index: 2;
  transition: background-color 0.3s;
}

.hero:hover .bg-bottom {
  background-color: #003d1e;
}

/* Title and Dots */
.hero-title-container {
  text-align: center;
  z-index: 3;
  animation: fadeInDown 1s ease-out;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.hero-company-title {
  font-family: "Georgia", serif;
  color: #004d26;
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dots .dot {
  width: 12px;
  height: 12px;
  background-color: #f39c12; /* Orange */
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-dots .dot:nth-child(2) {
  animation-delay: 0.3s;
}

.hero-dots .dot:nth-child(3) {
  animation-delay: 0.6s;
}

/* Leaves Decoration */
.leaves-group {
  position: absolute;
  bottom: 0; /* Attach to bottom of white section */
  z-index: 3;
  display: flex;
  align-items: flex-end;
}

.leaves-left {
  left: 5%;
}

.leaves-right {
  right: 5%;
  transform: scaleX(-1); /* Mirror for the right side */
}

.leaf {
  border-radius: 0 100px 0 100px;
  transform-origin: bottom left;
  box-shadow: inset 5px 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.leaves-group:hover .leaf-light {
  transform: rotate(35deg) translateX(-15px) scale(1.1);
}

.leaves-group:hover .leaf-dark {
  transform: rotate(50deg) translateX(15px) scale(1.1);
}

.leaf-light {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #8bc34a, #689f38);
  transform: rotate(20deg) translateX(-10px);
  animation: swayLight 6s ease-in-out infinite;
  z-index: 2;
}

.leaf-dark {
  width: 110px;
  height: 110px;
  background: linear-gradient(135deg, #007a08, #004d26);
  transform: rotate(60deg) translateX(10px);
  animation: swayDark 7s ease-in-out infinite reverse;
  z-index: 1;
}

/* Carousel Content Wrapper */
.hero-content-wrapper {
  position: relative;
  z-index: 4; /* Above the background */
  margin-top: 180px; /* Push carousel down overlapping the green border */
}

.carousel-inner {
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 4px solid white;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.carousel-inner:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
}

.carousel-image, .carousel-video {
  height: 60vh;
  object-fit: cover;
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px rgba(243, 156, 18, 0.5); }
  100% { transform: scale(1); opacity: 0.8; }
}

@keyframes swayLight {
  0%, 100% { transform: rotate(20deg) translateX(-10px); }
  50% { transform: rotate(30deg) translateX(-10px); }
}

@keyframes swayDark {
  0%, 100% { transform: rotate(60deg) translateX(10px); }
  50% { transform: rotate(50deg) translateX(10px); }
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-bottom: 50px;
  }
  .hero-company-title {
    font-size: 1.6rem;
    line-height: 1.3;
    word-wrap: break-word;
    margin-bottom: 10px;
  }
  .leaf-light { width: 50px; height: 50px; }
  .leaf-dark { width: 70px; height: 70px; }
  .carousel-image, .carousel-video {
    height: 35vh;
  }
  .hero-content-wrapper {
    margin-top: 200px;
  }
  .bg-top {
    padding-top: 80px;
  }
}

button.carousel-control-prev,
button.carousel-control-next {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  height: 50px;
  width: 50px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

button.carousel-control-prev {
  left: 10px;
}

button.carousel-control-next {
  right: 10px;
}

button.carousel-control-prev:hover,
button.carousel-control-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}
