/* ========================================
   중소기업자금119 - 메인 스타일시트
   ======================================== */

/* Google Fonts - Pretendard 대체용 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   전역 스타일
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0b2149;
  --secondary-color: #1e3a8a;
  --accent-color: #3b82f6;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --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);
}

body {
  font-family: 'Noto Sans KR', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   네비게이션 스타일
   ======================================== */
nav {
  background: var(--primary-color);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

nav .logo:hover {
  transform: scale(1.05);
}

nav .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

nav .logo-text .top {
  font-size: 18px;
}

nav .logo-text .bottom {
  font-size: 22px;
  font-weight: 700;
}

nav .nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
}

nav .nav-menu a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

nav .nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

nav .nav-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

nav .nav-menu a:hover::after {
  width: 80%;
}

nav .nav-menu a.active {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* ========================================
   메인 컨테이너
   ======================================== */
.main-container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  padding: 0 20px;
}

/* ========================================
   카드 스타일
   ======================================== */
.card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
}

.form-card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 48px;
  margin-bottom: 24px;
}

.shadow {
  box-shadow: var(--shadow-lg);
}

/* ========================================
   폼 스타일
   ======================================== */
.form-card h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
  text-align: center;
}

.form-desc {
  text-align: center;
  color: var(--text-gray);
  margin-bottom: 40px;
  font-size: 16px;
  line-height: 1.8;
}

.input-form {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.form-grid > div {
  display: flex;
  flex-direction: column;
}

.form-grid label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-grid textarea {
  resize: vertical;
  min-height: 100px;
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: var(--text-light);
}

/* 전체 너비 필드 */
.form-grid .full-width {
  grid-column: 1 / -1;
}

/* ========================================
   버튼 스타일
   ======================================== */
.submit-btn {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.submit-btn:active {
  transform: translateY(0);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

.btn-secondary {
  background: var(--text-gray);
  color: white;
}

/* ========================================
   푸터 스타일
   ======================================== */
footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 24px 20px;
  margin-top: auto;
  font-size: 14px;
}

/* ========================================
   페이지별 스타일
   ======================================== */

/* 성공사례 카드 */
.success-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.success-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.success-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-color);
}

.success-card h3 {
  color: var(--primary-color);
  font-size: 20px;
  margin-bottom: 12px;
}

.success-card .tag {
  display: inline-block;
  background: var(--bg-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-gray);
  margin-right: 8px;
  margin-bottom: 12px;
}

.success-card .amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--success-color);
  margin: 16px 0;
}

.success-card p {
  color: var(--text-gray);
  line-height: 1.7;
}

/* 회사소개 섹션 */
.about-section {
  margin-bottom: 48px;
}

.about-section h2 {
  color: var(--primary-color);
  font-size: 32px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent-color);
}

.about-section h3 {
  color: var(--secondary-color);
  font-size: 22px;
  margin: 24px 0 16px;
}

.about-section p,
.about-section ul {
  color: var(--text-gray);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-section ul {
  list-style: none;
  padding-left: 0;
}

.about-section ul li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.about-section ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.feature-item {
  background: var(--bg-light);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-item .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-item h4 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-item p {
  color: var(--text-gray);
  font-size: 14px;
}

/* 관리자 페이지 */
.admin-container {
  max-width: 1400px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-header h1 {
  color: var(--primary-color);
  font-size: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.stat-card .number {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.stat-card .label {
  color: var(--text-gray);
  font-size: 14px;
}

.table-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--bg-light);
}

.data-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-gray);
}

.data-table tbody tr:hover {
  background: var(--bg-light);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-new {
  background: #dbeafe;
  color: #1e40af;
}

.status-contacted {
  background: #fef3c7;
  color: #92400e;
}

.status-completed {
  background: #d1fae5;
  color: #065f46;
}

/* ========================================
   반응형 디자인
   ======================================== */
@media (max-width: 768px) {
  nav {
    padding: 12px 20px;
  }

  nav .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
  }

  nav .nav-menu.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .main-container {
    margin: 20px auto;
    padding: 0 16px;
  }

  .form-card {
    padding: 24px;
  }

  .form-card h2 {
    font-size: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .success-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-container {
    padding: 16px;
  }

  .data-table {
    font-size: 14px;
  }

  .data-table th,
  .data-table td {
    padding: 8px;
  }
}

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.hidden {
  display: none;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
