/* ===== 이룸한의원 공통 스타일 ===== */
:root {
  --green: #2f5d50;
  --green-dark: #1f4238;
  --green-soft: #e8efe9;
  --wood: #b08a62;
  --beige: #f6f1ea;
  --ink: #222;
  --muted: #6b6b6b;
  --line: #e5e1da;
  --white: #fff;
  --header-h: 84px;
  --serif: "Noto Serif KR", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--white); line-height: 1.6; word-break: keep-all; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.inner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; }
.section-head { text-align: center; margin-bottom: 60px; }
.section-head .eyebrow { display: inline-block; font-size: 13px; letter-spacing: .2em; color: var(--wood); font-weight: 600; margin-bottom: 14px; }
.section-head h2 { font-family: var(--serif); font-size: 38px; font-weight: 600; line-height: 1.35; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 17px; }

/* ===== 로고 ===== */
.logo { display: flex; align-items: center; gap: 10px; }
.logo svg { width: 40px; height: 36px; }
.logo-text { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }

/* ===== 헤더 ===== */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 100; color: var(--white); transition: background .3s, color .3s, box-shadow .3s; }
.header .inner { max-width: 1400px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header.scrolled, .header.solid { background: var(--white); color: var(--ink); box-shadow: 0 2px 16px rgba(0,0,0,.06); }
.header.scrolled .logo svg, .header.solid .logo svg { color: var(--green); }
.gnb { display: flex; gap: 6px; }
.gnb a { display: block; padding: 10px 14px; font-size: 16px; font-weight: 500; border-radius: 6px; transition: color .2s; position: relative; }
.gnb a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: currentColor; transform: scaleX(0); transition: transform .25s; }
.gnb a:hover::after, .gnb a.active::after { transform: scaleX(1); }
.header.scrolled .gnb a:hover, .header.solid .gnb a:hover, .header.solid .gnb a.active { color: var(--green); }
.gnb .num { font-size: 12px; opacity: .6; margin-right: 4px; }
.menu-btn { display: none; width: 40px; height: 40px; background: none; border: 0; color: inherit; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; margin: 5px auto; background: currentColor; transition: .3s; }

/* ===== 메인 슬라이더 ===== */
.hero { position: relative; height: 100vh; min-height: 600px; max-height: 1000px; overflow: hidden; background: var(--green-dark); }
.hero-media, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity 1.2s ease; }
.slide.active { opacity: 1; z-index: 1; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.08); transition: transform 6s ease; }
.slide.active .slide-bg { transform: scale(1); }
.slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.1)); }
/* 사진이 없을 때 보이는 기본 배경 (images/slide1~3.jpg 넣으면 사진이 덮어씀) */
.slide:nth-child(1) .slide-bg { background-image: url("../images/slide1.jpg"), linear-gradient(135deg, #2f5d50, #8a7356); }
.slide:nth-child(2) .slide-bg { background-image: url("../images/slide2.jpg"), linear-gradient(135deg, #6f5a43, #2f5d50); }
.slide:nth-child(3) .slide-bg { background-image: url("../images/slide3.jpg"), linear-gradient(135deg, #1f4238, #b08a62); }
.slide-text { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; color: var(--white); max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.slide-text .eyebrow { font-size: 15px; letter-spacing: .25em; opacity: .85; margin-bottom: 20px; }
.slide-text h2 { font-family: var(--serif); font-size: 56px; font-weight: 600; line-height: 1.3; }
.slide-text p { margin-top: 20px; font-size: 20px; opacity: .9; }
.slide .slide-text > * { opacity: 0; transform: translateY(24px); transition: opacity .8s .4s, transform .8s .4s; }
.slide.active .slide-text > * { opacity: 1; transform: none; }
.slide.active .slide-text p { transition-delay: .6s; }
.hero-ctrl { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 18px; color: var(--white); width: 100%; max-width: 1400px; padding: 0 24px; }
.hero-ctrl button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 22px; padding: 4px 8px; opacity: .8; }
.hero-ctrl button:hover { opacity: 1; }
.dots { display: flex; gap: 10px; }
.dots button { width: 40px; height: 3px; padding: 0; background: rgba(255,255,255,.4); position: relative; overflow: hidden; }
.dots button.active::after { content: ""; position: absolute; inset: 0; background: var(--white); animation: dotfill 5s linear forwards; }
.hero.paused .dots button.active::after { animation-play-state: paused; }
@keyframes dotfill { from { transform: translateX(-100%); } to { transform: none; } }
.scroll-down { position: absolute; right: 40px; bottom: 50px; z-index: 5; color: var(--white); font-size: 12px; letter-spacing: .2em; writing-mode: vertical-rl; opacity: .8; }

/* ===== 치료 프로세스 ===== */
.process { background: var(--beige); }
.steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 16px; }
.step { background: var(--white); border-radius: 16px; padding: 0 28px 40px; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.04); overflow: hidden; }
.step-img { margin: 0 -28px 28px; aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-soft); }
.step-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.step:hover .step-img img { transform: scale(1.05); }

/* ===== 진료 안내 카드 ===== */
.clinic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.clinic-card { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--green); color: var(--white); }
.clinic-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.clinic-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(20,40,34,.85)); transition: background .4s; }
.clinic-card:hover img { transform: scale(1.07); }
.clinic-card:hover::after { background: linear-gradient(180deg, rgba(47,93,80,.35), rgba(20,40,34,.9)); }
.cc-text { position: absolute; left: 28px; right: 28px; bottom: 26px; z-index: 1; }
.cc-text span { font-size: 13px; letter-spacing: .15em; color: #e9d6b8; font-weight: 700; }
.cc-text h3 { font-size: 24px; margin: 4px 0 6px; }
.cc-text p { font-size: 15px; opacity: .85; }
.step .step-no { font-size: 13px; font-weight: 700; color: var(--wood); letter-spacing: .15em; }
.step .icon { width: 76px; height: 76px; margin: 18px auto 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: none; place-items: center; }
.step .icon svg { width: 36px; height: 36px; }
.step h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }
.step-arrow { display: grid; place-items: center; color: var(--wood); font-size: 28px; }
.basic-care { margin-top: 40px; background: var(--green); color: var(--white); border-radius: 16px; padding: 32px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.basic-care .label { font-size: 14px; letter-spacing: .15em; opacity: .75; }
.basic-care .items { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.basic-care .items span { background: rgba(255,255,255,.14); border-radius: 999px; padding: 8px 20px; font-size: 17px; font-weight: 600; }
.basic-care .time { font-family: var(--serif); font-size: 26px; }
.basic-care .time strong { font-size: 40px; margin: 0 4px; }

/* ===== 누적 치료 수 ===== */
.stats { background: linear-gradient(rgba(20,40,34,.86), rgba(20,40,34,.9)), url("../images/stats.jpg") center / cover fixed, var(--green-dark); color: var(--white); }
.stats .section-head p { color: rgba(255,255,255,.65); }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
.stat { padding: 44px 12px; text-align: center; border-right: 1px solid rgba(255,255,255,.18); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--serif); font-size: 44px; font-weight: 600; color: #e9d6b8; }
.stat .unit { font-size: 18px; margin-left: 2px; color: #e9d6b8; }
.stat .label { margin-top: 8px; font-size: 16px; opacity: .85; }
.stats .basis { margin-top: 24px; text-align: right; font-size: 13px; opacity: .55; }

/* ===== 치료 시간과 비용 ===== */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.price-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--white); transition: transform .3s, box-shadow .3s; }
.price-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.price-card .head { padding: 28px 30px; background: var(--beige); border-bottom: 1px solid var(--line); }
.price-card .head .tag { font-size: 13px; color: var(--wood); font-weight: 700; letter-spacing: .1em; }
.price-card .head h3 { font-size: 22px; margin-top: 4px; }
.price-card ul { padding: 10px 30px 24px; }
.price-card li { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.price-card li:last-child { border-bottom: 0; }
.price-card .name { font-weight: 600; }
.price-card .name small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.price-card .won { color: var(--green); font-weight: 700; white-space: nowrap; }
.price-note { margin-top: 28px; text-align: center; color: var(--muted); font-size: 14px; }

/* ===== 진료시간 · 오시는 길 ===== */
.visit { background: var(--beige); }
.visit-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.hours { background: var(--white); border-radius: 16px; padding: 44px 40px; }
.hours h3, .location h3 { font-family: var(--serif); font-size: 26px; margin-bottom: 24px; }
.hours table { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 18px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 17px; }
.hours th { width: 40%; font-weight: 600; color: var(--green); }
.hours td { font-weight: 500; }
.hours .notice { margin-top: 22px; padding: 14px 18px; background: #fbf3e6; border-radius: 10px; color: #8a5a20; font-size: 15px; font-weight: 600; }
.location { display: flex; flex-direction: column; }
.map { flex: 1; min-height: 320px; border-radius: 16px; background: #e4ded4; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.loc-info { margin-top: 20px; display: grid; gap: 10px; font-size: 16px; }
.loc-info div { display: flex; gap: 16px; }
.loc-info dt { width: 70px; flex-shrink: 0; font-weight: 700; color: var(--green); }

/* ===== 서브페이지 ===== */
.sub-visual { height: 420px; background-color: var(--green); background-image: linear-gradient(135deg, var(--green), #8a7356); background-size: cover; background-position: center; color: var(--white); display: flex; align-items: flex-end; padding-bottom: 70px; }
.sub-visual .eyebrow { font-size: 14px; letter-spacing: .2em; opacity: .8; }
.sub-visual h1 { font-family: var(--serif); font-size: 44px; font-weight: 600; margin-top: 8px; }
.sub-empty { min-height: 50vh; display: grid; place-items: center; text-align: center; color: var(--muted); }
.sub-empty strong { display: block; font-size: 22px; color: var(--ink); margin-bottom: 8px; }

/* ===== 푸터 ===== */
.footer { background: #1a1a1a; color: rgba(255,255,255,.6); padding: 60px 0; font-size: 14px; }
.footer .inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer .logo { color: var(--white); margin-bottom: 18px; }
.footer .logo-text { font-size: 20px; }
.footer address { font-style: normal; line-height: 1.9; }
.footer address span + span::before { content: "|"; margin: 0 10px; opacity: .35; }
.footer .copy { margin-top: 16px; opacity: .6; }
.footer .f-hours { text-align: right; line-height: 1.9; }
.footer .f-hours strong { color: var(--white); display: block; margin-bottom: 4px; }

/* ===== 우측 고정 퀵배너 ===== */
.quick { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.quick a { width: 72px; height: 72px; border-radius: 14px; background: var(--white); box-shadow: 0 4px 18px rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink); transition: transform .2s; }
.quick a:hover { transform: translateX(-4px); }
.quick svg { width: 26px; height: 26px; }
.quick .q-kakao { background: #fee500; color: #3a1d1d; }
.quick .q-insta svg { color: #d6249f; }
.quick .q-blog { background: #03c75a; color: var(--white); }
.quick .q-naver { background: var(--green); color: var(--white); }
.quick .q-top { background: var(--ink); color: var(--white); opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s; }
.quick .q-top.show { opacity: 1; pointer-events: auto; }

/* ===== 스크롤 등장 효과 ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s, transform .9s; }
.reveal.in { opacity: 1; transform: none; }

/* ===== 반응형 ===== */
@media (max-width: 1280px) {
  .gnb a { padding: 10px 9px; font-size: 15px; }
  .gnb .num { display: none; }
}
@media (max-width: 1024px) {
  :root { --header-h: 68px; }
  .menu-btn { display: block; }
  .gnb { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--white); color: var(--ink); flex-direction: column; gap: 0; padding: 20px 24px; transform: translateX(100%); transition: transform .3s; }
  .gnb.open { transform: none; }
  .gnb a { padding: 18px 4px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .gnb a::after { display: none; }
  .gnb .num { display: inline; }
  .header.menu-open { background: var(--white); color: var(--ink); }
  .header.menu-open .logo svg { color: var(--green); }
  .menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn.open span:nth-child(2) { opacity: 0; }
  .menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .steps { grid-template-columns: 1fr; }
  .step-arrow { transform: rotate(90deg); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat { border-bottom: 1px solid rgba(255,255,255,.18); }
  .price-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .clinic-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { background-attachment: scroll; }
  .visit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .inner { padding: 0 16px; }
  .section-head h2 { font-size: 28px; }
  .slide-text { padding: 0 16px; }
  .slide-text h2 { font-size: 32px; }
  .slide-text p { font-size: 16px; }
  .hero-ctrl { padding: 0 16px; bottom: 90px; }
  .scroll-down { display: none; }
  .logo-text { font-size: 20px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-right: 1px solid rgba(255,255,255,.18); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:last-child { grid-column: span 2; }
  .stat .num { font-size: 34px; }
  .clinic-grid { grid-template-columns: 1fr; gap: 16px; }
  .cc-text h3 { font-size: 21px; }
  .basic-care { padding: 26px 22px; }
  .hours { padding: 32px 22px; }
  .sub-visual { height: 260px; padding-bottom: 40px; }
  .sub-visual h1 { font-size: 32px; }
  .footer .f-hours { text-align: left; }
  /* 퀵배너: 모바일에서는 하단 바 형태 */
  .quick { top: auto; bottom: 0; right: 0; left: 0; transform: none; flex-direction: row; gap: 0; background: var(--white); box-shadow: 0 -2px 12px rgba(0,0,0,.08); }
  .quick a { flex: 1; width: auto; height: 60px; border-radius: 0; box-shadow: none; font-size: 11px; }
  .quick a:hover { transform: none; }
  .quick svg { width: 22px; height: 22px; }
  .quick .q-top { position: fixed; right: 16px; bottom: 76px; width: 44px; height: 44px; border-radius: 50%; flex: none; }
  .quick .q-top span { display: none; }
  body { padding-bottom: 60px; }
}
