/* =============================================================
 * 2026 개편 — 서브페이지 공통 헤더·푸터 스타일 (main.css 발췌)
 * 원본 main.css의 topbar/site-header/gnb/search/footer 구간만 추출.
 * 전역(body·a·img 등) 규칙은 제외 — 서브페이지 콘텐츠에 영향 없음.
 * ============================================================= */
@font-face {
  font-family: "Gmarket Sans";
  font-style: normal;
  font-weight: 300;
  src: url("../fonts/GmarketSansLight.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "Gmarket Sans";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/GmarketSansMedium.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "Gmarket Sans";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/GmarketSansMedium.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "Gmarket Sans";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/GmarketSansBold.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "Gmarket Sans";
  font-style: normal;
  font-weight: 900;
  src: url("../fonts/GmarketSansBold.woff") format("woff");
  font-display: swap;
}
:root {
  --navy: #173f69;
  --deep: #0d2f55;
  --blue: #2876d1;
  --light-blue: #d7efff;
  --ink: #1f2933;
  --muted: #68737d;
  --line: #dbe3ec;
  --soft: #f3f7fb;
  --white: #fff;
  --max: 1430px;
}

/* =============================================================
 * 서브페이지 전역 규칙 스코프 상쇄(normalize)
 * style.css 등의 a{color:#333}, 요소별 line-height(18/24/30/48px),
 * h1{font-weight:600}가 헤더·푸터에 스며드는 것을 차단한다.
 * 발췌 컴포넌트 규칙이 이 블록 뒤에 오므로, 동일 특이도에서는
 * 컴포넌트 규칙이 우선한다(메인 페이지와 동일한 캐스케이드).
 * ============================================================= */
.topbar,
.site-header,
footer.footer {
  line-height: normal;
  letter-spacing: normal;
}
.site-header {
  color: var(--ink);
}
.topbar a, .topbar div, .topbar time, .topbar span,
.site-header h1, .site-header a, .site-header ul, .site-header li,
.site-header div, .site-header span, .site-header nav, .site-header form,
.site-header input, .site-header button, .site-header label,
footer.footer div, footer.footer p, footer.footer a, footer.footer address,
footer.footer span, footer.footer strong {
  line-height: normal;
  letter-spacing: normal;
}
.topbar a,
.site-header a,
footer.footer a {
  color: inherit;
  text-decoration: none;
}
.site-header .logo {
  font-weight: 700;
}
/* reset.css strong{font-weight:600} 상쇄 — 메인(UA bold=700)과 통일 */
footer.footer strong {
  font-weight: 700;
}
.site-header ul,
.site-header li {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.is-menu-open {
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.topbar {
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
}

.topbar__inner {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  min-height: 58px;
  align-items: center;
  font-size: 12px;
}

.site-header {
  position: relative;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 270px;
  background: var(--white);
  border-top: 1px solid #eef2f6;
  box-shadow: 0 10px 18px rgba(7, 24, 43, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.site-header:hover::before,
.site-header:focus-within::before {
  opacity: 1;
  visibility: visible;
}

.header__inner {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  align-items: center;
  gap: 48px;
  min-height: 100px;
  position: relative;
  z-index: 1;
}

.logo {
  margin: 0;
}

.logo img {
  width: 212px;
  height: auto;
}

.gnb__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 34px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 20px;
  font-weight: 500;
}

.gnb__item {
  position: relative;
  text-align: center;
}

.gnb__head {
  display: none;
}

.gnb__item + .gnb__item::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c9d0d8;
  transform: translate(-50%, -50%);
}

.gnb__link {
  display: inline-flex;
  align-items: center;
  min-height: 100px;
}

.gnb__depth {
  position: absolute;
  left: 50%;
  top: calc(100% + 32px);
  display: grid;
  gap: 30px;
  min-width: 160px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: #26313c;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.site-header:hover .gnb__depth,
.site-header:focus-within .gnb__depth {
  opacity: 1;
  visibility: visible;
}

.gnb__depth a {
  display: block;
  white-space: nowrap;
}

.gnb__depth a:hover,
.gnb__depth a:focus-visible {
  color: var(--blue);
}

.search {
  display: flex;
  align-items: center;
  height: 50px;
  border: 2px solid #3b82db;
  border-radius: 14px;
  overflow: hidden;
}

.search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  color: #56616d;
}

.search button {
  width: 52px;
  height: 100%;
  border: 0;
  background: var(--white);
}

.search button img {
  width: 24px;
  height: 24px;
}

.menu-toggle {
  display: none;
}

/* (main 요소 배경 규칙은 메인 페이지 전용이라 발췌에서 제외) */
.footer {
  padding: 38px 0 46px;
  border-top: 1px solid #e2e7ee;
  color: #5f6872;
  font-size: 15px;
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: center;
}

.footer__info p {
  margin: 0 0 14px;
}

.footer__info a:first-child {
  color: #1d75cd;
  font-weight: 900;
}

.footer__info address {
  margin-bottom: 12px;
  font-style: normal;
}

.footer__info strong {
  margin-left: 22px;
  color: #353d46;
}

.footer__info strong:first-child {
  margin-left: 0;
}

.footer__logos {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer__logos a {
  display: inline-flex;
  align-items: center;
  opacity: 0.82;
  transition: opacity 0.18s ease;
}

.footer__logos a:hover,
.footer__logos a:focus-visible {
  opacity: 1;
}

.footer__logos img {
  display: block;
  width: auto;
  max-width: 170px;
  max-height: 44px;
}

.footer__logos a:nth-child(3) img {
  max-width: 60px;
  max-height: 58px;
}

@media (max-width: 1180px) {
  .header__inner {
    grid-template-columns: 220px auto 260px;
    gap: 24px;
  }

  .gnb__list {
    gap: 24px;
    font-size: 18px;
  }

  .gnb__item + .gnb__item::before {
    left: -12px;
  }

  .gnb__depth {
    font-size: 15px;
    min-width: 145px;
  }

}
@media (max-width: 820px) {
  .topbar__inner {
    min-height: 42px;
    font-size: 12px;
  }

  .header__inner {
    grid-template-columns: 1fr auto;
    min-height: 72px;
  }

  .site-header::before {
    content: none;
  }

  .site-header::after {
    content: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(7, 24, 43, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .site-header.is-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  .logo img {
    width: 178px;
  }

  .menu-toggle {
    display: inline-grid;
    align-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    border: none;
    border-radius: 8px;
    background: #fff;
    position: relative;
  }

  .menu-toggle span:not(.sr-only) {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--deep);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .gnb,
  .search {
    grid-column: 1 / -1;
  }

  .gnb {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    display: block;
    width: 100vw;
    height: 100vh;
    padding: 42px 22px 40px;
    background: #fff;
    transform: translateY(-105%);
    transition: transform 0.24s ease;
    overflow-y: auto;
  }

  .site-header.is-open .gnb {
    transform: translateY(0);
  }

  .gnb__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 84px;
    padding: 0 58px 26px 0;
    border-bottom: 1px solid #e7eef5;
    color: #516172;
    font-size: 13px;
  }

  .gnb__head img {
    width: 178px;
    height: auto;
  }

  .gnb__head div {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .gnb__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    border-top: 0;
    width: 100%;
    justify-items: stretch;
    margin-top: 30px;
  }

  .gnb__item {
    width: 100%;
    min-width: 0;
    list-style: none;
    text-align: left;
  }

  .gnb__item + .gnb__item::before {
    display: none;
  }

  .gnb__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 68px;
    padding: 0 24px;
    border-radius: 12px;
    color: var(--deep);
    background: #f4f8fc;
    font-size: 22px;
    font-weight: 500;
  }

  .gnb__link::after {
    content: "";
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.72;
    transition: transform 0.18s ease;
  }

  .gnb__item.is-active .gnb__link {
    border-radius: 12px 12px 0 0;
    background: #eef5fb;
  }

  .gnb__item.is-active .gnb__link::after {
    transform: rotate(135deg);
  }

  .gnb__depth {
    position: static;
    display: none;
    gap: 0;
    min-width: 0;
    padding: 8px 16px 14px;
    margin: -2px 0 0;
    border: 1px solid #edf3f8;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: #fbfdff;
    color: #4d5a66;
    font-size: 16px;
    text-align: left;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .gnb__item.is-active .gnb__depth {
    display: grid;
  }

  .gnb__depth a {
    display: block;
    padding: 11px 8px;
    white-space: normal;
  }

  .gnb__depth a::after {
    content: none;
  }

  .site-header.is-open .menu-toggle {
    position: fixed;
    top: 46px;
    right: 10px;
    z-index: 60;
    background: #f7fbff;
    border-color: #d6e1ed;
    box-shadow: 0 10px 26px rgba(7, 24, 43, 0.16);
  }

  .site-header.is-open .menu-toggle span:not(.sr-only):nth-child(1) {
    position: absolute;
    left: 9px;
    top: 20.5px;
    width: 26px;
    height: 2px;
    transform: rotate(45deg);
  }

  .site-header.is-open .menu-toggle span:not(.sr-only):nth-child(2) {
    opacity: 0;
  }

  .site-header.is-open .menu-toggle span:not(.sr-only):nth-child(3) {
    position: absolute;
    left: 9px;
    top: 20.5px;
    width: 26px;
    height: 2px;
    transform: rotate(-45deg);
  }

  .search {
    height: 46px;
    margin-bottom: 14px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer__logos {
    flex-wrap: wrap;
    gap: 16px 22px;
  }

  .footer__logos img {
    max-width: min(100%, 190px);
  }
}
@media (max-width: 520px) {
  .footer {
    padding: 30px 0 36px;
    font-size: 13px;
  }

  .footer__inner {
    gap: 22px;
  }

  .footer__info p {
    margin-bottom: 10px;
  }

  .footer__info address {
    margin-bottom: 10px;
    line-height: 1.55;
  }

  .footer__info strong {
    display: inline-block;
    min-width: 54px;
    margin-left: 0;
    margin-right: 4px;
  }

  .footer__logos {
    display: flex;
    align-items: center;
    gap: 14px 18px;
    padding-top: 4px;
  }

  .footer__logos a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .footer__logos img {
    width: auto;
    max-width: 128px;
    max-height: 30px;
    object-fit: contain;
    justify-self: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .footer__logos a:nth-child(3) {
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
  }

  .footer__logos a:nth-child(3) img {
    width: auto;
    max-width: 52px;
    max-height: 44px;
  }
}

/* =============================================================
 * 서브페이지 구 CSS 상쇄 오버라이드 (반드시 발췌 구간 뒤에 위치)
 * ============================================================= */

/* style.css header{position:fixed} 상쇄 — 개편 헤더는 문서 흐름 배치 */
header.site-header {
  position: relative;
  top: auto;
  left: auto;
  z-index: 10;
}

/* common.css·style.css footer{background:#141E2C; margin-top:80px} 상쇄 */
footer.footer {
  margin-top: 0;
  background: var(--white);
}

/* 폰트: 헤더·푸터 범위만 Gmarket (common.css `*{font-family:NotoSansKR}` 상쇄), 자간 복원 */
.topbar, .topbar *,
.site-header, .site-header *,
footer.footer, footer.footer * {
  font-family: "Gmarket Sans", "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  letter-spacing: normal;
}

/* 헤더·푸터 내부 폭: 서브페이지 .inner(1280/1500px 규칙) 영향 제거, 메인과 동일 폭 */
/* min() 미지원 구형 브라우저 호환을 위해 calc + max-width 조합 사용 */
.topbar .topbar__inner,
.site-header .header__inner,
footer.footer .footer__inner {
  width: calc(100% - 48px);
  max-width: 1430px;
  margin: 0 auto;
}
@media (max-width: 820px) {
  .topbar .topbar__inner,
  .site-header .header__inner,
  footer.footer .footer__inner {
    width: calc(100% - 20px);
  }
}

/* 로그인 연장 타이머 칩 (main-ext.css와 동일) */
.topbar .log_timer {
  align-items: center;
  margin-right: 6px;
}
.topbar .log_timer time {
  font-variant-numeric: tabular-nums;
}
.topbar .log_timer a {
  color: var(--navy);
  width: 44px;
  height: 22px;
  font-size: 11px;
  margin-left: 8px;
}


/* common.css input::placeholder{color:#000} 상쇄 —
   원본 디자인은 placeholder 규칙이 없어 브라우저 기본 연회색으로 표시됨 */
.search input::placeholder {
  color: revert;
  font-size: revert;
  font-weight: revert;
}
