/* ============================================================
   common.css — 보험친구닷컴 공통 스타일
   모든 페이지에서 <link rel="stylesheet" href="common.css"> 로 불러옵니다.
   버전: 2025
============================================================ */

/* ── 리셋 & 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CSS 변수 ── */
:root {
  --primary:       #1A3A6B;
  --primary-dark:  #0D2344;
  --primary-light: #EBF0F8;
  --accent:        #E8A020;
  --text-dark:     #1C1C2E;
  --text-mid:      #4A4A6A;
  --text-light:    #8888AA;
  --bg:            #FFFFFF;
  --bg-soft:       #F7F9FC;
  --border:        #E0E8F4;
}

/* ── 기본 body ── */
body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-dark);
  background: var(--bg);
  line-height: 1.6;
}

/* ════════════════════════════════════
   HEADER
════════════════════════════════════ */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}

/* 로고 */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-text { display: flex; flex-direction: column; }
.logo-text .sub  { font-size: 10px; color: var(--text-light); font-weight: 400; }
.logo-text .main { font-size: 18px; font-weight: 700; color: var(--primary-dark); }

/* 데스크탑 nav */
nav { display: flex; align-items: center; gap: 32px; }
nav a { font-size: 14px; font-weight: 500; color: var(--text-mid); text-decoration: none; transition: color 0.2s; }
nav a:hover, nav a.active { color: var(--primary); }

/* 상담 버튼 */
.btn-contact {
  background: var(--primary); color: white;
  border: none; padding: 10px 22px;
  border-radius: 25px; font-size: 14px; font-weight: 600;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer; transition: background 0.2s;
}
.btn-contact:hover { background: var(--primary-dark); }

/* ════════════════════════════════════
   DROPDOWN
════════════════════════════════════ */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 4px; }
.nav-dropdown > a::after { content: '▾'; font-size: 11px; }

.dropdown-menu {
  display: none;
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(26,58,107,0.12);
  min-width: 160px; overflow: hidden;
  z-index: 200; padding-top: 8px; margin-top: 0;
}
.dropdown-menu::before {
  content: ''; position: absolute;
  top: -8px; left: 0; right: 0; height: 8px;
}
.nav-dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block; padding: 11px 18px;
  font-size: 14px; color: var(--text-dark);
  text-decoration: none; transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-menu a.active { color: var(--primary); font-weight: 700; background: var(--primary-light); }

/* ════════════════════════════════════
   HAMBURGER
════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; padding: 4px; border-radius: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--primary-dark); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════════
   MOBILE MENU
════════════════════════════════════ */
.mobile-menu-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 200;
}
.mobile-menu-overlay.active { display: block; }

.mobile-menu {
  position: fixed; top: 0; right: 0;
  width: 280px; height: 100%;
  background: white; z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}
.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 56px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-title { font-size: 15px; font-weight: 700; color: var(--primary-dark); }
.mobile-menu-close {
  width: 32px; height: 32px;
  background: var(--bg-soft); border: none; border-radius: 50%;
  font-size: 15px; cursor: pointer; color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
}

.mobile-nav { display: flex; flex-direction: column; padding: 4px 0; flex: 1; overflow-y: auto; }
.mobile-nav a {
  display: block; padding: 10px 20px; font-size: 15px; font-weight: 500;
  color: var(--text-dark); text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.mobile-nav a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-nav a.sub-item {
  padding: 10px 20px 10px 34px; font-size: 14px;
  color: var(--text-mid); background: var(--bg-soft);
}

.mobile-menu-cta { padding: 20px; border-top: 1px solid var(--border); }
.mobile-menu-cta .btn-contact { width: 100%; padding: 13px; font-size: 15px; }

/* ════════════════════════════════════
   FOOTER (공통)
════════════════════════════════════ */
footer {
  background: #0D1B2E;
  color: rgba(255,255,255,0.5);
  padding: 28px 5%;
  text-align: center;
  font-size: 12px;
}

/* ════════════════════════════════════
   반응형
════════════════════════════════════ */
@media (max-width: 1250px) {
  nav { display: none; }
  .hamburger { display: flex; }
}
