/* 안중한의원 홈페이지 - 모바일 우선 반응형 스타일 */

:root {
  --color-primary: #2f5d4f;
  --color-primary-dark: #1f4238;
  --color-primary-light: #e8f0ec;
  --color-accent: #b5793a;
  --color-text: #232323;
  --color-text-muted: #5b5b5b;
  --color-bg: #fbfaf7;
  --color-surface: #ffffff;
  --color-border: #e4e0d8;
  --color-danger-bg: #fff4e8;
  --radius: 14px;
  --radius-lg: 20px;
  --max-width: 1100px;
  --header-h: 60px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(31, 66, 56, 0.1);
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 0.6em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg); /* 사이트 배경색과 완전히 동일한 불투명 배경 (기존 rgba+blur는 색이 미세하게 달라 보이는 원인) */
  border-bottom: 1px solid var(--color-border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.brand-logo { height: 34px; width: auto; display: block; }
@media (min-width: 820px) { .brand-logo { height: 42px; } }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 86vw);
  height: 100vh;
  background: var(--color-surface);
  padding: calc(var(--header-h) + 16px) 20px 32px;
  overflow-y: auto;
  transition: right 0.25s ease;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
}
.site-nav.open { right: 0; }
.nav-menu { display: flex; flex-direction: column; gap: 2px; }
.nav-menu > li { border-bottom: 1px solid var(--color-border); }
.nav-menu > li > a {
  display: block;
  padding: 14px 4px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--color-text);
}
.has-sub { position: relative; }
.sub-toggle {
  position: absolute;
  right: 0;
  top: 4px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.sub-toggle[aria-expanded="true"] { transform: rotate(180deg); }
.sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.sub-menu.open { max-height: 800px; }
.sub-menu li a {
  display: block;
  padding: 9px 4px 9px 14px;
  font-size: 0.94rem;
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-border);
}
.sub-menu li a:hover { color: var(--color-primary); border-left-color: var(--color-primary); }

.nav-cta { display: flex; gap: 8px; margin-top: 18px; }
.nav-cta .btn { flex: 1; text-align: center; padding: 12px 10px; font-size: 0.92rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-call { background: var(--color-accent); color: #fff; }
.btn-call:hover { background: #9c6529; }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-light); }
.btn-lg { padding: 14px 22px; font-size: 1.05rem; }

/* ---------- Floating call button ---------- */
.floating-call {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-weight: 800;
  font-size: 0.98rem;
}
.floating-call-icon { font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }
.hero-placeholder {
  margin: 24px auto 0;
  max-width: 420px;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(135deg, #eef2ef, #eef2ef 12px, #e5ebe6 12px, #e5ebe6 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--color-border);
}

/* ---------- Hero v2 (헤드라인 좌측 / 원장 사진 우측 / CTA는 하단 중앙) ---------- */
.hero-v2 {
  padding: 40px 0 32px;
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, #16332b 100%);
  color: #fff;
}
.hero-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
.hero-v2 h1 { font-size: 2.85rem; color: #fff; margin-bottom: 16px; } /* 기존 1.9rem 대비 1.5배 */
.hero-v2 .hero-desc-v2 { color: #d7e3dd; font-size: 1rem; max-width: 32em; margin-bottom: 0; }
.hero-photo-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
}
.hero-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.hero-photo-caption { margin: 14px 0 0; color: #fff; font-weight: 700; font-size: 1rem; }
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}
.btn-outline-invert {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-outline-invert:hover { background: rgba(255, 255, 255, 0.12); }

.btn-icon { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; }
.btn-kakao { background: #FAE100; color: #3C1E1E; }
.btn-kakao:hover { background: #f0d700; }
.btn-naver { background: #2DB400; color: #fff; }
.btn-naver:hover { background: #259900; }

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; }
  .hero-v2 h1 { font-size: 3.6rem; } /* 기존 2.4rem 대비 1.5배 */
}

@media (max-width: 480px) {
  .hero-v2 h1 { font-size: 2.1rem; } /* 초소형 화면에서 줄바꿈 붕괴 방지 */
}

/* ---------- Section ---------- */
.section { padding: 44px 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: 1.5rem; color: var(--color-primary-dark); }
.section-head p { max-width: 40em; margin: 0 auto; }
.section-foot { text-align: center; margin-top: 26px; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.category-card, .treatment-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover, .treatment-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.category-icon { font-size: 1.8rem; }
.category-card h3 { margin: 10px 0 8px; color: var(--color-primary-dark); }
.treatment-card h4 { margin-bottom: 8px; color: var(--color-primary-dark); font-size: 1.05rem; }
.category-link, .treatment-link { color: var(--color-accent); font-weight: 700; font-size: 0.9rem; }

.treatment-card-short { padding: 0; overflow: hidden; }
.treatment-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--color-primary-light), #f4f1ea);
  color: var(--color-primary-dark);
}
.treatment-card-short h4 { margin: 14px 20px 6px; font-size: 1rem; color: var(--color-primary-dark); }
.treatment-card-short p { margin: 0 20px 18px; font-size: 0.86rem; color: var(--color-text-muted); }

/* ---------- Doctors ---------- */
.doctor-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.doctor-photo-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.doctor-gen { color: var(--color-accent); font-weight: 700; font-size: 0.85rem; }
.doctor-card h3 { margin: 4px 0 10px; }
.doctor-schedule {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}
.doctor-detail summary { cursor: pointer; color: var(--color-primary); font-weight: 700; margin-top: 12px; }
.doctor-detail ul { margin: 10px 0; padding-left: 1.1em; list-style: disc; color: var(--color-text-muted); }
.doctor-detail li { margin-bottom: 4px; }
.paper-list { font-size: 0.86rem; color: var(--color-text-muted); }

/* 홈페이지용 의료진 요약 카드 - 큰 사진 + 짧은 텍스트 */
.doctor-card-home { padding: 0; overflow: hidden; text-align: center; }
.doctor-photo-lg {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--color-primary-light), #f2efe7);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2.4rem;
}
.doctor-card-home .doctor-gen { display: block; margin-top: 16px; }
.doctor-card-home h3 { margin: 4px 0 6px; }
.doctor-card-home p.doctor-short { margin: 0 18px 20px; font-size: 0.88rem; }

/* ---------- Process steps ---------- */
.process-steps { display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 640px) { .process-steps { grid-template-columns: repeat(4, 1fr); } }
.process-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: left;
}
.process-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.process-step h4 { margin-bottom: 6px; font-size: 1rem; }
.process-step p { font-size: 0.88rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px 18px;
  margin-bottom: 10px;
}
.faq-item summary { cursor: pointer; list-style: none; padding: 14px 26px 14px 0; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 12px;
  font-size: 1.3rem;
  color: var(--color-accent);
  font-weight: 700;
}
.faq-item[open] summary::after { content: "–"; }
.faq-q { display: inline; font-size: 1rem; color: var(--color-text); margin: 0; }
.faq-q::before { content: "Q. "; color: var(--color-primary); font-weight: 800; }
.faq-a { padding: 0 0 16px; color: var(--color-text-muted); }
.faq-a::before { content: "A. "; color: var(--color-accent); font-weight: 800; }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; margin: 16px 0; border-radius: var(--radius); border: 1px solid var(--color-border); }
.data-table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: 0.92rem; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.data-table th { background: var(--color-primary-light); color: var(--color-primary-dark); font-weight: 700; }
.data-table tr:last-child td { border-bottom: none; }

/* ---------- Callout / legal notice ---------- */
.callout {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.92rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout a { color: var(--color-primary-dark); font-weight: 700; text-decoration: underline; }
.legal-note {
  background: var(--color-danger-bg);
  border: 1px solid #eeddc0;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.82rem;
  color: #7a5b23;
  margin-top: 28px;
}
.confirm-needed { color: var(--color-accent); font-weight: 700; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--color-text-muted); padding: 14px 0 0; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.crumb-sep { margin: 0 6px; }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--color-primary-dark); color: #fff; padding: 34px 0; }
.cta-banner-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; text-align: center; }
.cta-banner-text { color: #eef4f1; font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }
.cta-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cta-banner .btn-outline { border-color: #fff; color: #fff; }
.cta-banner .btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Detail page blocks ---------- */
.detail-header { padding: 30px 0 8px; }
.detail-header h1 { font-size: 1.55rem; color: var(--color-primary-dark); }
.detail-oneliner { font-size: 1.02rem; }
.block { margin: 28px 0; }
.block h2 { font-size: 1.2rem; color: var(--color-primary-dark); border-left: 4px solid var(--color-accent); padding-left: 10px; }
.block h3 { font-size: 1.02rem; color: var(--color-primary-dark); margin-top: 18px; }
.check-list { padding-left: 1.2em; list-style: none; }
.check-list li { position: relative; padding-left: 1.5em; margin-bottom: 8px; color: var(--color-text-muted); }
.check-list li::before { content: "✔"; position: absolute; left: 0; color: var(--color-primary); font-weight: 700; }
.plain-list { padding-left: 1.2em; list-style: disc; color: var(--color-text-muted); }
.plain-list li { margin-bottom: 6px; }

/* ---------- News list ---------- */
.news-item {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.news-date { font-size: 0.8rem; color: var(--color-accent); font-weight: 700; }
.news-item h4 { margin: 4px 0 6px; font-size: 1rem; }
.news-item p { margin: 0; font-size: 0.92rem; }

/* ---------- 홈페이지 진료시간·오시는 길 패널 ---------- */
.hl-panel {
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
}
.hl-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 780px) {
  .hl-grid { grid-template-columns: 1.15fr 1fr; gap: 0; }
  .hl-col-hours { padding-right: 30px; border-right: 1px solid rgba(47, 93, 79, 0.18); }
  .hl-col-location { padding-left: 30px; }
}
.hl-col h3 { color: var(--color-primary-dark); font-size: 1.1rem; margin-bottom: 14px; }
.schedule-matrix { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; font-size: 0.84rem; }
.schedule-matrix th, .schedule-matrix td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--color-border); }
.schedule-matrix th { background: var(--color-primary); color: #fff; font-weight: 700; }
.schedule-matrix td:first-child, .schedule-matrix th:first-child { text-align: left; padding-left: 12px; }
.schedule-matrix .doc-name { font-weight: 700; color: var(--color-primary-dark); }
.schedule-matrix .dot { color: var(--color-primary); font-weight: 800; }
.hl-hours-summary { margin-top: 14px; font-size: 0.86rem; line-height: 1.7; }
.hl-hours-summary strong { color: var(--color-primary-dark); }

.transit-block { margin-bottom: 18px; }
.transit-block h4 { font-size: 0.92rem; color: var(--color-primary-dark); margin-bottom: 6px; }
.transit-block p { margin: 0; font-size: 0.88rem; }
.route-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.route-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.hl-map-mini {
  display: block;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 16px;
}
.hl-map-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.parking-bar {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(47, 93, 79, 0.18);
  font-size: 0.88rem;
}
.parking-bar strong { color: var(--color-primary-dark); }

/* ---------- 사진 (노션 원천자료 이미지) ---------- */
.single-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.single-photo img { width: 100%; height: auto; display: block; }

.photo-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-grid figure {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--color-primary-light);
}
.photo-grid figcaption {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ---------- Info list (location/hours) ---------- */
.info-list { display: grid; gap: 10px; }
.info-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.info-row .label { flex: 0 0 84px; font-weight: 700; color: var(--color-primary-dark); }
.info-row .value { color: var(--color-text-muted); }
.map-placeholder {
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  border: 1px dashed var(--color-border);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

/* ---------- Privacy ---------- */
.privacy-article { margin-bottom: 26px; }
.privacy-article h2 { font-size: 1.05rem; color: var(--color-primary-dark); }

footer.site-footer {
  background: var(--color-primary-dark);
  color: #cfe0d8;
  padding: 34px 0 100px;
  margin-top: 40px;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.footer-clinic { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.footer-info { font-size: 0.86rem; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.footer-info a { color: #cfe0d8; text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.86rem; margin-bottom: 14px; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.78rem; color: #9db6ac; }

/* ---------- Desktop nav ---------- */
@media (min-width: 820px) {
  :root { --header-h: 68px; }
  .header-inner { padding: 0 20px; }
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    box-shadow: none;
    overflow: visible; /* 모바일 드로어용 overflow-y:auto가 desktop에서 서브메뉴를 잘라내던 원인 */
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .nav-menu { flex-direction: row; align-items: center; gap: 4px; }
  .nav-menu > li { border-bottom: none; }
  .nav-menu > li > a { padding: 10px 12px; font-size: 0.95rem; border-radius: 8px; }
  .nav-menu > li > a:hover { background: var(--color-primary-light); }
  .has-sub { position: relative; }
  .sub-toggle { display: none; }

  /* 서브메뉴: 문서 흐름에서 완전히 빼내는 오버레이. display를 토글하지 않고
     opacity/visibility로만 열고 닫아서, 어떤 경우에도 페이지 콘텐츠를 밀어내지 않는다. */
  .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    min-width: 220px;
    padding: 8px;
    z-index: 9999; /* 헤더·히어로 등 페이지의 다른 모든 요소보다 확실히 위 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    /* 닫힐 때는 빠르게(100ms) — 다른 메인 메뉴로 옮겨갈 때 이전 서브메뉴가 남아 겹쳐 보이지 않도록 */
    transition: opacity 0.1s ease, transform 0.1s ease, visibility 0.1s;
  }
  .has-sub.open .sub-menu,
  .has-sub:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    /* 열릴 때는 조금 더 자연스럽게(180ms) */
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  /* 메뉴~서브메뉴 사이 여백을 마우스가 지나갈 수 있는 보이지 않는 히트 영역으로 이어붙임 */
  .has-sub::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
  }
  .sub-menu li a { border-left: none; border-radius: 6px; padding: 9px 12px; }
  .sub-menu li a:hover { background: var(--color-primary-light); }
  .nav-cta { margin-top: 0; }
  .floating-call { display: none; }
}

@media (max-width: 819px) {
  .site-nav { visibility: hidden; pointer-events: none; }
  .site-nav.open { visibility: visible; pointer-events: auto; }
}
