/* ==========================================================================
   Luther University International Education Institute
   루터대학교 국제교육원 / 한국어교육원 웹사이트
   ========================================================================== */

:root {
  --color-primary: #0f2c52;
  --color-primary-dark: #081b33;
  --color-primary-light: #1e4577;
  --color-accent: #c9962f;
  --color-accent-light: #e4b656;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f9;
  --color-bg-navy: #0f2c52;
  --color-text: #1f2937;
  --color-text-muted: #5b6472;
  --color-text-invert: #ffffff;
  --color-border: #e3e7ee;

  --font-kr: 'Noto Sans KR', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --font-en: 'Poppins', 'Noto Sans KR', sans-serif;
  --font-zh: 'Noto Sans SC', 'Noto Sans KR', sans-serif;

  --container: 1180px;
  --radius: 10px;
  --shadow-sm: 0 2px 10px rgba(15, 44, 82, 0.06);
  --shadow-md: 0 8px 28px rgba(15, 44, 82, 0.12);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.3; font-weight: 700; }

p { margin: 0 0 1em; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: #1a1305;
}
.btn-primary:hover { background: var(--color-accent-light); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-navy {
  background: var(--color-primary);
  color: #fff;
}
.btn-navy:hover { background: var(--color-primary-light); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.05rem;
}
.brand .brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand .brand-text small { font-weight: 500; color: var(--color-text-muted); font-size: 0.72rem; letter-spacing: .04em; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--color-text);
  transition: all var(--transition);
}
.main-nav a:hover, .main-nav a.active {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: none;
  background: transparent;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.lang-switch button.active {
  background: var(--color-primary);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,27,51,0.5), rgba(8,27,51,0.72));
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; padding: 100px 0 90px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  max-width: 780px;
  margin-bottom: .5em;
}
.hero .hero-lead {
  font-size: 1.1rem;
  max-width: 640px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2em;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.page-hero {
  min-height: 320px;
}
.page-hero .hero-inner { padding: 70px 0 60px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-navy { background: var(--color-primary); color: #fff; }

.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head.align-left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 0.82rem;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.section-head p { color: var(--color-text-muted); font-size: 1.02rem; }
.section-navy .section-head p { color: rgba(255,255,255,0.78); }

/* ---------- Grids / Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.12rem; }
.card p { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split .eyebrow { display: inline-block; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-row .stat-num {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--color-accent);
}
.stat-row .stat-label { color: rgba(255,255,255,0.78); font-size: 0.92rem; margin-top: 4px; }

/* ---------- Timeline / Steps ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.timeline-step {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px 18px;
  position: relative;
}
.timeline-step .step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  margin-bottom: 12px;
}
.timeline-step h4 { font-size: 0.98rem; margin-bottom: 6px; }
.timeline-step .step-date { color: var(--color-accent); font-weight: 700; font-size: 0.88rem; }
.timeline-step p { font-size: 0.86rem; color: var(--color-text-muted); margin: 6px 0 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 480px; }
th, td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
thead th { background: var(--color-bg-alt); color: var(--color-primary); font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- Level cards ---------- */
.level-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: #fff;
}
.level-card .level-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
.level-card h3 { font-size: 1.1rem; }
.level-card p { color: var(--color-text-muted); font-size: 0.93rem; margin: 0; }

/* ---------- Checklist ---------- */
.check-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.96rem;
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "✓";
  color: var(--color-accent);
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item .gallery-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(8,27,51,0.85), transparent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}

.lightbox {
  position: fixed; inset: 0;
  background: rgba(8,12,20,0.9);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  color: #fff; font-size: 2rem; background: none; border: none; cursor: pointer;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}
.contact-info-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-row {
  display: flex; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-row:last-child { border-bottom: none; }
.contact-row .contact-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.contact-row h4 { margin: 0 0 4px; font-size: 0.95rem; }
.contact-row p { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; }

.map-frame {
  width: 100%; height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 0.92rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 18px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border-radius: 20px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 8px; font-size: 1.6rem; }
.cta-band p { color: rgba(255,255,255,0.8); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.72);
  padding: 56px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { display: flex; gap: 10px; align-items: center; color: #fff; font-weight: 800; margin-bottom: 14px; }
.footer-brand .brand-mark { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.footer-top h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-top li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-top a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.badge-note {
  display: inline-block;
  background: #fff6e0;
  color: #7a5300;
  border: 1px solid #f1dda3;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  margin-top: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .split { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: #fff;
    padding: 12px 24px 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 70px 0 60px; }
  .cta-band { padding: 40px 26px; text-align: center; justify-content: center; }
}

/* language-specific font on <html lang="zh"> etc */
html[lang="zh"] body { font-family: var(--font-zh); }
html[lang="en"] body { font-family: var(--font-en); }

/* ---------- Notice board ---------- */
.notice-wrap { max-width: 860px; margin: 0 auto; }
.notice-list { border-top: 2px solid var(--color-primary); }
.notice-item {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 12px; border-bottom: 1px solid var(--color-border);
  color: var(--color-text); text-decoration: none; transition: background var(--transition);
}
.notice-item:hover { background: var(--color-bg-alt); }
.notice-item.pinned { background: #fffaf0; }
.notice-pin {
  flex: none; font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 20px;
  background: var(--color-accent); color: #fff;
}
.notice-title { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.notice-date { flex: none; color: var(--color-text-muted); font-size: 0.9rem; }
.notice-empty { text-align: center; color: var(--color-text-muted); padding: 60px 0; }
.notice-detail h2 { margin-bottom: 8px; }
.notice-meta { color: var(--color-text-muted); padding-bottom: 16px; border-bottom: 1px solid var(--color-border); }
.notice-body { white-space: pre-wrap; padding-top: 24px; line-height: 1.85; }
@media (max-width: 600px) {
  .notice-item { flex-wrap: wrap; }
  .notice-title { flex-basis: 100%; order: 2; white-space: normal; }
}

/* Home: latest notices */
.home-notice { padding: 48px 0 8px; }
.home-notice-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.home-notice-head h2 { margin: 0; font-size: 1.5rem; color: var(--color-primary); }
.home-notice-head a { color: var(--color-text-muted); text-decoration: none; font-size: 0.95rem; }
.home-notice-head a:hover { color: var(--color-accent); }
