/* =============================================
   About Us — Section 3: Operational Excellence Carousel
============================================= */

.about-section-three {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  z-index: 20;
  display: flex;
  align-items: center;
  background-color: #0b141d;
}

.about-section-three .about-section-content {
  max-width: 100%;
  padding: 6rem 0;
}

/* ── Section 3: Carousel Header ── */
.carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 5vw;
  max-width: 1400px;
  margin: 0 auto 4rem auto;
  gap: 4rem;
}

.carousel-header-left {
  flex: 1;
}

.carousel-header-right {
  flex: 1;
  max-width: 500px;
}

.carousel-header-right p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  font-size: 0.95rem;
}

.carousel-btn {
  margin-top: 1.5rem;
  border-radius: 50px;
}

@media (max-width: 900px) {
  .carousel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
}

/* ── Section 3: Carousel Container ── */
.operational-carousel {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 2rem 0;
}

/* ── Carousel Items ── */
.carousel-item {
  position: absolute;
  width: 380px;
  height: 480px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, z-index 0s;
  opacity: 0;
  z-index: 0;
  transform: translateX(0) scale(0.6);
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  filter: grayscale(100%) brightness(0.5);
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  pointer-events: none;
}

.carousel-item h3 {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.6s ease;
}

/* Active State (Center) */
.carousel-item.active {
  opacity: 1;
  z-index: 3;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  cursor: default;
}

.carousel-item.active img {
  filter: grayscale(0%) brightness(0.9);
}

.carousel-item.active h3 {
  color: white;
  font-weight: 700;
}

/* Adjacent States (Left and Right) */
.carousel-item.prev-1 {
  opacity: 1;
  z-index: 2;
  transform: translateX(-60%) scale(0.85);
  pointer-events: auto;
}

.carousel-item.next-1 {
  opacity: 1;
  z-index: 2;
  transform: translateX(60%) scale(0.85);
  pointer-events: auto;
}

/* Far States (Outer edges) */
.carousel-item.prev-2 {
  opacity: 1;
  z-index: 1;
  transform: translateX(-105%) scale(0.7);
  pointer-events: auto;
}

.carousel-item.next-2 {
  opacity: 1;
  z-index: 1;
  transform: translateX(105%) scale(0.7);
  pointer-events: auto;
}

/* ── Carousel Nav Buttons ── */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  z-index: 10;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.prev-btn {
  left: 50%;
  margin-left: -170px;
}

.next-btn {
  right: 50%;
  margin-right: -170px;
}

/* ── Multi-Device Responsiveness ── */
@media (max-width: 900px) {
  .operational-carousel {
    height: 440px;
  }
  .carousel-item {
    width: 300px;
    height: 400px;
  }
  .carousel-item.prev-1 { transform: translateX(-55%) scale(0.85); }
  .carousel-item.next-1 { transform: translateX(55%) scale(0.85); }
  .carousel-item.prev-2 { transform: translateX(-95%) scale(0.7); }
  .carousel-item.next-2 { transform: translateX(95%) scale(0.7); }
  
  .prev-btn { margin-left: -150px; }
  .next-btn { margin-right: -150px; }
}

@media (max-width: 600px) {
  .operational-carousel {
    height: 380px;
  }
  .carousel-item {
    width: 240px;
    height: 340px;
  }
  .carousel-item h3 {
    font-size: 1.4rem;
    bottom: 1.5rem;
    left: 1.5rem;
  }
  .carousel-item.prev-1 { transform: translateX(-50%) scale(0.85); }
  .carousel-item.next-1 { transform: translateX(50%) scale(0.85); }
  .carousel-item.prev-2 { transform: translateX(-85%) scale(0.7); }
  .carousel-item.next-2 { transform: translateX(85%) scale(0.7); }
  
  /* Make buttons more accessible on mobile touch */
  .nav-btn {
    width: 44px;
    height: 44px;
  }
  .prev-btn { margin-left: -130px; }
  .next-btn { margin-right: -130px; }
}
