/* ====================================================
   common.css  —  모든 페이지 공통 스타일
   ==================================================== */

/* ── 리셋 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: '맑은 고딕', 'Malgun Gothic', sans-serif; font-size: 14px; color: #222; }
a { color: inherit; text-decoration: none; }

/* ── 햄버거 버튼 ── */
.ham-btn {
  background: none; border: none; color: #fff;
  font-size: 22px; cursor: pointer; line-height: 1; flex-shrink: 0;
  padding: 4px 0 4px 8px;
}
.ham-btn:hover { opacity: .8; }

/* ── 햄버거 오버레이 ── */
.ham-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.35); z-index: 200;
}
.ham-overlay.open { display: block; }

/* ── 햄버거 드롭다운 패널 ── */
.ham-menu {
  position: fixed; top: 0; right: -260px; z-index: 201;
  width: 240px; height: 100vh; background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,.2);
  overflow-y: auto; padding-bottom: 24px;
  transition: right .25s ease;
}
.ham-menu.open { right: 0; }
.ham-header {
  background: linear-gradient(135deg, #1a6cb5 0%, #0fa4c7 100%);
  color: #fff; padding: 18px 16px; font-size: 14px; font-weight: 700;
}
.ham-section-label {
  background: #e8f0f8; color: #1a6cb5;
  padding: 7px 16px; font-size: 11px; font-weight: 700;
  letter-spacing: .5px; border-top: 1px solid #dde3ea;
}
.ham-item {
  display: block; padding: 10px 20px; color: #334;
  font-size: 13px; border-bottom: 1px solid #f0f4f8;
  transition: background .1s;
}
.ham-item:hover { background: #dce8f5; color: #1a6cb5; }
.ham-item.ham-home { font-weight: 600; border-bottom: 2px solid #e8f0f8; }
.ham-item.current { background: #e8f0f8; color: #1a6cb5; font-weight: 700; }

/* ── 위로가기 버튼 ── */
.scroll-top {
  position: fixed; bottom: 56px; right: 20px; z-index: 150;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #1a6cb5 0%, #0fa4c7 100%);
  color: #fff; border: none; cursor: pointer;
  font-size: 18px; line-height: 1;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s, transform .2s;
  display: flex; align-items: center; justify-content: center;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-3px); }

/* ── PDF 모바일 열기 버튼 ── */
.pdf-mobile-btn {
  display: none;
  text-align: center; padding: 20px 16px;
  background: #e8f4fd; border: 2px solid #1a6cb5;
  border-radius: 8px; margin: 20px; font-size: 15px;
  color: #1a6cb5; font-weight: 700; text-decoration: none;
}
@media (max-width: 768px) {
  .pdf-mobile-btn { display: block; }
  .pdf-wrap iframe { display: none !important; }
}

/* ── 푸터 ── */
footer {
  position: sticky; bottom: 0; z-index: 50;
  background: #1a3a5c; color: rgba(255,255,255,.65);
  text-align: center; padding: 12px 20px; font-size: 12px;
  box-shadow: 0 -2px 8px rgba(0,0,0,.2);
}
footer a { color: inherit; text-decoration: none; transition: color .15s; }
footer a:hover { color: #fff; }
