/* ===== 기본 초기화 및 색상 변수 정의 ===== */
:root {
  --bg-main: #0a0e17;
  --bg-card: rgba(19, 26, 42, 0.85);
  --bg-card-hover: rgba(28, 38, 62, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.4);
  
  --primary: #10b981;        /* 에메랄드 메인 포인트 */
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  --secondary: #6366f1;      /* 인디고 서브 포인트 */
  --accent: #f59e0b;         /* 골드/앰버 강조 */
  
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  
  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

/* ===== 상단 네비게이션 바 ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px var(--primary-glow);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  word-break: keep-all;
  flex-shrink: 0;
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  color: #ffffff;
  background: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* 모바일 햄버거 메뉴 버튼 */
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== 메인 컨테이너 및 탭 섹션 ===== */
.main-content {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.tab-section {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.tab-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 공통 히어로 헤더 ===== */
.hero-header {
  text-align: center;
  padding: 40px 16px 50px;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.25;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-sub);
  max-width: 620px;
  margin: 0 auto;
}

/* ===== 카드 레이아웃 그리드 ===== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 16px 36px -10px rgba(16, 185, 129, 0.2);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: inline-block;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card-desc {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== 푸터 ===== */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: rgba(10, 14, 23, 0.95);
  padding: 40px 24px 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ===== 반응형 미디어 쿼리 ===== */
@media (max-width: 1100px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
  }
  
  .nav-menu.open {
    display: flex;
  }
  
  .nav-mobile-toggle {
    display: block;
  }
}
