/* gallery.css - 갤러리 메인 페이지 */

/* ── GNB 활성 상태 ── */
.gnb__link.is-active {
  color: var(--color-white);
  border-bottom: 2px solid var(--color-primary);
}

.gnb__sub a.is-active {
  color: var(--color-white);
  background: #2a2a2a;
}

/* ── 히어로 슬라이더 ── */
.hero {
  position: relative;
  width: 100%;
  /* 헤더(56px) + GNB(40px) 제외한 전체 뷰포트 높이 */
  height: calc(100vh - var(--header-height) - var(--gnb-height));
  background: #111;
  overflow: hidden;
}

/* 메인 슬라이드 이미지 영역 */
.hero__slide {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #111;
}

/* 좌우 화살표 */
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 96px;
  height: 96px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10;
}

.hero__arrow:hover {
  opacity: 1;
}

.hero__arrow--prev { left: 24px; }
.hero__arrow--next { right: 24px; }

/* 썸네일 strip */
.hero__thumbnails {
  position: absolute;
  bottom: 16px;
  left: 24px;
  padding: 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.hero__thumb-list {
  display: flex;
  gap: 6px;
}

.hero__thumb-list li {
  width: 80px;
  height: 56px;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.hero__thumb-list li.is-active {
  border-color: var(--color-white);
}

.hero__thumb-list li:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

/* ── 푸터 - 전체 목록 ── */
.footer__toggle {
  display: flex;
  justify-content: center;
  padding: 32px 0 16px;
  border-top: 1px solid #2a2a2a;
}

.footer__toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 28px;
  background: transparent;
  border: 1px solid #555;
  border-radius: 22px;
  color: #aaa;
  font-family: var(--font-base);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.footer__toggle-btn:hover {
  border-color: #aaa;
  color: #fff;
}

/* 열림 상태 화살표 회전 */
.footer__toggle-btn.is-open .footer__toggle-icon {
  transform: rotate(180deg);
}

.footer__toggle-icon {
  transition: transform 0.3s;
}

/* 전체 사진 그리드 */
.footer__grid {
  display: none;
  max-height: 600px;
  overflow-y: auto;
  padding: 0 24px 40px;
}

/* 열림 상태 */
.footer__grid.is-open {
  display: block;
}

.footer__grid-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.footer__grid-list li {
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #333;
  background-size: cover;
  background-position: center;
  transition: opacity 0.2s;
}

.footer__grid-list li:hover {
  opacity: 0.8;
}

/* ── 반응형: 태블릿 (768px 이하) ── */
@media (max-width: 768px) {
  /* 푸터 그리드 2열 */
  .footer__grid-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 썸네일 간격/크기 축소 */
  .hero__thumb-list li {
    width: 60px;
    height: 44px;
  }

  /* 화살표 크기 축소 */
  .hero__arrow {
    width: 56px;
    height: 56px;
  }

  .hero__arrow--prev { left: 8px; }
  .hero__arrow--next { right: 8px; }
}

/* ── 반응형: 모바일 (480px 이하) ── */
@media (max-width: 480px) {
  /* 푸터 그리드 1열 */
  .footer__grid-list {
    grid-template-columns: 1fr;
  }

  /* 썸네일 숨김 (화면이 너무 좁음) */
  .hero__thumbnails {
    display: none;
  }

  /* 화살표 더 축소 */
  .hero__arrow {
    width: 40px;
    height: 40px;
  }
}
