/* 공통 바닥 — 이 시안은 자기 눈금을 갖고 있어 layouts.css 의 눈금을 쓰지 않습니다. */
html { overflow-x: hidden; }
h1, h2, h3, h4 { line-height: 1.3; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 동두천제일요양병원(jeilhospital.co.kr) — 연한 파란 띠 위 흰 머리, 사진 슬라이드에 왼쪽 글,
   아이콘 링크 상자 6개(2×3) → 남색 띠 「입원상담/문의」 큰 전화번호 + 사진 → 공지·식단·행사 세 칸 목록
   → 협력기관 로고 줄 → 회색 푸터. 짧고 단정한 한 화면 반짜리 병원 홈. */
/* 색 전환기(palette.js)가 색을 고르기 전에는 이 시안 본래의 색을 씁니다.
   .js-pal 이 붙으면 palettes.css 의 --primary 가 이깁니다. */
body:not(.js-pal) { --primary: #1d3f7a; --primary-dk: #142c57; --primary-lt: #eaf2fb; }
body { --navy: var(--primary); --sky: var(--primary-lt); --ln: #e2e6ea; }
body { color: #555; font-size: 14px; }

.top { background: var(--sky); font-size: 12px; color: #4f5f73; height: 28px; display: flex; align-items: center; }
.top .wrap { display: flex; gap: 16px; }
.hd { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid var(--ln); }
.hd__in { display: flex; align-items: center; height: 88px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo i { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #2b9d63, #1d3f7a); position: relative; }
.logo i::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 800; }
.logo b { font-size: 12px; color: #6a6a6a; display: block; letter-spacing: .1em; }
.logo strong { font-size: 22px; color: var(--navy); }
.nv { margin-left: auto; display: flex; gap: 40px; font-size: 16px; font-weight: 700; color: #333; }

.visual { position: relative; height: 600px; overflow: hidden; }
.visual img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.92); }
/* 밝은 복도 벽 위 흰 글 — 왼쪽부터 어둡게 깔아 글자를 받칩니다. */
.visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,20,40,.55) 0%, rgba(10,20,40,.45) 40%, rgba(10,20,40,.05) 70%, rgba(10,20,40,0) 100%); pointer-events: none; }
.visual__txt { position: absolute; z-index: 1; left: 0; right: 0; top: 130px; }
.visual__txt h1 { font-size: 30px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); font-weight: 700; line-height: 1.5; }
.visual__txt p { color: #fff; font-size: 18px; margin-top: 6px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.visual__num { position: absolute; z-index: 1; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.visual__num i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #fff; color: #fff; font-size: 12px; display: grid; place-items: center; font-style: normal; }
.visual__num i:first-child { background: #fff; color: var(--navy); }

.links { padding: 40px 0; }
.links__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lk { border: 1px solid var(--ln); padding: 26px 28px 24px; position: relative; min-height: 180px; display: flex; flex-direction: column; align-items: flex-start; }
.lk h3 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.lk p { font-size: 13px; line-height: 1.7; color: #666; max-width: 70%; }
.lk a { display: inline-block; margin-top: auto; padding: 6px 14px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px; color: #444; }
.lk i { position: absolute; right: 26px; bottom: 24px; width: 64px; height: 64px; border-radius: 50%; background: var(--sky); display: grid; place-items: center; font-size: 28px; font-style: normal; }

.cs { background: var(--navy); color: #fff; height: 214px; overflow: hidden; }
.cs .wrap { display: flex; align-items: center; height: 100%; gap: 30px; }
.cs__ic { width: 78px; height: 78px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: grid; place-items: center; font-size: 34px; }
.cs h3 { color: #fff; font-size: 24px; margin-bottom: 4px; }
.cs b { display: block; font-size: 30px; font-weight: 800; letter-spacing: .02em; }
.cs img { margin-left: auto; margin-right: calc(-1 * max(24px, (100vw - 1200px) / 2)); height: 214px; width: 46%; object-fit: cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }

.comm { padding: 40px 0; }
.comm__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.box { border: 1px solid var(--ln); padding: 20px 22px; }
.box h3 { font-size: 16px; color: #222; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--navy); display: flex; justify-content: space-between; align-items: center; }
.box h3 span { font-size: 18px; color: #6f6f6f; font-weight: 400; }
.box li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed #eee; }
.box li em { font-style: normal; color: #6f6f6f; white-space: nowrap; }

.partners { border-top: 1px solid var(--ln); border-bottom: 1px solid var(--ln); padding: 24px 0; }
.partners .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.partners span { flex: 1; min-width: 150px; height: 44px; display: grid; place-items: center; color: #6f6f6f; font-size: 13px; font-weight: 700; border: 1px dashed #ddd; }

.fnav { padding: 12px 0; font-size: 12px; color: #666; display: flex; gap: 20px; }
.ft { background: #f5f6f8; color: #666666; font-size: 12px; line-height: 1.9; padding: 26px 0; }
.ft .wrap { display: flex; justify-content: space-between; align-items: center; }
.ft__legal { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e6ea; color: #6f6f6f; }
.lk p { margin-bottom: 14px; }
.nw { white-space: nowrap; }

/* 모바일 메뉴 — 스크립트 없이 <details> 로 엽니다. 넓은 화면에서는 숨깁니다. */
.mnav { display: none; }
.mnav summary { list-style: none; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; cursor: pointer; border-radius: 4px; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary span { display: block; width: 24px; height: 2px; background: #333; transition: transform .2s, opacity .2s; }
.mnav[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mnav[open] summary span:nth-child(2) { opacity: 0; }
.mnav[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mnav__list { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--ln); box-shadow: 0 10px 20px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.mnav__list a { padding: 15px 24px; border-bottom: 1px solid #eef0f3; font-size: 16px; font-weight: 700; color: #333; }
.mnav__list a:hover { color: var(--navy); }

@media (max-width: 860px) {
  .nv { display: none; }
  .mnav { display: block; margin-left: auto; }
  .hd__in { height: 76px; }
  .links__grid, .comm__grid { grid-template-columns: 1fr; }
  .lk { min-height: 0; padding: 22px 24px; }
  .lk i { right: 22px; bottom: 22px; width: 56px; height: 56px; font-size: 24px; }
  .visual { height: 420px; }
  .visual::after { background: linear-gradient(90deg, rgba(10,20,40,.55), rgba(10,20,40,.35)); }
  .visual__txt { top: 90px; }
  .visual__txt h1 { font-size: 26px; }
  .visual__txt p { font-size: 16px; }
  .cs { height: auto; padding: 36px 0; }
  .cs .wrap { gap: 20px; }
  .cs__ic { width: 60px; height: 60px; font-size: 26px; flex: 0 0 auto; }
  .cs h3 { font-size: 20px; margin-bottom: 6px; }
  .cs b { font-size: 26px; white-space: nowrap; line-height: 1.4; }
  .cs img { display: none; }
  .ft .wrap { flex-direction: column; align-items: flex-start; gap: 18px; }
  .ft .logo { order: -1; }
  .ft .logo strong { white-space: nowrap; font-size: 20px; }
}
@media (min-width: 601px) and (max-width: 860px) { .links__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 380px) { .cs b { font-size: 23px; } .cs .wrap { gap: 16px; } }

/* ── 원래 인라인 style 이던 자리 — CSP 때문에 클래스로 뺐습니다 ── */
