/* ===== CAROUSEL BOX ===== */
.carousel-box {
  max-width: 1600px;
  margin: 100px 40px;
  padding: 120px 80px 54px 80px;
  background: #c4c4c4;
  border-radius: 32px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    inset 2px 0 0 rgba(255, 255, 255, 0.18),
    inset -2px 0 0 rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.carousel-title {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.carousel-title.emboss {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: #1f2937;
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.6),
   -1px -1px 0 rgba(0, 0, 0, 0.35);
}

/* ===== WRAPPER ===== */
.carousel-wrapper {
  position: relative;
  width: 1240px; /* ✅ FIXED */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ===== VIEWPORT ===== */
.carousel-viewport {
  width: 1240px; /* ✅ FIXED */
  overflow: hidden;
}

/* ===== TRACK ===== */
.operateredirect {
  display: flex;
  gap: 40px;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* ===== CARD ===== */
.image-box {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.image-box img {
  display: block;
  height: 432px;
  width: 100%;
  object-fit: cover;
  backface-visibility: hidden;
}

/* ===== BUTTONS ===== */
.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(34,197,94,0.8);
  background: rgba(10,20,18,0.6);
  color: #22c55e;
  font-size: 22px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-btn:hover {
  background: rgba(34,197,94,0.15);
}

.carousel-btn.prev { left: -60px; }
.carousel-btn.next { right: -60px; }

@media (max-width: 1300px) {
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }
}

/* ===== carousel-slider ===== */
.carousel-slider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin: 50px 0px 0px 0px;
  position: relative;
  z-index: 5;
}

.carousel-dot {
  width: 22px;
  height: 6px;
  border-radius: 6px;
  background: rgba(34,197,94,0.3);
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: #22c55e;
  width: 36px;
}

/* ===== Bottom overlay panel carousel ===== */
.overlay-container {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 16px;
  min-height: 110px;
  max-height: 150px;
  overflow: hidden;
  background: rgba(10, 20, 18, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(34, 197, 94, 0.85);
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  transform: translateY(0) scale(0.98);
  opacity: 0.9;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    background-color 0.35s ease;
}

.card {
  width: 100%;
  color: #e5e7eb;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #22c55e;
}

.card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #d1d5db;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-arrow {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.7);
  font-size: 14px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover */
.image-box:hover .overlay-container {
  transform: translateY(-10px) scale(1.02);
  opacity: 1;
  background: rgba(22, 163, 74, 0.35);
}

.image-box:hover .card-arrow {
  background: rgba(34, 197, 94, 0.15);
  transform: translateX(2px) translateY(-2px);
}

/* MOBILE */
@media (max-width: 768px) {
  .operateredirect { gap: 24px; }
  .carousel-btn { display: none; }
  .image-box { width: 280px; }
  .overlay-container {
    min-height: 100px;
    max-height: 130px;
    padding: 14px;
  }
  .card-header h3 { font-size: 15px; }
  .card p {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  .card-arrow {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
}
