/* =====================================================
   Gallery Window – Main Page Style (Final)
===================================================== */

/* ---------- Reset & Base ---------- */

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Noto Sans KR", Helvetica, Arial, sans-serif;

  background-color: #15171a;
  background-image: url("../images/bg_main.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;   /* ← 추가 */

  color: #e6e7e9;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =====================================================
   Header
===================================================== */

.site-header {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 96px 24px;
}

.site-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #d8dadd;
}

.site-header h1 .ko {
  margin-right: 18px;
  color: #e3e4e6;
}

.site-header h1 .en {
  font-weight: 400;
  opacity: 0.65;
}

.site-header .subtitle {
  margin-top: 12px;
  font-size: 14px;
  color: #a2a7ad;
}

/* ==============================
   Headline Notice (Top)
============================== */

#headline-notice {
  margin-top: 18px;
  margin-bottom: 28px;

  font-size: 16px;            /* 작가노트보다 1단계 큼 */
  line-height: 1.7;

  color: rgba(230, 231, 233, 0.78); /* 작가노트보다 살짝 어두움 */

  text-align: left;   /* ⭐ 원래대로 복구 */
  max-width: none;      /* ⭐ 폭 제한 제거 */
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================
   Exhibition List
===================================================== */

.exhibitions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);

  gap: 36px 72px;          /* ⭐ 공간 절반으로 축소 */

  max-width: 1400px;
  margin: 48px auto 12px;  /* ⭐ 아래 여백 거의 제거 */
  padding: 0 80px;

  justify-items: center;
}

/* hall 번호 배지 */
.exhibition {
  position: relative;
}

.hall-label {
  position: absolute;
  top: 12px;
  left: 12px;     /* ⭐ 좌측 상단 */
  z-index: 5;

  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;

  padding: 6px 10px;
  background: rgba(0,0,0,0.55);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
}

/* ---------- Poster / Note Layout ---------- */
/* 포스터 1.5 / 작가노트 3 / 여백 0.5 */

.exhibition-body {
  display: grid;
  grid-template-columns: 1.5fr 3fr 0.5fr;
  gap: 80px;
  align-items: start;
}

/* 포스터 */
.exhibition-body img {
  cursor: pointer;
}

/* 포스터 메타 */
.meta {
  margin-top: 16px;
}

.meta h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #e0e1e3;
}

.meta p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #9ea3a9;
}

/* 작가노트 */
.artist-note {
  font-size: 17px;
  line-height: 1.9;
  color: #e6e9ed;

  white-space: pre-line;
  text-align: justify;
  word-break: keep-all;

  width: 560px;        /* ⭐ 작가노트 고정폭 */
}

body.home .artist-note p {
  margin-bottom: 0.8em;
}

body.home .artist-note {
  margin-top: 8px;
}

/* =====================================================
   Bottom Area – Notice & Guestbook
===================================================== */

.bottom-area {
  max-width: 1200px;
  margin: 120px auto 120px;
  padding: 0 96px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px;
}

/* 공통 제목 */
.bottom-area h3 {
  margin: 0 0 24px;
  font-size: 16px;
  font-weight: 500;
  color: #d6d8db;
  letter-spacing: 0.05em;
}

/* ---------- Notice ---------- */

.notice ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notice li {
  margin-bottom: 14px;
  font-size: 14px;
  color: #b8bcc2;
}

.notice .date {
  margin-right: 12px;
  color: #8f949b;
  font-size: 13px;
}

/* 공지 제목 링크 */
.notice-text {
  color: #222;            /* 처음부터 잘 보이도록 */
  text-decoration: none;
}

.notice-text:visited {
  color: #777;            /* 읽은 공지 */
}

.notice-text:hover {
  color: #000;            /* 살짝 강조 */
  text-decoration: underline;
}


/* 공지 목록 스크롤 처리 */
.notice-list {
  max-height: 160px;      /* 약 3~4개 */
  overflow-y: auto;
}


/* ---------- Guestbook ---------- */

.guestbook ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.guestbook li {
  margin-bottom: 10px;
  font-size: 14px;
  color: #cfd3d8;
}

/* 입력 폼 */
#guestbook-form {
  display: flex;
  gap: 10px;
}

#guestbook-input {
  flex: 1;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #e6e7e9;
  font-size: 14px;
}

#guestbook-input::placeholder {
  color: #8c9096;
}

#guestbook-form button {
  padding: 8px 14px;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: #e6e7e9;
  font-size: 14px;
  cursor: pointer;
}

#guestbook-form button:hover {
  background: rgba(255,255,255,0.08);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .bottom-area {
    grid-template-columns: 1fr;
    gap: 80px;
    padding: 0 32px;
  }
}

.guestbook.poetic {
  margin-top: 140px;
  text-align: center;
}

.guestbook.poetic li {
  font-size: 15px;
  color: #bfc3c8;
  opacity: 0.8;
  letter-spacing: 0.04em;
}


/* =====================================================
   Responsive
===================================================== */

@media (max-width: 1200px) {
  .site-header,
  .exhibitions,
  .bottom-area {
    padding-left: 64px;
    padding-right: 64px;
  }
}

@media (max-width: 900px) {
  .exhibition-body {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .bottom-area {
    grid-template-columns: 1fr;
    gap: 72px;
  }

  .site-header,
  .exhibitions,
  .bottom-area {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* ==============================
   Archive
============================== */

body.archive {
  background: #0f1114;
  color: #d4d6da;
}

/* =========================
   Main Page Footer
   ========================= */

.main-footer {
  position: relative;     /* 다른 레이어와 분리 */
  z-index: 2;
  pointer-events: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 12px;
}

.footer-left span {
  margin-right: 12px;
}

/* footer 텍스트 톤 통일 */
.footer-title,
.footer-credit {
  font-weight: 500;
  color: #cfcfcf;        /* 이전보다 밝고, 품위 있는 밝기 */
  letter-spacing: 0.04em;
}

/* 사용하지 않는 항목이면 제거 가능 */
.footer-period {
  color: #aaa;
}

.main-footer {
  margin-top: 40px;
  padding: 16px 0;
  font-size: 12px;
}

.footer-title,
.footer-credit {
  color: #cfcfcf;      /* 눈에 잘 보이되 튀지 않는 밝기 */
  letter-spacing: 0.04em;
}

.main-footer span {
  cursor: default;
}

/* =========================
   Archive Buttons (Home)
   ========================= */

.archive-buttons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 24px 0 20px;
}

.archive-buttons a {
  font-size: 13px;
  color: #e6e6e6;          /* 밝은 회색 */
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid #aaa;
}

.archive-buttons a:hover {
  color: #ffffff;
  border-color: #ffffff;
}

/* 전시 상세: span 줄바꿈 강제 */
.exhibition-text.info span {
  display: block !important;
  line-height: 1.25;
  margin-bottom: 1px;
}

/* =========================================
   Page-specific overrides
   ========================================= */

/* 대표화면 (index) */
body.home {
  background-color: #000;
  font-size: 14px;
}

/* 대표화면 포스터 크기 */
body.home .poster {
  max-width: 420px; /* 상황에 맞게 400~460px */
}

/* 대표화면 포스터–작가노트 간격 */
body.home .exhibition-body {
  gap: 40px; /* 기존 80px → 절반 */
}

/* 상세페이지 */
body.exhibition-detail {
  /* 상세페이지 기본은 exhibition-detail.css에서 처리 */
}

/* (여기에는 정말 필요한 것만, 대부분은 exhibition-detail.css로) */

/* Archive (예정/지난 전시) 포스터 정렬 보정 */

/* =========================
   Poster Image (FINAL)
========================= */

.poster-item img{
  width:100%;
  height:auto;
  display:block;
  border-radius:6px;
  transition:transform .25s ease;
}

.poster-item figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #555;
}

/* =========================
   Detail Page Image & Footer Fix (SAFE OVERRIDE)
   ========================= */

.detail-page img,
.notice-detail img {
  width: 66%;
  max-width: 720px;
  display: block;
  margin: 0 auto 40px;
}

.detail-nav,
.archive-nav {
  margin-top: 80px;
  margin-bottom: 120px;
  text-align: center;
}

/* 하단 공지사항 / 방명록 공통 스타일 */
.notice-section,
.guestbook-section {
  color: #cfd6dd; /* 기본 내용 색 (통일) */
}

/* 섹션 타이틀 */
.notice-section h2,
.guestbook-section h2 {
  color: #eef3f7;     /* 가장 밝게 */
  font-weight: 500;
}

/* 공지사항 제목 */
.notice-section .notice-title {
  color: #dbe2e8;     /* 타이틀보다 살짝 어둡게 */
}

/* 공지사항 날짜 */
.notice-section .notice-date {
  color: #9aa4ad;     /* 정보성 텍스트는 한 톤 낮춤 */
}

/* 방명록 내용 */
.guestbook-section .guestbook-item {
  color: #c6ccd3;     /* 공지사항 내용과 동일 */
}

/* =========================================
   Home bottom-area tone adjustment
   ========================================= */

/* 하단 영역 기본 텍스트 톤 */
body.home .bottom-area {
  color: #cfd6dd;
}

/* 섹션 타이틀 (공지사항 / 최근 방명록) */
body.home .bottom-area h3 {
  color: #eef3f7;
  font-weight: 500;
}

/* 공지사항 날짜 */
body.home .notice .date {
  color: #9aa4ad;
  font-size: 12px;
}

/* 공지사항 제목 */
body.home .notice .notice-text {
  color: #dbe2e8;
  text-decoration: none;
}

/* 방명록 내용 */
body.home .guestbook li {
  color: #cfd6dd;
}

/* =========================
   Common Text Utilities
========================= */

.text-big {
  font-size: 18px;
  font-weight: 600;
}

.text-accent {
  color: var(--theme-color, #c6d4e1);
}

.text-italic {
  font-style: italic;
}

.text-muted {
  opacity: 0.7;
}

/* =========================
   Exhibition Text Style
========================= */

.exhibition-text {
  text-align: justify;
  line-height: 1.9;
  letter-spacing: 0.02em;
  word-break: keep-all;
}

.exhibition-text p {
  margin-bottom: 0.2em;
}

/* =========================
   Hall (Exhibition Wall)
========================= */

.hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;   /* 좌우 안전 여백 */
  background: #111;
  position: relative;
  z-index: 2;
}

.hall-card {
  text-align: center;
  transition: transform 0.4s ease;
  overflow: hidden;  /* 이미지 넘침 방지 */
}

.hall-card img {
  height: 70vh;
  max-height: 720px;
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.hall-card:hover {
  transform: translateY(-8px);
}

/*
body {
  background-color: #000;
  background-image: url("../images/background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
*/

/* =========================
   Global Exhibition Space
========================= */
.site-background {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.site-background.main {
  position: fixed;   /* ⭐ fixed → absolute */
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;

  background-image: url("../images/bg_main.jpg");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.site-background.hall {
  background-image: url("../images/bg_hall.jpg");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

/* hall만 어둡게 */
.site-background.hall::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

body {
  background: transparent;
}

main,
.hall-grid,
.container,
.wrapper {
  background: transparent !important;
}

/* Hall poster override */

.hall-card img {
  max-width: none !important;
  width: auto !important;
  height: 70vh !important;
  max-height: 720px;
display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* ===== Page transition (gallery entrance) ===== */

.page-fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 9999;
}

.page-fade.active {
  opacity: 1;
}

/* ===== Hall poster reveal ===== */

.hall-card {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.hall-card.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Poster overlay caption ===== */

.poster-wrap {
  position: relative;
  display: inline-block;
}

.poster-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-size: 20px;
  letter-spacing: 0.05em;

  background: rgba(0,0,0,0.45);
  opacity: 0;

  transition: opacity 0.4s ease;
}

.poster-wrap:hover .poster-caption {
  opacity: 1;
}

/* =====================================
   Main poster sizing (Lobby only)
===================================== */

.main-poster img {
  height: 38vh;
  width: auto;
  margin: 0 auto;
  display: block;
}

/* =========================
   Hall Entry Layout
========================= */

.hall-poster {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.25s ease;
  position: relative;
  z-index: 5;
}

.hall-poster:hover {
  transform: scale(1.025);
  filter: contrast(1.1) brightness(1.04);
}

.artist-profile {
  color: #ddd;
  line-height: 1.7;
  font-size: 14px;
}

.artist-note-area {
  flex: 1;
  max-width: 620px;
}

/* ===== Hall entry reveal ===== */

.hall-entry {
  display: grid;
  grid-template-columns: 520px 560px;
  gap: 60px;
  align-items: start;
  max-width: 1200px;
  margin: 100px auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}


.hall-entry.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Enter exhibition button ===== */

.enter-exhibition-wrap {
  margin-top: 80px;
  text-align: center;
}

.enter-exhibition {
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid rgba(255,255,255,0.4);
  transition: all 0.35s ease;
}

.enter-exhibition:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.entry-buttons a {
  padding: 12px 26px;
  border: 1px solid rgba(255,255,255,0.6);
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.05em;
  transition: all .25s ease;
}

.entry-buttons a:hover {
  background: rgba(255,255,255,0.1);
}

.back-main {
  color: #ccc;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

/* ===== Lobby hall posters ===== */

.exhibition img {
  display: block;
  margin: 0 auto;

  width: auto;
  height: 46vh;
  max-height: 560px;

  object-fit: contain;
  filter: contrast(1.05) brightness(1.02);
}

/* ===== Lobby poster fix ===== */

body.home .exhibition img {
  height: 46vh !important;
  width: auto !important;
  max-height: 640px;
}

/* ===== 대표화면 포스터 강제 크기 ===== */

body.home .exhibition {
  text-align: center;
}

body.home .exhibition img {
  height: 55vh !important;
  width: auto !important;
  max-height: 720px;
  max-width: none !important;
}

.hall-left img {
  width: 100%;
  height: auto;
}

.hall-entry.show {
  opacity: 1;
  transform: translateY(0);
}

#hallPoster {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}


.hall-left {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 500px;
  flex-shrink: 0;
  text-align: center;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.35));
}

.hall-left img {
  width: 100%;
  height: auto;
}

.artist-profile {
  margin-top: 40px;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.9;
}

.site-background.hall::after {
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.2),
    rgba(0,0,0,0.75)
  );
}

#hallPoster {
  cursor: pointer;
  transition: transform .35s ease;
}

#hallPoster:hover {
  transform: scale(1.02);
}

.site-background {
  z-index: -1;
}

#hallPoster {
  pointer-events: auto;
}

/* 대표화면 포스터 인터랙션 */

body.home .exhibition img {
  transition: transform .35s ease;
}

body.home .exhibition img:hover {
  transform: scale(1.03);
}

.hall-entry .artist-note {
  font-size: 0.9rem;     /* ⭐ 2단계 축소 느낌 */
  line-height: 1.8;
  margin-top: 0;
}

/*
.hall-entry {
  align-items: start;   /* center → start */
}
*/

/* ===== Hall background slow zoom ===== */

.site-background.hall {
  animation: hallZoom 18s ease-out forwards;
}

@keyframes hallZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1);
  }
}

.site-background.hall {
  will-change: transform;
}

/* ===== Hall artist note reading focus ===== */

.hall-entry .artist-note p {
  opacity: 0.72;
  transition: opacity .6s ease;
}

/* 첫 문단 강조 */
.hall-entry .artist-note p:first-of-type {
  opacity: 1;
  font-size: 1.05em;
  letter-spacing: 0.01em;
}

.entry-buttons {
  position: absolute;
  top: -60px;
  left: 0;

  display: flex;
  flex-direction: row;
  gap: 20px;

  z-index: 3;
}

.entry-buttons a {
  padding: 10px 18px;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
}

/* ===== Poster light gloss effect ===== */

#hallPoster {
  position: relative;
  overflow: hidden;
}

/* 빛 레이어 */
#hallPoster::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -60%;
  width: 60%;
  height: 300%;

  background: linear-gradient(
    75deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0) 100%
  );

  transform: rotate(25deg);
  transition: transform 0.9s ease;
  pointer-events: none;
}

/* hover 시 빛 이동 */
#hallPoster:hover::after {
  transform: translateX(260%) rotate(25deg);
}

body.home .exhibition img {
  position: relative;
  overflow: hidden;
}

body.home .exhibition img:hover {
  transform: scale(1.03);
}

/* ===== page transition fade ===== */

#pageFade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 9999;
}

#pageFade.active {
  opacity: 1;
}

/* ===== Hall entrance interaction ===== */

/* 포스터 기본 */
#hallPoster {
  cursor: pointer;
  transition: transform 0.35s ease, filter 0.35s ease;
}

/* 포스터 hover */
#hallPoster:hover {
  transform: scale(1.015);
  filter: brightness(1.08);
}

/* 작품보기 버튼 기본 */
.enter-exhibition {
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* ⭐ 포스터 hover 시 버튼도 반응 */
#hallPoster:hover ~ .artist-note-area .enter-exhibition,
#hallPoster:hover + .artist-profile + .artist-note-area .enter-exhibition {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
}

.hall-content {
    display: flex;
    gap: 60px;
}

.hall-left-note {
    width: 420px;
}

.hall-right-list {
    flex: 1;
}

#exhibitionList {
    max-width: 1400px;
    margin: 40px auto 80px auto;
}

.hall-left {
  transform: translateY(-20px);
}

.hall-poster {
  box-shadow:
    0 20px 40px rgba(0,0,0,0.45),
    0 6px 12px rgba(0,0,0,0.35);
  filter: contrast(1.06) brightness(1.02);
}

.artist-note-area {
  padding-top: 18px;
}

.hall-entry.show {
  opacity: 1;
  transform: translateY(0);
}

.section-title + .exhibition-text {
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .hall-entry {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.profile-subtitle {
  font-weight: bold;
  text-align: left;
  display: block;
  margin-top: 28px;
}

.profile-subtitle {
  margin-top: 36px;
}

/* Hall cinematic entrance */
.hall-entry {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 1.6s ease,
    transform 1.6s ease;
}

.hall-entry.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Archive page readability fix ===== */

.archive-page {
  color: #e6e6e6;
}

.archive-title {
  color: #ffffff;
  text-align: center;
}

.archive-nav a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

.archive-nav a:hover {
  color: #fff;
  border-color: #fff;
}

/* ===============================
   Archive layout (final)
================================ */

/* 포스터 영역 */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.poster-item img:hover {
  transform: scale(1.04);
}

/* 하단 버튼 */
.archive-nav a {
  color: #dcdcdc;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

.archive-nav a:hover {
  color: #ffffff;
}

/* ===============================
   Archive text visibility fix
================================ */

/* 하단 네비게이션 */
.archive-nav a {
  color: #333;
  border-bottom: 1px solid rgba(0,0,0,0.3);
}

.archive-nav a:hover {
  color: #000;
  border-color: #000;
}

/* ===============================
   Gallery interaction tone
================================ */

a, button, .hall-poster, .poster-item img {
  transition: all 0.35s ease;
}

a:hover,
button:hover,
.poster-item img:hover,
.hall-poster:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

/* ===============================
   Gallery entrance atmosphere
================================ */

/* 전시장 연출 전용 */
body.hall,
body.exhibition {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.page-ready {
  opacity: 1;
}

.main-links {
  margin: 90px auto 48px;   /* ⭐ 포스터와의 거리 설정 */
  display: flex;
  justify-content: center;
  gap: 24px;
}

/* ===== Emergency layout restore ===== */

main {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
/*  min-height: auto;   */
}

/* ===== Safety guard : fade overlay fail-safe ===== */
body:not(.transitioning) .page-fade {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ======================================
   Archive Exhibition Detail Page
====================================== */

body.archive-detail-page {
  background: #eaf2f7;   /* 연한 하늘색 */
  color: #222;
}

/* 전체 중앙 정렬 */
.archive-detail-page main {
  max-width: 920px;
  margin: 80px auto 120px;
  padding: 0 24px;
  text-align: center;
}

/* 포스터 (hall과 비슷한 크기) */
.archive-detail-page .exhibition-poster img {
  width: 420px;
  max-width: 90%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 48px;
}

/* 텍스트 영역 — 포스터보다 넓게 */
.archive-detail-page .exhibition-text {
  max-width: 720px;
  margin: 0 auto 60px;
  text-align: justify;
  line-height: 1.9;
  color: #222;
}

/* 하단 버튼 중앙 */
.archive-detail-page .archive-nav {
  text-align: center;
  margin-top: 40px;
}

.archive-detail-page .archive-nav a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #222;
  padding-bottom: 3px;
}

.archive-detail-page .archive-nav a:hover {
  opacity: 0.6;
}

/* ===============================
   Archive Detail (전시 상세)
================================ */

/* 상세페이지 기본 프레임 */
.archive-detail-page main {
  max-width: 920px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}

/* 포스터 중앙 정렬 */
.archive-detail-page .exhibition-poster {
  text-align: center;
}

.archive-detail-page .exhibition-poster img {
  display: block;
  margin: 0 auto 40px;
  max-width: 520px;
  width: 100%;
  height: auto;
}


/* ===============================
   Gallery artwork depth
   (작품만 입체감 유지)
================================ */

.exhibition img,
.hall-poster,
.exhibition-poster img {
  box-shadow:
    0 12px 28px rgba(0,0,0,0.18),
    0 2px 6px rgba(0,0,0,0.12);

  transition: transform 0.35s ease,
              box-shadow 0.35s ease;
}

.exhibition img:hover,
.hall-poster:hover {
  transform: translateY(-6px);
  box-shadow:
    0 22px 48px rgba(0,0,0,0.28),
    0 6px 14px rgba(0,0,0,0.18);
}


/* ===============================
   Text area normalization
   (⚠️ 모든 흰/회색 박스 제거)
================================ */

.artist-note,
.exhibition-text,
.notice-detail {
  background: none;
  padding: 0;
  border-radius: 0;
}


/* ===============================
   Detail page background
================================ */

body.archive-detail-page,
body.exhibition-detail,
body.notice-page {
  background:
    linear-gradient(
      to bottom,
      #f6f8fb 0%,
      #e9eff5 100%
    );
}

html, body {
  overflow-x: hidden;
}

/* ===============================
   MOBILE LAYOUT (≤768px)
   Gallery Window unified version
================================= */

html,
body {
  overflow-x: hidden;
}

/* =========================
   HALL MOBILE ALIGN FIX
========================= */

body.hall {
  overflow-x: hidden;
}

.site-background.hall {
  position: fixed;   /* ⭐ absolute → fixed */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* =====================================
   MOBILE LAYOUT FINAL (≤768px)
   Gallery Window unified system
===================================== */

@media (max-width: 768px) {

  /* -----------------
     공통 여백 (전체 페이지)
  ----------------- */
  .site-header,
  .exhibitions,
  .main-links,
  .bottom-area,
  main {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }

  /* ⭐ 대표화면 버튼 위치 조정 */
  .main-links{
    margin:64px auto 40px;
  }

  main{
    width:100%;
    max-width:100%;
    margin:0 auto;
  }

  /* -----------------
     ARCHIVE / POSTER GRID
     (모바일 2열)
  ----------------- */
@media (max-width:768px){

  .archive-page .poster-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:14px;

    width:100%;
    max-width:100%;
    padding:0 12px;
    box-sizing:border-box;
  }

  .archive-page .poster-item{
    min-width:0;   /* ⭐ 핵심 — overflow 차단 */
  }

  .archive-page .poster-item img{
    width:100%;
    height:auto;
  }

}

  /* -----------------
     HALL LAYOUT
  ----------------- */
  .hall-entry{
    display:flex;
    flex-direction:column;
    width:100%;
    padding:0 16px;
    box-sizing:border-box;
  }

  .hall-left,
  .artist-note-area{
    width:100%;
    max-width:360px;
    margin:0 auto;
  }

  .hall-poster{
    width:100%;
    height:auto;
    display:block;
  }

  /* -----------------
     Exhibition Text
  ----------------- */
  .exhibition-text{
    font-size:14px;
    line-height:1.65;
  }

}

.official-site{
  color:#e12d86;
  font-weight:600;
  letter-spacing:0.02em;
}

/* =====================================
   HALL MOBILE NOTE WIDTH FIX (FINAL)
===================================== */

@media (max-width:768px){

  .hall-entry{
    padding:0 16px;
    box-sizing:border-box;
  }

  .artist-note-area{
    width:100%;
    max-width:100%;
    margin:0 auto;
    box-sizing:border-box;
  }

  .artist-note{
    width:100%;
    max-width:100%;
    min-width:0;                 /* ⭐ grid/flex overflow 방지 핵심 */
    overflow-wrap:break-word;    /* 긴 문장 강제 줄바꿈 */
    word-break:keep-all;
  }

}

/* =========================
   HOME MOBILE HALL GRID
========================= */

@media (max-width: 768px){

  .exhibitions{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:18px;
    justify-items:center;
  }

  .exhibition{
    width:100%;
    max-width:160px;
  }

  .exhibition img{
    width:100%;
    height:auto;
  }

}

/* =========================
   COMING badge
========================= */

.coming-badge{
  position:absolute;
  top:10px;
  left:10px;
  padding:6px 10px;
  font-size:12px;
  letter-spacing:0.12em;
  background:rgba(0,0,0,0.7);
  color:#fff;
  border:1px solid rgba(255,255,255,0.6);
}

/* =========================
   COMING exhibition poster
========================= */

.exhibition.coming img{
  opacity: 0.65;          /* ⭐ 살짝만 흐림 */
  filter: grayscale(20%); /* 색감 아주 약하게 감소 */
  transition: opacity .3s ease;
}

if (exhibition.status === "coming") {
  block.classList.add("coming");
}

/* =========================
   COMING BADGE (REFINED)
========================= */

.exhibition.coming::after {
  content: "COMING";

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  font-size: 17px;          /* ⭐ 약 60% 축소 */
  font-weight: 600;
  letter-spacing: 0.18em;

  color: #e6d98a;           /* ⭐ 낮은 채도의 노란색 */
  background: rgba(0,0,0,0.35);

  padding: 10px 16px;
  border: 1px solid rgba(230,217,138,0.7);

  backdrop-filter: blur(4px);
  z-index: 6;
}

/* =========================
   HOME MOBILE GRID FIX
========================= */

@media (max-width:768px){

  .exhibitions{
    display:grid;
    grid-template-columns:1fr;   /* ⭐ 1열 */
    gap:40px;
    padding:0 16px;
  }

  .exhibition{
    width:100%;
    max-width:320px;
    margin:0 auto;
  }

  .exhibition img{
    width:100%;
    height:auto;
    display:block;
  }

}