/* ============================================================
   common.css - 공통 레이아웃 / 헤더 / 푸터 / 반응형
   경로: www/assets/css/common.css
   
   컬러 변수
   --color-navy : #003366  (메인 네이비)
   --color-green: #2E7D32  (포인트 그린)
   --color-gray : #666
   --color-bg   : #F8F9FA
   ============================================================ */

:root {
  --color-navy : #003366;
  --color-green: #2E7D32;
  --color-gray : #666;
  --color-light: #f0f4f8;
  --color-bg   : #F8F9FA;
  --color-border: #dde1e7;
  --radius     : 8px;
  --shadow     : 0 2px 8px rgba(0,0,0,0.08);
  --inner-width : 1200px;
  --header-h   : 64px;
}

/* ── 공통 래퍼 ─────────────────────────────── */
.inner {
  max-width: var(--inner-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── 헤더 ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  height: var(--header-h);
}
.site-header .inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

/* 로고 */
.logo { display: flex; align-items: center; }
.logo a { display: flex; flex-direction: row; align-items: center; gap: 0; }
.logo-img { height: 28px; width: auto; max-width: none; flex-shrink: 0; }
.logo-service {
  font-size: 14px; font-weight: 700; color: var(--color-navy);
  white-space: nowrap;
  padding-left: 10px; margin-left: 10px;
  border-left: 1px solid var(--color-border);
  line-height: 1;
}

/* GNB */
.gnb { flex: 1; }
.gnb > ul { display: flex; gap: 0; }
.gnb > ul > li { position: relative; }
.gnb > ul > li > a {
  display: block;
  padding: 0 20px;
  height: var(--header-h);
  line-height: var(--header-h);
  font-size: 15px;
  font-weight: 600;
  color: #333;
  transition: color .2s;
}
.gnb > ul > li:hover > a,
.gnb > ul > li.active > a { color: var(--color-navy); }
.gnb > ul > li.active > a { border-bottom: 2px solid var(--color-navy); }

/* 서브메뉴 */
.gnb .sub-menu {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px;
  z-index: 200;
}
.gnb > ul > li:hover .sub-menu { display: block; }
.gnb .sub-menu li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #444;
  transition: background .15s;
}
.gnb .sub-menu li a:hover { background: var(--color-light); color: var(--color-navy); }

/* 회원 메뉴 */
.header-member { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.header-member a {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 4px;
  transition: all .2s;
}
.btn-login    { color: var(--color-navy); }
.btn-login:hover { background: var(--color-navy); color: #fff; }
.btn-register { background: var(--color-navy); color: #fff; }
.btn-register:hover { background: #002244; }
.btn-mypage   { color: var(--color-navy); font-weight: 600; }
.btn-logout   { color: var(--color-gray); font-size: 12px; }

/* 배지 */
.badge-premium { background: var(--color-green); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }
.badge-company { background: var(--color-navy);  color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }
.badge-pending  { background: #f0ad4e; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }
.badge-rejected { background: #c0392b; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }
.badge-expired  { background: #999;    color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }

/* 햄버거 (모바일) */
.btn-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-left: auto; }
.btn-hamburger span { display: block; width: 22px; height: 2px; background: #333; border-radius: 2px; }

/* ── 모바일 메뉴 ────────────────────────────── */
.mobile-menu-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 300;
}
.mobile-menu {
  position: fixed;
  top: 0; right: -280px;
  width: 280px; height: 100%;
  background: #fff;
  z-index: 400;
  padding: 20px 0;
  transition: right .3s ease;
  overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu-overlay.open { display: block; }
.btn-mobile-close {
  display: block;
  margin: 0 16px 16px auto;
  font-size: 20px;
  color: #666;
}
.mobile-menu li a {
  display: block;
  padding: 12px 20px;
  font-size: 15px;
  color: #333;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu li.divider { height: 8px; background: var(--color-bg); }

/* ── 본문 ──────────────────────────────────── */
.site-main { min-height: calc(100vh - var(--header-h) - 200px); }

/* ── 푸터 ──────────────────────────────────── */
.site-footer { background: var(--color-navy); color: rgba(255,255,255,.8); padding: 40px 0; margin-top: 80px; }
.ft-layout { display: flex; align-items: flex-start; gap: 36px; }
.ft-logo-col { flex-shrink: 0; padding-top: 2px; }
.ft-logo-img { height: 40px; width: auto; max-width: none; display: block; }
.ft-body { flex: 1; }
.ft-tagline { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.ft-nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 14px; }
.ft-nav a { font-size: 13px; color: rgba(255,255,255,.7); transition: color .2s; }
.ft-nav a:hover { color: #fff; }
.ft-nav a.strong { color: #fff; font-weight: 600; }
.ft-info { font-size: 12px; line-height: 2; color: rgba(255,255,255,.5); margin-bottom: 8px; }
.ft-info p { margin: 0; }
.ft-sep { margin: 0 7px; opacity: .35; }
.ft-biz-check {
  display: inline-block; margin-left: 8px;
  padding: 1px 7px; border: 1px solid rgba(255,255,255,.3);
  border-radius: 3px; font-size: 11px; color: rgba(255,255,255,.6);
  text-decoration: none; vertical-align: middle; transition: border-color .2s, color .2s;
}
.ft-biz-check:hover { border-color: rgba(255,255,255,.7); color: #fff; }
.ft-mail { color: rgba(255,255,255,.6); text-decoration: none; }
.ft-mail:hover { color: #fff; text-decoration: underline; }
.ft-copy { font-size: 12px; color: rgba(255,255,255,.35); margin-top: 4px; }

/* ── 공통 UI 컴포넌트 ──────────────────────── */

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  cursor: pointer;
}
.btn-primary   { background: var(--color-navy);  color: #fff; }
.btn-primary:hover { background: #002244; }
.btn-secondary { background: var(--color-green); color: #fff; }
.btn-secondary:hover { background: #1b5e20; }
.btn-outline   { border: 1px solid var(--color-navy); color: var(--color-navy); }
.btn-outline:hover { background: var(--color-navy); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* 섹션 타이틀 */
.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-navy);
}
.section-title span { color: var(--color-green); }

/* 카드 */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }

/* 페이지 헤더 */
.page-header {
  background: var(--color-light);
  padding: 40px 0;
  margin-bottom: 40px;
}
.page-header h2 { font-size: 28px; font-weight: 700; color: var(--color-navy); }
.page-header p  { color: var(--color-gray); margin-top: 8px; }

/* 권한 안내 박스 */
.auth-notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: #795548;
}
.auth-notice a { color: var(--color-navy); font-weight: 600; text-decoration: underline; }

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-gray);
}
.empty-state p { font-size: 15px; margin-bottom: 16px; }

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 40px 0;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 14px;
  color: #444;
  transition: all .2s;
}
.pagination a:hover { border-color: var(--color-navy); color: var(--color-navy); }
.pagination span.current { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

/* ── 인증 모달 (전역) ───────────────────────── */
.auth-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .48);
  z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.auth-modal-box {
  background: #fff;
  border-radius: 18px;
  padding: 40px 32px 36px;
  width: 100%; max-width: 400px;
  text-align: center;
  box-shadow: 0 16px 56px rgba(0, 0, 0, .22);
  animation: authModalIn .2s ease;
}
@keyframes authModalIn {
  from { opacity: 0; transform: translateY(-12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1);   }
}
.auth-modal-icon  { font-size: 2.4rem; margin-bottom: 16px; line-height: 1; }
.auth-modal-title { font-size: 1.1rem; font-weight: 800; color: #1a2a3a; margin-bottom: 10px; }
.auth-modal-desc  { font-size: .875rem; color: #666; line-height: 1.65; margin-bottom: 28px; white-space: pre-line; }
.auth-modal-btns  { display: flex; flex-direction: column; gap: 10px; }
.auth-modal-btn-primary {
  display: block; padding: 13px 24px;
  background: var(--color-navy); color: #fff;
  border-radius: 8px; text-decoration: none;
  font-size: .95rem; font-weight: 700;
  transition: background .2s;
}
.auth-modal-btn-primary:hover { background: #1a4080; }
.auth-modal-btn-close {
  display: block; padding: 11px 24px;
  border: 1.5px solid var(--color-border); background: #fff;
  color: #666; border-radius: 8px;
  font-size: .875rem; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.auth-modal-btn-close:hover { border-color: #999; color: #333; }

/* ── 반응형 ────────────────────────────────── */
@media (max-width: 1024px) {
  .gnb { display: none; }
  .btn-hamburger { display: flex; }
  .header-member .btn-register,
  .header-member .btn-login { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .inner { padding: 0 16px; }
  .section-title { font-size: 20px; }
  .logo-img { height: 22px; }
  .logo-service { font-size: 12px; padding-left: 8px; margin-left: 8px; }
  .ft-layout { flex-direction: column; gap: 20px; }
  .ft-logo-img { height: 32px; }
  .page-header { padding: 28px 0; }
  .page-header h2 { font-size: 22px; }
  .site-footer { padding: 24px 0; margin-top: 48px; }
  .footer-top { flex-direction: column; }
  .footer-nav { gap: 12px; }
}

@media (max-width: 480px) {
  .btn-lg { padding: 12px 20px; font-size: 15px; }
  .logo-img { height: 18px; }
  .logo-service { font-size: 11px; padding-left: 6px; margin-left: 6px; }
  .ft-logo-img { height: 26px; }
}
