/* ===== Header ===== */
.header {
  background: linear-gradient(to right, #323232 0%, #595959 100%);
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  /* border-bottom: 1px dashed #a7a4a4; */
}
/* 헤더 3단: 로고(왼쪽) | header-inner(가운데) | header-right(오른쪽) */
.header-row {
  width: 100%;
  max-width: 1500px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.header-left a,
#header-logo-img {
  display: block;
}
#header-logo-img {
  max-width: 70px;
  width: 70px;
  height: auto;
  object-fit: contain;
}
.header-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}
.header-center {
  position: relative;
  background: #DBDCE1;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 16px;
}
.badge-issue {
  background-color: transparent;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--text-color);
}
.badge-date-wrap {
  position: relative;
}
.badge-date {
  border-left: 1px solid var(--text-color);
  padding: 4px 0;
  display: flex;
  align-items: center;
  border-radius: 0 4px 4px 0;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  color: #f78e1e;
}
.badge-date span,
.badge-date .badge-date-text {
  font-weight: 500;
  font-size: 1.2rem;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.badge-date__chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: #f78e1e;
}
.badge-date.is-open {
  /* background-color: #fff; */
  border-color: #f78e1e;
}
.badge-date.is-open .badge-date-text,
.badge-date.is-open span.badge-date-text {
  color: #000;
}
.badge-date.is-open .badge-date__chevron {
  transform: rotate(180deg);
  color: #000;
}

/* 밝은 header-center 배경에서는 흰 글자 대비 부족 → 날짜만 진한색 (효과·애니메이션은 위와 동일) */
.header-center .badge-date span,
.header-center .badge-date .badge-date-text {
  color: #222;
}
.header-center .badge-date.is-open .badge-date-text,
.header-center .badge-date.is-open span.badge-date-text {
  color: #000;
}

/* 호수 선택 드롭다운: header-center 전체 너비로 펼침 (기준: .header-center position: relative) */
.vol-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  background: black;
  border: 1px solid rgba(247, 142, 30, 0.8);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 110;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  overflow-y: hidden;
  overflow-x: hidden;
  padding: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.2s ease,
    visibility 0s linear 0.35s;
}
.vol-dropdown.is-open {
  max-height: 20rem;
  opacity: 0.8;
  overflow-y: auto;
  padding: 4px 0;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.2s ease,
    visibility 0s linear 0s;
}
.vol-dropdown[hidden] {
  display: none !important;
}
.vol-dropdown__list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
}
.vol-dropdown__item {
  margin: 0;
  border: none;
  background: transparent;
  text-align: center;
}
.vol-dropdown__link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  font-size: 1rem;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
}
.vol-dropdown__link:hover {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  color: #f78e1e;
}

/* 리스트 마지막: 지난호 보기 */
.vol-dropdown__item--past {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}
.vol-dropdown__link--past {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  font-weight: 300;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  background: transparent;
}
.vol-dropdown__link--past:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f78e1e;
}
.header-right {
  display: flex;
  gap: 20px;
  align-items: center;
  z-index: 1;
}
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
}
.btn-icon.menu-open .icon-menu { display: none; }
.btn-icon.menu-open .icon-close { display: block !important; }
.icon-search, .icon-menu,
.btn-icon .icon-img {
  display: block;
  max-width: 25px;
}
.btn-icon .icon-img.icon-close {
  display: none;
}

/* btn-menu: 뒤집기 효과로 메뉴 ↔ 닫기 전환 (btn-search와 동일하게 아이콘 크기에 맞춤) */
#btn-menu .btn-menu-icon-wrap {
  display: inline-block;
  position: relative;
  perspective: 100px;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}
#btn-menu .btn-menu-icon-wrap .icon-menu {
  display: block;
  backface-visibility: hidden;
  transform: rotateY(0deg);
}
#btn-menu .btn-menu-icon-wrap .icon-close {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  backface-visibility: hidden;
  transform: rotateY(180deg);
}
#btn-menu.menu-open .btn-menu-icon-wrap {
  transform: rotateY(180deg);
}

/* ===== Search Panel (header 하단) ===== */
.search-panel {
  position: fixed;
  top: 90px;
  left: 0;
  right: 0;
  z-index: 95;
  background: #47484c;
  padding: 35px 24px;
  border-bottom: 1px solid #a7a4a4;
}
.search-panel[hidden] {
  display: none !important;
}
.search-panel form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.search-panel fieldset {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin: 0;
  padding: 0;
  border: none;
}
.search-panel select,
.search-panel input[type="text"],
.search-panel .SWS__btn {
  box-sizing: border-box;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  font-size: 1.2rem;
  font-family: inherit;
  line-height: 1.25;
  border-radius: 4px;
  vertical-align: middle;
}
.search-panel select,
.search-panel input[type="text"] {
  color: #000;
  background: #fff;
  border: 1px solid #b7b9bd;
}
.search-panel .SWS__btn {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: #f78e1e;
  border: none;
  cursor: pointer;
}
.search-panel .SWS__btn:hover {
  background: #e07d0d;
}
.search-panel .btn__close {
  display: block;
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 0 0 0;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}
.search-panel .btn__close:hover {
  color: #f78e1e;
}
.sound-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 검색 열림 시 하위 section 비활성화 (어두운 오버레이) */
.app-search-open #SW_search ~ * {
  pointer-events: none;
}
#app.app-search-open::after {
  content: '';
  position: fixed;
  top: 120px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 94;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* ===== Mobile Nav (nav__inner 스타일) ===== */
.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #47484c;
  padding: 0;
  z-index: 90;
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.22s ease-out;
  pointer-events: none;
}
.nav-mobile.nav-mobile--open {
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile[hidden] {
  display: none !important;
  transition: none;
}

.nav-inner {
  padding: 16px 24px 24px;
  padding-top: calc(72px + 16px);
}

.nav-mobile__main {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #444;
  text-align: center;
}

.nav-mobile__item {
  border-bottom: 1px solid #444;
}
.nav-mobile__item:last-child { border-bottom: none; }

.nav-mobile__label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 0;
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
  text-decoration: none;
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 1px dashed gray;
}
.nav-mobile__label-text {
  display: inline-block;
  position: relative;
  padding-bottom: 6px;
}
.nav-mobile__label-text::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__label:hover { color: #f78e1e; }
.nav-mobile__label:hover .nav-mobile__label-text::before { width: 100%; }
.nav-mobile__item.has-sub .nav-mobile__label::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}
.nav-mobile__main .nav-mobile__label-text::before {
  left: 50%;
  transform: translateX(-50%);
}
.nav-mobile__item.has-sub .nav-mobile__label.is-open::after {
  transform: rotate(-135deg);
}

.nav-mobile__sub {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 16px;
  text-align: center;
}
.nav-mobile__sub[hidden] { display: none !important; }
.nav-mobile__sub li { margin: 0; }
.nav-mobile__sub a {
  position: relative;
  display: inline-block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 1.2rem;
  text-decoration: none;
  border: none;
}
.nav-mobile__sub a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__sub a:hover { color: #f78e1e; }
.nav-mobile__sub a:hover::before { width: 100%; }
.nav-mobile__sub button.nav-mobile__bottom-action {
  position: relative;
  display: inline-block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.nav-mobile__sub button.nav-mobile__bottom-action::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__sub button.nav-mobile__bottom-action:hover { color: #f78e1e; }
.nav-mobile__sub button.nav-mobile__bottom-action:hover::before { width: 100%; }

.nav-mobile__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #a7a4a4;
}
.nav-mobile__bottom-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  border: 1px solid #a7a4a4;
  padding: 10px 20px;
  border-radius: 4px;
}
.nav-mobile__bottom-group a,
.nav-mobile__bottom-group button.nav-mobile__bottom-action {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  font-size: 1.2rem;
  text-decoration: none;
  padding: 4px 0;
}
.nav-mobile__bottom-group .nav-mobile__bottom-link-text {
  display: inline-block;
  position: relative;
}
.nav-mobile__bottom-group .nav-mobile__bottom-link-text::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__bottom-group a:not(:last-child)::after,
.nav-mobile__bottom-group button.nav-mobile__bottom-action:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1em;
  background: rgba(255, 255, 255, 0.3);
  margin-left: 20px;
  vertical-align: middle;
}
.nav-mobile__bottom-group a:hover,
.nav-mobile__bottom-group button.nav-mobile__bottom-action:hover { color: #f78e1e; }
.nav-mobile__bottom-group a:hover .nav-mobile__bottom-link-text::before,
.nav-mobile__bottom-group button.nav-mobile__bottom-action:hover .nav-mobile__bottom-link-text::before { width: 100%; }

/* PC: 가로 칼럼, has-sub 펼침 */
@media (min-width: 769px) {
  .nav-inner {
    padding-top: calc(120px + 24px);
    padding-left: 40px;
    padding-right: 40px;
    max-width: 1500px;
    margin: 0 auto;
  }

  .nav-mobile__main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;

    border-bottom: none;
  }

  .nav-mobile__item {
    flex: 1 1 auto;
    min-width: 180px;
    border-bottom: none;
    border-right: 1px solid #a7a4a4;
    padding: 0 5px;
  }
  .nav-mobile__item:last-of-type {
    border-right: none;
    padding-right: 0;
  }

  .nav-mobile__item.has-sub .nav-mobile__label {
    padding-bottom: 8px;
    cursor: default;
  }
  .nav-mobile__item.has-sub .nav-mobile__label::after {
    display: none;
  }

  .nav-mobile__sub {
    display: block !important;
    padding: 8px 0 0 0;
  }
  .nav-mobile__sub[hidden] {
    display: block !important;
  }

  .nav-mobile__bottom {
    margin-top: 32px;
    padding-top: 24px;
  }
}

@media (max-width: 1200px) {
  .badge-date { display: none; }
}

@media (max-width: 768px) {
  .header-center {
    gap:0px;
  }
  .header { height: 60px; padding: 0px 10px 0px 10px;}
  .search-panel { top: 60px; }
  .search-panel fieldset {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }
  .search-panel fieldset select,
  .search-panel fieldset input[type="text"],
  .search-panel fieldset .SWS__btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #app.app-search-open::after { top: 72px; }
  .badge-issue, .badge-date {
    padding: 2.5px 8px;
    border-radius: 4px;
  }
  .badge-issue { font-size: 1rem; }
  .badge-date { display: none; }
  #header-logo-img { width: 140px; max-height: 38px; }
  .header-right { gap: 10px; }
  .nav-mobile__main {
    text-align: left;
  }
  .nav-mobile__label {
    font-size: 1.1rem;
    justify-content: flex-start;
    text-align: left;
  }
  .nav-mobile__main .nav-mobile__label-text::before {
    left: 0;
    transform: none;
  }
  .nav-mobile__sub {
    text-align: left;
  }
  .nav-mobile__bottom {
    justify-content: center;
  }
  .nav-mobile__bottom-group {
    justify-content: center;
  }
  .nav-mobile__bottom-group a,
  .nav-mobile__bottom-link-text {
    font-size: 1rem;
  }
  .nav-mobile__sub a {
   padding-top: 0; 
  }
  .nav-mobile__label{
    border-bottom: none;
  }
}
