/* ==================================================
   HOME HERO SYNC V5

   - 제목·설명·사진을 JavaScript로 동시에 전환
   - 점 버튼 클릭으로 슬라이드 선택
   - 상담 버튼과 접수 안내는 고정
   - 기존 CSS 자동 애니메이션은 사용하지 않음
   ================================================== */

/* 메인 위아래 여백 */
#home-classic #home-synced-hero {
  margin-top: 0;
  margin-bottom: 0;
  padding: 28px 0 20px;
  background: #fff;
  color: #222;
}

/* PC: 왼쪽 문구 / 오른쪽 사진 */
#home-synced-hero .hs-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.55fr);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
}

#home-synced-hero .hs-copy,
#home-synced-hero .hs-visual {
  min-width: 0;
}

#home-synced-hero .hs-copy {
  text-align: center;
}

/*
 * 문구들을 같은 그리드 칸에 겹쳐 배치합니다.
 * 숨긴 문구도 높이 계산에 참여하므로
 * 슬라이드 변경 시 버튼 위치가 흔들리지 않습니다.
 */
#home-synced-hero .hs-stack {
  display: grid;
}

#home-synced-hero .hs-stack > .hs-frame {
  grid-area: 1 / 1;
  align-self: center;
  min-width: 0;
}

/* 제목 */
#home-classic #home-synced-hero .hs-title {
  margin: 0;
  padding: 0;
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.04em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  color: #202020;
}

/* 설명 */
#home-classic #home-synced-hero .hs-description {
  margin: 24px 0 0;
  padding: 0;
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.65;
  letter-spacing: -0.025em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  color: #454545;
}

/* 고정 버튼 및 접수 안내 */
#home-synced-hero .hs-contact-box {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 32px;
  padding: 12px;
  background: #faf9f3;
  text-align: left;
}

#home-synced-hero .hs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#home-classic #home-synced-hero .hs-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 15px;
  border: 1px solid #3f3f00;
  border-radius: 6px;
  background: #3f3f00;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

#home-classic #home-synced-hero .hs-actions .button.outline {
  background: transparent;
  color: #3f3f00;
}

#home-synced-hero .hs-actions .button:focus-visible {
  outline: 3px solid #77772b;
  outline-offset: 3px;
}

#home-classic #home-synced-hero .hs-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #626258;
}

/* 사진 영역 */
#home-synced-hero .hs-photos {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f7f6f1;
}

/*
 * 사진 전체를 표시합니다.
 * 이미지 비율이 16:9와 다르면 여백이 생길 수 있습니다.
 */
#home-synced-hero .hs-photos > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

/* 기본적으로 모든 프레임을 숨깁니다. */
#home-classic #home-synced-hero .hs-frame {
  animation: none;
  transition: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/*
 * JavaScript 실행 전 또는 실행되지 않는 환경에서는
 * 첫 번째 사진과 문구만 표시합니다.
 */
#home-classic #home-synced-hero:not(.hs-js-ready)
  .hs-frame--1 {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* JavaScript에서 선택한 프레임만 표시 */
#home-classic #home-synced-hero.hs-js-ready
  .hs-frame.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 사진 선택 버튼 영역 */
#home-classic #home-synced-hero .hs-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
}

/* JavaScript 초기화 전에는 버튼 숨김 */
#home-classic #home-synced-hero .hs-dots[hidden] {
  display: none;
}

/*
 * 실제 클릭 영역은 28 × 28px입니다.
 * 눈에 보이는 점은 8 × 8px로 유지합니다.
 */
#home-classic #home-synced-hero .hs-dot-button {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

#home-classic #home-synced-hero .hs-dot-button::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7d7c9;
}

/* 선택되지 않은 점의 마우스 반응 */
@media (hover: hover) {
  #home-classic #home-synced-hero
    .hs-dot-button:hover::before {
    background: #92926d;
  }
}

/* 현재 선택된 점은 진한 색으로 표시 */
#home-classic #home-synced-hero
  .hs-dot-button[aria-pressed="true"]::before {
  background: #3f3f00;
}

/* 키보드 포커스 표시 */
#home-classic #home-synced-hero
  .hs-dot-button:focus-visible {
  outline: 2px solid #77772b;
  outline-offset: 1px;
}

/* 메인 바로 아래 상담 분야 섹션과의 여백 */
#home-classic #home-synced-hero + .concerns-section {
  margin-top: 0;
  padding-top: 24px;
}

#home-classic #home-synced-hero
  + .concerns-section > .section-heading {
  margin-top: 0;
  padding-top: 0;
}

#home-classic #home-synced-hero
  + .concerns-section > .section-heading > .section-kicker {
  margin-top: 0;
}

/* 모바일 */
@media (max-width: 760px) {
  #home-classic #home-synced-hero {
    padding-top: 20px;
    padding-bottom: 12px;
  }

  #home-synced-hero .hs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  #home-classic #home-synced-hero .hs-title {
    font-size: clamp(24px, 6.5vw, 32px);
  }

  #home-classic #home-synced-hero .hs-description {
    margin-top: 18px;
    font-size: 16px;
  }

  #home-synced-hero .hs-contact-box {
    margin-top: 24px;
  }

  #home-synced-hero .hs-actions {
    justify-content: center;
  }

  #home-classic #home-synced-hero + .concerns-section {
    padding-top: 20px;
  }
}

/*
 * 기기의 '동작 줄이기' 설정은 JavaScript에서 처리합니다.
 * 자동 전환만 중단하며 점 클릭에 의한 수동 전환은 유지합니다.
 */
