/* SSEED Industry — 3D carousel section (scoped, does not affect body scroll) */

.it-3d-banner {
  --3d-accent: var(--it-theme-3, #00d4ff);
  --3d-accent-soft: var(--it-theme-2, #29b6f6);
  --3d-gold: var(--it-theme-3, #00d4ff);
  --3d-surface: var(--it-grey-1, #111827);
  --3d-overlay: rgba(0, 0, 0, 0.55);
  --3d-card-width: 280px;
  --3d-card-height: 400px;
  --3d-carousel-radius: 240px;
  --3d-bg-blur: 6px;
  --3d-side-card-blur: 5px;
  position: relative;
  min-height: 720px;
  height: 720px;
  overflow: hidden;
  background-color: var(--it-common-black, #0b0f19);
}

.it-3d-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.it-3d-banner-bg__slide {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  filter: blur(var(--3d-bg-blur, 6px));
  transition: opacity 1s ease, transform 8s ease, filter 1s ease;
  will-change: opacity, transform, filter;
}

.it-3d-banner-bg__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .it-3d-banner-bg__slide {
    transition: opacity 0.35s ease;
    transform: none;
    filter: blur(4px);
  }

  .it-3d-banner-bg__slide.is-active {
    transform: none;
  }

  .it-3d-banner .card-img {
    transition: none;
  }

  .it-3d-banner .memory-card:not(.is-active):not(.is-back) .card-img {
    filter: blur(3px);
  }
}

.it-3d-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.78), rgba(0, 212, 255, 0.18));
  transition: background 1.2s ease;
}

.it-3d-banner__container {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1320px;
  padding-left: 24px;
  padding-right: 24px;
}

.it-3d-banner__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 720px;
}

.it-3d-banner__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 24px 28px 24px 0;
  max-width: 100%;
}

.it-3d-banner__content .it-subtitle {
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.it-3d-banner__title {
  font-family: var(--it-ff-heading, "Inter", "Roboto", "Open Sans", sans-serif);
  font-size: clamp(2.35rem, 4.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  color: #fff;
  margin-bottom: 28px;
  text-transform: capitalize;
}

.it-3d-banner__desc {
  font-family: var(--it-ff-body, "Inter", "Roboto", "Open Sans", sans-serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
  max-width: 100%;
}

.it-3d-banner__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.it-3d-banner__nav-mobile {
  display: none;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  flex: 0 0 100%;
  order: 3;
}

.it-3d-banner .memory-card.is-active .card-front {
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.45);
}

.it-3d-banner__carousel-col {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  min-height: 0;
}

.it-3d-banner__stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.it-3d-banner .carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  max-height: none;
  perspective: 1400px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  overflow: visible;
}

.it-3d-banner .carousel {
  position: relative;
  width: var(--3d-carousel-radius);
  height: var(--3d-carousel-radius);
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
  transform-origin: center center;
}

.it-3d-banner .memory-card {
  position: absolute;
  width: var(--3d-card-width);
  height: var(--3d-card-height);
  left: 50%;
  top: 50%;
  margin-left: calc(var(--3d-card-width) / -2);
  margin-top: calc(var(--3d-card-height) / -2);
  transform-style: preserve-3d;
  transition:
    transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.45s ease,
    visibility 0.45s ease;
  cursor: pointer;
}

.it-3d-banner .memory-card.is-back {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.it-3d-banner .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.it-3d-banner .memory-card:hover .card-inner {
  transform: translateZ(12px);
}

.it-3d-banner .memory-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.it-3d-banner .card-front,
.it-3d-banner .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.it-3d-banner .card-front {
  background: var(--it-common-black, #0b0f19);
  transform-style: preserve-3d;
}

.it-3d-banner .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  transition: filter 0.55s ease;
}

.it-3d-banner .memory-card:not(.is-active):not(.is-back) .card-img {
  filter: blur(var(--3d-side-card-blur, 5px));
}

.it-3d-banner .memory-card.is-active .card-img {
  filter: blur(0);
}

.it-3d-banner .card-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 22px 20px 20px;
  z-index: 3;
  background: linear-gradient(
    to top,
    rgba(11, 15, 25, 0.95) 0%,
    rgba(17, 24, 39, 0.55) 55%,
    transparent 100%
  );
}

.it-3d-banner .memory-date {
  font-family: var(--it-ff-heading, "Inter", "Roboto", "Open Sans", sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--3d-gold);
  margin-bottom: 8px;
  display: block;
}

.it-3d-banner .card-overlay h3,
.it-3d-banner .card-back .card-content h3 {
  font-family: var(--it-ff-heading, "Inter", "Roboto", "Open Sans", sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 8px;
}

.it-3d-banner .card-overlay p {
  font-family: var(--it-ff-body, "Inter", "Roboto", "Open Sans", sans-serif);
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.it-3d-banner .card-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    65deg,
    transparent 62%,
    rgba(255, 255, 255, 0.06) 68%,
    rgba(220, 220, 220, 0.12) 70%,
    rgba(255, 255, 255, 0.06) 72%,
    transparent 78%
  );
  background-size: 200% 200%;
  animation: sseed-card-shine 4s linear infinite;
  z-index: 2;
  pointer-events: none;
  border-radius: 10px;
}

@keyframes sseed-card-shine {
  0% {
    background-position: 0 0;
  }
  25% {
    background-position: 100% 0;
  }
  50% {
    background-position: 100% 100%;
  }
  75% {
    background-position: 0 100%;
  }
  100% {
    background-position: 0 0;
  }
}

.it-3d-banner .card-back {
  background: linear-gradient(
    155deg,
    var(--it-common-black, #0b0f19) 0%,
    var(--it-grey-1, #111827) 52%,
    rgba(41, 182, 246, 0.22) 100%
  );
  border: 1px solid rgba(0, 212, 255, 0.4);
  box-shadow: inset 0 0 0 1px rgba(41, 182, 246, 0.08);
  transform: rotateY(180deg);
}

.it-3d-banner .card-back .card-content {
  padding: 18px 16px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.it-3d-banner .card-back .card-content .memory-date {
  margin-bottom: 6px;
}

.it-3d-banner .card-back .card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.2;
}

.it-3d-banner .card-back .card-content p {
  font-family: var(--it-ff-body, "Inter", "Roboto", "Open Sans", sans-serif);
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.it-3d-banner .card-back-btn {
  margin-top: 12px;
  align-self: center;
  flex-shrink: 0;
  pointer-events: auto;
  text-transform: none;
  letter-spacing: 0.02em;
}

.it-3d-banner .card-back-btn.it-btn-green.yellow-bg {
  color: var(--it-common-black, #0b0f19);
  background: var(--3d-accent);
  box-shadow: 0 4px 18px rgba(0, 212, 255, 0.25);
}

.it-3d-banner .card-back-btn.it-btn-green.yellow-bg:hover {
  color: var(--it-common-white);
  background: var(--3d-accent-soft);
}

.it-3d-banner .control-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--3d-accent);
  background: rgba(11, 15, 25, 0.45);
  color: var(--3d-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(0, 212, 255, 0);
}

.it-3d-banner .control-btn:hover,
.it-3d-banner .control-btn:focus-visible {
  background: var(--3d-accent);
  border-color: var(--3d-accent);
  color: var(--it-common-black, #0b0f19);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
  transform: scale(1.05);
}

.it-3d-banner.is-dragging .carousel-container {
  touch-action: none;
  cursor: grabbing;
  user-select: none;
}

.it-3d-banner.is-dragging .carousel {
  transition: none;
}

/* Desktop: image-only fronts, dynamic left panel */
@media (min-width: 992px) {
  .it-3d-banner__grid {
    flex-wrap: nowrap;
  }

  .it-3d-banner__content--desktop {
    display: flex;
    width: 48%;
    flex: 0 0 48%;
    max-width: 48%;
    height: 100%;
    min-height: 680px;
  }

  .it-3d-banner__carousel-col {
    width: 52%;
    flex: 0 0 52%;
    max-width: 52%;
    height: 100%;
    min-height: 680px;
  }

  .it-3d-banner {
    --3d-card-width: 300px;
    --3d-card-height: 420px;
    --3d-carousel-radius: 260px;
  }

  .it-3d-banner .card-front .card-overlay {
    display: none !important;
  }

  .it-3d-banner__nav-mobile {
    display: none !important;
  }

  .it-3d-banner__nav--desktop {
    display: flex;
  }
}

/* Tablet & mobile (<992px): hide left panel, show overlay on cards */
@media (max-width: 991px) {
  .it-3d-banner {
    min-height: auto;
    height: auto;
    padding: 56px 0 48px;
  }

  .it-3d-banner__grid {
    min-height: 0;
    flex-direction: column;
    justify-content: center;
  }

  .it-3d-banner__content--desktop {
    display: none !important;
  }

  .it-3d-banner__carousel-col {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    order: 1;
  }

  .it-3d-banner__nav-mobile {
    display: flex;
    order: 2;
  }

  .it-3d-banner .card-front .card-overlay {
    display: block;
  }

  .it-3d-banner {
    --3d-card-width: 220px;
    --3d-card-height: 320px;
    --3d-carousel-radius: 260px;
  }

  .it-3d-banner__carousel-col {
    min-height: 460px;
  }

  .it-3d-banner__stage,
  .it-3d-banner .carousel-container {
    min-height: 460px;
    max-height: 480px;
  }
}

@media (max-width: 767px) {
  .it-3d-banner {
    --3d-card-width: 220px;
    --3d-card-height: 300px;
    --3d-carousel-radius: 240px;
    padding: 48px 0 40px;
  }

  .it-3d-banner__carousel-col {
    min-height: 400px;
  }

  .it-3d-banner__stage,
  .it-3d-banner .carousel-container {
    min-height: 400px;
    max-height: 420px;
  }

  .it-3d-banner .card-overlay h3,
  .it-3d-banner .card-back .card-content h3 {
    font-size: 1.05rem;
  }

  .it-3d-banner .card-back .card-content {
    padding: 14px 14px 12px;
  }

  .it-3d-banner .card-back .card-content p {
    font-size: 0.8rem;
    -webkit-line-clamp: 4;
  }

  .it-3d-banner .card-back-btn {
    margin-top: 10px;
  }
}
