/* 효인지 홈페이지 V21: 프론트 페이지 전용 보완 */

@media (min-width: 681px) {
  html { scrollbar-gutter: stable; }
}

html,
body.front-page-v21 {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body.front-page-v21 { overflow-x: clip; }
}

body.front-page-v21 .site-header,
body.front-page-v21 main,
body.front-page-v21 .site-footer,
body.front-page-v21 .container,
body.front-page-v21 .v15-hero,
body.front-page-v21 .v15-hero-grid,
body.front-page-v21 .v15-hero-copy,
body.front-page-v21 .v15-hero-media,
body.front-page-v21 .v15-hero-slider,
body.front-page-v21 .footer-grid,
body.front-page-v21 .footer-grid > div {
  min-width: 0;
  max-width: 100%;
}

body.front-page-v21 img,
body.front-page-v21 svg,
body.front-page-v21 video {
  max-width: 100%;
}

body.front-page-v21 .v15-hero {
  overflow: hidden;
}

@supports (overflow: clip) {
  body.front-page-v21 .v15-hero { overflow: clip; }
}

/* 고정된 무대 안에서만 내용이 바뀌므로 줄 전환 시 페이지 높이가 변하지 않습니다. */
body.front-page-v21 .v15-hero .hero-animated-text {
  width: 100%;
  height: 220px;
  min-height: 220px;
  display: block;
  overflow: hidden;
  overflow-anchor: none;
  contain: layout paint;
  font-family: "Noto Serif KR", "Noto Sans KR", serif;
}

@supports (overflow: clip) {
  body.front-page-v21 .v15-hero .hero-animated-text { overflow: clip; }
}

.v21-hero-stage {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 44px 78px 72px;
  align-content: center;
  row-gap: 3px;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity .68s ease, transform .68s cubic-bezier(.2,.75,.25,1);
  will-change: opacity, transform;
}

.v21-hero-stage.is-entered {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.v21-hero-stage.is-leaving {
  opacity: 0;
  transform: translate3d(0, -8px, 0);
}

.v21-hero-first-line,
.v21-hero-brand-line {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  overflow: hidden;
}

.v21-hero-first-line {
  color: #6b5c63;
  font-family: "Noto Sans KR", sans-serif;
  font-size: clamp(23px, 2.05vw, 33px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.045em;
}

.v21-hero-first-text,
.v21-hero-brand-prefix,
.v21-hero-brand-suffix {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.v21-char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, .42em, 0) scale(.98);
  filter: blur(2px);
  transition:
    opacity .38s ease,
    filter .38s ease,
    transform .46s cubic-bezier(.2,.78,.2,1);
}

.v21-char.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.v21-char--care,
.v21-char--rehab {
  color: #87334d;
  text-shadow: 0 5px 18px rgba(135,51,77,.12);
}

.v21-hero-mark-slot {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.v21-hero-mark {
  width: 88px;
  height: auto;
  display: block;
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(.9);
  filter: blur(5px);
  transition:
    opacity .66s ease,
    filter .66s ease,
    transform .72s cubic-bezier(.18,.78,.2,1.08);
}

.v21-hero-mark.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.v21-hero-brand-line {
  gap: 0;
  color: #34282e;
  font-size: clamp(32px, 3.05vw, 47px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.065em;
}

.v21-hero-brand-prefix {
  color: #b51f3c;
  -webkit-text-fill-color: #b51f3c;
  text-shadow: 0 7px 22px rgba(181,31,60,.16);
}

.v21-hero-brand-suffix {
  min-height: 1.12em;
  padding: 0;
  color: #34282e;
  -webkit-text-fill-color: #34282e;
  background: none;
  box-shadow: none;
  text-shadow: 0 6px 18px rgba(52,40,46,.10);
}

.v21-hero-stage.is-complete .v21-hero-mark {
  animation: v21HeroMarkBreathe 2.8s ease-in-out infinite;
}

@keyframes v21HeroMarkBreathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -2px, 0) scale(1.025); }
}

/* 슬라이드 점의 실제 너비를 고정하고 확대만 하여 컨트롤이 좌우로 흔들리지 않게 합니다. */
body.front-page-v21 .v15-hero-slider .slider-dot,
body.front-page-v21 .v15-hero-slider .slider-dot.active {
  width: 24px !important;
  flex: 0 0 24px;
  transform: scaleX(.34);
  transform-origin: center;
  transition: transform .25s ease, background .25s ease;
}

body.front-page-v21 .v15-hero-slider .slider-dot.active {
  transform: scaleX(1);
}

/* 푸터 연락처와 최하단 관리자 링크 */
.v21-footer-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
}

.v21-footer-phone b {
  color: #f2e5df;
  font-size: 13px;
  font-weight: 700;
}

.v21-footer-phone a { font-size: 13px; }

.v21-footer-admin-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.v21-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 12px;
  color: #c8b8bd;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.v21-admin-link:hover,
.v21-admin-link:focus-visible {
  color: #fff;
  border-color: rgba(255,255,255,.32);
  background: rgba(255,255,255,.08);
}

@media (max-width: 1180px) {
  body.front-page-v21 .v15-hero .hero-animated-text {
    height: 206px;
    min-height: 206px;
  }

  .v21-hero-stage {
    grid-template-rows: 40px 72px 66px;
  }
}

@media (max-width: 680px) {
  body.front-page-v21 .v15-hero .hero-animated-text {
    height: 172px;
    min-height: 172px;
  }

  .v21-hero-stage {
    grid-template-rows: 32px 60px 52px;
    row-gap: 2px;
  }

  .v21-hero-first-line {
    font-size: clamp(18px, 5.35vw, 22px);
    letter-spacing: -.055em;
  }

  .v21-hero-mark { width: 72px; }

  .v21-hero-brand-line {
    gap: 0;
    font-size: clamp(20px, 6.55vw, 27px);
    letter-spacing: -.07em;
  }


  .v21-footer-admin-row {
    justify-content: flex-end;
    margin-top: 10px;
  }
}

@media (max-width: 370px) {
  .v21-hero-first-line { font-size: 17.5px; }
  .v21-hero-brand-line { font-size: 19.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .v21-hero-stage,
  .v21-hero-mark,
  .v21-char,
  .v21-hero-stage.is-complete .v21-hero-mark {
    animation: none !important;
    transition: none !important;
  }
}
