/*
 * 감람나무 상담센터 — 디자인 검토판 V1
 *
 * 신규 파일입니다.
 * 기존 CSS는 수정하지 않습니다.
 *
 * pp-* 클래스는 site-polish-preview.js에서
 * 항목별 설정에 따라 추가합니다.
 */

/* =========================================================
   1. 버튼 디자인 통일
   ========================================================= */

html.pp-controls .simple-site a.button,
html.pp-controls .simple-site button.button,
html.pp-controls .simple-site .main-nav a.nav-consult,
html.pp-controls .simple-site .op-button {
  min-height: 48px;
  border-radius: 8px;
}

/* 일반적인 주요 버튼 */
html.pp-controls .simple-site a.button:not(.outline),
html.pp-controls .simple-site button.button:not(.outline),
html.pp-controls .simple-site .main-nav a.nav-consult,
html.pp-controls .simple-site .op-button:not(.op-button-secondary) {
  border-color: #3f3f00;
  background: #3f3f00;
  color: #fff;
}

html.pp-controls .simple-site a.button:not(.outline):hover,
html.pp-controls .simple-site button.button:not(.outline):hover,
html.pp-controls .simple-site .main-nav a.nav-consult:hover,
html.pp-controls .simple-site .op-button:not(.op-button-secondary):hover {
  border-color: #303000;
  background: #303000;
  color: #fff;
}

/* 보조 버튼 */
html.pp-controls .simple-site a.button.outline,
html.pp-controls .simple-site .op-button-secondary {
  border-color: #c9cfbe;
  background: #fffefb;
  color: #3f3f00;
}

html.pp-controls .simple-site a.button.outline:hover,
html.pp-controls .simple-site .op-button-secondary:hover {
  border-color: #aab59a;
  background: #f1f4e9;
  color: #303000;
}

/*
 * 홈 하단은 진한 배경이므로
 * 기존의 흰색 버튼 대비를 유지합니다.
 */
html.pp-controls #home-classic .home-contact-band a.button {
  border-color: #fff;
  background: #fff;
  color: #3f3f00;
}

html.pp-controls #home-classic .home-contact-band a.button.outline {
  border-color: #fff;
  background: transparent;
  color: #fff;
}

html.pp-controls #home-classic .home-contact-band a.button:hover {
  border-color: #f7f7ef;
  background: #f7f7ef;
  color: #303000;
}

/* 버튼이 위로 움직이는 효과보다 색 변화 중심 */
html.pp-controls #home-classic .button:hover {
  transform: none;
  box-shadow: none;
}

/* =========================================================
   2. 카드 디자인 통일
   ========================================================= */

html.pp-cards #home-classic .concern-card,
html.pp-cards #home-classic .program-card,
html.pp-cards #home-classic .coaching-feature,
html.pp-cards #home-classic .journey-grid li,
html.pp-cards .simple-site .op-card,
html.pp-cards .simple-site .op-director,
html.pp-cards .simple-site .resource-card {
  border-radius: 14px;
}

/* 카드 전체가 링크인 경우만 약한 움직임 */
html.pp-cards #home-classic .concern-card:hover {
  transform: none;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  html.pp-cards #home-classic .concern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(46, 52, 29, .06);
  }
}

/* 내부 링크를 누르는 일반 카드에는 움직임 생략 */
html.pp-cards #home-classic .program-card:hover {
  transform: none;
  box-shadow: none;
}

/* =========================================================
   3. 푸터로 이동한 관리자 메뉴
   ========================================================= */

html.pp-admin-footer #center-site-footer .pp-admin-link {
  padding-right: 10px;
  padding-left: 10px;

  border: 1px solid #e1e5dc;
  border-radius: 6px;

  color: #656b57;
  font-size: 12px;
}

/* =========================================================
   4. 모바일 가독성
   ========================================================= */

@media (max-width: 640px) {
  html.pp-readable #home-classic .concern-card p,
  html.pp-readable #home-classic .faq-answer p,
  html.pp-readable #home-classic .journey-grid p {
    font-size: 14px;
    line-height: 1.85;
  }

  html.pp-readable #home-classic .concern-link {
    font-size: 13px;
    line-height: 1.7;
  }

  html.pp-readable #home-classic .concern-category {
    font-size: 12px;
  }

  html.pp-readable #home-classic .section-footnote,
  html.pp-readable #home-classic .booklet-disclaimer,
  html.pp-readable #home-classic .journey-bottom p {
    font-size: 12px;
    line-height: 1.85;
  }
}

/*
 * 좁은 카드에 글자를 밀어 넣지 않고,
 * 작은 화면은 한 열로 읽기 편하게 표시합니다.
 */
@media (max-width: 480px) {
  html.pp-readable #home-classic .concern-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  html.pp-readable #home-classic .concern-card {
    padding: 23px;
  }

  html.pp-readable #home-classic .concern-card h3 {
    font-size: 20px;
    line-height: 1.6;
  }

  html.pp-readable #home-classic .concern-category {
    margin-bottom: 14px;
  }

  html.pp-readable #home-classic .concern-card p {
    margin-bottom: 18px;
  }
}

/* =========================================================
   5. 센터 철학 문단 배치
   ========================================================= */

html.pp-philosophy #center-philosophy {
  max-width: 800px;
  padding-top: 8px;
}

html.pp-philosophy #center-philosophy .pp-philosophy-copy {
  width: 100%;
  margin: 0;
  padding: 0;
}

html.pp-philosophy #center-philosophy .pp-philosophy-copy p {
  margin: 0 0 26px;

  color: #49513f;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.95;
  letter-spacing: -.02em;

  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}

html.pp-philosophy #center-philosophy
.pp-philosophy-copy p:first-child {
  margin-bottom: 36px;
  padding: 24px 16px 30px;

  border-bottom: 1px solid #dfe5d6;

  color: #3f3f00;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.8;

  text-align: center;
}

html.pp-philosophy #center-philosophy
.pp-philosophy-copy p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  html.pp-philosophy #center-philosophy .pp-philosophy-copy p {
    margin-bottom: 23px;
    font-size: 16px;
    line-height: 1.9;
  }

  html.pp-philosophy #center-philosophy
  .pp-philosophy-copy p:first-child {
    margin-bottom: 28px;
    padding: 12px 0 24px;
    font-size: 19px;
  }
}

/* =========================================================
   6. 센터 공간 사진 — 실제 파일이 있을 때만 표시
   ========================================================= */

.simple-site .pp-space-section {
  margin: 44px 0;
  padding: 30px 0;

  border-top: 1px solid #e1e5dc;
  border-bottom: 1px solid #e1e5dc;
}

.simple-site .pp-space-heading {
  margin-bottom: 22px;
}

.simple-site .pp-space-heading h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.simple-site .pp-space-heading p {
  margin: 0;
  color: #656d61;
  font-size: 15px;
}

.simple-site .pp-space-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.simple-site .pp-space-card {
  min-width: 0;
  margin: 0;
}

.simple-site .pp-space-card img {
  display: block;

  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;

  border: 1px solid #e1e5dc;
  border-radius: 12px;

  background: #f7f8f3;
  object-fit: contain;
}

.simple-site .pp-space-card figcaption {
  margin-top: 10px;

  color: #55604b;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 640px) {
  .simple-site .pp-space-section {
    margin: 32px 0;
    padding: 25px 0;
  }

  .simple-site .pp-space-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .simple-site .pp-space-heading h2 {
    font-size: 24px;
  }

  .simple-site .pp-space-heading p {
    font-size: 14px;
  }
}

/* =========================================================
   7. 자료실 표지 — 해당 이미지가 있을 때만 표시
   ========================================================= */

html.pp-covers .simple-site .resource-card.pp-resource-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

html.pp-covers .simple-site .pp-resource-cover {
  width: 132px;
  margin: 0;
}

html.pp-covers .simple-site .pp-resource-cover img {
  display: block;

  width: 100%;
  height: auto;

  border: 1px solid #dce2d3;
  border-radius: 3px 8px 8px 3px;

  box-shadow: 5px 7px 18px rgba(49, 61, 36, .10);
}

html.pp-covers .simple-site .pp-resource-copy {
  min-width: 0;
}

html.pp-covers .simple-site .pp-resource-copy .actions {
  margin-top: 20px;
}

@media (max-width: 540px) {
  html.pp-covers .simple-site .resource-card.pp-resource-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  html.pp-covers .simple-site .pp-resource-cover {
    width: 112px;
  }
}

/* =========================================================
   8. 언론 소개 태블릿 배치
   ========================================================= */

/* 기존 CSS의 중복 규칙은 건드리지 않고 검토판에서만 적용 */
@media (min-width: 641px) and (max-width: 960px) {
  html.pp-press-grid .simple-site .op-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 640px) {
  html.pp-press-grid .simple-site .op-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   9. 홈 슬라이더 일시정지 버튼
   ========================================================= */

#home-classic #home-synced-hero .pp-hero-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  min-width: 76px;
  min-height: 36px;
  margin: 0 0 0 8px;
  padding: 6px 10px;

  border: 1px solid #dce2d3;
  border-radius: 999px;

  background: #fff;
  color: #4c593d;

  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;

  cursor: pointer;
}

#home-classic #home-synced-hero .pp-hero-toggle:hover {
  background: #f3f6ec;
  border-color: #bdc9ad;
}

#home-classic #home-synced-hero .pp-hero-toggle:focus-visible {
  outline: 2px solid #77772b;
  outline-offset: 2px;
}

/* =========================================================
   10. 접근성
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html.pp-cards #home-classic .concern-card:hover {
    transform: none;
  }
}

/* =========================================================
   메인 슬라이더: 중앙 점 버튼과 오른쪽 재생 제어 버튼
   ========================================================= */

#home-classic #home-synced-hero .hs-dots.pp-hero-controls {
  display: grid;
  grid-template-columns:
    minmax(44px, 1fr) auto minmax(44px, 1fr);
  align-items: center;
  column-gap: 12px;

  box-sizing: border-box;
  width: 100%;
  min-height: 44px;

  margin: 6px 0 0;
  padding: 0;
}

/* 점 버튼 그룹은 가운데 열에 배치합니다. */
#home-classic #home-synced-hero
.pp-hero-controls .pp-hero-dot-group {
  grid-column: 2;
  grid-row: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;

  min-height: 44px;
}

/*
 * 점은 작게 표시하되,
 * 누를 수 있는 영역은 충분히 확보합니다.
 */
#home-classic #home-synced-hero
.pp-hero-dot-group .hs-dot-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;

  box-sizing: border-box;
  width: 32px;
  min-width: 32px;
  height: 44px;
  min-height: 44px;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 6px;
  background: transparent;

  box-shadow: none;
  transform: none;
  cursor: pointer;
}

/* 기존 점 장식과 겹치지 않도록 초기화합니다. */
#home-classic #home-synced-hero
.pp-hero-dot-group .hs-dot-button::before {
  content: none;
}

#home-classic #home-synced-hero
.pp-hero-dot-group .hs-dot-button::after {
  content: "";
  position: static;
  display: block;

  width: 7px;
  height: 7px;

  border: 0;
  border-radius: 50%;
  background: #d5d8cb;

  box-shadow: none;
  transform: none;
}

/* 현재 선택된 슬라이드의 점 색상입니다. */
#home-classic #home-synced-hero
.pp-hero-dot-group .hs-dot-button[aria-pressed="true"]::after {
  background: #3f3f00;
}

/* 재생 제어 버튼은 오른쪽 열 끝에 배치합니다. */
#home-classic #home-synced-hero
.pp-hero-controls .pp-hero-toggle {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;

  margin: 0;
  padding: 0;

  border: 1px solid #e0e4d7;
  border-radius: 50%;

  background: #fff;
  color: #596340;

  box-shadow: none;
  transform: none;
  cursor: pointer;
}

#home-classic #home-synced-hero
.pp-hero-controls .pp-hero-toggle svg {
  display: block;
  width: 16px;
  height: 16px;

  pointer-events: none;
}

/* 마우스를 사용하는 환경에서만 올림 효과를 적용합니다. */
@media (hover: hover) and (pointer: fine) {
  #home-classic #home-synced-hero
  .pp-hero-controls .pp-hero-toggle:hover {
    border-color: #b9c3a8;
    background: #f4f6ef;
    color: #3f3f00;
  }
}

/* 키보드로 선택한 버튼을 명확히 표시합니다. */
#home-classic #home-synced-hero
.pp-hero-controls button:focus-visible {
  outline: 2px solid #77772b;
  outline-offset: 2px;
}

/* 숨김 속성이 다른 표시 규칙에 덮이지 않도록 합니다. */
#home-classic #home-synced-hero .pp-hero-toggle[hidden],
#home-classic #home-synced-hero .hs-dots[hidden] {
  display: none !important;
}
