@charset "utf-8";

/* scrolling2 - 포트폴리오 스크롤 트리거 */

.scrolling2 {
  width: 100%;
  float: left;
  position: relative;
  padding-top: 6rem;
  padding-bottom: 4rem;
  overflow: visible !important;
}

/* admin_div 오버라이드: sticky 깨지지 않도록 */
.scrolling2.admin_div,
.scrolling2.admin_div:hover {
  overflow: visible !important;
  position: relative !important;
  border: none !important;
  outline: none !important;
}

.scrolling2 .contents-container {
  width: 100% !important;
  display: block !important;
  float: none !important;
  overflow: visible !important;
}

.scrolling2 .contents-inner {
  width: 100%;
  display: block;
  overflow: visible !important;
}

/* === 스티키 타이틀 영역 (CSS sticky) === */
.scrolling2 .group-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 5;
  height: 100vh;
  pointer-events: none;
}

.scrolling2 .textset {
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 타이틀 (GSAP가 JS에서 초기 opacity:0 세팅) */
.scrolling2 .textset .textset-tit {
  font-weight: 700;
  font-size: clamp(6rem, calc(3.125vw + 50px), 10rem);
  line-height: 1.1;
  pointer-events: auto;
}

.scrolling2 .textset .textset-desc {
  margin: 0.8rem 0 0;
  font-size: clamp(1.4rem, calc(0.156vw + 13.5px), 1.6rem);
  color: var(--text-color3, #777);
  pointer-events: auto;
}

.scrolling2 .textset .textset-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 3rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color, #222);
  border: 1px solid var(--text-color3, #999);
  border-radius: 10rem;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  pointer-events: auto;
}

.scrolling2 .textset .textset-btn:hover {
  background: var(--text-color, #222);
  color: #fff;
  border-color: var(--text-color, #222);
}

/* MORE 버튼 시스템 오버라이드 */
.scrolling2 .textset .hymore_wrap {
  position: static;
  display: inline-block !important;
  float: none !important;
  margin-top: 2rem;
  pointer-events: auto;
  text-align: center;
}

/* === 이미지 그리드 영역 === */
.scrolling2 .group-content {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 제목이 있을 때만 negative margin (group-scroll 100vh 겹침용) */
.scrolling2 .has-title .group-content {
  margin-top: -100vh;
}

.scrolling2 .imageset {
  overflow: hidden;
  width: clamp(30rem, calc(10.25vw + 267.2px), 43.2rem);
  height: clamp(20.8rem, calc(7.109vw + 185.25px), 30rem);
  border-radius: 1.6rem;
  cursor: pointer;
  position: relative;
}

/* 호버 딤 효과 */
.scrolling2 .imageset::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 2;
  transition: background 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}

.scrolling2 .imageset:hover::before {
  background: rgba(0, 0, 0, 0.25);
}

/* + 아이콘 (우상단) */
.scrolling2 .imageset-plus {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  z-index: 3;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.scrolling2 .imageset:hover .imageset-plus {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* 썸네일 캡션 (좌하단) */
.scrolling2 .imageset-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: 100%;
  padding: 3rem 2rem 1.6rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(0.8rem);
}

.scrolling2 .imageset .wg_img1 {
  width: 100%;
  height: 100%;
}

.scrolling2 .imageset .wg_img1 img,
.scrolling2 .imageset .wg_img1 picture {
  display: block;
  width: 100%;
  height: 100%;
}

.scrolling2 .imageset .wg_img1 img,
.scrolling2 .imageset .imageset-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 이미지 지그재그 배치 (6개 기준) */
.scrolling2 .imageset:nth-child(2) {
  margin-top: -8rem;
  margin-left: auto;
}

.scrolling2 .imageset:nth-child(3) {
  margin-top: 10rem;
  margin-left: 30.8rem;
}

.scrolling2 .imageset:nth-child(4) {
  margin-top: 10rem;
  margin-left: auto;
}

.scrolling2 .imageset:nth-child(5) {
  margin-top: -9rem;
}

.scrolling2 .imageset:nth-child(6) {
  margin-top: 11rem;
  margin-left: 30.8rem;
}

/* 7개 이상일 경우 반복 패턴 */
.scrolling2 .imageset:nth-child(6n+7) {
  margin-top: 10rem;
  margin-left: auto;
}

.scrolling2 .imageset:nth-child(6n+8) {
  margin-top: -8rem;
}

.scrolling2 .imageset:nth-child(6n+9) {
  margin-top: 10rem;
  margin-left: 30.8rem;
}

.scrolling2 .imageset:nth-child(6n+10) {
  margin-top: 10rem;
}

.scrolling2 .imageset:nth-child(6n+11) {
  margin-top: -9rem;
  margin-left: auto;
}

.scrolling2 .imageset:nth-child(6n+12) {
  margin-top: 11rem;
  margin-left: 30.8rem;
}

/* === 모달 === */
.scrolling2-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
}

.scrolling2-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.scrolling2-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.scrolling2-modal-content {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 1.2rem;
  max-width: 80rem;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: scrolling2_modalIn 0.3s ease;
}

@keyframes scrolling2_modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scrolling2-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.4rem;
  height: 5.8rem;
  border-bottom: 1px solid #e5e5e5;
}

.scrolling2-modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #222;
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrolling2-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  border-radius: 0.6rem;
  transition: background 0.2s;
  flex-shrink: 0;
  margin-left: 1.2rem;
}

.scrolling2-modal-close:hover {
  background: #f2f2f2;
}

.scrolling2-modal-body {
  padding: 2.4rem;
  max-height: 80rem;
  overflow-y: auto;
}

.scrolling2-modal-body::-webkit-scrollbar {
  width: 4px;
}

.scrolling2-modal-body::-webkit-scrollbar-track {
  background: #e5e5e5;
}

.scrolling2-modal-body::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10rem;
}

.scrolling2-modal-body .wg_img2 img {
  width: 100%;
  height: auto;
  display: block;
}

.scrolling2-modal-desc {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  font-size: 1.5rem;
  line-height: 1.7;
  color: #555;
}


/* ========== 반응형 992px ========== */
@media (max-width: 992px) {
  .scrolling2 {
    padding-top: 5rem;
    padding-bottom: 9rem;
  }

  .scrolling2 .imageset {
    width: 24rem;
    height: 16.7rem;
    border-radius: 1rem;
  }

  .scrolling2 .imageset-plus {
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
  }

  .scrolling2 .imageset-plus svg {
    width: 18px;
    height: 18px;
  }

  .scrolling2 .imageset-caption {
    padding: 2rem 1.4rem 1.2rem;
    font-size: 1.3rem;
  }

  .scrolling2 .textset .textset-btn,
  .scrolling2 .textset .hymore_wrap {
    margin-top: 1.4rem;
  }

  .scrolling2 .textset .textset-btn {
    padding: 0.8rem 2.2rem;
    font-size: 1.3rem;
  }

  /* 모바일: 좌우 번갈아 배치 */
  .scrolling2 .group-content .imageset {
    margin-left: 0;
    margin-top: 0;
  }

  .scrolling2 .group-content .imageset:nth-child(even) {
    margin-left: auto;
  }

  .scrolling2 .group-content .imageset + .imageset {
    margin-top: 5rem;
  }

  /* 7개 이상 패턴 리셋 */
  .scrolling2 .group-content .imageset:nth-child(6n+7),
  .scrolling2 .group-content .imageset:nth-child(6n+8),
  .scrolling2 .group-content .imageset:nth-child(6n+9),
  .scrolling2 .group-content .imageset:nth-child(6n+10),
  .scrolling2 .group-content .imageset:nth-child(6n+11),
  .scrolling2 .group-content .imageset:nth-child(6n+12) {
    margin-left: 0;
    margin-top: 0;
  }

  .scrolling2 .group-content .imageset:nth-child(6n+7):nth-child(even),
  .scrolling2 .group-content .imageset:nth-child(6n+8):nth-child(even),
  .scrolling2 .group-content .imageset:nth-child(6n+9):nth-child(even),
  .scrolling2 .group-content .imageset:nth-child(6n+10):nth-child(even),
  .scrolling2 .group-content .imageset:nth-child(6n+11):nth-child(even),
  .scrolling2 .group-content .imageset:nth-child(6n+12):nth-child(even) {
    margin-left: auto;
  }

  .scrolling2 .group-content .imageset:nth-child(6n+7) + .imageset,
  .scrolling2 .group-content .imageset:nth-child(6n+8) + .imageset,
  .scrolling2 .group-content .imageset:nth-child(6n+9) + .imageset,
  .scrolling2 .group-content .imageset:nth-child(6n+10) + .imageset,
  .scrolling2 .group-content .imageset:nth-child(6n+11) + .imageset,
  .scrolling2 .group-content .imageset:nth-child(6n+12) + .imageset {
    margin-top: 5rem;
  }

  /* 모달 모바일 */
  .scrolling2-modal-header {
    padding: 0 1.6rem;
    height: 4.8rem;
  }

  .scrolling2-modal-title {
    font-size: 1.5rem;
  }

  .scrolling2-modal-body {
    padding: 2.6rem 1.6rem;
    max-height: 45.2rem;
  }

  .scrolling2-modal-desc {
    font-size: 1.4rem;
  }
}
