/* ===================================================
   정세영치과의원 — 공통 스타일시트
   컬러 테마: 다크 + 골드 (프리미엄 치과 브랜딩)
   v2 — 2026-09-21
   =================================================== */

/* ── 0. CSS 변수 ── */
:root {
  --primary:       #C9A96E;   /* 골드 — 메인 브랜드 */
  --primary-dark:  #A8843E;   /* 진한 골드 — hover */
  --primary-light: #F5EDD8;   /* 아주 연한 골드 — 배경용 */
  --accent:        #C9A96E;   /* 골드 통일 */
  --accent-hover:  #A8843E;
  --green:         #22C55E;   /* 민트 그린 — 보조 포인트 */
  --text:          #1A1A1A;   /* 거의 검정 — 본문 */
  --text-muted:    #5A5A5A;   /* 중간 회색 — 설명 */
  --text-light:    #9A9A9A;   /* 연회색 — 보조 */
  --bg:            #FFFFFF;   /* 흰 배경 */
  --bg-alt:        #F7F5F1;   /* 연한 베이지 — 섹션 배경 */
  --bg-dark:       #0A0A0A;   /* 거의 블랙 — 히어로/다크 섹션 */
  --dark2:         #141410;   /* 약간 밝은 다크 */
  --border:        #E5E3DF;   /* 연한 보더 */
  --shadow-sm:     0 1px 4px rgba(0,0,0,.06);
  --shadow:        0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.18);
  --radius:        10px;
  --radius-lg:     16px;
  --transition:    .2s ease;
  --max-width:     1140px;
  --nav-h:         70px;
  font-size: 16px;
}

/* ── 1. 리셋 & 베이스 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── 2. 타이포그래피 ── */
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
p  { color: var(--text-muted); line-height: 1.8; }

/* ── 3. 공통 컨테이너 ── */
.container {
  width: min(var(--max-width), 100% - 2rem);
  margin-inline: auto;
}

/* ── 4. 공통 섹션 ── */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-dark p { color: rgba(255,255,255,.65); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header .label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p  { max-width: 560px; margin-inline: auto; }

/* ── 5. 내비게이션 ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}
.nav-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--bg-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo .logo-icon svg { fill: var(--primary); width: 20px; height: 20px; }
.nav-logo .logo-sub {
  font-size: .68rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.nav-cta {
  background: var(--bg-dark) !important;
  color: var(--primary) !important;
  border-radius: 8px;
  padding: 9px 18px !important;
  font-weight: 700 !important;
  transition: background var(--transition) !important;
  white-space: nowrap;
  letter-spacing: .02em;
}
.nav-cta:hover {
  background: #1A1A1A !important;
  color: #fff !important;
}

/* 드롭다운 메가메뉴 */
.nav-links li { position: relative; list-style: none; }
.nav-arrow {
  font-size: .68em;
  vertical-align: middle;
  display: inline-block;
  transition: transform .2s ease;
  margin-left: 2px;
}
.has-drop:hover .nav-arrow,
.has-drop:focus-within .nav-arrow { transform: rotate(180deg); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  border: 1px solid var(--border);
  padding: 8px;
  min-width: 150px;
  z-index: 1100;
}
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -7px; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top: none;
  border-bottom-color: var(--border);
}
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top: none;
  border-bottom-color: #fff;
}
.has-drop:hover .nav-dropdown,
.has-drop:focus-within .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-dropdown a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* nav 우측 정보 로테이터 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-info-rotator {
  position: relative;
  width: 168px;
  height: 18px;
  overflow: hidden;
}
.nav-info-item {
  position: absolute;
  top: 0; left: 0; right: 0;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .5s ease;
}
.nav-info-item.active { opacity: 1; }

/* 햄버거 메뉴 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--primary-light); }
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── 6. 페이지 히어로 (서브페이지) ── */
.page-hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1A1410 100%);
  padding: calc(var(--nav-h) + 56px) 0 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A96E' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .container { position: relative; }
.page-hero .label-en {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.page-hero p  { color: rgba(255,255,255,.65); margin-top: 10px; max-width: 540px; }
.breadcrumb {
  display: flex;
  gap: 6px;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  margin-top: 20px;
}
.breadcrumb a { color: rgba(255,255,255,.4); }
.breadcrumb span { color: var(--primary); }

/* ── 7. 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  transition: all var(--transition);
  line-height: 1;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(169,132,62,.4); }
.btn-accent {
  background: var(--bg-dark);
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-accent:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white {
  background: #fff;
  color: var(--bg-dark);
  font-weight: 700;
}
.btn-white:hover { background: var(--primary-light); }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }

/* ── 8. 카드 ── */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card-icon {
  width: 52px; height: 52px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
}
.card-icon.accent { background: var(--primary-light); }
.card-icon.green  { background: #ECFDF5; }

/* ── 9. 그리드 ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── 10. 뱃지 / 태그 ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-blue   { background: var(--primary-light); color: var(--primary-dark); }
.badge-orange { background: var(--primary-light); color: var(--primary-dark); }
.badge-green  { background: #ECFDF5; color: #16A34A; }

/* ── 11. 아코디언 (FAQ) ── */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  font-weight: 600;
  font-size: .95rem;
  background: #fff;
  text-align: left;
  transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--bg-alt); }
.accordion-trigger .acc-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform var(--transition);
}
.accordion-item.open .acc-icon { transform: rotate(45deg); background: var(--primary); color: #fff; }
.accordion-body {
  display: none;
  padding: 0 20px 18px;
  background: var(--bg-alt);
  font-size: .9rem;
  color: var(--text-muted);
}
.accordion-item.open .accordion-body { display: block; }

/* ── 12. 강조 박스 ── */
.info-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  font-size: .9rem;
}
.warn-box {
  background: #FFF9EB;
  border-left: 4px solid #F59E0B;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  font-size: .9rem;
  color: #92400E;
}

/* ── 13. 진료시간 테이블 ── */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.hours-table th { text-align: left; color: var(--text-muted); font-weight: 600; }
.hours-table td { text-align: right; }
.hours-table tr.tonight td { color: var(--primary-dark); font-weight: 700; }
.hours-table tr.closed td  { color: var(--text-light); }

/* ── 14. 플로팅 예약 버튼 ── */
.floating-cta {
  position: fixed;
  bottom: 24px; right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}
.floating-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
  font-size: 1.25rem;
}
.floating-btn:hover { transform: scale(1.1); }
.float-kakao { background: #FEE500; color: #3C1E1E; }
.float-naver  { background: var(--bg-dark); color: var(--primary); }
.float-tel    { background: var(--primary); color: #fff; }

/* ── 15. 이미지 플레이스홀더 ── */
.img-placeholder {
  background: linear-gradient(135deg, #1A1A1A 0%, #2A2520 100%);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: .85rem;
}

/* ── 16. 푸터 ── */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.6);
  padding: 48px 0 24px;
  font-size: .88rem;
  border-top: 1px solid rgba(201,169,110,.2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-brand h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 10px; }
.footer-brand p  { color: rgba(255,255,255,.45); font-size: .85rem; line-height: 1.8; }
.footer-col h4 { color: rgba(255,255,255,.75); font-size: .88rem; font-weight: 700; margin-bottom: 12px; }
.footer-col li { margin-bottom: 7px; }
.footer-col a  { color: rgba(255,255,255,.45); transition: color var(--transition); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px;
  text-align: center;
  color: rgba(255,255,255,.28);
  font-size: .8rem;
}

/* ── 17. 홈 히어로 ── */
.hero {
  background:
    linear-gradient(135deg, rgba(8,8,6,.85) 0%, rgba(20,16,5,.80) 100%),
    url('https://images.unsplash.com/photo-1704455306251-b4634215d98f?auto=format&fit=crop&w=1600&q=80')
    center center / cover no-repeat;
  padding: calc(var(--nav-h) + 80px) 0 80px;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.hero::after {
  content: '';
  position: absolute;
  right: -100px; bottom: -80px;
  width: 550px; height: 550px;
  border-radius: 50%;
  background: rgba(201,169,110,.04);
}
.hero-inner { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block;
  background: rgba(201,169,110,.15);
  border: 1px solid rgba(201,169,110,.35);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.25;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero p {
  color: rgba(255,255,255,.65);
  font-size: 1.05rem;
  max-width: 500px;
  margin-bottom: 32px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── 18. 원칙 카드 ── */
.principle-num {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  margin-bottom: 14px;
  flex-shrink: 0;
}

/* ── 19. 서비스 탭 ── */
.tab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.tab-btn {
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--primary-dark); border-color: var(--primary); }
.tab-btn.active { background: var(--bg-dark); color: var(--primary); border-color: var(--bg-dark); }
.tab-panel { display: none; animation: fadeIn .2s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── 20. 서비스 스텝 ── */
.step-list { display: flex; flex-direction: column; gap: 20px; }
.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: .85rem;
}
.step-content h4 { font-size: 1rem; margin-bottom: 4px; }
.step-content p  { font-size: .88rem; }

/* ── 21. 장비 카드 ── */
.equip-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.equip-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.equip-img {
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.equip-body { padding: 20px; }
.equip-body h3 { font-size: 1.05rem; margin-bottom: 8px; }

/* ── 22. 연락처 블록 ── */
.contact-info-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.ci-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.ci-label { font-size: .78rem; color: var(--text-muted); margin-bottom: 2px; }
.ci-value { font-weight: 700; color: var(--text); font-size: .95rem; }

/* ── 23. 지도 wrapper ── */
.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.map-wrapper iframe { display: block; width: 100%; }

/* ── 반응형 ── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-links { display: none; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; background: #fff; padding: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; border-radius: var(--radius); }
  .nav-toggle { display: flex; }
  .nav-dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 4px 0 4px 16px;
    min-width: auto;
    background: var(--bg);
    margin-top: 2px;
  }
  .nav-dropdown::before, .nav-dropdown::after { display: none; }
  .has-drop .nav-dropdown { display: block; }
  .nav-right { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { justify-content: center; }
  footer .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
