/* ===== 헤더 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-height);
  backdrop-filter: blur(16px); background: rgba(255,255,255,.86); border-bottom: 1px solid var(--color-line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -0.04em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--color-navy); color: var(--color-mint); font-size: 13px; }

/* 데스크톱 메뉴 */
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-top { display: inline-flex; align-items: center; gap: 5px; padding: 10px 14px; border-radius: 999px; color: #354155; font-size: 15px; font-weight: 700; opacity: .86; transition: background .15s, opacity .15s; }
.nav-item:hover .nav-top, .nav-item.active .nav-top { opacity: 1; color: var(--color-navy); background: #eef2f6; }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .6; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 184px; background: #fff; border: 1px solid var(--color-line); border-radius: 14px; padding: 8px;
  box-shadow: var(--shadow-soft); display: grid; gap: 2px; opacity: 0; visibility: hidden; transition: all .16s;
}
.has-children:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { padding: 10px 14px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: #44505f; }
.dropdown a:hover { background: #eef2f6; color: var(--color-navy); }
.header-cta { margin-left: 6px; padding: 11px 17px; border-radius: 999px; background: var(--color-navy); color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; }

/* 햄버거 버튼 */
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: #eef2f4; border-radius: 12px; padding: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--color-navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
body.m-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.m-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.m-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== 모바일 드로어 ===== */
.m-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(82vw, 340px); z-index: 70;
  background: #fff; box-shadow: -20px 0 60px rgba(0,0,0,.18); transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column;
}
body.m-open .m-drawer { transform: translateX(0); }
.m-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--color-line); }
.m-brand { font-weight: 900; color: var(--color-navy); }
.m-close { border: 0; background: #f1f4f7; width: 36px; height: 36px; border-radius: 10px; font-size: 16px; cursor: pointer; color: #44505f; }
.m-nav { padding: 12px 16px 28px; overflow-y: auto; }
.m-link, .m-top { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 12px; font-size: 17px; font-weight: 700; color: var(--color-navy); background: none; border: 0; border-bottom: 1px solid #f0f3f6; cursor: pointer; text-align: left; }
.m-caret { width: 10px; height: 10px; position: relative; }
.m-caret::before, .m-caret::after { content: ""; position: absolute; top: 4px; width: 10px; height: 2px; background: #8a97a8; border-radius: 2px; transition: transform .2s; }
.m-caret::after { transform: rotate(90deg); }
.m-top.open .m-caret::after { transform: rotate(0); }
.m-sub { max-height: 0; overflow: hidden; transition: max-height .26s ease; }
.m-sub-link { display: block; padding: 13px 12px 13px 24px; font-size: 15px; font-weight: 600; color: #5a6675; border-bottom: 1px solid #f4f6f8; }
.m-sub-link.all { color: var(--color-navy); font-weight: 700; }
.m-cta { display: block; text-align: center; margin-top: 20px; padding: 15px; border-radius: 12px; background: var(--color-navy); color: #fff; font-weight: 800; }
.m-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(8,20,34,.5); opacity: 0; transition: opacity .26s; }
body.m-open .m-overlay { opacity: 1; }

/* ===== 페이지 상단 헤더(서브 히어로) ===== */
.page-hero { background: radial-gradient(circle at 18% 20%, #24486e, var(--color-navy) 52%, #0c1b2c); color: #fff; padding: 64px 0 56px; }
.page-hero .kicker { color: var(--color-mint); }
.page-hero h1 { margin: 12px 0 10px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.05em; }
.page-hero p { color: rgba(255,255,255,.76); font-size: 17px; line-height: 1.7; max-width: 680px; }
.section[id] { scroll-margin-top: 90px; }

/* ===== 홈 바로가기 카드 ===== */
.home-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.home-card { background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: 0 10px 30px rgba(21,44,70,.05); transition: transform .15s, box-shadow .15s; }
.home-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(21,44,70,.12); }
.home-card h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.03em; color: var(--color-navy); }
.home-card p { margin: 0; color: var(--color-muted); font-size: 14.5px; line-height: 1.6; }

/* ===== 푸터 ===== */
.site-footer { padding: 44px 0; background: #071422; color: rgba(255,255,255,.74); }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.footer-grid strong { color: #fff; }
.foot-links { margin-top: 14px; font-size: 14px; }
.foot-links a { opacity: .8; }
.foot-links a:hover { opacity: 1; color: var(--color-mint); }

/* ===== 공지 팝업 ===== */
.popup-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(8,20,34,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.popup-card { width: min(420px, 100%); background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.popup-img img { width: 100%; display: block; max-height: 300px; object-fit: cover; }
.popup-body { padding: 24px 24px 20px; }
.popup-body .kicker { color: var(--color-navy); }
.popup-body h3 { margin: 6px 0 10px; font-size: 22px; letter-spacing: -0.03em; }
.popup-body p { margin: 0; color: var(--color-muted); line-height: 1.7; white-space: pre-wrap; }
.popup-body .popup-link { display: inline-block; margin-top: 16px; padding: 11px 18px; border-radius: 999px; background: var(--color-navy); color: #fff; font-weight: 800; font-size: 14px; }
.popup-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--color-line); }
.popup-foot button { flex: 1; padding: 14px; border: 0; background: #fff; cursor: pointer; font-weight: 700; color: #6a7280; }
.popup-foot button.popup-close { border-left: 1px solid var(--color-line); color: var(--color-navy); }

@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) { .home-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-card-grid { grid-template-columns: 1fr; } }
