/* =============================================
   UNIVGOGO — 전국 4년제 대학 정보 플랫폼
   Design System v1.0
   ============================================= */

:root {
  --primary: #1a4fba;
  --primary-dark: #123990;
  --primary-light: #e8effe;
  --accent: #f5a623;
  --accent-dark: #d4891a;
  --success: #2ecc71;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --bg: #f8faff;
  --bg-white: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(26,79,186,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(26,79,186,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(26,79,186,0.14), 0 4px 12px rgba(0,0,0,0.08);
  --font-sans: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --max-w: 1160px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── 레이아웃 ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }

/* ── 헤더 ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.25rem; font-weight: 800;
  color: var(--primary); white-space: nowrap; flex-shrink: 0;
}
.site-logo .logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--primary); color: #fff;
  border-radius: 10px; font-size: 1rem; font-weight: 900;
}
.header-search {
  flex: 1; max-width: 520px;
  position: relative;
}
.header-search input {
  width: 100%; height: 40px;
  padding: 0 44px 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 40px; font-size: 0.9rem;
  background: var(--bg); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,79,186,0.12);
  background: #fff;
}
.header-search .search-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-size: 1.1rem; pointer-events: none;
}
.header-nav { display: flex; gap: 4px; flex-shrink: 0; }
.header-nav a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.header-nav a:hover, .header-nav a.active {
  background: var(--primary-light); color: var(--primary);
}

/* ── 빵부스러기 ── */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-muted);
  padding: 14px 0 0;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-secondary); font-weight: 500; }
.breadcrumb svg { width: 12px; height: 12px; opacity: 0.5; }

/* ── 페이지 히어로 ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 60%, #3b82f6 100%);
  color: #fff; padding: 44px 0 40px;
}
.page-hero .univ-meta {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.meta-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600;
  background: rgba(255,255,255,0.18); color: #fff;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900; line-height: 1.25; margin-bottom: 12px;
}
.page-hero p { font-size: 0.95rem; opacity: 0.88; max-width: 620px; }

/* ── 카드 ── */
.card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body { padding: 24px; }

/* ── 섹션 제목 ── */
.section-title {
  font-size: 1.2rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ''; display: block;
  width: 4px; height: 20px;
  background: var(--primary); border-radius: 3px; flex-shrink: 0;
}

/* ── 정보 그리드 ── */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.info-item {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.info-item .label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px;
}
.info-item .value {
  font-size: 0.95rem; font-weight: 700; color: var(--text-primary);
}
.info-item .value a { color: var(--primary); }
.info-item .value a:hover { text-decoration: underline; }

/* ── CTA 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.95rem; font-weight: 700;
  padding: 13px 24px; border-radius: var(--radius-sm);
  transition: all 0.18s; text-align: center;
  cursor: pointer; border: 2px solid transparent;
}
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: var(--shadow); transform: translateY(-1px); }

.btn-accent {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: var(--shadow); transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--primary); border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-ghost {
  background: var(--bg); color: var(--text-secondary); border-color: var(--border);
}
.btn-ghost:hover { background: var(--border); color: var(--text-primary); }

.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* ── CTA 버튼 그룹 ── */
.cta-group {
  display: flex; flex-wrap: wrap; gap: 12px;
}

/* ── 링크 카드 ── */
.link-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all 0.18s; text-decoration: none;
  color: var(--text-primary);
}
.link-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.link-card .link-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.link-card .link-title { font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.link-card .link-desc { font-size: 0.82rem; color: var(--text-muted); }
.link-card .link-arrow { margin-left: auto; color: var(--primary); font-size: 1.1rem; flex-shrink: 0; }

/* ── 학과 태그 ── */
.dept-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.dept-tag {
  padding: 6px 14px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 0.83rem; font-weight: 600;
  border: 1px solid rgba(26,79,186,0.15);
  transition: all 0.15s;
}
.dept-tag:hover { background: var(--primary); color: #fff; }

/* ── 관련 대학 카드 ── */
.univ-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.univ-card {
  display: block; padding: 16px 18px;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: all 0.18s;
}
.univ-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.univ-card .name { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.univ-card .meta-row { display: flex; gap: 8px; }
.univ-card .tag-sm {
  font-size: 0.72rem; font-weight: 600; padding: 2px 8px;
  border-radius: 10px; background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; padding: 16px 20px;
  font-size: 0.9rem; font-weight: 700; color: var(--text-primary);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--bg-white); transition: background 0.15s;
}
.faq-q:hover { background: var(--primary-light); }
.faq-q .q-icon { color: var(--primary); flex-shrink: 0; transition: transform 0.2s; }
.faq-q.open .q-icon { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 14px 20px;
  font-size: 0.875rem; color: var(--text-secondary);
  background: var(--bg); border-top: 1px solid var(--border-light);
  line-height: 1.7;
}
.faq-a.open { display: block; }

/* ── 입결 안내 박스 ── */
.admission-info-box {
  border: 2px solid var(--primary); border-radius: var(--radius);
  padding: 28px; background: var(--primary-light);
  text-align: center; margin-bottom: 28px;
}
.admission-info-box .emoji { font-size: 2.5rem; margin-bottom: 10px; }
.admission-info-box h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; color: var(--primary); }
.admission-info-box p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.7; }

/* ── 외부 링크 소스 목록 ── */
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.source-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); transition: all 0.18s;
}
.source-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.source-card .s-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.source-card .s-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.source-card .s-desc { font-size: 0.78rem; color: var(--text-muted); }

/* ── 메인 검색 히어로 ── */
.main-hero {
  background: linear-gradient(145deg, #0d2f7e 0%, #1a4fba 50%, #2563eb 100%);
  padding: 80px 0 70px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.main-hero::before {
  content: ''; position: absolute;
  top: -60px; right: -60px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.main-hero::after {
  content: ''; position: absolute;
  bottom: -80px; left: -40px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.hero-eyebrow {
  display: inline-block; padding: 5px 16px;
  background: rgba(255,255,255,0.15); border-radius: 20px;
  font-size: 0.82rem; font-weight: 600; margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.25);
}
.main-hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900; line-height: 1.2; margin-bottom: 14px;
}
.main-hero h1 em { font-style: normal; color: var(--accent); }
.main-hero p { font-size: 1rem; opacity: 0.85; margin-bottom: 36px; }
.hero-search-wrap {
  max-width: 600px; margin: 0 auto; position: relative; z-index: 1;
}
.hero-search-box {
  display: flex; align-items: center;
  background: #fff; border-radius: 50px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.hero-search-box input {
  flex: 1; padding: 18px 24px; font-size: 1rem;
  border: none; outline: none; color: var(--text-primary);
  font-family: inherit;
}
.hero-search-box button {
  padding: 14px 28px; margin: 6px;
  background: var(--primary); color: #fff;
  border-radius: 50px; font-size: 0.95rem; font-weight: 700;
  border: none; cursor: pointer;
  transition: background 0.18s;
}
.hero-search-box button:hover { background: var(--primary-dark); }
.search-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: none; z-index: 200;
}
.search-suggestions.open { display: block; }
.suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; cursor: pointer;
  transition: background 0.12s;
}
.suggestion-item:hover { background: var(--primary-light); }
.suggestion-item .s-name { font-size: 0.9rem; font-weight: 700; }
.suggestion-item .s-region { font-size: 0.78rem; color: var(--text-muted); }

/* ── 퀵 메뉴 ── */
.quick-menu {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-top: 36px;
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 12px; border-radius: var(--radius);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; cursor: pointer; transition: all 0.18s;
  text-decoration: none;
}
.quick-item:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
.quick-item .qi-icon { font-size: 1.6rem; }
.quick-item .qi-label { font-size: 0.82rem; font-weight: 700; }

/* ── 지역 필터 ── */
.region-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.region-tab {
  padding: 8px 18px; border-radius: 30px;
  font-size: 0.85rem; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--bg-white);
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
  text-decoration: none;
}
.region-tab:hover, .region-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── 인기 대학 그리드 ── */
.popular-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.popular-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 18px 12px;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all 0.18s;
  text-decoration: none; color: var(--text-primary);
}
.popular-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.popular-card .pc-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.popular-card .pc-name { font-size: 0.85rem; font-weight: 700; text-align: center; }
.popular-card .pc-region { font-size: 0.75rem; color: var(--text-muted); }

/* ── 전체 대학 목록 ── */
.univ-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.univ-list-card {
  display: flex; flex-direction: column;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; gap: 12px;
  transition: all 0.18s; text-decoration: none; color: var(--text-primary);
}
.univ-list-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.univ-list-card .ulc-header { display: flex; align-items: center; gap: 12px; }
.univ-list-card .ulc-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.univ-list-card .ulc-name { font-size: 1rem; font-weight: 800; }
.univ-list-card .ulc-en { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.univ-list-card .ulc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.univ-list-card .ulc-links { display: flex; gap: 8px; margin-top: 4px; }
.ulc-link-btn {
  flex: 1; text-align: center; padding: 8px;
  border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 700;
  border: 1.5px solid var(--border); color: var(--text-secondary);
  transition: all 0.15s; background: var(--bg);
}
.ulc-link-btn:hover, .ulc-link-btn.primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── 공지 배너 ── */
.notice-banner {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 0.82rem; color: #92400e;
  display: flex; align-items: flex-start; gap: 8px;
}

/* ── 푸터 ── */
.site-footer {
  background: #0f172a; color: rgba(255,255,255,0.6);
  padding: 48px 0 28px; margin-top: 80px;
}
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; }
.footer-brand { margin-bottom: 16px; }
.footer-brand .logo { font-size: 1.2rem; font-weight: 900; color: #fff; margin-bottom: 8px; }
.footer-brand p { font-size: 0.82rem; line-height: 1.7; max-width: 340px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.5); transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem; text-align: center;
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { text-align: left; }
  .quick-menu { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-group { flex-direction: column; }
  .section { padding: 40px 0; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
  .univ-list-grid { grid-template-columns: 1fr; }
  .source-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .main-hero { padding: 56px 0 50px; }
  .page-hero { padding: 32px 0 28px; }
  .card-body { padding: 16px; }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-menu { grid-template-columns: repeat(3, 1fr); }
  .btn-lg { padding: 14px 22px; font-size: 0.95rem; }
}

/* ── 유틸리티 ── */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.73rem; font-weight: 700;
}
.badge-national { background: #dbeafe; color: #1d4ed8; }
.badge-private  { background: #fef3c7; color: #92400e; }
.badge-public   { background: #d1fae5; color: #065f46; }

/* ── 구분선 ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── 로딩/스켈레톤 없애기 위한 CLS 예방 ── */
.ad-placeholder { min-height: 90px; background: transparent; }
