/* ===================================================
   Layout: Pin scroll section
   File:   template-parts/flexible/pin_scroll_section/pin_scroll_section.css
=================================================== */

.pin-scroll-section {
  position: relative;
  width: 100%;
  /* padding-top: 110px !important;
  padding-bottom: 70px !important; */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background-color: transparent;
}

.pin-section-gradient {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pin-scroll-section__container {
  position: relative;
  overflow: hidden;
  z-index: 2;
  width: 100%;
}

.pinscroll-heading-container {
  margin-top: 60px;
  margin-bottom: 50px;
}

.pinscroll-heading-container .icon-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pinscroll-heading-container .icon-heading img {
  width: 24px;
  height: 24px;
  display: block;
}

/* ===================================================
   DESKTOP LAYOUT (.pin-scroll-desktop)
=================================================== */

.pin-scroll-row {
  align-items: center;
  position: relative;
}

/* ── SVG Wheel & Number ─────────────────────────────────────────────── */

.scroll-img-no-container {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  pointer-events: none;
}

.polygon-wheel-wrapper {
  position: relative;
  width: 516px;
  height: 500px;
  margin-left: -285px;
  flex-shrink: 0;
}

.polygon-wheel-wrapper svg.polygon-wheel-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: 258px 250px;
  transform-box: fill-box;
}

.polygon-path {
  stroke: #282828;
  opacity: 0.35;
}

.active-vertex-dot {
  position: absolute;
  left: 498px;
  top: 241px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0.5px solid #282828;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

.active-vertex-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #282828;
}

.s-no-container {
  position: relative;
  width: 80px;
  height: 480px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000000 35px,
    #000000 calc(100% - 35px),
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000000 35px,
    #000000 calc(100% - 35px),
    transparent 100%
  );
}

.s-no {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  margin: auto 0;
  height: fit-content;
  display: flex;
  align-items: center;
  opacity: 0;
  white-space: nowrap;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.05em;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.s-no:first-child {
  opacity: 1;
}

/* ── Desktop Content & Image Area ───────────────────────────────────── */

.scroll-content-img-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-left: 20px;
  width: 100%;
}

.scroll-content-container {
  position: relative;
  width: 50%;
  max-width: 540px;
  height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000000 35px,
    #000000 calc(100% - 35px),
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000000 35px,
    #000000 calc(100% - 35px),
    transparent 100%
  );
}

.scroll-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  margin: auto 0;
  height: fit-content;
  width: 100%;
  max-width: 520px;
  opacity: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.scroll-content:first-child {
  opacity: 1;
  pointer-events: auto;
}

.scroll-content p {
  margin: 0 !important;
}

.scroll-content .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
position: relative;
z-index: 99;
}

.scroll-content .primary-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.scroll-img-continer {
  position: relative;
  width: 50%;
  max-width: 540px;
  height: 50vh;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  background-color: transparent;
}

.scroll-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border-radius: 20px;
  overflow: hidden;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.scroll-img:first-child {
  opacity: 1;
}

.scroll-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  pointer-events: none;
  user-select: none;
}

/* ===================================================
   MOBILE LAYOUT (.pin-scroll-mobile)
=================================================== */

.pin-scroll-mobile {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pin-mobile-wheel-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.pin-mobile-polygon-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 140px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.pin-mobile-polygon-wrapper svg.pin-mobile-polygon-svg {
  position: absolute;
  left: 50%;
  bottom: 4px;
  margin-left: -258px;
  width: 516px;
  height: 500px;
  display: block;
  transform-origin: 258px 250px;
  transform-box: fill-box;
}

.pin-mobile-vertex-dot {
  position: absolute;
  left: 50%;
  bottom: 0px;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0.5px solid #282828;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

.pin-mobile-vertex-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #282828;
}

.pin-mobile-s-no-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 40px;
  margin-top: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-mobile-s-no {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  white-space: nowrap;
  font-family: inherit;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.05em;
  pointer-events: none;
  will-change: transform, opacity;
}

.pin-mobile-s-no:first-child {
  opacity: 1;
}

.pin-mobile-content-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  min-height: 220px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-mobile-content {
  position: absolute;
  inset: 0;
  margin: auto 0;
  height: fit-content;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.pin-mobile-content:first-child {
  opacity: 1;
  pointer-events: auto;
}

.pin-mobile-content h3,
.pin-mobile-content p {
  margin: 0;
}

.pin-mobile-content .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
}

.pin-mobile-img-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 340px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  background-color: transparent;
}

.pin-mobile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border-radius: 20px;
  overflow: hidden;
  will-change: opacity;
}

.pin-mobile-img:first-child {
  opacity: 1;
}

.pin-mobile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

/* ── Responsive Spacing ─────────────────────────────────────────────── */

@media (min-width: 1200px) and (max-width: 1400px) {
  .polygon-wheel-wrapper {
    margin-left: -330px;
  }
}

@media (max-width: 991px) {
  .pin-scroll-section {
    padding: 0 !important;
  }
  .pin-mobile-polygon-wrapper svg.pin-mobile-polygon-svg {
    scale: 0.9 !important;
  }
  .pin-mobile-polygon-wrapper svg.pin-mobile-polygon-svg {
    bottom: -30px;
  }

  .pin-mobile-wheel-section,
  .pin-mobile-s-no-container,
  .pin-mobile-content-container {
    margin: 0;
  }
  .pin-mobile-content {
    margin-top: 10px;
    margin-bottom: 0;
  }
  .pin-mobile-content-container {
    height: 180px;
    min-height: 180px;
  }
  .pin-scroll-section__container .icon-heading {
    padding-bottom: 24px;
    justify-content: center;
  }
  .pin-mobile-content .primary-btn {
    height: 45px;
  }
  .pin-mobile-s-no:last-child {
      left: auto;
  }
}

@media (max-width: 575px) {
  .pin-mobile-img-container {
    height: 280px;
  }
}
