/* ==========================================================================
   메인 CSS 파일 - 장례복지 애플리케이션
   ========================================================================== */

/* CSS 변수 (커스텀 프로퍼티) */
:root {
  /* 색상 팔레트 */
  --primary-color: #2c3e50;
  --primary-light: #34495e;
  --primary-dark: #1a252f;
  --secondary-color: #3498db;
  --secondary-light: #5dade2;
  --secondary-dark: #2980b9;
  --accent-color: #e74c3c;
  --accent-light: #ec7063;
  --accent-dark: #c0392b;
  
  /* 중성 색상 */
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-300: #dadce0;
  --gray-400: #bdc1c6;
  --gray-500: #9aa0a6;
  --gray-600: #80868b;
  --gray-700: #5f6368;
  --gray-800: #3c4043;
  --gray-900: #202124;
  --black: #000000;
  
  /* 배경 색상 */
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #343a40;
  
  /* 텍스트 색상 */
  --text-white: #ffffff;
  --text-dark: #212529;
  --text-muted: #6c757d;
  
  /* 테두리 색상 */
  --border-color: #dee2e6;
  --border-dark: #495057;
  
  /* 상태 색상 */
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --error-color: #e74c3c;
  --info-color: #3498db;
  
  /* 타이포그래피 */
  --font-family-base: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* 폰트 크기 */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  
  /* 폰트 두께 */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* 라인 높이 */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* 간격 */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  --spacing-4xl: 5rem;     /* 80px */
  
  /* 테두리 */
  --border-width: 1px;
  --border-width-thick: 2px;
  --border-radius-sm: 0.25rem;   /* 4px */
  --border-radius: 0.375rem;     /* 6px */
  --border-radius-lg: 0.5rem;    /* 8px */
  --border-radius-xl: 0.75rem;   /* 12px */
  --border-radius-full: 9999px;
  
  /* 그림자 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* 전환 */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* 레이아웃 */
  --container-max-width: 1200px;
  --container-padding: var(--spacing-md);
  
  /* 컨테이너 패딩 변수 추가 */
  --container-padding-mobile: var(--spacing-sm);
  --container-padding-tablet: var(--spacing-md);
  --container-padding-desktop: var(--spacing-lg);
  
  /* 헤더 */
  --header-height: 84px;
  --header-height-mobile: 70px;
  
  /* 네비게이션 */
  --nav-height: 60px;
  --nav-height-mobile: 50px;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #ecf0f1;
    --primary-light: #bdc3c7;
    --primary-dark: #95a5a6;
    --secondary-color: #3498db;
    --secondary-light: #5dade2;
    --secondary-dark: #2980b9;
    
    --white: #2c3e50;
    --gray-50: #34495e;
    --gray-100: #4a5568;
    --gray-200: #5a6c7d;
    --gray-300: #6b7c8d;
    --gray-400: #7c8d9e;
    --gray-500: #8d9eaf;
    --gray-600: #9eafc0;
    --gray-700: #afc0d1;
    --gray-800: #c0d1e2;
    --gray-900: #d1e2f3;
    --black: #ffffff;
  }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000000;
    --secondary-color: #0000ff;
    --accent-color: #ff0000;
    --gray-500: #000000;
    --gray-600: #000000;
    --gray-700: #000000;
    --gray-800: #000000;
    --gray-900: #000000;
  }
}

/* 기본 스타일 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--gray-900);
  background-color: var(--white);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 타이포그래피 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--spacing-md) 0;
  color: var(--primary-color);
}

h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}

h6 {
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-sm);
}

p {
  margin: 0 0 var(--spacing-md) 0;
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary-dark);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* 이미지 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  text-decoration: none;
  border: var(--border-width) solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  vertical-align: middle;
}

.btn:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 버튼 변형 */
.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--primary-color);
  text-decoration: none;
}

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

.btn-accent:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  text-decoration: none;
}

/* 버튼 크기 */
.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-lg);
}

.btn-xl {
  padding: var(--spacing-lg) var(--spacing-xl);
  font-size: var(--font-size-xl);
}

/* 컨테이너 */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* 유틸리티 클래스 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-error { color: var(--error-color); }
.text-info { color: var(--info-color); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-accent { background-color: var(--accent-color); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-error { background-color: var(--error-color); }
.bg-info { background-color: var(--info-color); }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mr-0 { margin-right: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }

.p-0 { padding: 0; }
.pt-0 { padding-top: 0; }
.pr-0 { padding-right: 0; }
.pb-0 { padding-bottom: 0; }
.pl-0 { padding-left: 0; }

/* 접근성 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-sm);
  text-decoration: none;
  z-index: var(--z-tooltip);
  border-radius: var(--border-radius);
}

.skip-link:focus {
  top: 6px;
}

/* 로딩 스피너 */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--spacing-md);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* 포커스 스타일 */
:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* 선택 텍스트 */
::selection {
  background-color: var(--secondary-color);
  color: var(--white);
}

::-moz-selection {
  background-color: var(--secondary-color);
  color: var(--white);
}

/* ==========================================================================
   버튼 아이콘 스타일
   ========================================================================== */

/* 기본 아이콘 스타일 */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  position: relative;
}

/* 버튼 내 아이콘 스타일 */
.btn .icon {
  margin-right: var(--spacing-xs);
  width: 1.2em;
  height: 1.2em;
}

.btn .icon:last-child {
  margin-right: 0;
  margin-left: var(--spacing-xs);
}

/* 전화 아이콘 */
.phone-icon::before {
  content: "📞";
  font-size: 1em;
}

/* 가이드 아이콘 */
.guide-icon::before {
  content: "📋";
  font-size: 1em;
}

/* 문화 아이콘 */
.culture-icon::before {
  content: "🏛️";
  font-size: 1em;
}

/* 저장 아이콘 */
.save-icon::before {
  content: "💾";
  font-size: 1em;
}

/* 잠금 아이콘 */
.lock-icon::before {
  content: "🔒";
  font-size: 1em;
}

/* 로그인 아이콘 */
.login-icon::before {
  content: "🔑";
  font-size: 1em;
}

/* 정보 아이콘 */
.info-icon::before {
  content: "ℹ️";
  font-size: 1em;
}

/* 지도 아이콘 */
.map-icon::before {
  content: "🗺️";
  font-size: 1em;
}

/* 네비게이션 아이콘 */
.navigation-icon::before {
  content: "🧭";
  font-size: 1em;
}

/* 홈 아이콘 */
.home-icon::before {
  content: "🏠";
  font-size: 1em;
}

/* 뒤로가기 아이콘 */
.back-icon::before {
  content: "⬅️";
  font-size: 1em;
}

/* 체크 아이콘 */
.check-icon::before {
  content: "✅";
  font-size: 1em;
}

/* 이메일 아이콘 */
.email-icon::before {
  content: "📧";
  font-size: 1em;
}

/* 시계 아이콘 */
.clock-icon::before {
  content: "⏰";
  font-size: 1em;
}

/* 사용자 아이콘 */
.user-icon::before {
  content: "👤";
  font-size: 1em;
}

/* 등록 아이콘 */
.register-icon::before {
  content: "📝";
  font-size: 1em;
}

/* 제출 아이콘 */
.submit-icon::before {
  content: "📤";
  font-size: 1em;
}

/* 상태 아이콘 */
.status-icon::before {
  content: "✅";
  font-size: 1em;
}

/* 총계 아이콘 */
.total-icon::before {
  content: "📊";
  font-size: 1em;
}

/* 광역시/특별시 아이콘 */
.metro-icon::before {
  content: "🏙️";
  font-size: 1em;
}

/* 도/특별자치도 아이콘 */
.province-icon::before {
  content: "🏔️";
  font-size: 1em;
}

/* 서비스 아이콘 */
.service-icon::before {
  content: "⚙️";
  font-size: 1em;
}

/* 검색 아이콘 */
.search-icon::before {
  content: "🔍";
  font-size: 1em;
}

/* 그리드 아이콘 */
.grid-icon::before {
  content: "⊞";
  font-size: 1em;
}

/* 리스트 아이콘 */
.list-icon::before {
  content: "☰";
  font-size: 1em;
}

/* 위치 아이콘 */
.location-icon::before {
  content: "📍";
  font-size: 1em;
}

/* 결과 없음 아이콘 */
.no-results-icon::before {
  content: "🔍";
  font-size: 1em;
}

/* 홈페이지 서비스 아이콘들 */
.funeral-service::before {
  content: "⚰️";
  font-size: 1em;
}

.welfare-support::before {
  content: "🤝";
  font-size: 1em;
}

.consultation::before {
  content: "💬";
  font-size: 1em;
}

.consultation-icon::before {
  content: "💬";
  font-size: 1em;
}

/* 기타 아이콘들 */
.arrow-right::before {
  content: "→";
  font-size: 1em;
}

.star-filled::before {
  content: "★";
  font-size: 1em;
  color: var(--warning-color);
}

.expert-icon::before {
  content: "👨‍⚕️";
  font-size: 1em;
}

.support-icon::before {
  content: "💪";
  font-size: 1em;
}

/* 기관 소개 페이지 아이콘들 */
.experience-icon::before {
  content: "📈";
  font-size: 1em;
}

.quality-icon::before {
  content: "⭐";
  font-size: 1em;
}

.vision-icon::before {
  content: "👁️";
  font-size: 1em;
}

.mission-icon::before {
  content: "🎯";
  font-size: 1em;
}

.target-icon::before {
  content: "🎯";
  font-size: 1em;
}

.dignity-icon::before {
  content: "👑";
  font-size: 1em;
}

.professionalism-icon::before {
  content: "👔";
  font-size: 1em;
}

.empathy-icon::before {
  content: "🤗";
  font-size: 1em;
}

.innovation-icon::before {
  content: "💡";
  font-size: 1em;
}

.trust-icon::before {
  content: "🤝";
  font-size: 1em;
}

.welfare-icon::before {
  content: "🏥";
  font-size: 1em;
}

.education-icon::before {
  content: "📚";
  font-size: 1em;
}

.research-icon::before {
  content: "🔬";
  font-size: 1em;
}

/* 장례 가이드 페이지 아이콘들 */
.funeral-home-icon::before {
  content: "🏠";
  font-size: 1em;
}

.cremation-icon::before {
  content: "🔥";
  font-size: 1em;
}

.memorial-icon::before {
  content: "🕯️";
  font-size: 1em;
}

.arrow-down::before {
  content: "↓";
  font-size: 1em;
}

/* 소셜 로그인 아이콘들 */
.kakao-icon::before {
  content: "💛";
  font-size: 1em;
}

.naver-icon::before {
  content: "🟢";
  font-size: 1em;
}

/* 토스트 메시지 스타일 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: var(--spacing-lg);
  min-width: 300px;
  max-width: 400px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  border-left: 4px solid var(--info-color);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: var(--success-color);
}

.toast.warning {
  border-left-color: var(--warning-color);
}

.toast.error {
  border-left-color: var(--error-color);
}

.toast.info {
  border-left-color: var(--info-color);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.toast-content .icon {
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}

.toast.success .icon {
  color: var(--success-color);
}

.toast.warning .icon {
  color: var(--warning-color);
}

.toast.error .icon {
  color: var(--error-color);
}

.toast.info .icon {
  color: var(--info-color);
}

.toast-message {
  color: var(--text-dark);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}

/* 다크 모드 토스트 */
@media (prefers-color-scheme: dark) {
  .toast {
    background: var(--bg-dark);
    border-color: var(--border-dark);
  }
  
  .toast-message {
    color: var(--text-white);
  }
} 