/*
  더플러스홈케어 랜딩페이지 스타일시트
  - 색상 팔레트
    -- 배경: #FFFFFF
    -- 텍스트: #333333
    -- 메인(파랑): #007BFF
    -- 보조(녹색): #28a745
  - 최대 콘텐츠 너비: 1140px
  - 섹션 상/하 패딩: 80px 이상
*/

:root {
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-primary: #007bff;
  --color-accent: #28a745;
  --color-muted: #777777;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --container-max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* 공통 버튼 스타일 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { filter: brightness(0.95); transform: translateY(-1px); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-xl { padding: 16px 28px; font-size: 1.15rem; }
.btn-sm { padding: 8px 12px; font-size: 0.9rem; }

/* 헤더 */
.site-header {
  position: sticky; /* 스크롤 시 상단 고정 */
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 900;
  letter-spacing: -0.2px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}
.main-nav a.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.main-nav a.nav-link:hover { background: rgba(0,0,0,0.04); }
.main-nav .nav-cta { padding: 10px 14px; }

/* 히어로 */
.hero {
  position: relative;
  min-height: 85vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 비디오를 배경처럼 채우기 */
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35); /* 텍스트 가독성 위한 어두운 레이어 */
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
}
.hero h1 { font-weight: 900; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 0 0 16px; }
.hero p { font-size: clamp(1rem, 1.8vw, 1.15rem); margin: 0 0 28px; opacity: 0.95; }

/* 섹션 공통 */
.section { padding: 88px 0; }
.section h2 { font-weight: 900; font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 0 0 24px; text-align: center; }
.section-subtitle { text-align: center; color: var(--color-muted); margin: 0 auto 36px; max-width: 720px; }

/* 문제 제기 카드 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.problem-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.problem-card .icon { color: var(--color-accent); margin-bottom: 14px; }
.problem-card h3 { margin: 8px 0 8px; font-size: 1.1rem; font-weight: 800; }
.problem-card p { margin: 0; color: #444; }

/* 전후 비교 탭 */
.tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tab-button {
  background: #f3f6ff;
  color: #2b4d8b;
  border: 1px solid #e0e6ff;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}
.tab-button.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.tab-panel { animation: fadeIn 180ms ease-in; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.ba-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.ba-item { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.ba-subtitle { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; }
.ba-item img { width: 100%; height: auto; border-radius: 10px; display: block; }

/* 신청 폼 */
.section-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; }
.form-group-full { grid-column: 1 / -1; }
.form-group label { font-weight: 700; margin-bottom: 8px; }
.label-head { margin-bottom: 12px; }
.label-head .hint { font-weight: 500; color: var(--color-muted); }
.form-group input,
.form-group textarea {
  padding: 12px 14px;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  font-size: 1rem;
}
.helper-text { color: var(--color-muted); margin-top: 6px; display: block; }
.helper-preview { margin-top: 6px; font-weight: 700; color: #2b4d8b; }
.discount-badge { background: rgba(40,167,69,0.1); color: #1a7a34; border: 1px solid #bfe5c8; font-weight: 800; padding: 2px 8px; border-radius: 999px; font-size: 0.85em; }

/* 커스텀 달력 입력 */
.date-picker { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.date-picker input[type="date"],
.date-picker input[type="text"] { letter-spacing: 0.5px; background: #fafafa; cursor: pointer; }
.calendar-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 12px; border: 1px solid #e3e3e3; background: #fff; border-radius: 10px; cursor: pointer; }
.calendar-btn:hover { background: #f7f9ff; }
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,123,255,0.12); }
.invalid-feedback { display: none; color: #c62828; font-size: 0.9rem; margin-top: 6px; }
.form-group.invalid .invalid-feedback { display: block; }
.category-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: none; /* fieldset 기본 테두리 제거 */
  padding: 0;   /* fieldset 기본 패딩 제거 */
}
.category-group input[type="radio"],
.category-group input[type="checkbox"] { display: none; }
.category-option {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  background: #fff;
  font-weight: 700;
}
.category-group input[type="radio"]:checked + .category-option,
.category-group input[type="checkbox"]:checked + .category-option {
  background: rgba(0,123,255,0.08);
  border-color: var(--color-primary);
  color: #1a3e85;
}
.form-privacy { margin: 12px 0 18px; }
.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; }
.form-success { color: var(--color-accent); font-weight: 700; margin-top: 12px; }
.submit-btn { width: 100%; max-width: 520px; display: inline-flex; }

/* 푸터 */
.site-footer { background: #fafafa; border-top: 1px solid #eee; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; padding: 28px 0; align-items: start; }
.footer-brand { font-weight: 900; }
.footer-info p { margin: 4px 0; color: #555; }
.footer-bottom { text-align: center; font-size: 0.9rem; color: #777; padding: 14px 0 22px; border-top: 1px dashed #e6e6e6; }

/* 플로팅 카카오톡 버튼 */
.floating-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.floating-chat:hover .floating-tooltip { opacity: 1; transform: translateY(-6px); }
.floating-tooltip {
  position: absolute;
  right: 66px;
  bottom: 50%;
  transform: translateY(50%);
  background: #222;
  color: #fff;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.18s ease-in-out;
  pointer-events: none;
}

/* 반응형 */
@media (max-width: 992px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-container { height: auto; padding: 10px 0; align-items: flex-start; }
  .main-nav ul { flex-wrap: wrap; gap: 10px; }
  .card-grid { grid-template-columns: 1fr; }
  .ba-grid { grid-template-columns: 1fr; }
  .section-form .form-grid { grid-template-columns: 1fr; }
  .submit-btn { width: 100%; }
}

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; z-index: 2000; display: none; }
.lightbox[hidden] { display: none; }
.lightbox:not([hidden]) { display: block; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.lightbox-body { position: absolute; inset: 40px 20px 20px; display: grid; place-items: center; }
.lightbox-body img { max-width: 96vw; max-height: 76vh; border-radius: 12px; box-shadow: var(--shadow-md); background:#fff }
.lightbox-close { position: absolute; top: 16px; right: 22px; background: #fff; border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 22px; cursor: pointer; box-shadow: var(--shadow-sm); }
.lightbox-nav { position: absolute; bottom: 28px; display: flex; gap: 12px; }
.lightbox-prev, .lightbox-next { background: #fff; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; box-shadow: var(--shadow-sm); font-weight: 800; }
.lightbox-caption { position: absolute; bottom: 70px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.6); font-weight: 700; }
.lightbox-counter { position: absolute; top: 16px; left: 22px; color:#fff; font-weight: 800; }


