.carousel-control-prev,
.carousel-control-next {
  top: 50%;
  /* vertical center */
  transform: translateY(-50%);
  width: 40px;
  /* button width */
  height: 40px;
  /* button height */
}

.carousel-control-prev {
  left: 20px;
}

/* left edge  10px */
.carousel-control-next {
  right: 20px;
}

/* right edge  10px */

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 100%;
  height: 100%;
  background-size: 100%, 100%;
}



/* ===== HERO SECTION ===== */
.hero-section {
  height: 70vh;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  height: 70vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-bg .container {
  position: relative;
  z-index: 2;
}

/* ===== TEXT ===== */
.hero-subtitle {
  font-size: 40px;
  font-weight: 700;
  word-wrap: break-word;
}

.hero-title {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  word-wrap: break-word;
}

.hero-overlay-img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;

}

/* ===== INITIAL ANIMATION STATE ===== */
.animate-subtitle,
.animate-title,
.animate-btn,
.animate-overlay {
  opacity: 0;
}

/* ===== ACTIVE ANIMATION ===== */
.carousel-item.active .animate-subtitle {
  animation: fromTop .8s ease forwards;
}

.carousel-item.active .animate-title {
  animation: fromLeft 1s ease forwards;
  animation-delay: .2s;
}

.carousel-item.active .animate-btn {
  animation: fadeUp .8s ease forwards;
  animation-delay: .5s;
}

.carousel-item.active .animate-overlay {
  animation: fromBottom 1s ease forwards;
  animation-delay: .4s;
}

/* ===== KEYFRAMES ===== */
@keyframes fromTop {
  from {
    transform: translateY(-40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fromLeft {
  from {
    transform: translateX(-60px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fromBottom {
  from {
    transform: translateY(80px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== MOBILE / TABLET ===== */
@media(max-width:992px) {

  .hero-section,
  .hero-bg {
    height: 45vh;
  }

  .hero-subtitle {
    font-size: 33px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-overlay-img {
    max-height: 30vh;
    max-width: 200px;
  }
}

@media(max-width:576px) {

  .hero-section,
  .hero-bg {
    height: 35vh;
  }

  .btn-animated {
    max-width: 140px;
    padding: 0.4rem 1rem;
    /* smaller padding */
    font-size: 0.85rem;
    /* smaller text */
    border-radius: 4px;
    /* slightly smaller corners */
  }



  /* ===================================================================== */
  /* Buttons overlay na korar jonno */
  .carousel-control-prev,
  .carousel-control-next {
    position: absolute;
    /* relative → absolute */
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    z-index: 5;
  }

  .carousel-control-prev {
    left: 5px;
  }

  .carousel-control-next {
    right: 5px;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
  }

  /* ===================================================================== */

  /* right edge  10px */

  .hero-bg .d-flex {
    overflow-x: auto;
    padding: 0 20px;
  }



  .hero-subtitle {
    font-size: 20px;
  }

  .hero-title {
    font-size: 16px;
  }

  .hero-overlay-img {
    max-height: 30vh;
    max-width: 200px;
  }
}




.btn-animated {
  position: relative;
  display: inline-block;
  padding: 0.6rem 1.5rem;
  color: #fff;
  /* text color default */
  background-color: #198754;
  /* yellow default */
  border: none;
  border-radius: 6px;
  overflow: hidden;
  z-index: 1;
  transition: color 0.4s ease;
  background-image: linear-gradient(to right, #000 50%, #198754 50%);
  background-size: 200% 100%;
  background-position: right bottom;
  transition: all 0.5s ease;


  white-space: nowrap;
  text-align: center;
  text-overflow: ellipsis;
   white-space: nowrap;    
  max-width: 100%;      
}

.btn-animated:hover {
  color: #fff;
  /* text color white on hover */
  background-position: left bottom;
  /* animate left → right */
}