@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

* { box-sizing: border-box; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 히어로 배경 패턴 */
.hero-pattern {
  background-color: #1e3a5f;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(249,115,22,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(37,99,235,0.15) 0%, transparent 50%),
    linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
}

/* 숫자 카운터 애니메이션 */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-item { animation: countUp 0.6s ease forwards; }
.stat-item:nth-child(2) { animation-delay: 0.1s; }
.stat-item:nth-child(3) { animation-delay: 0.2s; }
.stat-item:nth-child(4) { animation-delay: 0.3s; }

/* 카드 호버 */
.service-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* 타임라인 */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #1e40af, #93c5fd);
}

/* 테이블 스타일 */
.data-table { border-collapse: collapse; width: 100%; }
.data-table th, .data-table td {
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.875rem;
}
.data-table thead th {
  background: #1e3a5f;
  color: white;
  font-weight: 600;
}
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover { background: #eff6ff; }

/* 서브페이지 배너 */
.sub-banner {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  position: relative;
  overflow: hidden;
}
.sub-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* 사이드 네비게이션 */
.side-nav a { transition: all 0.15s ease; }
.side-nav a.active { background: #1e3a5f; color: white; }
.side-nav a:not(.active):hover { background: #eff6ff; color: #1e40af; }

/* 공지사항 행 호버 */
.notice-row { transition: background 0.15s ease; }
.notice-row:hover { background: #eff6ff; }

/* 스크롤바 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* 인쇄 시 네비게이션 숨김 */
@media print {
  #site-header, #footer-placeholder footer { display: none; }
  main { padding-top: 0 !important; }
}

/* 부드러운 스크롤 */
html { scroll-behavior: smooth; }

/* ===== 다크 모드 (시스템 설정 자동 적용) ===== */
@media (prefers-color-scheme: dark) {
  body { background-color: #0f172a !important; }

  /* 배경 */
  .bg-gray-50 { background-color: #0f172a !important; }
  .bg-white    { background-color: #1e293b !important; }
  .bg-gray-100 { background-color: #182233 !important; }

  /* 텍스트 */
  .text-gray-900 { color: #f1f5f9 !important; }
  .text-gray-800 { color: #e2e8f0 !important; }
  .text-gray-700 { color: #cbd5e1 !important; }
  .text-gray-600 { color: #94a3b8 !important; }
  .text-gray-500 { color: #64748b !important; }
  .text-gray-400 { color: #475569 !important; }

  /* 테두리 */
  .border-gray-100 { border-color: #1e3a5f !important; }
  .border-gray-200 { border-color: #1e3a5f !important; }

  /* 컬러 배경 배지/카드 */
  .bg-blue-50   { background-color: rgba(30,58,138,0.25)  !important; }
  .bg-teal-50   { background-color: rgba(15,118,110,0.25) !important; }
  .bg-green-50  { background-color: rgba(20,83,45,0.25)   !important; }
  .bg-red-50    { background-color: rgba(127,29,29,0.25)  !important; }
  .bg-purple-50 { background-color: rgba(88,28,135,0.25)  !important; }
  .bg-yellow-50 { background-color: rgba(113,63,18,0.25)  !important; }
  .bg-orange-50 { background-color: rgba(124,45,18,0.25)  !important; }

  /* 인풋 / 셀렉트 / 텍스트에어리어 */
  input:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
  textarea, select {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
  }
  input::placeholder, textarea::placeholder { color: #475569 !important; }

  /* 테이블 */
  .data-table thead th { background: #0a1e3c !important; }
  .data-table th, .data-table td { border-color: #1e3a5f !important; }
  .data-table tbody tr:nth-child(even) { background: #182233 !important; }
  .data-table tbody tr:hover { background: #1e3a5f !important; }

  /* 사이드 네비게이션 */
  .side-nav a:not(.active):hover { background: #182233 !important; color: #14b8a6 !important; }
  .side-nav a.active { background: #0a3060 !important; }

  /* 공지사항 행 */
  .notice-row:hover { background: #182233 !important; }

  /* Prose (개인정보처리방침 등) */
  .prose        { color: #94a3b8; }
  .prose p      { color: #94a3b8; }
  .prose li     { color: #94a3b8; }
  .prose h2     { color: #e2e8f0 !important; }

  /* 스크롤바 */
  ::-webkit-scrollbar-track { background: #0f172a; }
  ::-webkit-scrollbar-thumb { background: #334155; }
}
