/* =====================================================================
   layout.css · 골드바 헤더 · 네이비 브레드크럼 · 푸터 · 페이지 머리 · 반응형
   ===================================================================== */

/* ---- 골드바 헤더 ---- */
.site-header { position: sticky; top: 0; z-index: var(--z-header);
  background: #c9a548 url("/images/common/top_bar_bg.png") center / cover no-repeat; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand__logo { height: 44px; width: auto; }

/* PC: 대분류가 가운데로 몰리지 않게 — 로고와 버튼 사이 남는 폭을 대분류 수만큼 같은 칸으로 나눠 고르게 펼친다(칸 최대 240px) */
.gnb { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-width: 0; margin-inline: var(--sp-4); }
.gnb__item { position: relative; flex: 1 1 0; max-width: 240px; display: flex; justify-content: center; }
.gnb__item + .gnb__item::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 18px; margin-top: -9px; background: rgba(7,20,71,.55); }
.gnb__link { display: flex; flex-direction: column; align-items: center; justify-content: center; height: var(--header-h);
  padding-inline: var(--sp-3); white-space: nowrap; color: var(--navy-900); font-weight: var(--fw-bold); font-size: var(--fs-lg); line-height: 1.2; }
.gnb__link:hover, .gnb__link[aria-current="page"] { text-decoration: none; color: #000; }
.gnb__link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--navy-800); }
.gnb__panel { position: absolute; left: 50%; transform: translateX(-50%); top: 100%; min-width: 220px; background: #fff;
  border-radius: 0 0 var(--radius-md) var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--sp-2); display: none; z-index: var(--z-dropdown); }
.gnb__item:hover > .gnb__panel, .gnb__item:focus-within > .gnb__panel { display: block; }
.gnb__panel a { display: block; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); color: var(--color-text); font-size: var(--fs-sm); }
.gnb__panel a:hover { background: var(--gray-50); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.header-actions form { margin: 0; }
.nav-toggle { display: none; flex: none; align-items: center; justify-content: center; background: none; border: 0; padding: var(--sp-2); margin-left: calc(-1 * var(--sp-2)); cursor: pointer; color: var(--navy-900); }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }
/* 로그인 회원 칩 — 오른쪽 두 버튼과 같은 높이(32px)·같은 둥근 모양, 크림 바탕 + 짙은 금색 테두리·첫 글자 동그라미 + 이름 (누르면 내 활동) */
.header-actions .btn--sm { height: 32px; padding-block: 0; }
.header-user { display: inline-flex; align-items: center; gap: var(--sp-2); height: 32px; padding: 0 .85rem 0 3px;
  border-radius: var(--radius-full); background: var(--gold-100); border: 1.5px solid var(--gold-700);
  box-shadow: 0 1px 2px rgba(74,54,10,.18); color: var(--gold-700); font-size: var(--fs-xs); line-height: 1;
  white-space: nowrap; transition: background var(--transition), border-color var(--transition); }
.header-user:hover { text-decoration: none; background: #fff; }
.header-user__avatar { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-700); color: #fff; font-size: .72rem; font-weight: var(--fw-bold); }
.header-user__name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; font-weight: var(--fw-medium); }
.header-user__name strong { color: var(--navy-900); font-weight: var(--fw-bold); font-size: var(--fs-sm); margin-right: 1px; }

/* ---- 네이비 브레드크럼 ---- */
.crumb { background: var(--navy-900); color: #fff; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.crumb ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: 0; min-height: 44px; align-items: center; }
.crumb a { color: #e6ebf8; }
.crumb li + li::before { content: ">"; margin-right: var(--sp-2); color: #aab6dc; }
.crumb li:last-child { font-weight: var(--fw-bold); color: #fff; }

/* ---- 본문 ---- */
main { min-height: 50vh; }
.page { padding-block: var(--sp-6) var(--sp-10); }
.page-head { margin-bottom: var(--sp-5); }
.page-head__eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .14em; color: var(--gold-600); text-transform: uppercase; }
.page-head h1 { font-size: var(--fs-3xl); font-weight: var(--fw-black); margin-top: var(--sp-1); }
.page-head p { color: var(--color-text-mute); margin-top: var(--sp-2); }
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-5); align-items: start; }
.layout-2col--wide { grid-template-columns: minmax(0, 1fr) 340px; }

/* ---- 푸터 ---- */
.site-footer { margin-top: var(--sp-10); background: var(--navy-900); color: #d9e0f4; font-size: var(--fs-sm); position: relative; }
.site-footer::before { content: ""; display: block; height: 10px; background: var(--gold-line); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-8); padding-block: var(--sp-8) var(--sp-6); }
.footer__logo { height: 44px; width: auto; margin-bottom: var(--sp-4); }
.footer__brand p { max-width: 26em; color: #c4cde6; }
.footer__cols { display: flex; gap: var(--sp-8); flex-wrap: wrap; }
.footer__col h4 { color: var(--gold-300); font-size: var(--fs-xs); margin-bottom: var(--sp-3); }
.footer__col ul { list-style: none; padding: 0; }
.footer__col li + li { margin-top: var(--sp-2); }
.footer__col a { color: #e6ebf8; }
.footer__legal { border-top: 1px solid rgba(255,255,255,.14); padding-block: var(--sp-4) var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; color: #aab6dc; font-size: var(--fs-xs); }
.footer__legal a { color: #c4cde6; }
.footer__info { border-top: 1px solid rgba(255,255,255,.14); padding-block: var(--sp-4); color: #aab6dc; font-size: var(--fs-xs); line-height: 1.7; }
.footer__info p { margin: 0; }
.footer__info p + p { margin-top: 2px; }
.footer__info b { color: var(--gold-300); font-weight: var(--fw-bold); margin-right: var(--sp-2); }
.footer__info span + span::before { content: "|"; margin: 0 var(--sp-2); color: rgba(255,255,255,.28); }
.footer__info a { color: #c4cde6; }
.footer__info .footer__note { margin-top: var(--sp-2); color: #8f9cc6; }
@media (max-width: 640px) {                     /* 모바일: 항목마다 한 줄 · 구분선 없음 */
  .footer__info p + p { margin-top: var(--sp-2); }
  .footer__info b { display: block; }
  .footer__info span { display: block; }
  .footer__info span + span::before { content: none; }
}

/* ---- 반응형 ---- */
@media (max-width: 960px) {
  .layout-2col, .layout-2col--wide { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  /* 모바일: [메뉴 열기] 맨 왼쪽 · 로고 가운데 · 후원하기/로그인 오른쪽 */
  .site-header__inner { gap: var(--sp-2); }
  .nav-toggle { display: inline-flex; order: -1; }
  .brand { flex: 1 1 auto; min-width: 0; justify-content: center; }
  .gnb { margin-inline: 0; }
  .gnb__item { max-width: none; display: block; }
  .gnb__link { white-space: normal; }
  .gnb { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; background: #fff;
    box-shadow: var(--shadow-lg); padding: var(--sp-2); transform: translateY(-130%); transition: transform var(--transition); }
  .gnb[data-open="true"] { transform: translateY(0); }
  .gnb__item + .gnb__item::before { display: none; }
  .gnb__link { height: auto; flex-direction: row; gap: var(--sp-2); justify-content: flex-start; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-md); }
  .gnb__panel { position: static; transform: none; display: block; box-shadow: none; padding: 0 0 var(--sp-2) var(--sp-4); }
  .brand__logo { height: 36px; }
  /* 모바일: 이름은 숨기고 첫 글자 동그라미만 (내 활동 바로가기) */
  .header-user { padding: 0; width: 32px; justify-content: center; background: transparent; border: 0; box-shadow: none; }
  .header-user__avatar { width: 30px; height: 30px; font-size: .8rem; box-shadow: 0 0 0 1.5px var(--gold-100); }
  .header-user__name { display: none; }
  .header-actions { gap: var(--sp-1); }
  .page-head h1 { font-size: var(--fs-2xl); }
}
@media (max-width: 400px) {
  .brand__logo { height: 30px; }
  .header-actions .btn--sm { padding-inline: .6rem; }
}
