/* ===================================
   대학정보포털 - Custom CSS
   Bootstrap 5.3 기반
   =================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #16a34a;
  --accent: #f59e0b;
  --bg-light: #f8fafc;
  --border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* ---- Base ---- */
body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-main);
  background: #fff;
  line-height: 1.7;
}

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

/* ---- Top Bar ---- */
.top-bar { background: var(--bg-light); border-bottom: 1px solid var(--border); }

/* ---- Header ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); z-index: 1030; }
.brand-icon { font-size: 1.6rem; color: var(--primary); line-height: 1; }
.brand-text { font-size: 1.2rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.02em; }

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-main) !important;
  padding: .5rem .75rem;
  border-radius: .375rem;
  transition: background .15s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background: var(--bg-light);
  color: var(--primary) !important;
}
.navbar-nav .nav-link i { margin-right: .25rem; }

/* ---- Hero Section ---- */
.hero-section {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; }
.hero-subtitle { font-size: 1.1rem; opacity: .85; margin-bottom: 2rem; }
.hero-search-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.hero-search-wrap .form-control {
  border: 0;
  border-radius: 3rem 0 0 3rem;
  padding: .85rem 1.5rem;
  font-size: 1rem;
  box-shadow: none;
}
.hero-search-wrap .btn {
  border-radius: 0 3rem 3rem 0;
  padding: .85rem 1.8rem;
  font-weight: 600;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.hero-search-wrap .btn:hover { background: #d97706; border-color: #d97706; }

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.6rem; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: .8rem; opacity: .75; margin-top: .2rem; }

/* ---- Section ---- */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}
.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: .4rem;
}

/* ---- Field Cards ---- */
.field-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  text-decoration: none !important;
  display: block;
  color: var(--text-main) !important;
}
.field-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
  color: var(--primary) !important;
}
.field-card-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.field-card-name { font-weight: 600; font-size: .95rem; }
.field-card-count { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

/* ---- Region Badges ---- */
.region-badge {
  display: inline-block;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-main);
  transition: background .15s, border-color .15s;
  text-decoration: none !important;
  margin: .25rem;
}
.region-badge:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
  text-decoration: none !important;
}

/* ---- School / Dept Cards ---- */
.uni-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow .2s, border-color .2s;
}
.uni-card:hover { box-shadow: var(--shadow); border-color: #93c5fd; }
.uni-card-title { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.uni-card-meta { font-size: .82rem; color: var(--text-muted); }
.uni-card-badge { font-size: .75rem; }

/* ---- Table ---- */
.data-table th { background: var(--bg-light); font-weight: 600; white-space: nowrap; }
.data-table td { vertical-align: middle; }
.data-table tr:hover td { background: #f0f7ff; }

/* ---- Filter Panel ---- */
.filter-panel {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.filter-panel .form-label { font-weight: 600; font-size: .85rem; color: var(--text-muted); margin-bottom: .35rem; }

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: .85rem; }
.breadcrumb-item a { color: var(--primary); }

/* ---- Info List (학교 상세) ---- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.info-list li:last-child { border-bottom: none; }
.info-list .info-label {
  flex: 0 0 130px;
  font-weight: 600;
  color: var(--text-muted);
}
.info-list .info-value { flex: 1; color: var(--text-main); }

/* ---- Detail Header ---- */
.detail-header {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.detail-header h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -0.02em; }
.detail-badge { font-size: .8rem; padding: .3rem .75rem; border-radius: 2rem; margin-right: .35rem; }

/* ---- Pagination ---- */
.pagination .page-link { border-radius: .5rem !important; margin: 0 2px; font-weight: 500; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ---- Search Result ---- */
.search-result-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  transition: box-shadow .15s;
}
.search-result-item:hover { box-shadow: var(--shadow-sm); }
.search-result-item mark { background: #fef08a; padding: 0 2px; border-radius: 2px; }

/* ---- Admin ---- */
.admin-sidebar {
  min-height: calc(100vh - 56px);
  background: #1e293b;
  width: 240px;
  flex-shrink: 0;
}
.admin-sidebar .nav-link { color: #94a3b8; border-radius: .375rem; padding: .6rem 1rem; font-weight: 500; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.admin-sidebar .nav-link i { width: 1.2rem; }
.admin-content { flex: 1; padding: 2rem; background: var(--bg-light); min-height: calc(100vh - 56px); }
.admin-card { background: #fff; border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); margin-bottom: 1.5rem; }
.admin-stat-card { text-align: center; }
.admin-stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.admin-stat-label { font-size: .9rem; color: var(--text-muted); }

/* ---- Footer ---- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}
.footer-brand-icon { font-size: 1.5rem; color: #3b82f6; }
.footer-brand-text { font-size: 1.1rem; font-weight: 700; color: #f1f5f9; }
.footer-heading { color: #f1f5f9; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.footer-link { display: block; color: #94a3b8; font-size: .875rem; padding: .2rem 0; transition: color .15s; }
.footer-link:hover { color: #e2e8f0; text-decoration: none; }
.footer-bottom-link { color: #94a3b8; font-size: .8rem; }
.footer-bottom-link:hover { color: #e2e8f0; }
.site-footer hr { border-color: #1e293b; }
.site-footer .text-muted { color: #94a3b8 !important; }
.site-footer a.text-muted { color: #94a3b8 !important; }
.site-footer a.text-muted:hover { color: #e2e8f0 !important; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section { padding: 3rem 0 2.5rem; }
  .hero-stats { gap: 1.25rem; justify-content: center; }
  .info-list .info-label { flex: 0 0 100px; }
  .admin-sidebar { width: 100%; min-height: auto; }
}

/* ---- Hero Badge ---- */
.hero-badge {
  background: rgba(255,255,255,.2) !important;
  color: #fff !important;
}
.hero-badge:hover {
  background: rgba(255,255,255,.35) !important;
  color: #fff !important;
}

/* ---- Font Weight Utilities (Bootstrap 5 확장) ---- */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

/* ---- Utility ---- */
.text-primary-dark { color: var(--primary-dark) !important; }
.bg-primary-soft { background: rgba(37,99,235,.08) !important; }
.rounded-xl { border-radius: var(--radius) !important; }
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
