html {
  scroll-behavior: smooth;
}
body {
  font-family: "Inter", sans-serif;
  margin: 0;
  background-color: #f9fafb;
  color: #111827;
}

/* --- 상단 콘텐츠 영역 --- */
.top-content {
  height: 1500px;
  background: linear-gradient(to bottom, #bae6fd, #f0f9ff);
  display: flex;
  align-items: center;
  justify-content: center;
}
.top-content h1 {
  font-size: 2.25rem;
  font-weight: bold;
  color: #0c4a6e;
}

/* --- 메인 레이아웃 --- */
.main-container {
  padding: 5rem;
}
.gallery-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* 자식 요소들을 상단에 정렬 */
  gap: 2rem;
}

/* --- 이미지 영역 --- */
.image-gallery {
  width: 1200px; /* 원래 너비로 복구 */
  flex-shrink: 0;
}
.image-wrapper {
  position: relative;
  /* overflow: hidden; */
  border-radius: 0.5rem;
  margin-bottom: 144px;
}
.image-wrapper:last-child {
  margin-bottom: 0 !important;
}
.image-wrapper img {
  width: 100%;
  display: block;
  height: auto;
}
.overlay-area {
  position: absolute;
  top: -50px;
  right: 0;
  width: 150px; /* 원래 크기로 복구 */
  min-height: 150px; /* 원래 크기로 복구 */
  height: auto;
  /* background-color: rgba(0, 0, 0, 0.5); */
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-text {
  color: white;
  font-size: 1.125rem;
  font-weight: bold;
}

/* --- 탭 영역 (수정됨) --- */
.tab-aside {
  width: 158px; /* 원래 너비로 복구 */
  flex-shrink: 0;

  border-radius: 4px;
  /* Sticky 속성 직접 적용 */
  position: -webkit-sticky;
  position: sticky;
  top: 100px;

  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.tab-button {
  font-size: 20px;
  width: 100%;
  font-weight: 400;
  padding: 12px 1rem;
  margin: 0;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  background-color: #ffffff;
  color: #8c8c8c;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.tab-button:last-child {
  border-bottom: none;
}
.tab-button:hover {
  background-color: #f3f4f6;
}

/* --- 스페이서 --- */
.left-spacer {
  width: 158px; /* 원래 너비로 복구 */
  flex-shrink: 0;
}

.sticky-tabs {
  position: -webkit-sticky; /* Safari 브라우저 호환성 */
  position: sticky;
  top: var(--sticky-top-offset, 100px); /* 기본값 100px */
  align-self: flex-start; /* flex 컨테이너 내에서 상단 정렬 */
}

/* 모바일 화면 대응 */
@media (max-width: 1600px) {
  /* 너비에 맞춰 수정 */
  .gallery-layout {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .left-spacer {
    display: none;
  }
  .image-gallery,
  .tab-aside {
    width: 100%;
    max-width: 1200px;
  }
  .tab-aside {
    position: static; /* 모바일에서는 sticky 해제 */
  }
}
