/* ===== CSS 변수 (라이트 모드 기본) ===== */
:root {
  --color-primary: #2E7D32;
  --color-primary-light: #43A047;
  --color-primary-dark: #1B5E20;
  --color-bg: #ffffff;
  --color-bg-alt: #F1F8E9;
  --color-text: #1B1B1B;
  --color-text-muted: #666666;
  --color-border: #E0E0E0;
  --color-card: #ffffff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 32px rgba(46, 125, 50, 0.15);
  --radius: 12px;
  --transition: 0.3s ease;
}

/* ===== 다크 모드 ===== */
body.dark {
  --color-bg: #121212;
  --color-bg-alt: #1A2E1C;
  --color-text: #F0F0F0;
  --color-text-muted: #AAAAAA;
  --color-border: #2E2E2E;
  --color-card: #1E1E1E;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 12px 32px rgba(67, 160, 71, 0.2);
}

/* ===== 리셋 & 기본 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: background-color var(--transition), color var(--transition);
  line-height: 1.6;
  font-size: 16px;
}

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

ul {
  list-style: none;
}

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

/* ===== 레이아웃 ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 버튼 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--color-primary);
  color: white;
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

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

.btn-icon {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 50%;
  transition: background-color var(--transition);
  line-height: 1;
  color: white;
}

.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ===== 헤더 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #1B5E20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.dark .header {
  background-color: #0d2e10;
}

.header__inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  margin-right: 28px;
  flex-shrink: 0;
}

.logo__icon {
  font-size: 24px;
}

/* nav 영역이 flex:1 로 공간 차지 */
.nav {
  flex: 1;
}

.nav__list {
  display: flex;
  gap: 2px;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav__icon {
  font-size: 15px;
  line-height: 1;
}

.nav__link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.15);
}

.nav__link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.22);
  font-weight: 700;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
  flex-shrink: 0;
}

/* ===== 로그인 버튼 ===== */
.nav-login-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: white;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-login-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ===== 유저 아바타 & 드롭다운 ===== */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.55);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.user-avatar:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  min-width: 170px;
  overflow: hidden;
  display: none;
  z-index: 200;
}

body.dark .user-dropdown {
  background: #2a2a2a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.user-dropdown.open {
  display: block;
}

.user-dropdown__name {
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  border-bottom: 1px solid #eee;
}

body.dark .user-dropdown__name {
  color: #aaa;
  border-color: #444;
}

.user-dropdown__item {
  display: block;
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  color: #1B1B1B;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

body.dark .user-dropdown__item {
  color: #f0f0f0;
}

.user-dropdown__item:hover {
  background-color: #F1F8E9;
  color: #1B5E20;
}

body.dark .user-dropdown__item:hover {
  background-color: #1A2E1C;
  color: #66BB6A;
}

.user-dropdown__divider {
  height: 1px;
  background: #eee;
  margin: 4px 0;
}

body.dark .user-dropdown__divider {
  background: #444;
}

/* ===== 햄버거 버튼 ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: white;
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 히어로 ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  padding: 80px 0;
  overflow: hidden;
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero__label {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 16px;
}

.hero__title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
}

.hero__desc {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero__btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero .btn--primary {
  background-color: white;
  color: var(--color-primary);
}

.hero .btn--primary:hover {
  background-color: #f0f0f0;
}

.hero .btn--secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: white;
}

.hero .btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.hero__mascot {
  font-size: 120px;
  animation: float 3s ease-in-out infinite;
  user-select: none;
}

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

/* ===== 섹션 공통 ===== */
.section__title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.section__desc {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 16px;
  margin-bottom: 48px;
}

/* ===== 서비스 ===== */
.services {
  padding: 80px 0;
  background-color: var(--color-bg-alt);
  transition: background-color var(--transition);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: var(--color-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--color-border);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary-light);
}

.service-card__icon {
  font-size: 36px;
}

.service-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.service-card__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  flex: 1;
}

.service-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== 통계 ===== */
.stats {
  padding: 60px 0;
  background-color: var(--color-primary);
  color: white;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item__number {
  display: block;
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 8px;
}

.stat-item__label {
  font-size: 14px;
  opacity: 0.85;
}

/* ===== 푸터 ===== */
.footer {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 60px 0 0;
  transition: background-color var(--transition);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.footer__brand {
  max-width: 260px;
}

.footer__desc {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer__links {
  display: flex;
  gap: 60px;
}

.footer__col h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

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

.footer__col ul a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer__col ul a:hover {
  color: var(--color-primary);
}

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ===== 반응형 (태블릿) ===== */
@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: #1B5E20;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 16px 16px;
    z-index: 99;
  }

  body.dark .nav {
    background-color: #0d2e10;
  }

  .nav.open {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    gap: 2px;
  }

  .nav__link {
    padding: 13px 16px;
    font-size: 15px;
    border-radius: 8px;
  }

  .nav-toggle {
    display: flex;
  }

  .hero__inner {
    flex-direction: column;
    text-align: center;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__btns {
    justify-content: center;
  }

  .hero__mascot {
    font-size: 80px;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__inner {
    flex-direction: column;
  }

  .footer__links {
    flex-direction: column;
    gap: 32px;
  }
}

/* ===== 반응형 (모바일) ===== */
@media (max-width: 480px) {
  .hero {
    padding: 60px 0;
  }

  .hero__title {
    font-size: 28px;
  }

  .hero__desc {
    font-size: 14px;
  }

  .section__title {
    font-size: 24px;
  }

  .stat-item__number {
    font-size: 32px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }
}
