@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

:root {
  --blue: #1b5fa8;
  --blue-dark: #13477f;
  --ink: #1a1a1a;
  --ink2: #555555;
  --ink3: #8c8c8c;
  --line: #e6e3dd;
  --line-strong: #c9c4ba;
  --cream: #f7f9fc;
  --cream2: #f0eee9;
  --white: #ffffff;
  --radius-pill: 999px;
  --radius-card: 4px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* focus visibility */
a:focus-visible, button:focus-visible, .faq-q:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- utility bar ---------- */
.utility-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  text-align: right;
  padding: 8px 0;
  font-size: 17px;
  color: var(--ink2);
}
.utility-bar .wrap {
  max-width: none;
  padding: 0 48px;
}

/* ---------- header ---------- */
.site-header {
  padding: 22px 0;
}
.site-header .wrap {
  max-width: none;
  padding: 0 48px;
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink3);
}
.phone-block { text-align: right; }
.phone-block .label { font-size: 17px; color: var(--ink3); }
.phone-block .number { font-size: 28px; font-weight: 600; color: var(--blue); }

/* ---------- nav ---------- */
.main-nav {
  background: var(--blue);
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 128px;
  flex-wrap: wrap;
}

.main-nav a {
  display: inline-block;
  padding: 16px 2px;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: #fff;
}
/* checkbox hack: no JS */
.nav-check { display: none; }
.nav-toggle-label { display: none; }

@media (max-width: 760px) {
  .main-nav ul { gap: 0; flex-direction: column; display: none; }
  .nav-check:checked ~ ul { display: flex; }
  .main-nav a { display: block; padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .nav-toggle-label {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    background: var(--blue);
    color: #fff;
    width: 100%;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
  }
  .nav-toggle-label::after { content: '☰'; }
  .nav-check:checked ~ .nav-toggle-label::after { content: '✕'; }
  .phone-block .label { font-size: 11px; white-space: nowrap; }
  .phone-block .number { font-size: 15px; white-space: nowrap; }
  .logo { font-size: 18px; }
  .site-header .logo img { height: 36px !important; }
  .utility-bar .wrap,
  .site-header .wrap {
    padding: 0 20px;
  }
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  padding: 18px 0;
  font-size: 13px;
  color: var(--ink3);
  border-bottom: 1px solid var(--line);
}
.breadcrumb a { color: var(--ink3); }
.breadcrumb a:hover { color: var(--blue); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #eef1f6, #dfe6ee);
  overflow: hidden;
}
.hero .photo-note {
  position: absolute;
  top: 16px; left: 24px;
  font-size: 12px;
  color: var(--ink3);
  font-family: ui-monospace, monospace;
}
.hero-card {
  max-width: 560px;
  background: rgba(255,255,255,0.92);
  padding: 40px;
  margin: 24px;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--ink3);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.hero .lede {
  font-size: 16px;
  color: var(--ink2);
  margin: 0 0 28px;
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.pill-btn:hover { background: var(--blue-dark); color: #fff; }
.pill-btn.outline {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
}
.pill-btn.outline:hover { background: var(--cream); }

/* ---------- section ---------- */
.section { padding: 56px 0; }
.section.tint { background: var(--cream); }
.section h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.section .sub { font-size: 17px; color: var(--ink2); margin: 0 0 32px; }

/* ---------- 4up category cards (home) ---------- */
/* 카테고리 그리드 레이아웃 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* PC에서는 4열 */
  border-top: 1px solid #e2e8f0;         /* 전체 상단 선 */
  border-left: 1px solid #e2e8f0;        /* 전체 좌측 선 */
}

/* 각 아이템 테두리 설정 (우측, 하단만 선을 주어 겹침 방지) */
.cat-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;  /* 오른쪽 구분선 */
  border-bottom: 1px solid #e2e8f0; /* 아래쪽 구분선 (가운데 가로선 역할) */
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* 화면이 줄어들어 2열로 바뀔 때 (반응형 미디어 쿼리) */
@media (max-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr); /* 2열 2행 배치 */
  }
}
.cat-grid a:last-child { border-right: none; }

/* 자세히 보기 파란색 강조 버튼 스타일 */
.cat-grid .btn-more {
  margin-top: 14px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0056b3;             /* 신뢰감을 주는 내과 브랜드 파란색 */
  background-color: #f0f7ff;  /* 파란색 텍스트가 잘 돋보이는 연한 파란 배경 */
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

/* 마우스를 올렸을 때(Hover) 파란색 버튼 반전 효과 */
.cat-grid a:hover .btn-more {
  background-color: #0056b3;  /* 진한 파란색 배경으로 변경 */
  color: #ffffff;             /* 글자색 흰색으로 반전 */
}
.cat-dot {
  display: inline-block;
  width: 34px; height: 34px;
  margin: 0 auto 14px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}
.cat-grid .t { font-size: 17px; color: #111111; font-weight: 600; }
.cat-grid .d { font-size: 15px; color: var(--ink3); margin-top: 2px; }

@media (max-width: 760px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid a:nth-child(2n) { border-right: none; }
}

/* ---------- card grid (equipment, clinic hub) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line);
  padding: 20px;
  background: var(--white);
}
.card .thumb {
  height: 130px;
  border: 1px dashed var(--line-strong);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--ink3);
  font-family: ui-monospace, monospace;
  text-align: center;
}
.card .name { font-size: 17px; font-weight: 600; }
.card .desc { font-size: 15px; color: var(--ink2); margin-top: 4px; }

.hub-card {
  border: 1px solid var(--line);
  padding: 26px;
  display: block;
  color: var(--ink);
}
.hub-card:hover { border-color: var(--blue); }
.hub-card .num { font-size: 15px; color: var(--blue); font-weight: 600; }
.hub-card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 14px; }
.hub-card .items { font-size: 14px; color: var(--ink2); line-height: 2; }

/* ---------- timeline ---------- */
.timeline { display: flex; align-items: flex-start; margin-top: 56px; }
.timeline .step { flex: 1; text-align: center; position: relative; }
.timeline .date { position: absolute; bottom: 100%; left: 0; right: 0; margin-bottom: 10px; font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); margin: 0 auto 14px; }
.timeline .label { font-size: 14px; color: var(--ink2); line-height: 1.7; }
.timeline .rule { flex: 1; height: 2px; background: var(--blue); margin-top: 6px; }

/* ---------- clinic detail blocks ---------- */
.detail-blocks { display: flex; flex-direction: column; gap: 16px; }
.detail-block { border: 1px solid var(--line); padding: 24px; }
.detail-block .k { font-size: 17px; font-weight: 600; color: var(--blue); margin-bottom: 6px; }
.detail-block .v { font-size: 17px; color: var(--ink2); line-height: 1.9; }
.detail-block.eq { display: flex; gap: 16px; align-items: center; }
.detail-block.eq .thumb { width: 120px; height: 84px; flex-shrink: 0; }

.cta-bar {
  margin-top: 28px;
  background: var(--cream);
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cta-bar .msg { font-size: 17px; color: var(--ink2); }

/* ---------- FAQ ---------- */
.faq-search {
  display: flex;
  gap: 12px;
  margin: 22px 0 8px;
}
.faq-search input {
  flex: 1;
  border: 1px solid var(--line);
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
}
.faq-search button {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.faq-cluster { border: 1px solid var(--line); margin-bottom: 16px; }
.faq-cluster[open] { border-color: var(--blue); }
.faq-cluster-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  background: var(--white);
  cursor: pointer;
  list-style: none;
}
.faq-cluster-head::-webkit-details-marker { display: none; }
.faq-cluster[open] .faq-cluster-head { background: var(--blue); color: #fff; }
.faq-cluster-head .title-group { display: flex; align-items: baseline; gap: 16px; }
.faq-cluster-head .n { font-size: 14px; color: var(--blue); }
.faq-cluster-head .name { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.faq-cluster-head .count { font-size: 14px; color: var(--blue); }
.faq-cluster[open] .faq-cluster-head .n,
.faq-cluster[open] .faq-cluster-head .count { color: rgba(255,255,255,0.85); }
.faq-cluster-head .sign { font-size: 22px; color: var(--blue); }
.faq-cluster[open] .faq-cluster-head .sign { color: #fff; }
.faq-cluster-head .sign::after { content: '+'; }
.faq-cluster[open] .faq-cluster-head .sign::after { content: '−'; }

.faq-cluster-body { padding: 10px 26px 26px; }

.faq-sub { font-size: 14px; font-weight: 600; color: var(--blue); margin: 18px 0 4px; }
.faq-empty { border-top: 1px solid var(--line); padding: 18px 0; font-size: 15px; color: var(--ink3); }

.faq-item { border-top: 1px solid var(--line); }
.faq-q {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q .sign { color: var(--blue); font-size: 20px; flex-shrink: 0; }
.faq-q .sign::after { content: '+'; }
.faq-item[open] .faq-q .sign::after { content: '−'; }
.faq-item[open] .faq-q { font-weight: 600; }
.faq-a {
  padding: 0 0 18px;
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.9;
}
.faq-item[open] { background: var(--cream); margin: 0 -26px; padding: 0 26px; }

.faq-cta {
  margin-top: 12px;
  background: var(--cream);
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.faq-cta .t { font-size: 17px; font-weight: 600; }
.faq-cta .d { font-size: 15px; color: var(--ink2); margin-top: 4px; }

/* ---------- info list (health-info) ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 700px) {
  .info-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .page-head { padding: 28px 0 0; }
  .page-head h1 { font-size: 24px; }
  .page-head .sub { font-size: 17px; }
}
.info-card {
  border: 1px solid var(--line);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-card .idx { font-size: 20px; font-weight: 600; color: var(--blue); }
.info-card .t { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.info-card .status { font-size: 17px; color: var(--ink3); }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid .thumb { height: 170px; border: 1px dashed var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--ink3); }

/* ---------- location (home bottom) ---------- */
.location-grid { display: grid; grid-template-columns: 1.3fr 1fr; border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .location-grid { grid-template-columns: 1fr; }
}
.location-grid .map-note {
  min-height: 300px;
  background: repeating-linear-gradient(135deg, #f5f4f1 0 10px, #eceae5 10px 20px);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--ink3); font-family: ui-monospace, monospace;
}
.location-grid .info { padding: 44px 48px; }
@media (max-width: 800px) {
  .location-grid .info { padding: 24px 0; }
}
.location-grid dl { font-size: 17px; color: var(--ink2); line-height: 2.1; margin: 0 0 22px; }
.location-grid dt { font-weight: 600; color: var(--ink); display: inline; }
.location-grid dd { display: inline; margin: 0; }
.location-grid .row { margin: 0 0 4px; }
.btn-row { display: flex; gap: 10px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--cream);
  padding: 26px 0;
  font-size: 13px;
  color: var(--ink3);
  border-top: 1px solid var(--line);
}

/* ---------- page header (inner pages) ---------- */
.page-head { padding: 44px 0 0; }
.page-head h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
.page-head .sub { font-size: 22px; color: var(--ink2); margin-top: 6px; }


.director-photo { width: 320px; height: 320px; flex-shrink: 0; object-fit: cover; }
@media (max-width: 700px) {
  .director-photo { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1 / 1; margin: 0 auto; }
}

.doctor-preview { display:flex; gap:40px; align-items:center; }
.doctor-preview .thumb-sq { width:180px; height:180px; flex-shrink:0; border:1px dashed var(--line-strong); display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--ink3); }
.doctor-cred { font-size:17px; color:var(--ink2); line-height:2; margin:0 0 20px; padding-left:18px; }

.faq-preview-grid { display:grid; grid-template-columns:1.5fr 1fr; gap:40px; }
.faq-preview-list { margin:16px 0 20px; }
.faq-preview-list .faq-item[open] { margin: 0; padding: 0; }
.faq-preview-item { display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--line); font-size:15px; }
.faq-preview-item .sign { color:var(--blue); flex-shrink:0; }
.hours-box { background:var(--white); border:1px solid var(--line); padding:24px; align-self:start; }

@media (max-width:700px){ .doctor-preview{flex-direction:column; text-align:center;} }
@media (max-width:800px){ .faq-preview-grid{grid-template-columns:1fr;} }

/* ---------- carousel (병원 둘러보기) ---------- */
.carousel { position: relative; overflow: hidden; border: 1px solid var(--line); }
.carousel-track { display: flex; transition: transform 0.4s ease; }
.carousel-slide { flex: 0 0 100%; aspect-ratio: 16 / 9; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-arrows { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.carousel-arrow {
  width: 36px; height: 36px;
  border: none; border-radius: var(--radius-card);
  background: rgba(255,255,255,0.92); color: var(--blue);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.carousel-arrow:hover { background: #fff; }

.carousel-dots { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; }
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.6); border: none; cursor: pointer; padding: 0;
}
.carousel-dot.active { background: var(--blue); }

/* ---------- equipment card photo ---------- */
.card .photo { width: 100%; height: 220px; object-fit: contain; padding: 12px; display: block; margin-bottom: 14px; }

/* ---------- location illustration ---------- */
.location-illustration {
  width: 100%;            
  max-width: 700px;         
  display: block;
  margin: 0 auto;  
  border: none;
  outline: none;
  box-shadow: none;
  border-radius: 0;
}

/* 카카오 지도 퍼가기 위젯 하단의 주소/전화 텍스트 숨김 (지도 위 마커에 이미 병원명 표시됨) */
#daumRoughmapContainer1789664712243 .section_address {
  display: none !important;
}

.hero-carousel { border: none; }
.hero-carousel .carousel-slide { aspect-ratio: 18 / 5; }
@media (max-width: 700px) { .hero-carousel .carousel-slide { aspect-ratio: 4 / 3; } }

/* ---------- 공지 팝업 ---------- */
.popup-overlay {
  display: none; 
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  
  /* 정중앙(center)에서 오른쪽 상단으로 변경 */
  align-items: flex-start;   /* 위쪽 정렬 */
  justify-content: flex-end; /* 오른쪽 정렬 */
  
  gap: 20px; flex-wrap: wrap;
  padding: 70px 50px 20px 20px; /* 상단 여백(40px)을 살짝 주어 화면 위에 딱 붙지 않게 조절 */
  z-index: 1000;
}
.popup-box {
  position: relative;
  background: #fff;
  width: 100%; max-width: 500px;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.popup-box img { width: 100%; display: block; }
.popup-close {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.popup-hide-today {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 13px; color: var(--ink2);
  background: var(--cream); cursor: pointer;
}

/* 푸터 저작권 문구 스타일 */
.site-footer .copyright {
  margin-top: 8px;
  font-size: 0.85em;
  opacity: 0.8;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-footer .dev-credit {
  opacity: 0.7;
}

/* ---------- 텍스트 선택/복사 방지 ---------- */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
/* 입력창(FAQ 검색)은 정상적으로 타이핑 가능하게 예외 처리 */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* ---------- 지도 크기 조절 ---------- */
.map-embed-wrap { width: 100%; }
.map-embed-scale { width: 1040px; transform-origin: top left; }

.map-mobile-link { display: none; }
@media (max-width: 700px) {
  .map-embed-wrap { display: none; }
  .map-mobile-link { display: inline-flex; margin-top: 12px; }
}