/*
  [비즈니스 로직 요약]
  - AllDayStock 웹 사이트 전역에서 사용되는 공통 스타일시트(CSS)입니다.
  - 리셋, 컬러 테마(라이트/다크), 글로벌 네비게이션 헤더 및 글로벌 푸터 스타일을 단일 관리합니다.

  [핵심 요구사항 리스트]
  1. 라이트 테마 및 prefers-color-scheme 기반 다크 테마 변수 정의
  2. 일관된 글로벌 상단 네비게이션 헤더(로고, 메뉴, 드롭다운) 레이아웃 및 반응형 스타일
  3. 사이트 하단 공통 푸터(링크, 데이터 출처, 투자 면책조항) 레이아웃
  4. 웹 폰트(Noto Sans KR, Outfit, Inter) 및 기본 텍스트 렌더링 최적화
  5. [신규] Google Material Symbols 공식 웹폰트 공통 아이콘 클래스 정의
*/

@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
  flex-shrink: 0;
}

/* [신규: 추천안] 속이 채워진 솔리드 아이콘 클래스 */
.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

/* [신규: 추천안] 제목 태그(h1, h2, h3) 내 아이콘의 크기·굵기·채움 일체화 스타일 */
h1 > .material-symbols-outlined,
h2 > .material-symbols-outlined,
h3 > .material-symbols-outlined,
.section-header h3 > .material-symbols-outlined,
.briefing-header h2 > .material-symbols-outlined {
  font-size: 1.15em;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  vertical-align: -0.12em;
  margin-right: 6px;
}

:root {
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #556b56;
  --border-color: #e2e8f0;
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.08);
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0b0f17;
    --card-bg: #131b2e;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --primary-color: #3b82f6;
    --primary-dark: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.15);
  }
}

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

body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   [요구사항 2] 글로벌 헤더 네비게이션
   ========================================================================== */
.global-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1445px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  /* 핵심 요구사항: 메인 심볼 백그라운드 기존 그라디언트 (블루 ➔ 시안) */
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}

.logo-icon .logo-arrow {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 1;
}

.logo-icon .logo-letter {
  position: relative;
  z-index: 2;
  color: white;
  font-weight: 800;
  font-size: 18px;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg:not(.logo-arrow) {
  width: 100%;
  height: 100%;
  display: block;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: #2563eb;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nav-link:hover,
.nav-link.active {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.08);
}

@media (min-width: 769px) {
  body.wide-mode .header-inner,
  body.wide-mode .footer-inner {
    max-width: 98% !important;
    padding: 0 20px !important;
  }
}

/* ==========================================================================
   [핵심 요구사항 2] 모바일 반응형 헤더 네비게이션 (가로 스크롤 칩 바)
   - 모바일 화면(≤768px)에서 메뉴 겹침/깨짐 현상을 원천 방지합니다.
   - 로고를 상단에 배치하고, 6대 메뉴를 한 손 스와이프 가능한 가로 스크롤 탭으로 제공합니다.
   ========================================================================== */
@media (max-width: 768px) {
  .header-inner {
    height: auto !important;
    min-height: 54px;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px 8px 16px;
    gap: 10px;
  }

  .logo-area {
    width: 100%;
    justify-content: flex-start;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .logo-icon .logo-arrow {
    width: 28px;
    height: 28px;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .global-header nav {
    width: 100%;
    overflow: hidden;
  }

  .nav-menu {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 2px 2px 6px 2px;
    margin: 0;
    scrollbar-width: none; /* Firefox */
  }

  .nav-menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }

  .nav-item {
    flex-shrink: 0;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 6px 12px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    color: var(--text-main);
  }

  .nav-link.active {
    background-color: rgba(37, 99, 235, 0.1);
    border-color: #2563eb;
    color: #2563eb;
    font-weight: 700;
  }

  .nav-link svg,
  .nav-link .material-symbols-outlined {
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
  }
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: 6px 0;
  list-style: none;
  display: none;
  z-index: 1100;
}

.nav-item:hover .dropdown-menu {
  display: block;
}

.dropdown-item a {
  display: block;
  padding: 8px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown-item a:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* ==========================================================================
   [요구사항 3] 글로벌 푸터
   ========================================================================== */
.global-footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 30px 0;
  margin-top: auto;
  width: 100%;
}

.footer-inner {
  max-width: 1445px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 20px;
}

.footer-brand h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 480px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
}

.footer-bottom .copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
}

.footer-bottom .disclaimer-notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: left;
  margin: 0;
}
