/* ============================================================
   전대서한의원 — common.css  v2
   ============================================================ */

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  --brand-primary:   #0F4A6E;
  --brand-accent:    #1E6DA0;
  --brand-deep:      #083350;
  --brand-light:     #CBE3F5;
  --brand-sky:       #38BDF8;
  --brand-sky-soft:  #E0F2FE;
  --bg-white:        #FFFFFF;
  --bg-mint:         #EBF3F9;
  --bg-ivory:        #F5F9FC;
  --bg-neutral:      #EDF2F7;
  --bg-charcoal:     #0A1628;
  --text-primary:    #0F172A;
  --text-secondary:  #334155;
  --text-tertiary:   #64748B;
  --text-white:      #FFFFFF;
  --highlight:       rgba(15,74,110,0.16);
  --shadow-sm:       0 2px 8px rgba(15,74,110,0.07);
  --shadow-md:       0 4px 20px rgba(15,74,110,0.10);
  --shadow-lg:       0 8px 40px rgba(15,74,110,0.14);
  --radius-sm:       8px;
  --radius-md:       16px;
  --radius-lg:       24px;
  --radius-full:     9999px;
  --trans-fast:      0.18s ease;
  --trans-base:      0.28s ease;
  --trans-slow:      0.45s ease;
  --container-max:   1280px;
  --container-pad:   clamp(24px, 5vw, 64px);
  --header-h:        112px;
  --font-sans:       'Pretendard Variable','Pretendard',-apple-system,BlinkMacSystemFont,sans-serif;
  --font-serif:      'Noto Serif KR',serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); font-weight: 400; color: var(--text-primary); background: var(--bg-white); line-height: 1.7; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
strong { font-weight: 700; }

/* Typography */
.t-hero-xl  { font-size: clamp(52px,7vw,110px); font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; }
.t-hero     { font-size: clamp(40px,5vw,68px);  font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; }
.t-section  { font-size: clamp(30px,3.5vw,46px); font-weight: 700; line-height: 1.22; letter-spacing: -0.02em; }
.t-card     { font-size: clamp(19px,2vw,22px); font-weight: 600; line-height: 1.4; }
.t-lead     { font-size: clamp(17px,1.6vw,20px); font-weight: 500; line-height: 1.65; }
.t-body     { font-size: 17px; font-weight: 400; line-height: 1.75; }
.t-caption  { font-size: 15px; font-weight: 400; line-height: 1.6; color: var(--text-tertiary); }

.hl { position: relative; display: inline; }
.hl::after { content: ''; position: absolute; left: -2px; right: -2px; bottom: 2px; height: 50%; background: var(--highlight); z-index: -1; border-radius: 3px; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); }
.section-wrap { padding: clamp(64px,8vw,108px) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 20px; }

.section-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--brand-primary); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.section-label::before { content: ''; display: block; width: 22px; height: 2px; background: var(--brand-primary); border-radius: 2px; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 15px 32px; border-radius: var(--radius-full); font-size: 16px; font-weight: 700; transition: all var(--trans-base); white-space: nowrap; }
.btn-primary { background: var(--brand-primary); color: #fff; box-shadow: 0 4px 16px rgba(15,74,110,0.35); }
.btn-primary:hover { background: var(--brand-deep); box-shadow: 0 6px 22px rgba(8,51,80,0.4); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--brand-primary); border: 2px solid var(--brand-primary); }
.btn-outline:hover { background: var(--brand-primary); color: #fff; }
.btn-white { background: #fff; color: var(--brand-deep); box-shadow: var(--shadow-sm); }
.btn-white:hover { background: var(--bg-mint); transform: translateY(-1px); }
.btn-sm { padding: 10px 22px; font-size: 14px; }
.btn-lg { padding: 18px 40px; font-size: 18px; }

.card { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow var(--trans-base), transform var(--trans-base); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-body { padding: 26px; }

.num-card { background: #fff; border-radius: var(--radius-md); padding: 30px 26px; box-shadow: var(--shadow-sm); transition: box-shadow var(--trans-base), transform var(--trans-base); }
.num-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.num-card__prefix { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--brand-primary); text-transform: uppercase; margin-bottom: 12px; }
.num-card__prefix span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-mint); color: var(--brand-deep); font-size: 11px; font-weight: 700; }

.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--bg-mint); flex-shrink: 0; }
.icon-badge svg { width: 24px; height: 24px; stroke: var(--brand-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-badge-sm { width: 40px; height: 40px; }
.icon-badge-sm svg { width: 18px; height: 18px; }
.icon-badge-lg { width: 68px; height: 68px; }
.icon-badge-lg svg { width: 30px; height: 30px; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid #D8E8E8; margin-bottom: 28px; }
.tab-btn { padding: 12px 24px; font-size: 15px; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--trans-fast); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tab-btn.active, .tab-btn:hover { color: var(--brand-primary); border-bottom-color: var(--brand-primary); background: var(--bg-mint); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.postit { position: relative; padding: 28px 24px 24px; border-radius: 2px 16px 16px 16px; }
.postit::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 40px; height: 12px; background: rgba(0,0,0,0.08); border-radius: 0 0 4px 4px; }
.postit-teal  { background: #E0F2F2; }
.postit-ivory { background: #FBF8F3; }
.postit-rose  { background: #FDE8E8; }
.postit-sky   { background: #E3F0FB; }

.accordion-item { border-bottom: 1px solid #D8E8E8; }
.accordion-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 22px 0; font-size: 16px; font-weight: 600; color: var(--text-primary); gap: 16px; text-align: left; }
.accordion-btn .acc-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-mint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform var(--trans-base), background var(--trans-base); }
.accordion-btn .acc-icon svg { width: 13px; height: 13px; stroke: var(--brand-primary); fill: none; stroke-width: 2.5; }
.accordion-btn.open .acc-icon { transform: rotate(180deg); background: var(--brand-primary); }
.accordion-btn.open .acc-icon svg { stroke: #fff; }
.accordion-body { display: none; padding: 0 0 22px; font-size: 15px; color: var(--text-secondary); line-height: 1.8; }
.accordion-body.open { display: block; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 20px; }
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: #fff; }

.stat-block { text-align: center; }
.stat-block__num { display: block; font-size: clamp(40px,4.5vw,60px); font-weight: 900; color: var(--brand-primary); line-height: 1; letter-spacing: -0.03em; }
.stat-block__label { display: block; font-size: 16px; font-weight: 500; color: var(--text-secondary); margin-top: 10px; }

.img-cover { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.img-wrap { overflow: hidden; }

.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* Header */
#site-header { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 1px 0 rgba(26,43,43,0.08); }
.header-top { border-bottom: 1px solid #DDE8E8; padding: 12px 0; }
.header-top .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo__mark { width: 40px; height: 40px; background: var(--brand-primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.header-logo__mark svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header-logo__text { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; }
.header-logo__text em { color: var(--brand-primary); font-style: normal; }
.header-search { flex: 0 0 280px; position: relative; }
.header-search input { width: 100%; padding: 10px 40px 10px 18px; border: 1.5px solid #C8DEDE; border-radius: var(--radius-full); font-size: 15px; background: var(--bg-mint); color: var(--text-primary); transition: border-color var(--trans-fast); outline: none; }
.header-search input:focus { border-color: var(--brand-primary); }
.header-search input::placeholder { color: var(--text-tertiary); }
.header-search button { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); }
.header-search button svg { width: 17px; height: 17px; stroke: var(--text-tertiary); fill: none; stroke-width: 2; }
.header-right { display: flex; align-items: center; gap: 22px; }
.header-util-links { display: flex; gap: 16px; }
.header-util-links a { font-size: 14px; color: var(--text-secondary); font-weight: 500; transition: color var(--trans-fast); }
.header-util-links a:hover { color: var(--brand-primary); }
.header-phone { display: flex; align-items: center; gap: 7px; font-size: 18px; font-weight: 800; color: var(--brand-deep); letter-spacing: -0.02em; }
.header-phone svg { width: 18px; height: 18px; stroke: var(--brand-primary); fill: none; stroke-width: 2; }

/* GNB */
.gnb { position: relative; }
.gnb-inner { display: flex; align-items: center; }
.gnb-hamburger { padding: 15px 16px 15px 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.gnb-hamburger svg { width: 22px; height: 22px; stroke: var(--text-primary); fill: none; stroke-width: 1.8; }
.gnb-list { display: flex; flex: 1; }
.gnb-item { position: relative; }
.gnb-link { display: flex; align-items: center; padding: 16px 18px; font-size: 15px; font-weight: 600; color: var(--text-primary); transition: color var(--trans-fast); white-space: nowrap; }
.gnb-link:hover, .gnb-link.active { color: var(--brand-primary); }
.gnb-divider { width: 1px; height: 18px; background: #C8DEDE; margin: auto 8px; align-self: center; }
.gnb-aux .gnb-link { font-size: 14px; color: var(--text-secondary); }
.mega-drop { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; border-radius: 0 0 var(--radius-md) var(--radius-md); box-shadow: var(--shadow-lg); padding: 16px 0; z-index: 999; border-top: 2px solid var(--brand-primary); }
.gnb-item:hover .mega-drop { display: block; }
.mega-drop a { display: block; padding: 10px 26px; font-size: 15px; font-weight: 500; color: var(--text-secondary); transition: all var(--trans-fast); }
.mega-drop a:hover { color: var(--brand-primary); background: var(--bg-mint); padding-left: 32px; }

/* Sidebar */
#sidebar-fixed { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 900; display: flex; flex-direction: column; gap: 2px; }
.sb-btn { display: flex; align-items: center; gap: 8px; padding: 12px 15px; background: rgba(255,255,255,0.96); border-left: 3px solid var(--brand-primary); font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; box-shadow: -2px 2px 10px rgba(26,43,43,0.10); transition: all var(--trans-fast); min-width: 104px; cursor: pointer; }
.sb-btn:hover { background: var(--brand-primary); color: #fff; transform: translateX(-4px); }
.sb-btn svg { width: 17px; height: 17px; stroke: var(--brand-primary); fill: none; stroke-width: 2; flex-shrink: 0; }
.sb-btn:hover svg { stroke: #fff; }
.sb-btn.sb-phone { border-left-color: var(--brand-deep); background: var(--brand-deep); color: #fff; }
.sb-btn.sb-phone svg { stroke: #fff; }
.sb-btn.sb-phone:hover { background: #0a3333; }

/* Footer */
#site-footer { background: var(--bg-charcoal); color: rgba(255,255,255,0.75); padding: 60px 0 0; }
.footer-inner { display: grid; grid-template-columns: 280px 1fr; gap: 64px; margin-bottom: 44px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo__mark { width: 38px; height: 38px; background: rgba(255,255,255,0.12); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.footer-logo__mark svg { width: 22px; height: 22px; stroke: var(--brand-accent); fill: none; stroke-width: 1.8; }
.footer-logo__text { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 20px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.45); transition: color var(--trans-fast); }
.footer-links a:hover { color: rgba(255,255,255,0.85); }
.footer-nav { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; }
.footer-nav-col h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-nav-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 10px; transition: color var(--trans-fast); }
.footer-nav-col a:hover { color: rgba(255,255,255,0.85); }
.footer-bizinfo { border-top: 1px solid rgba(255,255,255,0.08); padding: 22px 0; font-size: 13px; color: rgba(255,255,255,0.32); line-height: 2; }
.footer-bizinfo strong { color: rgba(255,255,255,0.5); font-weight: 600; margin-right: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 22px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copyright { font-size: 13px; color: rgba(255,255,255,0.28); }
.footer-sns { display: flex; gap: 10px; }
.footer-sns a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; transition: background var(--trans-fast); }
.footer-sns a:hover { background: var(--brand-primary); }
.footer-sns svg { width: 17px; height: 17px; stroke: rgba(255,255,255,0.6); fill: none; stroke-width: 1.8; }
.footer-sns a:hover svg { stroke: #fff; }

/* Sample Modal */
#sample-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(10,25,25,0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sample-modal__box { background: #fff; border-radius: 20px; padding: 52px 56px; max-width: 480px; width: calc(100% - 48px); text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,0.28); }
.sample-modal__badge { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-mint); color: var(--brand-deep); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; padding: 6px 16px; border-radius: var(--radius-full); margin-bottom: 22px; border: 1.5px solid rgba(15,74,110,0.2); }
.sample-modal__badge svg { width: 14px; height: 14px; stroke: var(--brand-primary); fill: none; stroke-width: 2.5; }
.sample-modal__title { font-size: 26px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 16px; line-height: 1.3; }
.sample-modal__title span { color: var(--brand-primary); }
.sample-modal__desc { font-size: 16px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 34px; }
.sample-modal__btn { width: 100%; padding: 17px; background: var(--brand-primary); color: #fff; border: none; border-radius: var(--radius-full); font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(15,74,110,0.35); transition: all var(--trans-base); }
.sample-modal__btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.sample-modal__note { font-size: 13px; color: var(--text-tertiary); margin-top: 14px; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-nav { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .header-search, .header-util-links { display: none; }
  .gnb-list, .gnb-divider, .gnb-aux { display: none; }
  .gnb-list.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--shadow-lg); z-index: 999; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }
  .footer-nav { grid-template-columns: repeat(2,1fr); }
  #sidebar-fixed { display: none; }
  .sample-modal__box { padding: 36px 28px; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

/* ─── 로고 서브텍스트 ─────────────────────────────────────── */
.header-logo__textblock { display: flex; flex-direction: column; gap: 2px; }
.header-logo__sub { font-size: 11px; font-weight: 500; color: var(--text-tertiary); letter-spacing: 0.04em; line-height: 1; }

/* ─── 로고 v3 — 大 한자 마크 ────────────────────────────── */
.header-logo__mark {
  width: 52px; height: 52px;
  flex-shrink: 0;
}
.header-logo__mark svg { width: 52px; height: 52px; }
.header-logo__textblock { display: flex; flex-direction: column; gap: 3px; }
.header-logo__text { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; }
.header-logo__text em { color: var(--brand-primary); font-style: normal; }
.header-logo__sub { font-size: 11px; font-weight: 500; color: var(--text-tertiary); letter-spacing: 0.03em; line-height: 1; }

/* ─── 퀵액션 컬러 아이콘 배지 ────────────────────────────── */
.icon-badge-color {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  margin: 0 auto 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform var(--trans-base), box-shadow var(--trans-base);
}
.icon-badge-color svg { width: 26px; height: 26px; }
.icon-badge-color:hover, .res-icon-item:hover .icon-badge-color {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.kakao-badge { background: #FEE500 !important; }
.kakao-badge svg { width: 26px; height: 26px; }
.res-icon-item span { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* ─── 사이드바 컬러 아이콘 버전 ──────────────────────────── */
.sb-btn.sb-color {
  border-left: 3px solid var(--sb-c, var(--brand-primary));
  gap: 10px;
}
.sb-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: transform var(--trans-fast);
}
.sb-icon-wrap svg { width: 16px; height: 16px; }
.sb-btn.sb-color:hover .sb-icon-wrap { transform: scale(1.1); }
.sb-btn.sb-color:hover { background: rgba(255,255,255,0.98); color: var(--sb-c, var(--brand-primary)); }
.sb-btn.sb-color:hover { transform: translateX(-4px); }

/* ─── 히어로 슬라이드1 — 숫자 스탯 필 ───────────────────── */
.hs-stat-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px;
}
.hs-stat-pill {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 18px; border-radius: var(--radius-md);
  color: #fff; min-width: 84px;
}
.hs-stat-pill strong { font-size: 18px; font-weight: 900; line-height: 1.1; }
.hs-stat-pill span { font-size: 12px; font-weight: 500; opacity: 0.85; margin-top: 2px; }
