/* --------------------------------------------------------------------------
   5. HERO SECTION (Feathered Edge, Fixed Stacking & Carousel Support)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--primary-blue, #0b132b);
  overflow: visible !important;
  padding: 5rem 0 8rem;
  z-index: 10;
}

/* Background Image Container with Feathered Masking */
.hero-bg-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  height: 100%;
  z-index: 2; /* Increased above slanted bg */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 15%, black 45%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 15%, black 45%);
}

/* Hero Carousel Setup */
.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* Dark Vignette Overlay */
.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to bottom, rgba(11, 19, 43, 0.4) 0%, transparent 20%, transparent 80%, rgba(11, 19, 43, 0.6) 100%),
    linear-gradient(to right, rgba(11, 19, 43, 0.7) 0%, rgba(0, 0, 0, 0.2) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Blended Orange Brand Shape */
.hero-slanted-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 48%; /* Adjusted width to avoid text overlap */
  height: 100%;
  background: linear-gradient(135deg, #f26522 0%, #e05310 100%);
  transform: skewX(-10deg);
  transform-origin: top left;
  z-index: 1; /* Pushed below bg-wrapper & container */
  pointer-events: none;
  box-shadow: 25px 0 50px rgba(242, 101, 34, 0.35);
}

.hero-slanted-bg::after {
  content: "";
  position: absolute;
  top: 0;
  right: -50px;
  width: 100px;
  height: 100%;
  background: linear-gradient(to right, rgba(242, 101, 34, 0.85) 0%, transparent 100%);
  pointer-events: none;
}

/* Container & Text Content */
.hero-container {
  position: relative;
  z-index: 10; /* Highest internal layer so text always renders above background */
  width: 100%;
}

.hero-content {
  max-width: 550px;
  color: #FFFFFF;
}

.hero-badge {
  background-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-content h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.2rem, 4.8vw, 2.85rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-content p {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2.2rem;
  line-height: 1.65;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Action Buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-hero-white {
  background-color: #FFFFFF;
  color: #f26522;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  transition: all 0.25s ease;
}

.btn-hero-white:hover {
  transform: translateY(-2px);
  background-color: #F8F9FA;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn-hero-outline {
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #FFFFFF;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.btn-hero-outline:hover {
  background-color: #FFFFFF;
  color: #f26522;
  border-color: #FFFFFF;
}

/* Overlapping Metric Cards Container */
.hero-intersection-container {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  z-index: 100 !important;
  width: 100%;
  max-width: 1140px;
  padding: 0 15px;
}

.intersection-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.badge-card {
  background: #FFFFFF;
  color: #212529;
  border-radius: var(--radius-md, 8px);
  padding: 1.4rem 1.6rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-top: 4px solid #f26522;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.badge-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
}

.badge-info h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  color: #f26522;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.badge-info p {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0b132b;
  line-height: 1.2;
}

/* Subsequent Section Clearance */
.hero-section + section,
#about {
  position: relative;
  z-index: 1 !important;
  padding-top: 100px !important;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1 {
  animation: fadeInUp 0.8s ease-out forwards;
}

.hero-content p,
.hero-badge {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-actions {
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

/* Responsive Overrides */
@media (max-width: 1200px) {
  .hero-slanted-bg {
    width: 55%;
  }
}

@media (max-width: 991px) {
  .hero-section {
    padding: 4rem 0 6rem;
  }

  .hero-slanted-bg {
    width: 100%;
    transform: skewX(0);
    background: linear-gradient(180deg, rgba(242, 101, 34, 0.9) 0%, rgba(216, 82, 18, 0.85) 100%);
    z-index: 1;
  }

  .hero-slanted-bg::after {
    display: none;
  }

  .hero-bg-wrapper {
    width: 100%;
    opacity: 0.35;
    -webkit-mask-image: none;
    mask-image: none;
    z-index: 0;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero-intersection-container {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 3rem;
  }

  .intersection-badges-grid {
    grid-template-columns: 1fr;
  }

  .hero-section + section,
  #about {
    padding-top: 3rem !important;
  }
}