/*
 * index.base.css — 모든 뷰포트에 적용되는 기본 스타일(모바일 우선 값).
 * 768px 이상에서 달라져야 하는 규칙은 index.pc.css 에만 둡니다.
 * 세로·가로 간격은 root.css 의 --space-* , 폭은 --content-measure-max 를 씁니다.
 */

/* 헤더 내비 5항목 — 좁은 데스크톱에서도 한 줄 유지 */
.header .header-nav {
  gap: clamp(10px, 1.8vw, 22px);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header .header-nav a {
  font-size: 0.875rem;
  white-space: nowrap;
}

/* ----- 히어로 -----
 * 세로: clamp(최소 px, 뷰포트 비율, 최대) — 순수 vw/vh 단독 사용은 주소창·초와이드에서 깨지기 쉬움
 * 가로: 좌우 패딩만 vw와 rem 혼합
 */
.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  /* 최소 ~21rem, 일반적으로 화면의 ~80% 높이 느낌, 최대 ~36rem으로 과도한 빈 공간 제한 */
  min-height: clamp(21rem, 80vh, 36rem);
  padding-top: max(5.25rem, calc(env(safe-area-inset-top, 0px) + 3.25rem));
  padding-right: clamp(var(--space-4), 5vw, var(--space-6));
  padding-bottom: max(3.25rem, calc(env(safe-area-inset-bottom, 0px) + 1.25rem));
  padding-left: clamp(var(--space-4), 5vw, var(--space-6));
  background: linear-gradient(180deg, var(--yellow-soft) 0%, var(--white) 60%);
}

@supports (height: 100svh) {
  .hero {
    min-height: clamp(21rem, 80svh, 36rem);
  }
}

.hero-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 0;
  text-align: center;
}

.hero-label {
  font-size: 0.875rem;
  color: var(--navy);
  font-weight: 500;
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--kakao-black);
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin: 0;
  word-break: keep-all;
}
.hero-title strong { color: var(--navy); }

.hero-desc {
  font-size: 0.9375rem;
  color: var(--dark);
  max-width: 520px;
  margin: 0 auto var(--space-6);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
  align-self: stretch;
  margin-top: auto;
  padding-top: var(--space-6);
  flex-shrink: 0;
}

.hero-actions .btn {
  width: 100%;
  max-width: 280px;
  min-height: 48px;
  padding: 14px 20px;
  font-size: 0.9375rem;
}

.hero-actions .btn-outline {
  color: var(--navy);
  border: 2px solid var(--navy);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
}
.hero-actions .btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

@media (max-width: 480px) {
  .hero {
    min-height: clamp(20rem, 78vh, 34rem);
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }

  @supports (height: 100svh) {
    .hero {
      min-height: clamp(20rem, 78svh, 34rem);
    }
  }
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  min-height: 48px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-primary { background: var(--kakao-yellow); color: var(--kakao-black); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.8); }
.btn-kakao { background: var(--kakao-yellow); color: var(--kakao-black); }

/* ----- 섹션 공통 ----- */
.section {
  padding: calc(var(--space-6) + var(--space-3)) 0;
}

.section-soft { background: var(--light); }

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--kakao-black);
  letter-spacing: -0.03em;
  line-height: 1.35;
  margin: 0 auto var(--space-10);
  max-width: var(--content-measure-max);
  padding: 0;
  text-align: center;
  word-break: keep-all;
}

.section-desc,
.section-note {
  font-size: 0.9375rem;
  color: var(--dark);
  max-width: var(--content-measure-max);
  margin: 0 auto calc(var(--space-5) + var(--space-2));
  padding: 0;
  text-align: center;
  line-height: 1.7;
}


/* 카드 그리드 */
.card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: var(--white);
  padding: 20px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: none; box-shadow: var(--shadow); }

.card-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.card h3 { font-size: 1rem; font-weight: 600; color: var(--navy); margin: 0 0 8px; }
.card p { font-size: 0.875rem; color: var(--dark); margin: 0; line-height: 1.5; }

/* 문제 리스트 */
.bullet-list { max-width: 640px; margin: 0 auto; padding: 0; list-style: none; }
.bullet-list li {
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 0.875rem;
  border-left: 4px solid var(--yellow);
  word-break: keep-all;
}
.bullet-list li strong { color: var(--navy); }

/* ----- 페인: 작은 말풍선 스택 + 하단 이투엘 링크 ----- */
.section-pain {
  background: #eceeef;
}

.pain-stack {
  max-width: min(100%, 21.5rem);
  margin: 0 auto;
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.pain-stack__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 14px;
  width: fit-content;
  max-width: 100%;
  filter: drop-shadow(0 2px 10px rgba(31, 42, 68, 0.1));
}

.pain-stack__unit:last-child {
  margin-bottom: 0;
}

.pain-stack__unit:nth-child(odd) {
  align-self: flex-start;
}

.pain-stack__unit:nth-child(even) {
  align-self: flex-end;
}

.pain-bubble {
  position: relative;
  margin: 0;
  width: fit-content;
  max-width: min(100%, 16.5rem);
  padding: 11px 14px 13px;
  background: var(--white);
  box-sizing: border-box;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--dark);
  text-align: center;
  word-break: keep-all;
  border: 1px solid rgba(31, 42, 68, 0.08);
}

/* 왼쪽 말풍선: 하단 왼쪽에 꼬리 */
.pain-stack__unit:nth-child(odd) .pain-bubble {
  border-radius: 16px 16px 16px 6px;
}

.pain-stack__unit:nth-child(odd) .pain-bubble::after {
  content: '';
  position: absolute;
  left: 12px;
  bottom: -6px;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid rgba(31, 42, 68, 0.08);
  border-top: none;
  border-left: none;
  border-radius: 0 0 2px 0;
  transform: rotate(45deg);
}

/* 오른쪽 말풍선: 하단 오른쪽에 꼬리 */
.pain-stack__unit:nth-child(even) .pain-bubble {
  border-radius: 16px 16px 6px 16px;
}

.pain-stack__unit:nth-child(even) .pain-bubble::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: -6px;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid rgba(31, 42, 68, 0.08);
  border-top: none;
  border-right: none;
  border-radius: 0 0 0 2px;
  transform: rotate(45deg);
}

.pain-bubble__hl {
  background: #ebe4d6;
  color: inherit;
  font-weight: 600;
  padding: 0.06em 0.2em;
  border-radius: 3px;
}

.pain-ellipsis {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: calc(var(--space-5) + var(--space-2)) auto 0;
  padding: 4px 0 0;
}

.pain-ellipsis__dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--navy);
  opacity: 0.22;
}

.pain-ellipsis__dot:nth-child(1) {
  opacity: 0.32;
}

.pain-ellipsis__dot:nth-child(2) {
  opacity: 0.22;
}

.pain-ellipsis__dot:nth-child(3) {
  opacity: 0.14;
}

.pain-outro {
  margin: calc(var(--space-6) - var(--space-1)) auto 0;
  max-width: min(26rem, 100%);
  padding: var(--space-6) var(--space-5);
  font-size: clamp(0.9375rem, 3.4vw, 1.0625rem);
  line-height: 1.65;
  text-align: center;
  color: var(--white);
  background: var(--navy);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(15, 22, 40, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
  word-break: keep-all;
}

.pain-outro strong {
  color: var(--white);
  font-weight: 800;
  font-size: 1.07em;
  letter-spacing: -0.02em;
}

.pain-outro__link {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.55);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.pain-outro__link:hover {
  color: var(--yellow);
  text-decoration-color: var(--yellow);
}

/* 솔루션(피처) 그리드 */
.feature-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature {
  background: var(--white);
  padding: 24px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.feature-icon { font-size: 2.25rem; display: block; margin-bottom: 16px; }
.feature h3 { font-size: 1rem; font-weight: 600; color: var(--navy); margin: 0 0 8px; }
.feature p { font-size: 0.875rem; color: var(--dark); margin: 0; line-height: 1.55; }

/* 행사 유형 */
.type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.type-card {
  background: var(--white);
  padding: 20px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.type-card h3 {
  font-size: 1rem; font-weight: 600; color: var(--navy); margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--yellow-soft); word-break: keep-all;
}
.type-card ul { margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--dark); line-height: 1.8; }

/* 진행 절차 */
.steps {
  max-width: var(--content-measure-max);
  margin: 0 auto var(--space-5);
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 0; flex-wrap: wrap;
  border-bottom: 1px solid rgba(0,0,0,.08); counter-increment: step;
}
.steps li:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--yellow);
  background: var(--navy); padding: 6px 12px; border-radius: 20px;
}
.steps div { font-size: 0.875rem; color: var(--dark); }
.steps strong { color: var(--navy); }

.disclaimer {
  font-size: 0.875rem;
  color: var(--dark);
  opacity: 0.85;
  text-align: center;
  max-width: var(--content-measure-max);
  margin: 0 auto;
  padding: 0;
  line-height: 1.65;
}

/* 보장 항목 */
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 auto var(--space-5);
  max-width: var(--content-measure-max);
}
.pill {
  display: inline-block; padding: 8px 14px; background: var(--white);
  border: 1px solid rgba(0,0,0,.1); border-radius: 24px; font-size: 0.875rem; font-weight: 500; color: var(--navy);
}

.callout {
  max-width: var(--content-measure-max);
  margin: 0 auto;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--dark);
  border-left: 4px solid var(--yellow);
}
.callout strong { display: block; margin-bottom: 8px; color: var(--navy); }
.callout ul { margin: 0; padding-left: 20px; }

/* 신뢰 체크리스트 */
.check-list { max-width: 600px; margin: 0 auto; padding: 0; list-style: none; }
.check-list li {
  padding: 14px 16px 14px 44px; position: relative; font-size: 0.875rem; color: var(--dark);
  margin-bottom: 8px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
}
.check-list li::before { content: '✓'; position: absolute; left: 16px; color: var(--navy); font-weight: 700; }

/* FAQ */
.faq-list {
  max-width: var(--content-measure-max);
  margin: 0 auto;
}
.faq-item { border-bottom: 1px solid rgba(0,0,0,.08); position: relative; }
.faq-q {
  padding: 16px 28px 16px 0; font-weight: 600; color: var(--navy);
  cursor: pointer; list-style: none; font-size: 0.9375rem; min-height: 48px; display: flex; align-items: center;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; position: absolute; right: 0; font-weight: 400; color: var(--dark); }
details[open] .faq-q::after { content: '−'; }
.faq-a { padding: 0 0 16px; margin: 0; font-size: 0.875rem; color: var(--dark); line-height: 1.7; }

/* 푸터 */
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding: 48px 24px 32px; }
.footer-col h3 { font-size: 0.9375rem; font-weight: 600; color: var(--white); margin: 0 0 16px; }
.footer-col ul { margin: 0; padding: 0; list-style: none; line-height: 1.9; }
.footer-col a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer-col a.footer-admin-link {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8125rem;
  font-weight: 400;
}
.footer-col a.footer-admin-link:hover {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-bottom {
  padding: 20px 24px;
  /* 고정 하단 바 높이와 동기(상패딩 + 1행 + 하패딩·safe) */
  padding-bottom: calc(20px + 22px + 48px + 48px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  font-size: 0.8125rem;
  opacity: .8;
}

/* 하단 고정 바: 전화 · 견적 신청 · 카톡 1열 (768px 미만 — pc.css에서 숨김) */
/* 본문 마지막 섹션이 바에 가리지 않도록 — 푸터 아래 흰 빈칸은 body 패딩 대신 여기만 사용 */
main#main {
  padding-bottom: calc(22px + 48px + 48px + env(safe-area-inset-bottom, 0px));
}

/* 뷰포트 맨 아래에 붙임: bottom만 쓰고 safe-area는 padding으로만 처리(iOS에서 바가 떠 보이는 현상 완화) */
.mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  padding-top: 18px;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.06);
  transform: translateZ(0);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease, visibility 0.28s;
}

.mobile-bar.is-hidden {
  transform: translate3d(0, calc(100% + 8px), 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mobile-bar__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.mobile-bar__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.mobile-bar__icon-btn:active {
  transform: scale(0.96);
}

.mobile-bar__icon-btn:focus {
  outline: none;
}

.mobile-bar__icon-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.mobile-bar__icon-btn--tel {
  background: var(--navy);
  color: var(--white);
}

/* 노란 견적 CTA와 구분 — 갈색 배경 + 밝은 아이콘 */
.mobile-bar__icon-btn--kakao {
  background: #4a342c;
  color: #fff;
}

.mobile-bar__icon {
  display: block;
  flex-shrink: 0;
}

.mobile-bar__cta {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  font-size: clamp(0.8125rem, 2.8vw, 0.9375rem);
  font-weight: 600;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(254, 229, 0, 0.35);
}

/* 데스크톱 전용 플로팅(전화+카톡) — 모바일에선 하단 바에 동일 링크 제공 */
.float-quick {
  display: none;
}

.float-quick__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.float-quick__btn:hover {
  transform: scale(1.06);
}

.float-quick__btn:focus {
  outline: none;
}

.float-quick__btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.float-quick__btn--tel {
  background: var(--navy);
  color: var(--white);
}

.float-quick__btn--kakao {
  background: #4a342c;
  color: #fff;
}

.float-quick__icon {
  display: block;
  flex-shrink: 0;
}

