/* =========================================
   GLOBAL RESET & BASE
========================================= */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

/* =========================================
   HERO & BANNER BASE
========================================= */
.hero,
.banner_section,
.carousel-item {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

@supports not (height: 100svh) {
  .hero,
  .banner_section,
  .carousel-item {
    height: 100vh;
  }
}

/* =========================================
   MEDIA LAYER (IMAGE / VIDEO) - OPTIMIZED
========================================= */
.hero__media,
.banner_section img,
.carousel-item img,
/* The video itself needs to be managed if wrapped in the ratio helper */
.carousel-item video { 
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* Apply object-fit: cover for standard images and videos to fill the 100svh container */
/* This will cause cropping but ensures no black bars on the 100svh banner */
.hero__media,
.banner_section img,
.carousel-item img,
.carousel-item video {
  object-fit: cover;
}

.carousel-item video {
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
}

/* *** Crucial for Video Aspect Ratio (If using Bootstrap Ratio Helper) ***
   If you implement the Bootstrap ratio wrapper (e.g., <div class="ratio ratio-16x9">) 
   and want the video to respect its aspect ratio (no cropping), you must override the 
   absolute positioning and object-fit for the video slide's content.

   If your goal is still a full-screen, 100svh banner, stick with the code above. 
   If you choose the ratio approach for videos, you need to change the height of the .carousel-item.
*/


/* =========================================
   OVERLAY LAYER
========================================= */
.hero__overlay,
.banner_section::after,
.carousel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.35) 45%,
    rgba(0,0,0,0.15) 70%,
    rgba(0,0,0,0) 100%
  );
  z-index: 5;
}

/* =========================================
   TEXT CONTENT
========================================= */
.hero__content,
.banner_text {
  position: absolute;
  top: 50%;
  left: 7%;
  transform: translateY(-50%);
  max-width: min(550px, 90vw);
  z-index: 10;
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
}

.banner_text h1,
.hero__content h1 {
  /* Using clamp() for fluid, responsive typography */
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.2;
}

.banner_text p,
.hero__content p {
  font-size: clamp(15px, 1.5vw, 18px);
  margin: 20px 0 30px;
  opacity: 0.9;
}

/* =========================================
   CTA BUTTON
========================================= */
.cta__more {
  display: inline-block;
  padding: 14px 40px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #3b8aff, #0055d4);
  box-shadow: 0 10px 0 #003c9e, 0 18px 25px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  position: relative;
}

.cta__more::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 45%;
  background: rgba(255,255,255,0.25);
  border-radius: 12px;
}

.cta__more:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 0 #003c9e, 0 20px 30px rgba(0,0,0,0.6);
}

.cta__more:active {
  transform: translateY(8px);
  box-shadow: 0 3px 0 #003c9e, 0 8px 15px rgba(0,0,0,0.4);
}

.cta__more:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

/* =========================================
   HERO STATE MANAGEMENT & ANIMATION
========================================= */
.carousel-item {
  opacity: 0;
  transition: opacity 0.8s ease;
  will-change: opacity;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-item .banner_text > *,
.carousel-item .hero__content > * {
  opacity: 0;
  transform: translateY(24px);
}

.carousel-item.active .banner_text h1,
.carousel-item.active .hero__content h1 {
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.carousel-item.active .banner_text p,
.carousel-item.active .hero__content p {
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

.carousel-item.active .banner_text a,
.carousel-item.active .hero__content a {
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   CAROUSEL CONTROLS
========================================= */
.carousel-control-prev,
.carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  z-index: 20;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 50px;
  height: 50px;
  background-size: 65%;
  filter: invert(1);
}

/* =========================================
   INDICATORS
========================================= */
.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
}

.carousel-indicators .active {
  width: 28px;
  border-radius: 10px;
  background: #fff;
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media (max-width: 992px) { /* Adjusting breakpoint for better tablet handling */
    /* Center banner text a bit better on smaller screens */
    .hero__content,
    .banner_text {
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      max-width: 90%;
    }
}

@media (max-width: 768px) {
  /* Font sizes are now fluid due to clamp(), but we can adjust margins/padding */

  .banner_text p,
  .hero__content p {
    margin: 15px 0 20px; /* Reduced margin on mobile */
  }

  .cta__more {
    padding: 11px 28px;
  }

  .carousel-item .banner_text > *,
  .carousel-item .hero__content > * {
    transform: translateY(14px);
  }

  .carousel-item.active h1 {
    animation-duration: 0.6s;
    animation-delay: 0.15s;
  }

  .carousel-item.active p {
    animation-duration: 0.6s;
    animation-delay: 0.3s;
  }

  .carousel-item.active a {
    animation-duration: 0.6s;
    animation-delay: 0.45s;
  }

  /* Shorter banners on mobile */
  .banner_section {
    height: 70svh;
  }
}

/* =========================================
   EXTRA SMALL DEVICES
========================================= */
@media (max-width: 480px) {
  /* Hiding description on the smallest screens to declutter */
  .banner_text p,
  .hero__content p {
    display: none;
  }

  .carousel-item .banner_text > *,
  .carousel-item .hero__content > * {
    transform: translateY(10px);
  }

  .cta__more {
    /* Ensure button is still readable and clickable */
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* =========================================
   REDUCED MOTION (ACCESSIBILITY)
========================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}