/* =============================================
   경기복지재단 공모사업 시스템 - 공통 디자인 시스템
   경기복지재단 홈페이지 디자인 기반
   ============================================= */

/* ── CSS 변수 (경기복지재단 브랜드 컬러) ── */
:root {
  /* 브랜드 컬러 */
  --gg-blue:       #0B4EA2;
  --gg-blue-dark:  #083b7a;
  --gg-blue-mid:   #1a4f9c;
  --gg-blue-light: #2d6abf;
  --gg-blue-pale:  #e8f0fb;
  --gg-yellow:     #F2C500;
  --gg-yellow-dk:  #d4ac00;
  --gg-red:        #E53B3B;
  --gg-teal:       #00A99D;
  --gg-green:      #4CAF50;

  /* 중성 컬러 */
  --bg:        #f4f6fa;
  --white:     #ffffff;
  --gray-50:   #f8f9fa;
  --gray-100:  #f0f2f5;
  --gray-200:  #e4e8f0;
  --gray-300:  #d0d8e8;
  --gray-400:  #b0bcd4;
  --gray-500:  #8a97b0;
  --gray-600:  #666e82;
  --gray-700:  #444c5e;
  --gray-800:  #2a3040;
  --gray-900:  #1a1e28;

  /* 텍스트 */
  --text:       #222831;
  --text-light: #5a6070;
  --text-muted: #9aa0b0;

  /* 테두리 */
  --border:     #d0d8e8;
  --border-light: #e8edf5;

  /* 그림자 */
  --shadow-sm:  0 2px 8px rgba(11,78,162,0.08);
  --shadow-md:  0 4px 20px rgba(11,78,162,0.12);
  --shadow-lg:  0 8px 32px rgba(11,78,162,0.16);

  /* 반경 */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* 전환 */
  --transition: 0.2s ease;
}

/* ── 리셋 & 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── 유틸리티 바 (상단 회색 바) ── */
.util-bar {
  background: #3a3f4a;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding: 5px 32px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}
.util-bar a { color: rgba(255,255,255,0.75); transition: color var(--transition); }
.util-bar a:hover { color: var(--gg-yellow); }
.util-bar .sep { opacity: 0.4; }

/* ── 헤더 ── */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gg-yellow);
  box-shadow: 0 2px 12px rgba(11,78,162,0.10);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}
.header-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--gg-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.header-logo-text { line-height: 1.2; }
.header-logo-text .org-name { font-size: 17px; font-weight: 800; color: var(--gg-blue); }
.header-logo-text .org-sub  { font-size: 10px; color: var(--gray-500); letter-spacing: 0.5px; text-transform: uppercase; }

/* ── 메인 네비게이션 ── */
.main-nav {
  background: var(--gg-blue);
  position: relative;
  z-index: 900;
}
.main-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  gap: 0;
}
.main-nav a {
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--gg-yellow);
  border-bottom-color: var(--gg-yellow);
  background: rgba(255,255,255,0.06);
}

/* ── 알림 스크롤 바 ── */
.notice-scroll-bar {
  background: var(--gg-blue-pale);
  border-bottom: 1px solid var(--border-light);
  padding: 8px 0;
  overflow: hidden;
}
.notice-scroll-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice-label {
  background: var(--gg-blue);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.notice-text { font-size: 13px; color: var(--gray-700); }

/* ── 섹션 공통 ── */
.section { padding: 60px 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { margin-bottom: 32px; display: flex; align-items: flex-end; justify-content: space-between; }
.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gg-blue-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .accent {
  display: inline-block;
  width: 5px;
  height: 24px;
  background: var(--gg-yellow);
  border-radius: 3px;
  flex-shrink: 0;
}
.section-more {
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}
.section-more:hover { color: var(--gg-blue); }

/* ── 카드 ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

/* ── 배지 ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-blue   { background: var(--gg-blue-pale); color: var(--gg-blue); }
.badge-yellow { background: #fff8e0; color: #b8920a; }
.badge-red    { background: #fdf0f0; color: var(--gg-red); }
.badge-gray   { background: var(--gray-100); color: var(--gray-500); }
.badge-green  { background: #edf7ee; color: #2e7d32; }
.badge-teal   { background: #e0f5f4; color: var(--gg-teal); }

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  border: none;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gg-blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--gg-blue-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-yellow {
  background: var(--gg-yellow);
  color: var(--gray-800);
}
.btn-yellow:hover { background: var(--gg-yellow-dk); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--gg-blue);
  border: 2px solid var(--gg-blue);
}
.btn-outline:hover { background: var(--gg-blue); color: var(--white); }
.btn-ghost {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--gray-200); }
.btn-danger {
  background: var(--gg-red);
  color: var(--white);
}
.btn-danger:hover { background: #c42e2e; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

/* ── 폼 ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-label .required { color: var(--gg-red); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--gg-blue);
  box-shadow: 0 0 0 3px rgba(11,78,162,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.invalid { border-color: var(--gg-red); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a97b0'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── 탭 ── */
.tab-group { display: flex; border-bottom: 2px solid var(--border-light); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-btn:hover { color: var(--gg-blue); }
.tab-btn.active { color: var(--gg-blue); border-bottom-color: var(--gg-blue); }

/* ── 테이블 ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead tr { background: var(--gg-blue); }
.data-table thead th {
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  padding: 12px 14px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.data-table tbody tr:hover { background: var(--gg-blue-pale); }
.data-table tbody td {
  padding: 11px 14px;
  color: var(--gray-700);
  vertical-align: middle;
  text-align: center;
}
.data-table tbody td:first-child { text-align: left; }

/* ── 페이지네이션 ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 28px;
}
.page-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--gg-blue); color: var(--gg-blue); background: var(--gg-blue-pale); }
.page-btn.active { background: var(--gg-blue); border-color: var(--gg-blue); color: var(--white); }

/* ── 모달 ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,20,50,0.55);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(11,78,162,0.25);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: modalIn 0.25s ease;
}
.modal-box.wide { max-width: 720px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  background: linear-gradient(135deg, var(--gg-blue) 0%, var(--gg-blue-light) 100%);
  color: var(--white);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-body { padding: 28px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--gray-50);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── 알림 토스트 ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  min-width: 280px;
  pointer-events: auto;
  border-left: 4px solid var(--gg-blue);
  animation: toastIn 0.3s ease;
}
.toast.success { border-left-color: var(--gg-green); }
.toast.error   { border-left-color: var(--gg-red); }
.toast.warning { border-left-color: var(--gg-yellow); }
.toast i { font-size: 16px; }
.toast.success i { color: var(--gg-green); }
.toast.error   i { color: var(--gg-red); }
.toast.warning i { color: var(--gg-yellow-dk); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: none; }
}

/* ── 상태 뱃지 (신청 상태) ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.status-접수중  { background: #e8f5e9; color: #2e7d32; }
.status-예정    { background: #fff3e0; color: #e65100; }
.status-마감    { background: var(--gray-100); color: var(--gray-500); }
.status-검토중  { background: #e3f2fd; color: #1565c0; }
.status-승인    { background: #e8f5e9; color: #2e7d32; }
.status-반려    { background: #fce4ec; color: #b71c1c; }
.status-임시저장 { background: #f3e5f5; color: #6a1b9a; }

/* ── 푸터 ── */
.site-footer {
  background: var(--gray-800);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gg-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 17px;
  font-weight: 900;
}
.footer-org { font-size: 15px; font-weight: 800; color: var(--white); }
.footer-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.footer-info { font-size: 12px; line-height: 1.9; color: rgba(255,255,255,0.6); }
.footer-info span { margin-right: 20px; }
.footer-info a { color: rgba(255,255,255,0.6); }
.footer-info a:hover { color: var(--gg-yellow); }
.footer-copy {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .util-bar { padding: 5px 16px; }
  .header-inner { padding: 0 16px; height: 60px; }
  .main-nav-inner { padding: 0 16px; overflow-x: auto; }
  .main-nav a { padding: 12px 14px; font-size: 13px; white-space: nowrap; }
  .section { padding: 40px 0; }
  .section-inner { padding: 0 16px; }
  .section-title { font-size: 20px; }
  .footer-inner { padding: 0 16px; }
}
