/* ==========================================================================
   style.css v6 - 16personalities 스타일 풀 반응형 리디자인
   - PC/태블릿/모바일 반응형
   - 고정 네비게이션, 히어로, 그리드 카드, 푸터
   ========================================================================== */

/* ============================================================
   1. 디자인 토큰 (CSS 변수) - 16personalities 팔레트 영감
   ============================================================ */
:root {
  /* 폰트 */
  --font-sans: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* 메인 색상 */
  --color-primary:   #6C4FE8;   /* 보라 (메인 CTA) */
  --color-primary-dark: #5538d4;
  --color-teal:      #3A9EA5;   /* 청록 (히어로 배경) */
  --color-teal-dark: #2d8a91;

  /* 배경 */
  --bg-page:         #F4F6FB;   /* 전체 페이지 배경 */
  --bg-white:        #FFFFFF;
  --bg-hero:         #3A9EA5;   /* 히어로 배경 */
  --bg-footer:       #1C1F2E;   /* 어두운 푸터 */

  /* 텍스트 */
  --text-main:       #1C1F2E;
  --text-sub:        #5A6080;
  --text-light:      #9AA0BC;
  --text-white:      #FFFFFF;

  /* 테두리 / 그림자 */
  --border-color:    rgba(0, 0, 0, 0.08);
  --shadow-sm:       0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:       0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg:       0 16px 48px rgba(0,0,0,0.12);

  /* 카드 카테고리 색상 (테스트별) */
  --card-color-1:    #7C4FE8;   /* 보라 (부모 유형) */
  --card-color-2:    #3A9EA5;   /* 청록 (소울 컨트리) */
  --card-color-3:    #E8884F;   /* 오렌지 (전생 테스트) */
  --card-color-4:    #4F88E8;   /* 파랑 (MBTI) */
  --card-color-5:    #44C97A;   /* 초록 (유행어 퀴즈) */

  /* 레이아웃 */
  --max-width:       1200px;
  --nav-height:      72px;
  --border-radius-card: 20px;
  --border-radius-btn:  100px;
}

/* ============================================================
   2. 기본 초기화
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   3. 고정 네비게이션 바
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

/* 스크롤 시 그림자 추가 (JS로 class 추가) */
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* 로고 */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

/* 로고 점 아이콘 (16personalities 스타일 오마주) */
.logo-icon {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-icon .dot {
  position: absolute;
  border-radius: 50%;
}

.logo-icon .d1 { width: 10px; height: 10px; background: #E8884F; top: 0;   left: 0; }
.logo-icon .d2 { width: 10px; height: 10px; background: #6C4FE8; top: 0;   right: 0; }
.logo-icon .d3 { width: 10px; height: 10px; background: #4F88E8; top: 13px; left: 50%; transform: translateX(-50%); }
.logo-icon .d4 { width: 10px; height: 10px; background: #44C97A; bottom: 0; left: 0; }
.logo-icon .d5 { width: 10px; height: 10px; background: #3A9EA5; bottom: 0; right: 0; }
.logo-icon .d6 { width: 7px;  height: 7px;  background: #E84F7C; top: 50%;  left: 50%; transform: translate(-50%, -50%); opacity: 0.6; }

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* 데스크탑 네비게이션 */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-sub);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.04);
}

/* 헤더 우측 액션 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* 언어 전환 버튼 */
.btn-lang {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-btn);
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-lang:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* 네비게이션 CTA 버튼 */
.btn-cta-nav {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--border-radius-btn);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  display: inline-block;
  box-shadow: 0 4px 14px rgba(108, 79, 232, 0.3);
}

.btn-cta-nav:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 79, 232, 0.4);
}

/* 햄버거 버튼 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}

.hamburger:hover {
  background: rgba(0,0,0,0.04);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* 열린 상태의 햄버거 (X 모양) */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 드롭다운 메뉴 */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--border-color);
  padding: 12px 24px 20px;
  box-shadow: var(--shadow-md);
}

.mobile-menu.open {
  display: flex;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-sub);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.2s ease;
}

.mobile-nav-link:last-of-type {
  border-bottom: none;
}

.mobile-nav-link:hover {
  color: var(--color-primary);
}

.mobile-nav-cta {
  display: block;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 14px;
  border-radius: var(--border-radius-btn);
  margin-top: 16px;
  box-shadow: 0 4px 14px rgba(108, 79, 232, 0.3);
}

/* ============================================================
   4. 히어로 섹션
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 560px;
  background: var(--bg-hero);
  /* 16personalities 특유의 청록-파랑 그라디언트 */
  background: linear-gradient(160deg, #2D8A96 0%, #3A9EA5 40%, #4DAFB5 70%, #5ABEC3 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* 배경 장식 도형들 */
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.shape-1 { width: 400px; height: 400px; top: -100px; right: -80px; }
.shape-2 { width: 280px; height: 280px; bottom: -60px; left: 10%; background: rgba(255,255,255,0.04); }
.shape-3 { width: 180px; height: 180px; top: 30%; right: 20%; background: rgba(255,255,255,0.08); }

/* 히어로 콘텐츠 */
.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 60px 24px 60px;
  position: relative;
  z-index: 2;
  max-width: 680px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--border-radius-btn);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  word-break: keep-all;
  /* 16personalities 특유의 따옴표 스타일 느낌의 굵은 제목 */
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  line-height: 1.65;
  margin-bottom: 36px;
  word-break: keep-all;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* 히어로 주 CTA 버튼 */
.btn-hero-primary {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.7);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 40px;
  border-radius: var(--border-radius-btn);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.btn-hero-primary:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.2);
  border-color: #fff;
}

.hero-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* 히어로 캐릭터 이모지 버블 */
.hero-illustration {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-characters {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.char-bubble {
  font-size: 3rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -1px;
  animation: floatUp 3s ease-in-out infinite;
}

.char-bubble.c1 { animation-delay: 0s; }
.char-bubble.c2 { animation-delay: 0.4s; }
.char-bubble.c3 { animation-delay: 0.8s; }
.char-bubble.c4 { animation-delay: 1.2s; }
.char-bubble.c5 { animation-delay: 1.6s; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================
   5. 통계 섹션
   ============================================================ */
.stats-section {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 8px 40px;
  text-align: center;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-plus {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sub);
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
  flex-shrink: 0;
}

/* ============================================================
   6. 애드센스 광고 슬롯
   ============================================================ */
.adsense-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  text-align: center;
}

/* 승인 전 임시 플레이스홀더 스타일 */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  background: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,0.02),
    rgba(0,0,0,0.02) 10px,
    transparent 10px,
    transparent 20px
  );
  border: 1px dashed rgba(0,0,0,0.12);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 500;
}

.adsense-mid .ad-placeholder {
  height: 250px;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   7. 테스트 카드 그리드 섹션
   ============================================================ */
.tests-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-sub);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

/* 테스트 카드 그리드 */
.test-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ============================================================
   8. 테스트 카드 (그리드 스타일)
   ============================================================ */
.test-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: var(--border-radius-card);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.test-card-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.test-card-link:hover .card-cta {
  opacity: 1;
  transform: translateX(4px);
}

.test-card-grid {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-card);
  padding: 32px 28px 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

/* 카드 상단 컬러 바 */
.test-card-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--card-accent, var(--color-primary));
  border-radius: var(--border-radius-card) var(--border-radius-card) 0 0;
}

/* 카드 배경 장식 원 */
.test-card-grid::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--card-accent, var(--color-primary));
  opacity: 0.05;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.test-card-link:hover .test-card-grid::after {
  opacity: 0.1;
  transform: scale(1.2);
}

/* 카드 아이콘 */
.card-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--card-accent-bg, rgba(108,79,232,0.08));
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* 카드 내용 */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  word-break: keep-all;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.55;
  word-break: keep-all;
}

/* 카드 하단 CTA */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.card-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--card-accent, var(--color-primary));
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-badge-free {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--card-accent, var(--color-primary));
  background: var(--card-accent-bg, rgba(108,79,232,0.08));
  border-radius: var(--border-radius-btn);
  padding: 4px 10px;
}

/* 준비 중 카드 */
.test-card-link.card-coming-soon {
  pointer-events: none;
  cursor: default;
}

.test-card-link.card-coming-soon .test-card-grid {
  opacity: 0.55;
  background: var(--bg-page);
}

.badge-coming-soon {
  background: #9CA3AF;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--border-radius-btn);
}

/* 카드 카테고리별 테마 색상 적용 */
.card-theme-1 {
  --card-accent: var(--card-color-1);
  --card-accent-bg: rgba(124, 79, 232, 0.08);
}
.card-theme-2 {
  --card-accent: var(--card-color-2);
  --card-accent-bg: rgba(58, 158, 165, 0.08);
}
.card-theme-3 {
  --card-accent: var(--card-color-3);
  --card-accent-bg: rgba(232, 136, 79, 0.08);
}
.card-theme-4 {
  --card-accent: var(--card-color-4);
  --card-accent-bg: rgba(79, 136, 232, 0.08);
}
.card-theme-5 {
  --card-accent: var(--card-color-5);
  --card-accent-bg: rgba(68, 201, 122, 0.08);
}
/* 🆕 사막 심리테스트용 황금 테마 */
.card-theme-6 {
  --card-accent: #D4A017;
  --card-accent-bg: rgba(212, 160, 23, 0.08);
}

/* ============================================================
   9. 연구 칼럼 섹션
   ============================================================ */
.research-section {
  background: var(--bg-white);
  padding: 64px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.research-section .section-header,
.research-section .accordion-container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.research-section .section-header {
  margin-bottom: 40px;
}

/* 아코디언 스타일 재설계 */
.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-white);
  transition: box-shadow 0.2s ease;
}

.accordion-item:hover {
  box-shadow: var(--shadow-sm);
}

.accordion-item.active {
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 79, 232, 0.2);
}

.accordion-header {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-sans);
  text-align: left;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: rgba(0,0,0,0.02);
}

.accordion-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.accordion-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: keep-all;
  line-height: 1.4;
}

.accordion-arrow {
  color: var(--text-light);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content-inner {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border-color);
}

.accordion-content-inner p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-sub);
  word-break: keep-all;
  padding-top: 20px;
}

.column-media-box {
  margin-top: 20px;
}

.column-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

.column-video {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: none;
  display: block;
}

/* ============================================================
   10. 사이트 푸터
   ============================================================ */
.site-footer {
  background: var(--bg-footer);
  color: rgba(255,255,255,0.7);
  padding-top: 60px;
  width: 100%;
  flex-shrink: 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

/* 푸터 브랜드 */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.footer-logo .logo-text {
  color: #fff;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

.footer-update {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

/* 푸터 링크 그리드 */
.footer-links-grid {
  display: flex;
  gap: 48px;
}

.footer-col h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.footer-col a:hover {
  color: #fff;
}

/* 푸터 하단 저작권 */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* ============================================================
   11. 정책 모달
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-white);
  border-radius: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.btn-close:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.04);
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-sub);
}

.modal-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 16px 0 8px;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 8px;
}

/* ============================================================
   12. 공통 유틸리티
   ============================================================ */

/* 스크롤바 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.01); }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.18); }

/* ============================================================
   13. 반응형 미디어 쿼리
   ============================================================ */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
  .desktop-nav { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 0.9rem; }
  .stat-item { padding: 8px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-links-grid { justify-content: flex-start; }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
  /* 헤더: 데스크탑 nav + 언어 버튼 숨기기, 햄버거 표시 */
  .desktop-nav { display: none; }
  .btn-lang { display: none; }
  .btn-cta-nav { display: none; }
  .hamburger { display: flex; }

  /* 히어로 */
  .hero-section { min-height: auto; }
  .hero-content { padding: 48px 20px 80px; }
  .hero-characters { padding: 0 16px; }
  .char-bubble { width: 56px; height: 56px; font-size: 2rem; }

  /* 통계 */
  .stats-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stat-divider { display: none; }
  .stat-item {
    padding: 20px 16px;
    border: 1px solid var(--border-color);
    margin: -0.5px;
  }

  /* 테스트 그리드 */
  .test-grid-container {
    grid-template-columns: 1fr;
  }

  .tests-section { padding: 48px 16px 36px; }

  /* 칼럼 */
  .research-section { padding: 48px 0; }

  /* 푸터 */
  .footer-links-grid { flex-direction: column; gap: 32px; }
  .footer-inner { padding: 0 20px 40px; }
}

/* 소형 모바일 (480px 이하) */
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .btn-hero-primary { padding: 14px 28px; font-size: 0.95rem; }
  .header-inner { padding: 0 16px; gap: 12px; }
  .accordion-header { padding: 16px 18px; }
  .accordion-content-inner { padding: 0 18px 20px; }
}

/* ============================================================
   14. 기존 개별 테스트 화면 스타일 (phone-container 유지)
       parenting-style.html 등 개별 페이지에서 사용
   ============================================================ */

/* 모바일 전용 폰 컨테이너 (개별 테스트 페이지용) */
.phone-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 50% 0%, #FFFDF9 0%, #F5EFEB 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(180, 165, 150, 0.25);
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.4s ease, box-shadow 0.4s ease;
  flex-shrink: 0;
  margin-top: 24px;
  border-radius: 24px;
}

/* phone-container가 있는 페이지의 body 수직 정렬 보장 */
body:has(.phone-container) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background-color: #F4EFE6;
  min-height: 100vh;
  width: 100%;
}

.screen {
  display: none;
  opacity: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  flex-direction: column;
  padding: 24px;
  padding-top: 24px;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateX(0);
  animation: slideFadeIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideFadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 공통 UI 컴포넌트 (개별 테스트 페이지) */
.screen-header {
  width: 100%;
  padding-bottom: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.btn-back {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-back:active { color: var(--color-primary); }

.btn {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 24px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #7C3AED 0%, #6366F1 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: linear-gradient(135deg, #FF7E36 0%, #FD5E09 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(255, 126, 54, 0.25);
}

.btn-secondary:active { transform: scale(0.97); }

.btn-kakao {
  background-color: #FEE500;
  color: #191919;
  box-shadow: 0 4px 12px rgba(254, 229, 0, 0.2);
}

.btn-whatsapp {
  background-color: #25D366;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-save-img {
  background: linear-gradient(135deg, #0D9488 0%, #14B8A6 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-save-img:active { transform: scale(0.97); }

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid rgba(0, 0, 0, 0.08);
}

.btn-outline:active { background: rgba(0, 0, 0, 0.03); }

/* 개별 테스트 페이지 - 인트로 화면 */
.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 90%;
  text-align: center;
}

.main-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  color: var(--text-main);
  word-break: keep-all;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.55;
  margin-bottom: 30px;
  max-width: 92%;
  word-break: keep-all;
}

.intro-banner {
  width: 200px;
  height: 200px;
  position: relative;
  margin-bottom: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  background-color: #FFF;
  box-shadow: 0 8px 20px rgba(180, 165, 150, 0.15);
}

.floating { animation: floatEffect 3s ease-in-out infinite; }

@keyframes floatEffect {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.decor-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  z-index: 1;
}

.circle-1 {
  width: 120px; height: 120px;
  background: rgba(124, 58, 237, 0.08);
  top: 10px; left: -20px;
  animation: pulse 4s ease-in-out infinite alternate;
}

.circle-2 {
  width: 110px; height: 110px;
  background: rgba(255, 126, 54, 0.08);
  bottom: 10px; right: -20px;
  animation: pulse 4s ease-in-out infinite alternate-reverse;
}

@keyframes pulse {
  0% { transform: scale(0.9) translate(0, 0); }
  100% { transform: scale(1.1) translate(8px, 8px); }
}

.intro-footer {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 16px;
}

/* 개별 테스트 페이지 - 테스트 스크린 */
.test-header { margin-bottom: 24px; }

.counter {
  font-size: 0.9rem;
  font-weight: 700;
  color: #FF7E36;
  display: block;
  margin-bottom: 8px;
}

.progress-bar-container {
  display: none;
  width: 100%;
  height: 6px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED 0%, #FF7E36 100%);
  border-radius: 99px;
  transition: width 0.3s ease-out;
}

.question-container {
  background: #FFFFFF;
  border: 1px solid rgba(230, 220, 210, 0.8);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(220, 210, 200, 0.15);
}

.card-decor {
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 100%;
  background: #FF7E36;
}

.question-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
  word-break: keep-all;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-btn {
  background: #FFFFFF;
  border: 1px solid rgba(230, 220, 210, 0.8);
  color: var(--text-main);
  padding: 16px 20px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  word-break: keep-all;
  box-shadow: 0 4px 10px rgba(220, 210, 200, 0.12);
  font-family: var(--font-sans);
}

.option-btn:hover { background: rgba(255, 126, 54, 0.03); border-color: rgba(255, 126, 54, 0.3); }
.option-btn:active { transform: scale(0.98); background: rgba(255, 126, 54, 0.08); border-color: #FF7E36; }

/* 로딩 스크린 */
#loading-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner-box {
  width: 100px; height: 100px;
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 25px;
}

.circle-border {
  width: 64px; height: 64px; padding: 3px;
  display: flex; justify-content: center; align-items: center;
  border-radius: 50%;
  background: linear-gradient(0deg, rgba(255, 126, 54, 0.1) 33%, rgba(255, 126, 54, 1) 100%);
  animation: spin .8s linear infinite;
}

.circle-core {
  width: 100%; height: 100%;
  background-color: #FFFDF9;
  border-radius: 50%;
}

@keyframes spin { from { transform: rotate(0); } to { transform: rotate(350deg); } }

.loading-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 18px; }

.loading-tips { height: 40px; position: relative; width: 100%; overflow: hidden; }

.tip-text {
  font-size: 0.9rem;
  color: var(--text-sub);
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  word-break: keep-all;
}

.tip-text.active { opacity: 1; transform: translateY(0); }

/* 결과 스크린 */
.result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 40px;
}

.result-header {
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

.result-img-box {
  width: 180px; height: 180px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #FFFFFF;
  background-color: #FFF;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0 8px 24px rgba(180, 165, 150, 0.2);
}

.result-img-box img { width: 100%; height: 100%; object-fit: contain; }

.result-img-box.flag-rect {
  width: 240px !important; height: 160px !important;
  border-radius: 10px !important; border: 3px solid #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(180, 165, 150, 0.25) !important;
  overflow: hidden !important;
}

.result-img-box.flag-rect img { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 8px !important; }

.result-img-box.char-rect {
  width: 200px !important; height: 200px !important;
  border-radius: 24px !important; border: 4px solid #FFFFFF !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(180, 165, 150, 0.2) !important;
  overflow: hidden !important;
}

.result-img-box.char-rect img { width: 100% !important; height: 100% !important; object-fit: contain !important; padding: 8px; }

.result-animal-name {
  font-size: 1.75rem; font-weight: 800; color: #FF7E36;
  margin-bottom: 4px; word-break: keep-all;
}

.result-type-title {
  font-size: 1.3rem; font-weight: 700; color: var(--text-main);
  line-height: 1.4; margin-bottom: 14px; word-break: keep-all;
}

.result-tags {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; margin-top: 8px;
}

.tag {
  background: #FFF5F0; border: 1px solid rgba(255, 126, 54, 0.15);
  border-radius: 8px; padding: 6px 12px;
  font-size: 0.8rem; color: #FF7E36; font-weight: 600;
}

.result-details {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 16px; margin-bottom: 30px;
}

.detail-card {
  background: #FFFFFF;
  border: 1px solid rgba(230, 220, 210, 0.8);
  border-radius: 20px; padding: 20px;
  box-shadow: 0 6px 15px rgba(180, 165, 150, 0.1);
  position: relative; overflow: hidden;
}

.detail-card.border-green { border-left: 4px solid #10B981; }
.detail-card.border-red   { border-left: 4px solid #EF4444; }
.detail-card.border-purple { border-left: 4px solid #8B5CF6; }

.detail-card-title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; font-size: 1.05rem; font-weight: 700;
  color: var(--text-main);
}

.card-icon { font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; }

.detail-card p {
  font-size: 0.9rem; line-height: 1.6;
  color: var(--text-sub); word-break: keep-all; white-space: pre-line;
}

.result-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; }

/* 슬라이더 (soul-country 테스트용) */
.slider-wrapper {
  background: #FFFFFF;
  border: 1px solid rgba(230, 220, 210, 0.8);
  border-radius: 24px; padding: 24px;
  box-shadow: 0 6px 18px rgba(220, 210, 200, 0.12);
  display: flex; flex-direction: column;
  align-items: center; width: 100%;
}

.slider-labels {
  display: flex; justify-content: space-between;
  width: 100%; margin-bottom: 8px;
  font-weight: 700; font-size: 0.85rem;
  color: var(--text-main); padding: 0 4px;
}

.slider-label-left { text-align: left; color: #7C3AED; }
.slider-label-right { text-align: right; color: #FF7E36; }

.custom-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%; height: 8px;
  border-radius: 99px;
  background: linear-gradient(to right, #7C3AED 0%, #6366F1 50%, #FF7E36 100%);
  outline: none; cursor: pointer; margin: 8px 0;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: white;
  border: 3px solid #7C3AED;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.custom-range-slider::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: white;
  border: 3px solid #7C3AED;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
}

.slider-value-display {
  font-size: 1.1rem; font-weight: 800;
  color: var(--text-main); margin-top: 6px;
}

/* 포털 홈 레거시 스타일 (portal-header, portal-footer 등) - 개별 페이지 혹시 참조 시 */
.portal-footer {
  text-align: center; font-size: 0.8rem;
  color: var(--text-sub); padding: 20px 0;
  margin-top: auto; border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.portal-footer .footer-links a {
  color: var(--text-sub); font-size: 0.78rem;
  margin: 0 4px; text-decoration: underline;
}

/* ============================================================
   하단 학술 연구 보고서 반응형 디자인 & 글자 잘림 방지 스타일
   ============================================================ */
.static-content-section {
  width: 100%;
  max-width: 480px;
  margin: 24px auto 40px;
  padding: 24px 20px;
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid #EAE3D9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  line-height: 1.7;
  color: #333333;
  word-break: keep-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
  flex-shrink: 0;
}

.static-content-section article {
  width: 100%;
}

.static-content-section h2 {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #111111 !important;
  line-height: 1.45 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  margin-bottom: 8px !important;
}

.static-content-section h3 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  margin-bottom: 8px !important;
}

.static-content-section p, 
.static-content-section li {
  font-size: 0.92rem !important;
  color: #444444 !important;
  line-height: 1.7 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

@media (min-width: 768px) {
  .static-content-section {
    max-width: 540px;
    padding: 28px 24px;
  }
  .static-content-section h2 {
    font-size: 1.3rem !important;
  }
}

