.gallery-perspective {
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.gallery-sticky-wrapper {
  width: 100%;
  height: calc(100svh - 70px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  background: transparent;
  isolation: isolate;
  z-index: 10;
  /* border: 1px solid red; */
}

.course_heading_main_title {
  width: 100%;
  height: auto;
  /* background-color: #fff; */
  z-index: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.course_heading_main_title_text {
  font-family: var(--font-Glida-Display);
  text-align: center;
  font-size: 80px;
  font-weight: 700;
  background: linear-gradient(
    270deg,
    #be9644 0.01%,
    #aa803c 15.01%,
    #f3dc87 43.01%,
    #fbefac 59.01%,
    #f3dc87 73.01%,
    #aa803c 93.01%,
    #c49d47 100.01%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Firefox support */
  color: transparent;
}
.course_heading_main_sub_title {
  width: 660px;
  height: auto;
  /* border: 1px solid red; */
  z-index: 1;
  position: absolute;
  bottom: 20px;
  left: 10%;
}
.course_heading_main_sub_title_text {
  font-size: 18px;
  color: rgba(255, 255, 255, 1);
  letter-spacing: 1.5px;
  margin-bottom: 0px;
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  z-index: 5;
}

.gallery-item {
  position: absolute;
  width: 450px;
  height: auto;
  will-change: transform, opacity, filter;
  z-index: 1;
  transform-origin: center center;
  cursor: pointer;
  pointer-events: auto !important;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  object-fit: cover;
  transition: border 0.3s ease;
  cursor: pointer;
}

.item-1 {
  top: 8%;
  left: -22%;
}

.item-2 {
  top: 12%;
  left: 105%;
}

.item-3 {
  top: -37%;
  left: 17%;
}

.item-4 {
  top: 20%;
  left: 67%;
}

.item-5 {
  top: 0%;
  left: -19%;
}

.item-6 {
  top: -12%;
  left: 106%;
}

.item-7 {
  top: 83%;
  left: 100%;
}

.item-8 {
  top: 85%;
  left: 35%;
}

.item-9 {
  top: 10%;
  left: -20%;
}

.item-10 {
  top: -26%;
  left: 103%;
}
/* 
.item-11 {
  top: -60%;
  left: 40%;
} */
.item-11 {
  top: -112%;
  left: 56%;
}

.item-12 {
  top: 81%;
  left: 115%;
}

.item-13 {
  top: 1%;
  left: -24%;
}

.item-14 {
  top: 116%;
  left: 43%;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.img-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.img-lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.img-lightbox-inner {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.88);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.img-lightbox-overlay.active .img-lightbox-inner {
  transform: scale(1);
}

.img-lightbox-inner img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  display: block;
}

.img-lightbox-close {
  position: fixed;
  top: 20px;
  right: 26px;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  outline: none;
}

.img-lightbox-close:hover {
  background: rgba(212, 175, 55, 0.25);
  transform: scale(1.12) rotate(90deg);
}

/* Video Archive Section Styles */
.video-archive-section {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  opacity: 0;
  pointer-events: none;
  background-color: #000;
  color: #fff;
  padding: 20px 40px;
  box-sizing: border-box;
}

.video-archive-left,
.video-archive-center,
.video-archive-right {
  display: flex;
  flex-direction: column;
}

.video-archive-left {
  flex: 1;
  border-right: 1px solid rgba(255, 255, 255, 1);
  padding-right: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-archive-center {
  flex: 2;
  padding: 0 40px;
  align-items: center;
  justify-content: center;
}

.video-archive-right {
  flex: 1.3;
  border-left: 1px solid rgba(255, 255, 255, 1);
  padding-left: 40px;
  justify-content: flex-end;
  position: relative;
}

.video-archive-title-container {
  margin-left: 70px;
}
.video-archive-title {
  font-family: var(--font-Glida-Display, sans-serif);
  font-size: 32px;
  color: #c49d47;
  margin: 0;
  font-weight: normal;
}
.video-archive-title-sub {
  font-family: var(--font-Glida-Display, sans-serif);
  font-size: 32px;
  color: #c49d47;
  margin: 10px 0 40px 0;
  font-weight: normal;
}

.video-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-thumb {
  width: 60px;
  height: 106px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.4;
  border: 2px solid transparent;
  cursor: pointer;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-container-main {
  width: 100%;
  max-width: 423px;
  height: 768px;
  overflow: hidden;
  position: relative;
}

.video-scroll-track {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 5px; /* 1px gap as requested */
  transform: translateY(0);
}

.archive-video {
  width: 100%;
  height: 768px; /* Video fixed at 768px */
  object-fit: contain;
  flex-shrink: 0;
}

.video-archive-desc-container {
  position: relative;
  height: 100px;
  width: 100%;
  margin-bottom: 10px;
}

.archive-desc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 20px;
  color: rgba(255, 255, 255, 1);
  line-height: 1.6;
  opacity: 0;
  margin: 0;
}
.archive-desc.archive-desc-0 {
  opacity: 1;
}

@media (max-width: 1550px) {
  .gallery-item {
    width: 350px;
  }

  .course_heading_main_title_text {
    font-size: 50px;
  }
  .course_heading_main_sub_title_text {
    font-size: 16px;
  }
  .course_heading_main_sub_title {
    width: 500px;
    bottom: 20px;
    left: 10%;
  }
  .video-archive-title-container {
    margin-left: 0px;
  }
  .video-thumbnails {
    gap: 4px;
  }
  .video-thumb {
    width: 50px;
    height: 82px;
  }
  .video-archive-center {
    flex: 1.5;
  }
  .video-archive-right {
    flex: 1;
    padding-left: 30px;
  }
  .archive-desc {
    font-size: 17px;
  }
  .video-archive-desc-container {
    margin-bottom: 20px;
  }
  .video-container-main {
    max-width: 329px;
    height: 583px;
  }
  .archive-video {
    height: 583px;
  }
}

@media (max-width: 1285px) and (max-height: 600px) {
  .gallery-item {
    width: 300px;
  }
  .course_heading_main_title_text {
    font-size: 40px;
  }
  .course_heading_main_sub_title_text {
    font-size: 14px;
  }
  .course_heading_main_sub_title {
    width: 650px;
    bottom: 10px;
    left: 7%;
  }
  .video-archive-section {
    padding: 20px 82px;
  }
  .video-archive-title {
    max-width: 220px;
    font-size: 21px;
  }
  .video-thumb {
    width: 38px;
    height: 61px;
  }
  .video-archive-desc-container {
    margin-bottom: -10px;
  }
  .archive-desc {
    font-size: 14px;
  }
  .video-container-main {
    max-width: 263px;
    height: 450px;
  }
  .archive-video {
    height: 450px;
  }
}

@media (max-width: 1285px) {
  .gallery-item {
    width: 300px;
  }
}

@media (max-width: 1200px) {
  .gallery-item {
    width: 270px;
  }
  .course_heading_main_sub_title_text {
    font-size: 14px;
  }
  .course_heading_main_title_text {
    font-size: 42px;
  }
  .video-archive-title {
    font-size: 26px;
  }
  .archive-desc {
    font-size: 14px;
  }
  .video-archive-desc-container {
    margin-bottom: 6px;
  }
  .video-thumb {
    width: 45px;
    height: 75px;
  }
}

@media (max-width: 992px) {
  .gallery-item {
    width: 310px !important;
  }
  .item-1 {
    top: 11%;
    left: -44%;
  }

  .item-2 {
    top: 5%;
    left: 114%;
  }

  .item-3 {
    top: -37%;
    left: 31%;
  }

  .item-4 {
    top: 63%;
    left: 30%;
  }

  .item-5 {
    top: 5%;
    left: -79%;
  }

  .item-6 {
    top: 10%;
    left: 106%;
  }

  .item-7 {
    top: 81%;
    left: 123%;
  }

  .item-8 {
    top: 82%;
    left: -81%;
  }

  .item-9 {
    top: -40%;
    left: -91%;
  }

  .item-10 {
    top: -45%;
    left: 113%;
  }

  .item-11 {
    top: -44%;
    left: 36%;
  }

  .item-12 {
    top: 92%;
    left: 83%;
  }

  .item-13 {
    top: -50%;
    left: -30%;
  }

  .item-14 {
    top: 99%;
    left: -21%;
  }
  .course_heading_main_sub_title {
    width: auto;
    left: 5%;
    right: 5%;
    bottom: 20px;
  }
  .course_heading_main_sub_title_text {
    font-size: 17px;
  }

  .video-archive-section {
    flex-direction: column;
    padding: 20px 30px;
    justify-content: space-between;
  }

  .video-archive-left {
    border-right: none;
    padding-right: 0;
    flex: unset;
    margin-bottom: 0px;
    align-items: flex-start;
  }

  .video-archive-title-container {
    margin-left: 0;
    width: 100%;
  }
  .video-archive-title {
    font-size: 33px;
    text-align: center;
  }
  .video-thumbnails {
    display: none;
  }

  .video-archive-center {
    flex: unset;
    padding: 0;
    width: 100%;
  }

  .video-archive-right {
    border-left: none;
    padding-left: 0;
    flex: unset;
    align-items: flex-start;
  }

  .video-container-main {
    max-width: 432px;
    height: 768px;
  }
  .archive-video {
    height: 768px;
  }

  .video-archive-desc-container {
    height: auto;
    margin-bottom: 60px;
  }
  .archive-desc {
    font-size: 18px;
    opacity: 0; /* Keep JS logic working */
  }
  .archive-desc.archive-desc-0 {
    opacity: 1;
  }
}

@media (max-width: 770px) {
  .video-container-main {
    max-width: 400px;
    height: 660px;
  }
  .archive-video {
    height: 660px;
  }
}

@media (max-width: 576px) {
  .gallery-item {
    width: 200px !important;
  }

  .item-1 {
    top: 13%;
    left: -40%;
  }

  .item-2 {
    top: 5%;
    left: 92%;
  }

  .item-3 {
    top: -37%;
    left: 17%;
    z-index: 7;
  }

  .item-4 {
    top: 70%;
    left: 22%;
  }

  .item-5 {
    top: -6%;
    left: -65%;
  }

  .item-6 {
    top: -12%;
    left: 106%;
  }

  .item-7 {
    top: 76%;
    left: 96%;
  }

  .item-8 {
    top: 67%;
    left: -53%;
  }

  .item-9 {
    top: -41%;
    left: -29%;
  }

  .item-10 {
    top: -45%;
    left: 73%;
  }

  .item-11 {
    top: -45%;
    left: 22%;
  }

  .item-12 {
    top: 69%;
    left: 83%;
  }

  .item-13 {
    top: -26%;
    left: -66%;
  }

  .item-14 {
    top: 86%;
    left: -37%;
  }

  .course_heading_main_title_text {
    font-size: 32px;
  }
  .course_heading_main_sub_title_text {
    font-size: 14px;
  }
  .course_heading_main_sub_title {
    left: 12px;
    right: 12px;
  }
  .video-archive-section {
    padding: 15px 12px;
  }
  .video-archive-title {
    font-size: 20px;
  }
  .img-lightbox-close {
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
  .video-container-main {
    max-width: 332px;
    height: 460px;
  }
  .archive-video {
    height: 460px;
  }
  .archive-desc {
    font-size: 14px;
    opacity: 0;
  }
  .video-archive-desc-container {
    margin-bottom: 80px;
  }
}

/*
@media (max-width: 768px) {
  .video-archive-section {
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
  }
  .video-archive-left, .video-archive-right {
    border: none;
    padding: 0;
    margin-bottom: 20px;
  }
  .video-thumbnails {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .video-container-main {
    height: 50vh;
  }
} */
