/* ==========================================================================
   Layout - 테마 공통 토대
   --------------------------------------------------------------------------
   색상 팔레트(:root) · 기준 글자 크기 · 레이아웃 폭 · 섹션 여백 · 버튼
   여기만 고치면 사이트 전체의 색과 여백이 함께 바뀝니다.
   ========================================================================== */

:root {
  /* 한방병원 : 짙은 한지(바탕) · 먹(글자) · 단청 오방색(포인트) */
  --primary-color: #26221f; /* 먹. 히어로 · 예약 섹션 · 푸터 · 버튼 */
  --point-color: #8a3a35; /* 단청 적. 강조 · 링크 · 활성 상태 */
  --brown-color: #6f6055; /* 진한 고동. 병원 소개 패널 · 공지 띠 */
  --navy-color: #2e4a52; /* 단청 청록. 특별함 섹션 */
  --herb-color: #2e4a52; /* 보조 강조 (토요일 표기 등) */
  --secondary-color: #ded5c4; /* 짙은 한지. 카드 · 입력칸 배경 */
  --lightgray-color: #ebe4d6; /* 한지 바탕. 본문 배경 */
  --background-color: #ded5c4; /* 한 단계 진한 한지. 섹션 구분 배경 */
  --white-color: #ffffff;
  --footerbg-color: transparent;

  /* 단청 오방색 (섹션을 나누는 띠 · 장식에 사용) */
  --dc-blue: #2e4a52;
  --dc-red: #8a3a35;
  --dc-yellow: #b0872f;
  --dc-white: #ebe4d6;
  --dc-black: #26221f;

  /* 카드·상자의 모서리 둥글기 (알약형 버튼은 제외) */
  --radius: 1.2rem;

  --line-color: #c6bba7;
  --text-color: #26221f;
  /* 본문 보조 텍스트 : 각 섹션에서 광범위하게 쓰이므로 여기서 한 번만 정의 */
  --text-color-sub: #6b6156;

  --inner-size: 1440px;

  /* 상단 고정 헤더 높이 (본문 위 여백과 앵커 오프셋이 이 값을 따라갑니다) */
  --header-h: 10rem;
  /* 관리자에게만 보이는 상단 바 높이 */
  --topbar-h: 3.2rem;
}

html {
  font-size: 62.5%;
}

@media (max-width: 1280px) {
  html {
    font-size: clamp(9px, 0.78125vw, 10px);
  } /* ~9-10px */

  :root {
    --header-h: 9rem;
  }
}
@media (max-width: 1024px) {
  html {
    font-size: clamp(9px, 0.9765625vw, 10px);
  } /* ~9-10px */
}
@media (max-width: 768px) {
  html {
    font-size: clamp(8px, 1.3020833vw, 10px);
  } /* ensure min 8px */

  :root {
    --header-h: 8.4rem;
  }
}
@media (max-width: 480px) {
  html {
    font-size: clamp(8px, 2.0833333vw, 10px);
  }
}

@media (min-width: 480px) {
  a[href^="tel"] {
    pointer-events: none; /* 클릭 차단 */
    cursor: default; /* 클릭 불가 표시 */
  }
}

body {
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--text-color);
  background: var(--lightgray-color);
  word-break: keep-all;
  hyphens: auto;

  /* 가로 스크롤 방지 (세로 스크롤은 그대로) */
  overflow-x: hidden;

  /* 헤더가 화면 위에 고정되므로 그 높이만큼 본문을 내린다 */
  padding-top: var(--header-h);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 관리자 로그인 시에만 상단 바가 추가되므로 그만큼 더 내린다 */
body.has_topbar {
  padding-top: calc(var(--header-h) + var(--topbar-h));
}

.inner {
  max-width: var(--inner-size);
  margin: 0 auto;
  padding: 0 2.4rem;
}

@media (max-width: 768px) {
  .inner {
    padding: 0 1.6rem;
  }
}

/* ※ width: 100% 는 flex 컨테이너(.default) 안에서도 내용 폭으로
   줄어들지 않고 본문 기준선(inner 라인)을 지키게 하는 값입니다. 지우지 마세요. */
.w_inner {
  width: 100%;
  max-width: var(--inner-size);
  margin: 0 auto;
  padding: 0 2.4rem;
}

@media (max-width: 768px) {
  .w_inner {
    padding: 0 1.6rem;
  }
}

/* 오른쪽 화면 끝까지 흘려보내는 영역 (카드 슬라이더용)
   왼쪽 시작점은 .w_inner 의 본문 기준선과 같다 */
.w_inner_r {
  width: 100%;
  max-width: calc((100% - var(--inner-size)) / 2 + var(--inner-size));
  margin: 0 0 0 auto;
  padding: 0 0 0 2.4rem;
}

@media (max-width: 768px) {
  .w_inner_r {
    padding: 0 0 0 1.6rem;
  }
}

/* ==========================================================================
   섹션 공통
   ========================================================================== */
/* 섹션 밖으로 나가는 장식(문양 · 등장 애니메이션)이 가로 스크롤을 만들지
   않도록 가로만 잘라낸다. clip 은 스크롤 컨테이너를 만들지 않아
   position: sticky 등에 영향을 주지 않는다. */
.default {
  position: relative;
  overflow-x: clip;
  padding: 12rem 0;
}

.default.bg {
  background: var(--background-color);
}

@media (max-width: 1024px) {
  .default {
    padding: 9.6rem 0;
  }
}

@media (max-width: 768px) {
  .default {
    padding: 7.2rem 0;
  }
}

/* 섹션 머리 : 왼쪽 제목 + 오른쪽 컨트롤(더보기 · 화살표) 한 줄 */
.sec_head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4rem;
  margin-bottom: 5.6rem;
}

@media (max-width: 768px) {
  .sec_head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.4rem;
    margin-bottom: 4rem;
  }
}

/* 섹션 제목 : 모든 제목은 명조(--font-serif)로 통일하고 크기도 여기서만 관리한다.
   ※ Noto Serif KR 은 200 · 600 두 가지 두께만 불러오므로
     제목의 font-weight 는 200(가늘게) 또는 600(굵게)만 쓰세요.
     (lib/css/fonts.css 의 @import 목록 참고) */
.sec_tit {
  font-family: var(--font-serif);
  font-size: 3.6rem;
  font-weight: 200;
  line-height: 1.42;
  letter-spacing: -0.03em;
}

.sec_tit strong {
  font-weight: 600;
}

.sec_tit em {
  font-style: normal;
  font-weight: 600;
  color: var(--point-color);
}

@media (max-width: 1280px) {
  .sec_tit {
    font-size: 3.2rem;
  }
}

@media (max-width: 768px) {
  .sec_tit {
    font-size: 2.6rem;
    line-height: 1.5;
  }
}

/* 제목 위 짧은 도입 문구 (모든 섹션 공통, 색만 각 섹션에서 덮어씀) */
.sec_sub {
  display: block;
  margin-bottom: 1.2rem;

  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 200;
  letter-spacing: -0.02em;
  color: var(--text-color-sub);
}

@media (max-width: 768px) {
  .sec_sub {
    font-size: 1.6rem;
  }
}

/* 제목 아래 설명 (모든 섹션 공통, 색만 각 섹션에서 덮어씀) */
.sec_desc {
  margin-top: 2.4rem;
  font-size: 1.5rem;
  line-height: 1.9;
  color: var(--text-color-sub);
}

/* 기존 섹션 제목 규칙 (게시판 · 서브페이지 호환) */
.title {
  margin-bottom: 5.6rem;
}

.title h2 {
  font-family: var(--font-serif);
  font-size: 3.6rem;
  font-weight: 200;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

@media (max-width: 768px) {
  .title h2 {
    font-size: 2.6rem;
  }
}

.title h2 em {
  font-style: normal;
  font-weight: 600;
  color: var(--point-color);
}

.title .desc {
  font-weight: 400;
  margin-top: 1.6rem;
  line-height: 1.9;
  color: var(--text-color-sub);
}

/* ==========================================================================
   버튼 · 링크
   ========================================================================== */

/* 알약형 기본 버튼 : 테두리만 있다가 올리면 먹색으로 차오른다 */
.pill_btn {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;

  height: 5.6rem;
  padding: 0 3.6rem;
  border: 1px solid var(--line-color);
  border-radius: 5.6rem;
  overflow: hidden;

  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text-color);
  background: transparent;
  cursor: pointer;
  transition: color 0.35s, border-color 0.35s;
}

.pill_btn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;

  height: 0;
  background: var(--primary-color);
  transition: height 0.35s;
}

.pill_btn:hover,
.pill_btn:focus-visible {
  color: var(--white-color);
  border-color: var(--primary-color);
}

.pill_btn:hover::before,
.pill_btn:focus-visible::before {
  height: 100%;
}

.pill_btn .icon {
  width: 1.6rem;
  height: 1.6rem;
  stroke: currentColor;
  stroke-width: 1.6;
}

/* 채워진 변형 (주요 행동 유도) */
.pill_btn.solid {
  background: var(--point-color);
  border-color: var(--point-color);
  color: var(--white-color);
}

.pill_btn.solid::before {
  background: var(--primary-color);
}

.pill_btn.solid:hover {
  border-color: var(--primary-color);
}

/* 어두운 배경 위에서 쓰는 변형 */
.pill_btn.light {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--white-color);
}

.pill_btn.light::before {
  background: var(--white-color);
}

.pill_btn.light:hover {
  color: var(--primary-color);
  border-color: var(--white-color);
}

/* 밑줄 링크 : 붉은 선 한 줄 (히어로 · 카드 더보기) */
.line_link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;

  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--point-color);

  font-size: 1.5rem;
  font-weight: 600;
  color: var(--point-color);
  white-space: nowrap;
  transition: gap 0.3s;
}

.line_link .icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  stroke-width: 2;
}

.line_link:hover {
  gap: 1.6rem;
}

/* 원형 화살표 버튼 (슬라이더 컨트롤) */
.circle_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 5.2rem;
  height: 5.2rem;
  border: 1px solid var(--line-color);
  border-radius: 50%;
  background: transparent;

  color: var(--text-color);
  font-size: 0;
  cursor: pointer;
  transition: 0.3s;
}

.circle_btn svg,
.circle_btn .icon {
  width: 1.8rem;
  height: 1.8rem;
  stroke: currentColor;
  stroke-width: 1.6;
}

.circle_btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
}

.circle_btn.swiper-button-disabled {
  opacity: 0.3;
  cursor: default;
}

.circle_btn.swiper-button-disabled:hover {
  background: transparent;
  border-color: var(--line-color);
  color: var(--text-color);
}

/* ==========================================================================
   전통 문양 - _access.pattern.php 의 SVG 를 섹션 배경에 깐다
   사용법 : <svg class="deco" aria-hidden="true"><use href="#pt_lotus" /></svg>
   위치·크기·색·농도는 각 섹션의 <style> 에서 덮어씁니다.
   ========================================================================== */

/* 스프라이트 원본은 화면에 보이지 않게 숨긴다 */
.pattern_sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* 기본 모습 : 섹션 옆구리에 반쯤 걸쳐 세로 가운데에 크게, 아주 옅게.
   각 섹션에서는 좌우(left/right: -16rem)와 색만 지정하면 됩니다. */
.deco {
  position: absolute;
  top: 50%;
  z-index: 0;

  width: 60rem;
  height: 60rem;
  transform: translateY(-50%);

  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

/* 섹션 본문이 문양보다 위에 오도록 */
.default > .w_inner {
  position: relative;
  z-index: 1;
}

/* 좁은 화면에서는 글과 겹치므로 감춘다 */
@media (max-width: 1024px) {
  .deco {
    display: none;
  }
}

/* ==========================================================================
   단청 띠 - 오방색 실선 (헤더 맨 위 · 푸터 맨 위)
   <span class="dancheong"></span> 한 줄로 어디에나 넣을 수 있습니다.
   색은 :root 의 --dc-* 값, 색 구간 길이는 아래 rem 값으로 조절합니다.
   ========================================================================== */
.dancheong {
  display: block;
  width: 100%;
  height: 2px;

  background: repeating-linear-gradient(
    90deg,
    var(--dc-blue) 0 12rem,
    var(--dc-red) 12rem 24rem,
    var(--dc-yellow) 24rem 36rem,
    var(--dc-white) 36rem 48rem,
    var(--dc-black) 48rem 60rem
  );
}

/* 슬라이더 진행 막대 (드래그 가능) */
.drag_bar {
  position: relative;
  width: 100%;
  height: 1px;
  background: var(--line-color);
  cursor: pointer;
}

.drag_bar .swiper-scrollbar-drag {
  position: absolute;
  top: -1px;
  height: 3px;
  background: var(--primary-color);
}

/* ── 그누보드 스킨에서 쓰는 기존 버튼 (색·모서리만 새 팔레트로) ── */
.default_btn {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  height: 4.8rem;

  padding: 0 3.2rem;
  border: 1px solid var(--line-color);
  border-radius: 4.8rem;
  overflow: hidden;

  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  transition: color 0.35s, border-color 0.35s;
}

.default_btn:hover {
  color: var(--white-color);
  border-color: var(--primary-color);
}

.default_btn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;

  height: 0;
  background: var(--primary-color);
  transition: height 0.35s;
}

.default_btn:hover::before {
  height: 100%;
}

.default_btn.round {
  height: 5.6rem;
  padding: 0 4rem;
  font-size: 1.6rem;
}

.icon_btn {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  height: 4.8rem;

  padding: 0 9.6rem 0 3.2rem;
  border-radius: 4.8rem;
  overflow: hidden;

  color: var(--white-color);
  white-space: nowrap;
}

.icon_btn::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: -1;
  width: 100%;
  height: 4.8rem;
  border-radius: 4.8rem;

  background: var(--primary-color);
}

.icon_btn::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12) url(../lib/icon/arrow-right.svg)
    no-repeat center center;
  filter: invert();
}

.icon_btn_write,
.icon_btn_cancel {
  position: relative;
  z-index: 1;

  margin-top: 4rem;

  display: inline-flex;
  align-items: center;
  height: 4.8rem;
  border-radius: 4.8rem;
  padding: 0 2.8rem 0 6.4rem;
  overflow: hidden;

  color: var(--white-color);
  font-weight: 600;
  white-space: nowrap;
}

.icon_btn_write::before,
.icon_btn_cancel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 4.8rem;
  border-radius: 4.8rem;
  background: var(--primary-color);
}

.icon_btn_cancel::before {
  background: var(--point-color);
}

.icon_btn_write::after,
.icon_btn_cancel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12) url(../lib/icon/edit-3.svg) no-repeat
    center center;

  filter: invert();
}

.icon_btn_cancel::after {
  background-image: url(../lib/icon/x.svg);
}

/* ==========================================================================
   보조 유틸리티
   ========================================================================== */
.flx {
  display: flex;
  gap: 3rem;
}

.flx > * {
  flex: 1;
  min-width: 0;
}

hr.hr {
  display: block;
  border: 1px solid transparent;
  margin: 4rem 0;
}
hr.hr_line {
  display: block;
  border: 1px solid transparent;
  border-top: 1px solid var(--line-color);
  margin: 12rem 40%;
}

.table_responsive {
  overflow-x: auto;
}

.iframe_wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.iframe_wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.design {
  margin-top: 1.6rem;
  font-size: 1.5rem;
  font-weight: 300;
  text-transform: uppercase;
}

.pg_current {
  display: inline-block;
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: #fff;
  font-weight: bold;
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  min-width: 30px;
  border-radius: 30px;
}
.pg_wrap {
  clear: both;
  float: none;
  display: block;
  margin-top: 4rem;
}
