/*
  더플러스홈케어 랜딩페이지 스타일시트
  - 색상 팔레트
    -- 배경: #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, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  /* 텍스트 렌더링 최적화 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.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; }

/* 기술자격증 섹션 */
.section-certification { background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%); }
.certification-content { display: grid; gap: 40px; }

/* 자격증 이미지 섹션 */
.certificate-image-section {
  background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(0,123,255,0.1);
}
.certificate-image-section h3 {
  text-align: center;
  margin: 0 0 28px;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-primary);
}
.certificate-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.certificate-img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 3px solid #ffd700;
}
.certificate-info {
  padding: 20px;
}
.certificate-info h4 {
  margin: 0 0 16px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-primary);
}
.certificate-info p {
  margin: 8px 0;
  color: var(--color-text);
  font-size: 1rem;
}
.certificate-info strong {
  color: var(--color-primary);
  font-weight: 700;
}
.certificate-badge-mini {
  margin-top: 16px;
}
.premium-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #8b4513;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  border: 2px solid #ffd700;
  /* 모바일 환경에서 영문 텍스트 렌더링 개선 */
  font-family: 'Noto Sans KR', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.3px;
  word-spacing: 1px;
}

/* 자격증 이미지 폴백 */
.certificate-fallback {
  width: 100%;
  max-width: 400px;
}
.cert-placeholder {
  background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
  border: 3px solid #ffd700;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cert-placeholder .cert-icon {
  color: #ffd700;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}
.cert-placeholder h4 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--color-primary);
}
.cert-placeholder p {
  margin: 0;
  color: var(--color-muted);
  font-weight: 600;
}
.certification-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cert-badge {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,123,255,0.08);
}
.cert-icon { 
  color: var(--color-primary); 
  margin-bottom: 16px; 
  display: flex;
  justify-content: center;
}
.cert-badge h3 { 
  margin: 8px 0 4px; 
  font-size: 1.1rem; 
  font-weight: 800; 
  color: var(--color-text);
}
.cert-badge p { 
  margin: 0; 
  color: var(--color-muted); 
  font-size: 0.9rem;
  font-weight: 600;
}

.certification-highlight {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0056b3 100%);
  border-radius: var(--radius);
  padding: 36px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.highlight-content h3 {
  margin: 0 0 24px;
  font-size: 1.3rem;
  font-weight: 900;
}
.highlight-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.highlight-content li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  padding: 8px 0;
}
.highlight-content li::before {
  content: "✓";
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.highlight-content strong {
  color: #ffd700;
}

/* 전후 비교 탭 */
.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; 
  padding: 20px;
  background: #f8f9fa;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.3s ease;
}

.form-success.success-highlight {
  background: #e8f5e8;
  border-color: var(--color-accent);
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
  transform: scale(1.02);
}

.form-completed {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.form-completed::after {
  content: "신청 완료";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-accent);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.2rem;
  z-index: 10;
  box-shadow: var(--shadow-md);
}

.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-info a { color: var(--color-primary); text-decoration: none; font-weight: 700; }
.footer-info a:hover { text-decoration: underline; }
.footer-bottom { text-align: center; font-size: 0.9rem; color: #777; padding: 14px 0 22px; border-top: 1px dashed #e6e6e6; }

/* 쿠팡 파트너스 배너 (모바일 전용) */
.coupang-banner-section {
  display: none; /* 기본적으로 숨김 (데스크톱) */
  text-align: center;
  padding: 20px 0;
  background: #f8f9fa;
  border-top: 1px solid #e6e6e6;
}

.coupang-banner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.coupang-banner-container iframe {
  max-width: 100%;
  height: auto;
}

.coupang-disclaimer {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
  padding: 0 20px;
  line-height: 1.4;
}



/* 반응형 */
@media (max-width: 992px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .certificate-display { grid-template-columns: 1fr; gap: 24px; }
  .certificate-img { max-width: 100%; margin: 0 auto; }
  .certification-badges { grid-template-columns: 1fr; }
  .highlight-content ul { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  
  /* 모바일에서 텍스트 렌더링 개선 */
  .premium-badge {
    font-size: 0.85rem;
    padding: 6px 14px;
    letter-spacing: 0.2px;
    word-spacing: 0.5px;
  }
}
@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%; }
  
  /* 모바일 환경에서만 쿠팡 배너 표시 */
  .coupang-banner-section {
    display: block;
  }
  
  /* 작은 화면에서 프리미엄 배지 최적화 */
  .premium-badge {
    font-size: 0.8rem;
    padding: 5px 12px;
    letter-spacing: 0.1px;
    word-spacing: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
  }
  
  /* 전체 텍스트 렌더링 최적화 */
  body, * {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 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; }


