/* 행복365의원 공통 스타일 (한글·영문 페이지 공용)
   모바일 기본 → 768px 이상 태블릿 → 1024px 이상 PC 로 자동 전환 */

:root {
  --green: #0B3B2B;
  --green2: #16412F;
  --yellow: #FBB323;
  --orange: #F59E0B;
  --text: #222;
  --sub: #555;
  --line: #e7e9e8;
  --bg: #f5f6f4;
  --wrap: 1120px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Pretendard Variable', Pretendard, 'Malgun Gothic', sans-serif; color: var(--text); background: #fff; line-height: 1.6; word-break: keep-all; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 헤더 ---------- */
.hd { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.hd-top { display: flex; align-items: center; justify-content: center; position: relative; padding: 12px 20px 10px; }
.logo img { width: 170px; height: auto; }
.lang { position: absolute; right: 18px; top: 8px; font-size: 12px; font-weight: 700; color: #aab; }
.lang a { color: #888; }
.lang b { color: var(--green); }
.lang i { font-style: normal; margin: 0 5px; color: #cbd5e1; }
.gnb { background: var(--green); }
.gnb ul { display: flex; justify-content: space-around; padding: 12px 4px; }
.gnb a { color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .3px; }

/* ---------- 메인 비주얼 슬라이더 ---------- */
.slider { position: relative; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track > * { flex: 0 0 100%; scroll-snap-align: start; }
.dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(0,0,0,.25); cursor: pointer; }
.dots button.on { background: var(--green); width: 22px; border-radius: 4px; }

.slide { min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px 56px; }
.s1 { background: linear-gradient(160deg, #fafafa 0%, #e9e9e9 55%, #cfcfcf 100%); }
.s1 .pre { color: var(--orange); font-weight: 700; font-size: 17px; }
.s1 h2 { color: var(--green); font-size: 54px; line-height: 1.12; font-weight: 900; margin: 14px 0 22px; }
.pill { display: inline-block; background: var(--green); color: #fff; font-weight: 800; font-size: 19px; padding: 10px 30px; border-radius: 40px; }
.s2 { background: linear-gradient(160deg, #0B3B2B 0%, #154734 60%, #2d5a48 100%); color: #fff; }
.s2 h2 { font-size: 28px; line-height: 1.3; font-weight: 800; }
.s2 p { color: #dfe8e3; margin: 10px 0 18px; font-size: 15px; }
.s2 img { width: 100%; max-width: 440px; border-radius: 4px; }

/* 오늘 진료 상태 */
.today { background: var(--bg); text-align: center; padding: 12px 16px; font-size: 14px; font-weight: 700; color: var(--green); }
.today .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; margin-right: 6px; vertical-align: 1px; }
.today.off .dot { background: #f59e0b; }

/* ---------- 공통 섹션 ---------- */
.sec { padding: 56px 0; }
/* 섹션 타이틀 (● 제목 + 가는 선 + 영문 부제) */
.tit { margin-bottom: 30px; }
.tit h2 { display: flex; align-items: center; gap: 10px; font-size: 32px; font-weight: 800; line-height: 1.15; color: var(--green); letter-spacing: -.5px; }
.tit h2::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.tit p { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11px; letter-spacing: .12em; color: #333; white-space: nowrap; }
.tit p::before { content: ''; flex: 1 1 0; max-width: 38%; min-width: 24px; height: 1px; background: #9fb0a8; }
.gray { background: var(--bg); }

/* 의료진 */
.doc-photo { max-width: 560px; margin: 0 auto; }
.doc-name { margin: 22px 0 6px; }
.doc-name strong { font-size: 26px; color: var(--green); }
.doc-name span { color: #666; font-weight: 700; margin-left: 8px; }
.doc-lead { font-weight: 700; color: #444; margin-bottom: 18px; }
.doc-info dt { color: var(--green); font-weight: 800; margin-top: 16px; }
.doc-info dd { color: var(--sub); font-size: 15px; }
.doc-info dd li::before { content: '· '; color: #aaa; }

/* 진료과목 */
.cards { display: grid; gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(0,0,0,.05); border-radius: 8px; overflow: hidden; }
.card img { width: 100%; aspect-ratio: 894/344; object-fit: cover; }
.card div { padding: 18px 22px 22px; }
.card h3 { color: var(--green); font-size: 19px; margin-bottom: 6px; }
.card p { color: var(--sub); font-size: 15px; }

/* 진료시간 */
#hours { padding-bottom: 0; }
.hours { background: var(--green2); color: #fff; padding: 48px 0; }
.hours-grid { display: grid; gap: 34px; }
.hours-grid > div:first-child h3 { font-size: 26px; margin-bottom: 14px; }
.hours table { border-collapse: collapse; font-size: 17px; }
.hours th { text-align: left; font-weight: 500; padding: 4px 16px 4px 0; color: #dfe8e3; white-space: nowrap; }
.hours td { font-weight: 700; }
.hours .note { margin-top: 10px; color: var(--yellow); font-weight: 700; }
.call h3 { color: var(--yellow); font-size: 24px; line-height: 1.35; }
.call p { color: #e6eee9; margin: 10px 0 14px; font-size: 15px; }
.call a.tel { color: var(--yellow); font-size: 30px; font-weight: 900; display: inline-block; }
.call a.tel small { display: block; font-size: 14px; color: #dfe8e3; font-weight: 500; }

/* 오시는 길 */
.loc-grid { display: grid; gap: 24px; }
.map { width: 100%; height: 320px; border: 0; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.navi { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.navi a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; border-radius: 8px; font-weight: 800; font-size: 14px; color: #fff; }
.navi .nv { background: #03C75A; }
.navi .kk { background: #FEE500; color: #3c1e1e; }
.navi .tm { background: #EF3E6D; }
.navi .ph { background: var(--green); }
.navi .gg { background: #4285F4; }
.loc-info h3 { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 18px; margin-top: 18px; }
.loc-info h3:first-child { margin-top: 0; }
.loc-info h3 svg { width: 22px; height: 22px; flex: none; }
.loc-info p, .loc-info li { color: var(--sub); }
.line2::before, .line9::before { content: ''; display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.line2::before { background: #22A447; }
.line9::before { background: #A17E2E; }

/* 병원 둘러보기 */
.gal .track > * { flex-basis: 100%; }
.gal figure { position: relative; cursor: zoom-in; }
.gal img { width: 100%; height: 280px; object-fit: cover; }
.gal figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 34px; color: #fff; font-size: 14px; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.gal .dots button { background: rgba(255,255,255,.6); }
.gal .dots button.on { background: #fff; }

/* 후기 (영문) */
.rv { padding: 8px 20px 44px; }
.rv-card { padding: 4px 6px; }
.rv-meta { font-size: 12px; color: #4b5563; margin-bottom: 8px; }
.rv-meta b { color: var(--green); }
.rv-meta .st { color: #f59e0b; letter-spacing: 1px; }
.rv-meta .bd { background: #e2e8f0; padding: 1px 5px; border-radius: 3px; font-weight: 700; }
.rv-card p { font-size: 14px; color: #334155; }
.rv .dots { bottom: 10px; }

/* 공지·비급여 */
.notice li { border-bottom: 1px solid #eee; }
.notice button { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 14px 2px; background: none; border: 0; font: inherit; font-size: 15px; text-align: left; cursor: pointer; color: #333; }
.notice button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice time { color: #999; font-size: 13px; flex: none; }
.links { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.btn-o { display: inline-block; padding: 9px 16px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 14px; color: #555; background: #fff; cursor: pointer; font-family: inherit; }

/* 푸터 */
.ft { background: #222; color: #999; font-size: 13px; text-align: center; padding: 36px 20px 110px; line-height: 1.8; }
.ft strong { color: #ddd; }
.ft a { color: #ccc; }
.sns { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.sns a { width: 38px; height: 38px; border-radius: 50%; background: #333; display: flex; align-items: center; justify-content: center; }
.sns a[hidden] { display: none; }
.sns svg { width: 20px; height: 20px; fill: #ddd; }
.app-btn { margin-top: 14px; background: none; border: 1px solid #555; color: #ccc; padding: 7px 14px; border-radius: 20px; font: inherit; font-size: 13px; cursor: pointer; }

/* 모바일 하단 고정바 */
.qbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--green); box-shadow: 0 -2px 10px rgba(0,0,0,.15); padding-bottom: env(safe-area-inset-bottom); }
.qbar a { color: #fff; text-align: center; padding: 10px 0 9px; font-size: 12px; font-weight: 700; }
.qbar a + a { border-left: 1px solid rgba(255,255,255,.15); }
.qbar svg { width: 22px; height: 22px; display: block; margin: 0 auto 2px; fill: none; stroke: #fff; stroke-width: 2; }
.qbar .hl { background: var(--yellow); color: var(--green); }
.qbar .hl svg { stroke: var(--green); }

/* 팝업(모달) */
.modal { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.8); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.on { display: flex; }
.modal-box { background: #fff; max-width: 480px; width: 100%; max-height: 86vh; overflow-y: auto; border-radius: 8px; }
.modal-box img { width: 100%; }
.modal-text { padding: 26px 22px; white-space: pre-line; font-size: 16px; }
.modal-bar { display: flex; justify-content: space-between; border-top: 1px solid #eee; }
.modal-bar button { flex: 1; padding: 13px; border: 0; background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: #333; }
.modal-bar button + button { border-left: 1px solid #eee; }
.modal-bar .hide1 { display: none; }
.modal.is-popup .hide1 { display: block; }

/* 아이폰 홈화면 추가 안내 */
.ios-tip { position: fixed; left: 12px; right: 12px; bottom: 76px; z-index: 95; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 16px 18px; font-size: 14px; display: none; }
.ios-tip.on { display: block; }
.ios-tip button { float: right; border: 0; background: none; font-size: 20px; cursor: pointer; }

/* ================= 태블릿 (768px 이상) ================= */
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hours-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .slide { min-height: 440px; }
  .s1 h2 { font-size: 72px; }
  .s2 { flex-direction: row; gap: 36px; text-align: left; }
  .s2 > div { max-width: 320px; }
  .gal .track > * { flex-basis: 50%; }
  .gal img { height: 320px; }
  .rv .track > * { flex-basis: 50%; }
}

/* ================= PC (1024px 이상) ================= */
@media (min-width: 1024px) {
  html { scroll-padding-top: 80px; }
  .hd-in { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; padding: 0 20px; }
  .hd-top { padding: 14px 0; }
  .logo img { width: 190px; }
  .lang { position: static; order: 3; margin-left: 20px; }
  .gnb { background: none; flex: 1; }
  .gnb ul { justify-content: flex-end; gap: 34px; padding: 0; }
  .gnb a { color: var(--green); font-size: 16px; }
  .gnb a:hover { color: var(--orange); }
  .slide { min-height: 480px; }
  .sec { padding: 80px 0; }
  .tit { margin-bottom: 40px; }
  .tit h2 { font-size: 46px; }
  .tit h2::before { width: 12px; height: 12px; }
  .tit p { font-size: 14px; }
  #doctor .doc-grid { max-width: 780px; margin: 0 auto; }
  .doc-photo { max-width: 780px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .card img { aspect-ratio: 4/3; }
  .loc-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .map { height: 420px; }
  .gal .track > * { flex-basis: 33.333%; }
  .gal img { height: 300px; }
  .rv .track > * { flex-basis: 33.333%; }
  .qbar { display: none; }
  .ft { padding-bottom: 40px; }
}
