/* ==========================================================================
   K-Bridge — Study in Korea · IEQAS certified universities
   Pure static stylesheet (no build step, no external framework)
   ========================================================================== */

:root {
  --navy-900: #071a37;
  --navy-800: #0a2350;
  --navy-700: #0f2f66;
  --blue-600: #1c5ed6;
  --blue-500: #2b74ea;
  --blue-100: #e6effc;
  --sky-400: #45b6f7;
  --gold-500: #c98a13;
  --gold-100: #fdf3dd;
  --ink-900: #10233f;
  --ink-700: #33465f;
  --ink-500: #61748d;
  --ink-400: #8397b0;
  --line: #dfe7f2;
  --bg: #f4f8fd;
  --card: #ffffff;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(13, 38, 76, .06), 0 2px 8px rgba(13, 38, 76, .05);
  --shadow-md: 0 10px 30px rgba(13, 38, 76, .09);
  --shadow-lg: 0 24px 60px rgba(8, 28, 60, .18);
  --max: 1180px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
          "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

section[id], main [id] { scroll-margin-top: 82px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-size: 19px; font-weight: 800; letter-spacing: -0.03em; color: var(--navy-900);
}
.brand-sub {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-400);
}
.main-nav { display: flex; gap: 4px; margin-left: 14px; }
.main-nav a {
  font-size: 14px; font-weight: 600; color: var(--ink-700);
  padding: 8px 12px; border-radius: 9px;
}
.main-nav a:hover { background: var(--blue-100); color: var(--blue-600); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  background: #eef3fb; border: 1px solid var(--line); border-radius: 999px;
}
.lang-switch button {
  border: 0; background: transparent; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-500);
  padding: 6px 12px; letter-spacing: .02em;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--navy-800); color: #fff; box-shadow: var(--shadow-sm);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: 0 6px 16px rgba(28, 94, 214, .25); }
.btn-primary:hover { background: #194fb5; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-700); }
.btn-ghost:hover { border-color: #b9cbe6; color: var(--blue-600); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 400px at 82% -12%, rgba(69, 182, 247, .22), transparent 62%),
    radial-gradient(700px 420px at 8% 0%, rgba(28, 94, 214, .13), transparent 60%),
    linear-gradient(180deg, #fbfdff 0%, #f2f7fe 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28, 94, 214, .25), transparent);
}
.hero-inner { padding: 64px 0 54px; max-width: 830px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px; align-items: center;
}
.hero-panel {
  background: rgba(255, 255, 255, .82); border: 1px solid var(--line);
  border-radius: 22px; padding: 22px 22px 18px; box-shadow: var(--shadow-md);
}
.panel-eyebrow {
  margin: 0 0 14px; font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-400);
}
.panel-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.panel-steps li { display: flex; gap: 12px; align-items: flex-start; }
.panel-steps .n {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px;
  background: var(--navy-800); color: #fff; font-size: 12px; font-weight: 800;
  display: grid; place-items: center; margin-top: 1px;
}
.panel-steps b { display: block; font-size: 14px; color: var(--navy-900); letter-spacing: -0.01em; }
.panel-steps span { display: block; font-size: 12.8px; color: var(--ink-500); line-height: 1.5; }
.panel-foot {
  margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-400);
}
.panel-foot .dot2 { width: 6px; height: 6px; border-radius: 50%; background: #17b26a; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--blue-600); background: #fff;
  border: 1px solid #d5e4fb; border-radius: 999px;
  padding: 6px 13px; margin: 0 0 20px;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #17b26a;
  box-shadow: 0 0 0 3px rgba(23, 178, 106, .16);
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.16; letter-spacing: -0.035em;
  font-weight: 800; color: var(--navy-900);
}
.hero h1 .hl { color: var(--blue-600); white-space: nowrap; }
.hero p.lead {
  margin: 0 0 28px; max-width: 640px;
  font-size: clamp(15px, 1.6vw, 17.5px); color: var(--ink-700);
}
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #cddcf1; border-radius: 16px;
  padding: 8px 8px 8px 16px; box-shadow: var(--shadow-md);
  max-width: 660px;
}
.search-box:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(43, 116, 234, .13); }
.search-box svg { flex: 0 0 auto; color: var(--ink-400); }
.search-box input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--ink-900); padding: 10px 0;
}
.search-box input::placeholder { color: var(--ink-400); }
.search-box .btn { flex: 0 0 auto; }
.search-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-400); }

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; max-width: 700px;
}
.stats li {
  background: rgba(255, 255, 255, .78); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.stats .num {
  display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--navy-800); line-height: 1.2;
}
.stats .num small { font-size: 12.5px; font-weight: 700; color: var(--ink-400); margin-left: 5px; letter-spacing: 0; }
.stats .lbl { display: block; font-size: 12.5px; color: var(--ink-500); font-weight: 600; margin-top: 3px; }

/* ---------------------------------------------------------------- explorer */
.explorer { padding: 44px 0 12px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head h2 {
  margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.03em; font-weight: 800; color: var(--navy-900);
}
.section-head p { margin: 0; color: var(--ink-500); font-size: 14.5px; max-width: 640px; }
.section-note {
  margin: 8px 0 0 !important; font-size: 12.5px !important; color: var(--ink-400) !important;
  max-width: 720px; line-height: 1.55;
}

.filters {
  margin: 22px 0 8px; padding: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid; gap: 12px;
}
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label {
  flex: 0 0 auto; min-width: 72px; font-size: 12px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-400);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-700);
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  transition: background .14s, border-color .14s, color .14s;
  white-space: nowrap;
}
.chip:hover { border-color: #b9cbe6; color: var(--blue-600); }
.chip[aria-pressed="true"] {
  background: var(--navy-800); border-color: var(--navy-800); color: #fff;
}
.chip.gold[aria-pressed="true"] { background: #a9740b; border-color: #a9740b; }

.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 18px 2px 14px;
}
.result-count { font-size: 14px; color: var(--ink-500); font-weight: 600; }
.result-count b { color: var(--navy-800); font-weight: 800; }
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-wrap select {
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-700);
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 7px 10px;
}
.select {
  width: 100%; max-width: 280px; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink-700); border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 8px 10px;
}
.select:focus { outline: 2px solid rgba(43, 116, 234, .35); outline-offset: 1px; }
.link-reset {
  border: 0; background: none; color: var(--blue-600);
  font-size: 13px; font-weight: 700; padding: 6px 4px;
}
.link-reset[hidden] { display: none; }

.cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  padding-bottom: 8px;
}
.card {
  position: relative; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  display: flex; flex-direction: column; gap: 10px; min-height: 158px;
}
.card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #c3d6ef;
}
.card:focus-visible { outline: 3px solid rgba(43, 116, 234, .35); outline-offset: 2px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-top > span:first-child { min-width: 0; }
.card-en {
  display: block;
  font-size: 16px; font-weight: 800; letter-spacing: -0.02em; color: var(--navy-900);
  line-height: 1.35;
}
.card-ko { display: block; font-size: 13px; color: var(--ink-500); font-weight: 600; margin-top: 2px; }
.badge {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
}
.badge.excellent { background: var(--gold-100); color: #8f6106; border: 1px solid #f0dca7; }
.badge.certified { background: var(--blue-100); color: #1a4cae; border: 1px solid #cfe0fa; }
.card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 12.5px; color: var(--ink-500); font-weight: 600;
}
.card-meta .sep { color: #cbd8e8; }
.card-progs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.prog {
  font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 6px;
  background: #f2f6fc; color: var(--ink-500); border: 1px solid #e4ecf7;
}
.prog.on { background: #eaf3ff; color: #17509f; border-color: #cfe2fb; }
.prog.off { opacity: .5; }

.empty {
  padding: 56px 20px; text-align: center; color: var(--ink-500);
  background: #fff; border: 1px dashed #cbd9ec; border-radius: var(--radius-lg);
  font-size: 14.5px;
}
.empty strong { display: block; color: var(--navy-800); font-size: 17px; margin-bottom: 6px; }

.pager { display: flex; justify-content: center; margin: 26px 0 8px; }

/* ---------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(6, 21, 43, .55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(620px, 100%); max-height: min(86vh, 760px); overflow: auto;
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.modal-head {
  padding: 26px 26px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fbff, #fff);
  position: sticky; top: 0;
}
.modal-head .close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink-500);
  display: grid; place-items: center; font-size: 18px; line-height: 1;
}
.modal-head .close:hover { color: var(--navy-800); border-color: #b9cbe6; }
.modal-en { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--navy-900); line-height: 1.28; padding-right: 40px; }
.modal-ko { font-size: 14px; color: var(--ink-500); font-weight: 600; margin-top: 4px; }
.modal-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-size: 11.5px; font-weight: 700; padding: 5px 9px; border-radius: 6px;
  background: #f2f6fc; border: 1px solid #e4ecf7; color: var(--ink-700);
}
.tag.gold { background: var(--gold-100); border-color: #f0dca7; color: #8f6106; }
.tag.blue { background: #eaf3ff; border-color: #cfe2fb; color: #17509f; }
.modal-body { padding: 20px 26px 26px; }
.modal-section + .modal-section { margin-top: 20px; }
.modal-section h3 {
  margin: 0 0 8px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-400); font-weight: 800;
}
.modal-section p { margin: 0; font-size: 14.5px; color: var(--ink-700); }
.benefit-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.benefit-list li {
  position: relative; padding-left: 24px; font-size: 14.3px; color: var(--ink-700);
}
.benefit-list li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 11px; height: 6px; border-left: 2px solid #17b26a; border-bottom: 2px solid #17b26a;
  transform: rotate(-45deg);
}
.benefit-list li.muted::before { border-color: var(--ink-400); }
.prog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prog-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfdff;
}
.prog-card.on { border-color: #cfe2fb; background: #f4f9ff; }
.prog-card.off { background: #fafbfd; }
.prog-card .k { font-size: 13px; font-weight: 800; color: var(--navy-800); }
.prog-card .v { font-size: 12.5px; color: var(--ink-500); font-weight: 600; }
.modal-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.modal-links .btn { font-size: 13px; padding: 9px 13px; }
.modal-note { font-size: 12px; color: var(--ink-400); margin-top: 12px; }

/* ---------------------------------------------------------------- guide */
.guide { padding: 56px 0 10px; }
.guide-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 22px; }
.guide-card article, .guide-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.guide-card h3 {
  margin: 0 0 8px; font-size: 18px; letter-spacing: -0.02em; color: var(--navy-900); font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.guide-card h3 .ico {
  width: 30px; height: 30px; border-radius: 9px; background: var(--blue-100);
  color: var(--blue-600); display: grid; place-items: center; flex: 0 0 auto;
}
.guide-card p { margin: 0 0 10px; font-size: 14.3px; color: var(--ink-700); }
.guide-card p:last-child { margin-bottom: 0; }
.guide-card ul { margin: 8px 0 0; padding-left: 18px; font-size: 14.2px; color: var(--ink-700); }
.guide-card li { margin-bottom: 6px; }
.mini-table { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: 13.2px; }
.mini-table th, .mini-table td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mini-table th { color: var(--ink-400); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.mini-table td:first-child { font-weight: 700; color: var(--navy-800); white-space: nowrap; }
.mini-table tr.restricted td { color: #a3341a; }
.mini-table tr.restricted td:first-child { color: #a3341a; }
.guide-wide { grid-column: 1 / -1; }
.callout {
  border-left: 3px solid var(--gold-500); background: #fffaf0;
  padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: 13.6px; color: #6b4c08;
  margin-top: 12px;
}
.callout.blue { border-color: var(--blue-600); background: #f4f9ff; color: #17468e; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  margin-top: 56px; background: var(--navy-900); color: #c9d6ea;
  padding: 40px 0 30px;
}
.site-footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-brand { max-width: 360px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #7f96b8; }
.footer-brand p { font-size: 13px; color: #9db0cc; margin: 12px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 13.5px; align-content: flex-start; }
.footer-links a { font-weight: 600; }
.footer-meta {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px; color: #8ba1c0; display: flex; flex-wrap: wrap; gap: 8px 18px;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-panel { display: none; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .hero-inner { padding: 44px 0 40px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { height: 62px; gap: 10px; }
  .brand-sub { display: none; }
  .header-actions .btn-primary { display: none; }
  .hero-inner { padding: 34px 0 30px; }
  .hero h1 { font-size: 28px; }
  .search-box { padding: 6px 6px 6px 14px; border-radius: 14px; }
  .search-box input { font-size: 15px; }
  .search-box .btn { padding: 10px 12px; font-size: 13px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats li:nth-child(3) { grid-column: 1 / -1; }
  .stats .num { font-size: 21px; }
  .filters { padding: 13px; }
  .filter-label { min-width: 100%; }
  .cards { grid-template-columns: 1fr; gap: 11px; }
  .card { min-height: 0; }
  .prog-grid { grid-template-columns: 1fr; }
  .modal { border-radius: 18px; max-height: 90vh; }
  .modal-head { padding: 20px 18px 16px; }
  .modal-body { padding: 16px 18px 22px; }
  .modal-en { font-size: 19px; }
  .guide-card { padding: 20px; }
  .footer-grid { flex-direction: column; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
