.page-gallery main { padding-top: 0px; }

/* HERO */
.page-gallery .hero-sub {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 20px;
}
.page-gallery .hero-sub-img {
  width: 100%;
  padding-top: 40%;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.02), rgba(0,0,0,0.18)),
    url('../img/sub-top-04.jpg') center/cover no-repeat;
  position: relative;
}
.page-gallery .hero-label {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 3px;
  color: #f7f7f7;
}

/* GALLERY GRID */
.section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}
.section-title {
  text-align: center;
  margin-bottom: 24px;
  font-size: 15px;
  letter-spacing: 3px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-item:hover img {
  transform: scale(1.05);
}

.snap-gallery {
  max-width: 1200px;
  margin: 60px auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.snap-item {
  overflow: hidden;
  border-radius: 6px;
}

.snap-item .thumb {
  overflow: hidden;
  border-radius: 6px;
}

.snap-item .thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.snap-item:hover img {
  transform: scale(1.05);
}

.caption {
  text-align: center;
  margin-top: 8px;
}

.k-caption {
  font-size: 13px;
  color: #222;
  margin-bottom: 4px;
}

.e-caption {
  font-size: 11px;
  color: #777;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}
.modal.active { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
}
.modal.active .modal-backdrop { opacity: 1; }

.modal-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 80%;
  max-height: 80%;
}
.modal-content img {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.modal-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.9;
  transition: all 0.3s ease;
  z-index: 15;
  color:#fff;
}

/* 호버 시 살짝 밝아지고 확대 */
.modal-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

/* 화살표 아이콘 */
.arrow-left,
.arrow-right {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  opacity: 0.9;
  transition: all 0.3s ease;
}

/* 방향 지정 */
.arrow-left {
  transform: rotate(-135deg);
  margin-left: 3px;
}
.arrow-right {
  transform: rotate(45deg);
  margin-right: 3px;
}

/* 화살표 hover 시 빛 강조 */
.modal-btn:hover .arrow-left,
.modal-btn:hover .arrow-right {
  border-color: #fff;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

/* 위치 */
.modal-prev {
  left: -70px;
}
.modal-next {
  right:-70px;
}

/* 모바일용 */
@media (max-width: 768px) {
  .modal-btn {
    width: 38px;
    height: 38px;
  }
  .arrow-left,
  .arrow-right {
    width: 14px;
    height: 14px;
    border-width: 1.5px;
  }
  .modal-prev { left: 10px; }
  .modal-next { right: 10px; }
}

/* 닫기 버튼 */
.modal-close {
  position: absolute;
  top: -40px;
  right: -10px;
  color: #fff;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: all .3s ease;
}
.modal-close:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* 페이지네이션 */
.modal-pagination {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.modal-pagination span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bbb;
  opacity: 0.5;
  transition: all .3s ease;
}
.modal-pagination span.active {
  width: 18px;
  border-radius: 6px;
  background: #fff;
  opacity: 1;
}


/* 모바일 대응 */
@media(max-width:1024px){
  .modal-prev{left:10px;}
  .modal-next{right:10px;}
  .modal-content{max-width:90%;max-height:70%;}
}
