/* KSVF 2026 — Common components
 * nav · button · pill · meta-card · countdown · section-head
 */

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: relative; z-index: 10;
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}
.tt-page > .ksvf-site-header,
.subpage-header > .ksvf-site-header {
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink-on-dark-0);
  font-size: 16px;
  display: flex; align-items: center; gap: 10px;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-mint), var(--accent-cyan));
  display: grid; place-items: center;
  color: var(--bg-0);
  font-weight: 900;
  font-size: 13px;
}
/* 대한상공회의소 로고 — 다크 배경 위에서 흰색으로 반전, 133x36 고정 */
.brand-logo {
  width: 133px;
  height: 36px;
  display: block;
  /* picture 안의 <img>가 source 자동 적용 후 비율 깨지는 것 방지 */
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .95;
  transition: opacity .15s ease;
}
.brand-logo:hover { opacity: 1; }

.nav-links {
  display: flex; gap: 32px;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-on-dark-1);
  letter-spacing: -.005em;
}
.nav-links > a,
.nav-links .nav-link-button,
.nav-links .nav-dropdown-btn {
  font-weight: 700;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links .nav-link-button:hover { color: var(--ink-on-dark-0); }
.nav-links .is-active {
  position: relative;
  color: var(--accent-mint);
}
.nav-links .is-active::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--accent-mint);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(125,240,160,.5);
}
.nav-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-on-dark-1);
  transition: color .15s;
}
.nav-right { display: flex; gap: 14px; align-items: center; }

/* KO / EN 언어 토글 */
.nav-lang {
  font-size: 12px;
  color: var(--ink-on-dark-3);
  letter-spacing: .05em;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  padding: 6px 10px;
  border-radius: var(--r-pill);
  transition: color .15s ease, background .15s ease;
  border: none;
  background: transparent;
}
.nav-lang:hover { background: rgba(255,255,255,.06); }
.nav-lang .lang-item {
  transition: color .15s ease;
  color: var(--ink-on-dark-3);
}
.nav-lang .lang-item.active {
  color: var(--ink-on-dark-0);
}
.nav-lang .lang-sep {
  color: var(--ink-on-dark-3);
  margin: 0 2px;
}

/* ============================================================
   Nav dropdown — "지난 행사" 서브메뉴 (제1회 · 제2회)
   · 호버(+ 키보드 focus-within)로 펼침
   · ::after pseudo로 부모↔메뉴 사이 14px 갭에 hover bridge 형성
     → 마우스를 메뉴로 내려갈 때 hover가 끊겨 메뉴가 닫히는 문제 방지
   ============================================================ */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
/* hover bridge: 부모 아래쪽 14px(=메뉴 margin-top)에 투명 hover 영역 추가 */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -8px; right: -8px;
  height: 14px;
  /* 메뉴가 펼쳐졌을 때만 hover 영역이 의미가 있음 — 평소엔 클릭에 방해되지 않게 */
  pointer-events: none;
}
.nav-dropdown:hover::after,
.nav-dropdown:focus-within::after {
  pointer-events: auto;
}

.nav-dropdown-btn {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-on-dark-1);
  cursor: pointer;
  transition: color .15s;
}
.nav-dropdown:hover .nav-dropdown-btn,
.nav-dropdown:focus-within .nav-dropdown-btn {
  color: var(--ink-on-dark-0);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  margin-top: 14px;
  min-width: 200px;
  padding: 8px;
  background: var(--bg-1);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-sm);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  z-index: 20;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-on-dark-1);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,.06);
  color: var(--ink-on-dark-0);
}

/* ============================================================
   공동 주관사 플로팅
   · 2025 공동 주관사 12개 로고를 임시 재사용
   · PC에서는 우측 고정, 좁은 화면에서는 본문 로고 그리드로 노출
   ============================================================ */
.co-organizer-float {
  position: fixed;
  top: 50%;
  right: 20px;
  z-index: 30;
  width: 194px;
  max-height: calc(100vh - 48px);
  padding: 14px;
  overflow-y: auto;
  transform: translateY(-50%);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(13,20,48,.12);
  border-radius: var(--r-md);
  box-shadow: 0 18px 44px rgba(0,0,0,.3);
  scrollbar-width: thin;
  scrollbar-color: rgba(13,20,48,.25) transparent;
}
.co-organizer-title {
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--ink-0);
  text-align: center;
}
.co-organizer-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  list-style: none;
}
.co-organizer-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 7px 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.co-organizer-list a:hover,
.co-organizer-list a:focus-visible {
  border-color: rgba(13,20,48,.45);
  outline: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.co-organizer-list img {
  width: auto;
  max-width: 100%;
  max-height: 30px;
  object-fit: contain;
}

/* 1320px 본문과 고정 레일이 만나는 PC 폭에서는 우측 레일 공간을 명시적으로 확보한다. */
@media (min-width: 1200px) and (max-width: 1760px) {
  body.has-organizer-panel { padding-right: 214px; }
}

/* 좁은 PC 폭에서는 2025 화면처럼 본문 흐름 안의 로고 그리드로 전환한다. */
@media (max-width: 1199px) {
  .co-organizer-float {
    position: relative;
    top: auto;
    right: auto;
    z-index: 3;
    width: min(calc(100% - 64px), var(--container));
    max-height: none;
    margin: 32px auto 0;
    overflow: visible;
    transform: none;
  }
  .co-organizer-list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 960px) {
  .co-organizer-float {
    width: calc(100% - 40px);
    margin-top: 20px;
  }
}

/* 영어 모드 — JS가 textContent를 교체.
   '한글 전용' / '영어 전용' 두 개를 따로 두고 보이고/숨기는 경우만 클래스로 처리.
   display: revert 를 쓰면 <div>/<p>/<span> 등이 각자의 기본 display 값으로 복원됨. */
.lang-only-en { display: none; }
html[data-lang="en"] .lang-only-en { display: revert; }
html[data-lang="en"] .lang-only-ko { display: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent-mint);
  color: var(--bg-0);
  box-shadow: var(--shadow-glow-mint);
}
.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--ink-on-dark-0);
  border-color: rgba(255,255,255,.14);
}
.btn-outline {
  background: transparent;
  color: var(--ink-on-dark-1);
  border-color: rgba(255,255,255,.2);
}

/* ============================================================
   Pill (eyebrow)
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: rgba(125,240,160,.1);
  border: 1px solid rgba(125,240,160,.3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--accent-mint);
  text-transform: uppercase;
}
.pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 8px var(--accent-mint);
}

/* ============================================================
   Meta card (DATE/VENUE)
   ============================================================ */
.meta-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  min-width: 180px;
}
.meta-card .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-on-dark-3);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.meta-card .v {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-on-dark-0);
}
.meta-card .small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-on-dark-2);
}

/* ============================================================
   Countdown
   ============================================================ */
.countdown { display: flex; gap: 14px; }
.cd-cell {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-md);
  padding: 16px 22px;
  min-width: 96px;
  text-align: center;
}
.cd-cell .cnt {
  display: block;
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 600;
  color: var(--accent-cyan);
  line-height: 1;
  letter-spacing: -.02em;
}
.cd-cell .label {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-on-dark-3);
  letter-spacing: .15em;
}
@media (max-width: 960px) {
  .cd-cell { padding: 12px 16px; min-width: 72px; }
  .cd-cell .cnt { font-size: 28px; }
}

/* ============================================================
   Section head
   ============================================================ */
.section {
  position: relative;
  padding: 120px 32px;
  max-width: var(--container);
  margin: 0 auto;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: 720px;
  margin-bottom: 56px;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-mint);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink-on-dark-0);
  letter-spacing: -.02em;
}
.section-title em {
  font-style: normal;
  color: var(--accent-mint);
}
.section-lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-on-dark-1);
}

/* ============================================================
   Coming-soon modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 10, 31, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s ease;
}
.modal-overlay.is-open {
  display: flex;
  opacity: 1;
}
.modal-box {
  position: relative;
  max-width: 420px;
  width: 100%;
  background: linear-gradient(180deg, rgba(20, 42, 92, .92), rgba(10, 21, 56, .96));
  border: 1px solid rgba(125, 240, 160, .3);
  border-radius: var(--r-lg);
  padding: 40px 36px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 40px rgba(125, 240, 160, .15);
  transform: translateY(10px) scale(.98);
  transition: transform .25s ease;
}
.modal-overlay.is-open .modal-box {
  transform: translateY(0) scale(1);
}
.modal-icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(125, 240, 160, .12);
  border: 1px solid rgba(125, 240, 160, .35);
  display: grid; place-items: center;
  color: var(--accent-mint);
}
.modal-icon svg { width: 28px; height: 28px; }
.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-on-dark-0);
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.modal-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-on-dark-1);
  margin-bottom: 24px;
}
.modal-text strong {
  color: var(--accent-mint);
  font-weight: 700;
}
.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 28px;
  border-radius: var(--r-pill);
  background: var(--accent-mint);
  color: var(--bg-0);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-glow-mint);
}
.modal-close-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(125, 240, 160, .5);
}
.modal-close-x {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--ink-on-dark-1);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.modal-close-x:hover {
  background: rgba(255,255,255,.12);
  color: var(--ink-on-dark-0);
}
.modal-close-x svg { width: 14px; height: 14px; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .section { padding: 72px 20px; }
}
