/* ===================================================
   KSIF.UZ — Official Portal Stylesheet
   King Sejong Institute Foundation (세종학당재단)
   Design: iksi.or.kr & ksif.uz institutional aesthetic
   =================================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Institutional Brand Palette (KSIF official) */
  --primary:        #003876;   /* KSIF Deep Royal Navy */
  --primary-light:  #0059B3;
  --primary-dark:   #002452;
  --primary-subtle: #EEF4FC;
  --sejong-blue:    #0082CA;   /* Korean bright cyan-blue */
  --taegeuk-red:    #C8102E;   /* Korean national flag red */
  --gold:           #C5A059;   /* Academic gold */

  /* Neutrals & Surfaces */
  --white:          #FFFFFF;
  --bg:             #F5F7FB;   /* Pristine institutional background */
  --bg-subtle:      #EDF1F7;
  --card-bg:        #FFFFFF;
  --border:         #E2E8F0;
  --border-strong:  #CBD5E1;

  /* Typography */
  --text:           #0F172A;   /* Slate dark text */
  --text-sub:       #334155;
  --text-muted:     #64748B;
  --text-light:     #94A3B8;

  /* Status Colors */
  --success:        #0D9488;
  --warning:        #D97706;
  --danger:         #DC2626;
  --info:           #0284C7;

  /* Dimensions & Shapes */
  --header-height:  76px;
  --sidebar-width:  260px;
  --radius-xs:      4px;
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;

  /* Shadows */
  --shadow-xs:      0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm:      0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow:         0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-md:      0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg:      0 16px 40px rgba(15, 23, 42, 0.12);

  --transition:     all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --font:           'Noto Sans', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  background-color: #071220;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  padding-top: var(--header-height);
}

main { flex: 1; margin-bottom: 0 !important; padding-bottom: 0 !important; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================
   TOP BAR (iksi.or.kr Institutional Header)
   ===================================================== */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 0;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kr-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #E2E8F0;
}

.top-bar-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
}

.lang-item {
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 1px 4px;
}

.lang-item.active {
  color: white;
  font-weight: 800;
  border-bottom: 2px solid var(--sejong-blue);
}

.lang-sep { opacity: 0.3; }
.top-bar-divider { width: 1px; height: 12px; background: rgba(255,255,255,0.2); }
.top-bar-phone { font-weight: 600; }
.top-bar-link { color: rgba(255,255,255,0.85); transition: var(--transition); }
.top-bar-link:hover { color: white; text-decoration: underline; }

/* =====================================================
   SITE HEADER (iksi.or.kr clean white nav)
   ===================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  height: var(--header-height);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 56, 118, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

/* Official Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-emblem {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 56, 118, 0.2);
}

.emblem-kr {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  font-family: 'Noto Sans KR', sans-serif;
}

.emblem-sub {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  opacity: 0.85;
}

.logo-titles {
  display: flex;
  flex-direction: column;
}

.logo-kr-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--sejong-blue);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.logo-main-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.logo-sub-title {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin-left: 20px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-sub);
  border-radius: var(--radius-xs);
  transition: var(--transition);
  position: relative;
  line-height: 1.3;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-subtle);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 800;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 16px;
  right: 16px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* Header Auth */
.header-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* User Menu */
.user-menu { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
}

.user-menu-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 56, 118, 0.08);
}

.user-avatar {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 400;
}

.user-dropdown.open { display: block; animation: fadeInDown 0.15s ease; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--bg);
  color: var(--primary);
}

.dropdown-item.text-danger { color: var(--danger); }
.dropdown-item.text-danger:hover { background: #FEF2F2; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-left: auto;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
}

.hamburger:hover {
  background: #f1f5f9;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.hamburger.open {
  background: #fee2e2;
  border-color: #fca5a5;
}

.hamburger.open span {
  background: #dc2626;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.btn-sm  { padding: 6px 14px;  font-size: 13px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  box-shadow: 0 4px 14px rgba(0, 56, 118, 0.25);
  transform: translateY(-1px);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-gold {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}
.btn-gold:hover {
  background: #B38E46;
  border-color: #B38E46;
  color: white;
}

.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-outline-white:hover {
  background: white;
  color: var(--primary);
}

.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-danger  { background: var(--danger);  color: white; border-color: var(--danger); }
.btn-warning { background: var(--warning); color: white; border-color: var(--warning); }

/* =====================================================
   INSTITUTIONAL HERO (Clean, Bright, Dignified)
   ===================================================== */
.hero-institutional {
  position: relative;
  background: linear-gradient(135deg, #F0F4FA 0%, #FFFFFF 50%, #EBF2FA 100%);
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -150px;
  right: -100px;
}

.shape-2 {
  width: 320px;
  height: 320px;
  background: var(--sejong-blue);
  bottom: -100px;
  left: -80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-agency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
}

.hero-heading {
  font-size: clamp(32px, 3.8vw, 44px);
  font-weight: 900;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-heading .highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero-heading .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(0, 130, 202, 0.2);
  z-index: -1;
  border-radius: 2px;
}

.hero-description {
  font-size: 16px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 580px;
}

.hero-btn-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

/* Hero Metrics Strip */
.hero-metrics {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  width: fit-content;
  max-width: 100%;
}

.metric-item {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}

.metric-item:first-child { padding-left: 0; }
.metric-item:last-child { padding-right: 0; }

.metric-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}

.metric-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.metric-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Right Hero Enrollment Widget Card */
.hero-widget-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border-top: 4px solid var(--primary);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: #F8FAFD;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 800;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.6; }
  100% { transform: scale(0.95); opacity: 1; }
}

.widget-status {
  color: #065F46;
  letter-spacing: 0.5px;
}

.widget-sem {
  margin-left: auto;
  color: var(--text-muted);
  font-weight: 700;
}

.widget-body {
  padding: 24px;
}

.widget-kr-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--sejong-blue);
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.widget-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}

.widget-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.widget-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  background: #F8FAFC;
  padding: 14px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.w-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-sub);
}

.btn-apply-widget {
  font-size: 15px;
  padding: 13px 20px;
}

.widget-footer {
  padding: 10px 24px;
  background: #F8FAFD;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* =====================================================
   QUICK ACCESS SERVICE GRID (바로가기)
   ===================================================== */
.quick-service-section {
  padding: 24px 0;
  margin-top: -32px;
  position: relative;
  z-index: 10;
}

.quick-service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--primary-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.service-card:hover .service-icon-wrap {
  background: var(--primary);
  color: white;
}

.service-kr {
  font-size: 10px;
  font-weight: 700;
  color: var(--sejong-blue);
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.service-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.service-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =====================================================
   SECTION COMMONS
   ===================================================== */
.section { padding: 72px 0; }
.section-alt { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-white { background: #F8FAFD; border-bottom: 1px solid var(--border); }
.section-roadmap { background: #FFFFFF; border-bottom: 1px solid var(--border); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-kr-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: var(--sejong-blue);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-tag {
  display: inline-block;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.4px;
}

.section-title span { color: var(--primary); }

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 10px auto 0;
  line-height: 1.65;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-top: 14px;
}

/* =====================================================
   CURRICULUM ROADMAP (세종한국어 교육과정 5단계)
   ===================================================== */
.roadmap-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.roadmap-step {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-xs);
}

.roadmap-step:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.step-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.level-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 800;
  width: fit-content;
  color: white;
}

.a1-pill { background: #0082CA; }
.a2-pill { background: #059669; }
.b1-pill { background: #7C3AED; }
.b2-pill { background: #D97706; }
.c1-pill { background: var(--primary); }

.step-kr-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.step-body {
  flex: 1;
  margin-bottom: 18px;
}

.step-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.step-points {
  list-style: none;
  font-size: 11px;
  color: var(--text-sub);
}

.step-points li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 7px;
  line-height: 1.5;
}

.step-points li::before {
  content: '▪';
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--primary);
  font-size: 11px;
}

.step-footer {
  margin-top: auto;
}

/* =====================================================
   NOTICES & CULTURAL ACADEMY (Dual Columns)
   ===================================================== */
.dual-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 20px;
}

.board-title-group {
  display: flex;
  flex-direction: column;
}

.board-kr {
  font-size: 11px;
  font-weight: 800;
  color: var(--sejong-blue);
  letter-spacing: 0.5px;
}

.board-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.board-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.board-more:hover { color: var(--primary); }

.notice-list {
  display: flex;
  flex-direction: column;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.notice-item:hover {
  background: var(--bg);
  padding-left: 14px;
}

.notice-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.notice-badge.new {
  background: #FEE2E2;
  color: var(--taegeuk-red);
}

.notice-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.notice-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-text:hover { color: var(--primary); }

.notice-date {
  font-size: 12px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Culture Cards Grid */
.culture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.culture-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: var(--transition);
}

.culture-card:hover {
  background: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.culture-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.culture-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.culture-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =====================================================
   APPLICATION PROCESS (3 Steps)
   ===================================================== */
.steps-process-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.process-card {
  flex: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
}

.process-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.process-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 4px;
  opacity: 0.3;
}

.process-kr {
  font-size: 11px;
  font-weight: 800;
  color: var(--sejong-blue);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.process-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.process-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.process-arrow {
  font-size: 24px;
  color: var(--border-strong);
  font-weight: 900;
}

/* =====================================================
   INSTITUTIONAL CTA BANNER
   ===================================================== */
.cta-banner-institutional {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 64px 0;
  text-align: center;
}

.cta-inner {
  max-width: 680px;
  margin: 0 auto;
}

.cta-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 900;
  margin-bottom: 14px;
  line-height: 1.25;
}

.cta-subtitle {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 30px;
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-cta-light {
  background: white;
  color: var(--primary);
  border-color: white;
}
.btn-cta-light:hover {
  background: var(--bg);
  color: var(--primary-dark);
}

/* =====================================================
   INSTITUTIONAL FOOTER (Partners, Credibility, Links)
   ===================================================== */
.site-footer {
  background: #0B192C;
  color: #94A3B8;
  font-size: 13px;
  border-top: 3px solid var(--primary);
  margin-top: auto;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
}

.footer-partners {
  background: #071220;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-partners-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
}

.partners-title {
  font-weight: 700;
  color: #CBD5E1;
}

.partners-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.partner-item { color: #94A3B8; font-weight: 500; }
.partner-dot { color: #475569; }

.footer-main {
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 2fr 1.3fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-emblem {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: white;
}

.footer-logo-title {
  font-size: 16px;
  font-weight: 900;
  color: white;
}

.footer-logo-subtitle {
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
}

.footer-text {
  font-size: 13px;
  line-height: 1.7;
  color: #94A3B8;
  margin-bottom: 18px;
}

.footer-meta-info {
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-links h4, .footer-contact h4 {
  font-size: 13px;
  font-weight: 800;
  color: white;
  margin-bottom: 18px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-left: 3px solid var(--sejong-blue);
  padding-left: 8px;
}

.footer-links ul li { margin-bottom: 10px; }

.footer-links ul li a {
  color: #94A3B8;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links ul li a:hover {
  color: white;
  transform: translateX(3px);
}

.f-dot { font-size: 10px; color: var(--sejong-blue); }

.footer-contact ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.footer-contact ul li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--sejong-blue);
}

.contact-hours {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  margin-top: 10px;
  font-size: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.footer-copy p { margin-bottom: 4px; }
.footer-legal { font-size: 11px; color: #64748B; font-family: 'Noto Sans KR', sans-serif; }

.footer-links-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links-inline a { color: #94A3B8; }
.footer-links-inline a:hover { color: white; }

/* =====================================================
   ADMIN & DASHBOARD (Clean Modern Layout)
   ===================================================== */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--primary-dark);
  color: white;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 24px 0;
}

/* "overflow-x: hidden" on html/body breaks position:sticky, which made the menu
   slide down and scroll away on long admin pages. "clip" hides the same overflow
   without turning them into scroll containers. */
html:has(.admin-layout),
body:has(.admin-layout) { overflow-x: clip; }

.sidebar-section {
  padding: 0 14px;
  margin-bottom: 8px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 8px 12px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.sidebar-link.active {
  background: var(--primary-light);
  color: white;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--taegeuk-red);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 100px;
}

.admin-content {
  flex: 1;
  padding: 32px 36px;
  background: var(--bg);
  overflow-x: hidden;
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* =====================================================
   STAT CARDS & METRICS
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue   { background: var(--primary-subtle); color: var(--primary); }
.stat-icon.gold   { background: #FEF3C7; color: #B45309; }
.stat-icon.green  { background: #D1FAE5; color: #047857; }
.stat-icon.orange { background: #FFEDD5; color: #C2410C; }

.stat-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* =====================================================
   CARDS & TABLES
   ===================================================== */
.card {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-sm); }

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
}

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.card-body { padding: 24px; }
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: #F8FAFD;
}

.table-responsive { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  padding: 12px 18px;
  background: #F8FAFD;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
  vertical-align: middle;
}

.table tbody tr:hover { background: #F8FAFD; }
.table tbody tr:last-child td { border-bottom: none; }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-info    { background: #E0F2FE; color: #075985; }
.badge-primary { background: var(--primary-subtle); color: var(--primary); }
.badge-gold    { background: #FEF9C3; color: #854D0E; }

/* Form Controls */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label .required { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 56, 118, 0.1);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid + .form-error { display: block; }

/* =====================================================
   STUDENT CABINET
   ===================================================== */
.cabinet-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: 32px 0;
}

.w-100 { width: 100% !important; }

.cabinet-sidebar {
  position: static;
  height: fit-content;
}

.profile-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.profile-avatar {
  width: 76px;
  height: 76px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0 auto 14px;
}

.profile-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.cabinet-nav { margin-top: 14px; }

.cabinet-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  margin-bottom: 2px;
}

.cabinet-nav-link:hover, .cabinet-nav-link.active {
  background: var(--primary-subtle);
  color: var(--primary);
}

.cabinet-nav-link.active {
  font-weight: 800;
  border-left: 3px solid var(--primary);
}

/* =====================================================
   SCHEDULE TABLE
   ===================================================== */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.schedule-table th {
  background: var(--primary);
  color: white;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.schedule-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  text-align: center;
  background: white;
}

.schedule-table .day-col {
  background: #F8FAFD;
  font-weight: 700;
  color: var(--primary);
  text-align: left;
}

.schedule-slot {
  background: var(--primary-subtle);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: inline-block;
}

/* =====================================================
   PAGE HERO (Inner Pages)
   ===================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 56px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: 15px;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto;
}

/* =====================================================
   TOAST & MODALS
   ===================================================== */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 600;
  min-width: 280px;
  max-width: 400px;
}

.toast-success { background: white; color: #166534; border-left: 4px solid var(--success); }
.toast-error   { background: white; color: #991B1B; border-left: 4px solid var(--danger); }
.toast-info    { background: white; color: #075985; border-left: 4px solid var(--info); }
.toast-warning { background: white; color: #92400E; border-left: 4px solid var(--warning); }

.toast button {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 16px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; animation: fadeIn 0.15s ease; }

.modal {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 17px; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* =====================================================
   COURSE DETAIL CARDS & FAQ (courses.html)
   ===================================================== */
.courses-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 50px;
}

.course-detail-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.course-detail-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.course-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 44px;
  height: auto;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: white;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.level-a1 { background: #0082CA; }
.level-a2 { background: #059669; }
.level-b1 { background: #7C3AED; }
.level-b2 { background: #D97706; }
.level-c1 { background: var(--primary); }

.course-detail-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.course-detail-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.course-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #F8FAFD;
  padding: 14px;
  border-radius: var(--radius-xs);
  margin-bottom: 20px;
  font-size: 13px;
  border: 1px solid var(--border);
}

.meta-item { display: flex; align-items: center; gap: 8px; color: var(--text-sub); }
.course-detail-body { margin-bottom: 24px; flex: 1; }
.course-detail-body h4 { font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }

.course-topics { list-style: none; }
.course-topics li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 8px;
}
.course-topics li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 800;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.comparison-table tr:hover td { background: #F8FAFD; }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-bottom: 10px;
  background: white;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.faq-question:hover { color: var(--primary); background: #FAFBFD; }
.faq-icon { font-size: 18px; color: var(--primary); font-weight: 800; transition: transform 0.2s; }
.faq-question.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 20px 18px; font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.faq-answer.open { display: block; animation: fadeInDown 0.15s ease; }

/* Filter Tabs & Search Bar */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-xs);
  margin-bottom: 20px;
  width: fit-content;
}
.filter-tab {
  padding: 6px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
}
.filter-tab.active { background: white; color: var(--primary); box-shadow: var(--shadow-xs); }

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 14px;
  max-width: 320px;
}
.search-bar input { border: none; outline: none; width: 100%; font-size: 14px; }

/* Empty state */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 1; transform: translateY(0); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =====================================================
   RESPONSIVE (Tablet & Mobile)
   ===================================================== */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mobile-nav-auth {
  display: none;
}

@media (max-width: 1100px) {
  .quick-service-grid { grid-template-columns: repeat(3, 1fr); }
  .roadmap-container { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 868px) {
  :root { --header-height: 64px; }

  /* Top Bar on Mobile: no awkward wrapping */
  .top-bar {
    padding: 6px 0;
  }
  .top-bar-inner {
    padding: 0 16px;
  }
  .top-bar-left .kr-badge {
    display: none;
  }
  .top-bar-title-full {
    display: none;
  }
  .top-bar-phone,
  .top-bar-divider {
    display: none;
  }
  .top-bar-title {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Header & Mobile Drawer */
  .main-nav, .header-auth { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: white;
    border-bottom: 3px solid var(--primary);
    padding: 12px 18px 24px;
    z-index: 999;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
    gap: 2px;
  }
  .main-nav.open .nav-link {
    display: flex;
    align-items: center;
    padding: 13px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 15.5px;
    font-weight: 600;
  }
  .mobile-nav-auth {
    display: block;
    margin-top: 14px;
    padding-top: 12px;
  }
  .hamburger { display: flex; }

  /* Hero Section on Mobile: 1-column stack */
  .hero-institutional {
    padding: 24px 0 36px !important;
  }
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .hero-agency-badge {
    font-size: 11px !important;
    padding: 5px 12px !important;
    margin-bottom: 14px !important;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }
  .hero-heading {
    font-size: 26px !important;
    line-height: 1.3 !important;
    margin-bottom: 14px !important;
  }
  .hero-description {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
  }
  .hero-btn-group {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 10px !important;
    margin-bottom: 22px !important;
  }
  .hero-btn-group .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
  }
  .hero-metrics {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 8px !important;
    padding: 14px 12px !important;
  }
  .hero-metrics .metric-sep {
    display: none !important;
  }
  .hero-metrics .metric-item {
    padding: 4px 6px !important;
    text-align: center;
    align-items: center;
  }
  .hero-widget-card {
    display: none !important;
  }

  /* Components & Layout */
  .quick-service-section { margin-top: 16px; }
  .quick-service-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Roadmap on Mobile */
  .roadmap-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .roadmap-step {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Dual section, Notice Board and Culture Grid */
  .dual-section-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .culture-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .culture-card {
    padding: 14px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .notice-item {
    padding: 12px 0 !important;
    gap: 10px !important;
    max-width: 100% !important;
  }
  .notice-info {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    min-width: 0 !important;
  }
  .notice-text {
    white-space: normal !important;
    line-height: 1.4 !important;
    font-size: 13.5px !important;
    word-break: break-word !important;
  }
  .notice-date {
    font-size: 11px !important;
    color: var(--text-light) !important;
  }

  .steps-process-grid { flex-direction: column; }
  .process-arrow { transform: rotate(90deg); margin: 8px 0; }

  /* SKA Featured Section on Mobile */
  .ska-featured-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Forms & Cards */
  .form-row-2col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Admin & Dashboard & Student Cabinet */
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .admin-content { padding: 16px; }
  .cabinet-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .cabinet-sidebar {
    position: static !important;
    width: 100% !important;
  }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .top-bar-link {
    display: none;
  }
  .top-bar-title {
    max-width: 180px;
  }
  .site-header .logo img {
    height: 31px !important;
  }

  /* Quick Services: Always 2 columns on phones */
  .quick-service-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .service-card {
    padding: 12px 8px !important;
  }
  .service-icon-wrap {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
    margin-bottom: 6px !important;
  }
  .service-title {
    font-size: 12.5px !important;
    line-height: 1.25 !important;
  }
  .service-kr {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }
  .service-sub {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
  }

  .section-title {
    font-size: 22px !important;
  }
  .section-desc {
    font-size: 13px !important;
  }
  .card {
    padding: 20px 16px !important;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-links-inline {
    justify-content: center;
  }
}

/* =====================================================
   SEJONG SCHEDULE TABLE (Always Table on Desktop & Mobile)
   ===================================================== */
.schedule-table-section {
  background: #F8FAFD;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 60px;
  position: relative;
}

.table-scroll-hint {
  display: none !important;
}

/* Mobile Interactive Swipe/Scroll Indicator (Official KSIF Style) */
.ksif-scroll-overlay {
  display: none;
}

@media (max-width: 860px) {
  .ksif-scroll-overlay {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .ksif-scroll-overlay.dismissed {
    opacity: 0;
    visibility: hidden;
  }

  .ksif-scroll-badge {
    background: rgba(33, 37, 41, 0.68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 12px 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
    cursor: pointer;
  }

  .ksif-scroll-title {
    color: #FFFFFF;
    font-weight: 800;
    font-size: 13.5px;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-transform: uppercase;
  }

  .ksif-scroll-svg {
    overflow: visible;
    display: block;
  }

  @keyframes ksifSwipeHand {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(7px); }
  }
  @keyframes ksifPulseArrow {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(4px); }
  }

  .ksif-scroll-svg .hand-group {
    animation: ksifSwipeHand 1.6s ease-in-out infinite;
  }
  .ksif-scroll-svg .arrow-group {
    animation: ksifPulseArrow 1.6s ease-in-out infinite;
  }
}

.topik-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =====================================================
   ROADMAP SECTION & CAROUSEL (Interactive Horizontal Slider)
   ===================================================== */
.section-roadmap {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 56px 0 60px;
  position: relative;
}

.roadmap-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.roadmap-header-text {
  max-width: 660px;
}

.carousel-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #CBD5E1;
  background: white;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.carousel-arrow-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 37, 69, 0.2);
}

.carousel-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.roadmap-carousel-viewport {
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 4px 18px;
  margin: 0 -4px;
}

.roadmap-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.roadmap-carousel-track {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.roadmap-step {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 300px;
  max-width: 360px;
  scroll-snap-align: start;
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(11, 37, 69, 0.05);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.roadmap-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(11, 37, 69, 0.1);
  border-color: var(--primary);
}

.roadmap-step.step-a1 { border-top-color: #0284C7; }
.roadmap-step.step-a2 { border-top-color: #0EA5E9; }
.roadmap-step.step-b1 { border-top-color: #0B2545; }
.roadmap-step.step-b2 { border-top-color: #1E3A8A; }
.roadmap-step.step-c1 { border-top-color: #C5A059; }

/* Book Pair Presentation in Roadmap Cards */
.book-pair-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  min-height: 145px;
}

.book-thumb-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.book-thumb-img {
  height: 118px;
  width: auto;
  max-width: 90px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-thumb-img:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 22px rgba(11, 37, 69, 0.2);
}

.book-code-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.carousel-dots-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 22px;
}

.carousel-dot {
  width: 22px;
  height: 7px;
  border-radius: 4px;
  background: #CBD5E1;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.carousel-dot.active {
  width: 38px;
  background: var(--primary);
}

@media (max-width: 992px) {
  .roadmap-step {
    flex: 0 0 calc(50% - 10px);
    min-width: 280px;
  }
}

@media (max-width: 640px) {
  .roadmap-step {
    flex: 0 0 86%;
    min-width: 260px;
    padding: 20px 16px;
  }
  .roadmap-header-wrap {
    margin-bottom: 16px;
  }
}

.topik-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.topik-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  background: white;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.topik-tab-btn:hover {
  background: #F1F5F9;
  color: var(--primary);
  border-color: #CBD5E1;
}

.topik-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(11, 60, 93, 0.25);
}

.topik-tab-btn .tab-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(0,0,0,0.08);
}

.topik-tab-btn.active .tab-count {
  background: rgba(255,255,255,0.25);
  color: white;
}

/* Table Container (Desktop) */
.topik-table-card {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(11, 60, 93, 0.05);
  overflow: hidden;
  margin-bottom: 24px;
}

.topik-desktop-view {
  width: 100%;
  overflow-x: auto;
}

.topik-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.topik-table thead th {
  background: #0B3C5D;
  color: #FFFFFF;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border-bottom: 2px solid #07263D;
}

.topik-table thead th .th-kr {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  color: #93C5FD;
  margin-top: 2px;
}

.topik-table tbody tr {
  border-bottom: 1px solid #EDF2F7;
  transition: background-color 0.15s ease;
}

.topik-table tbody tr:nth-child(even) {
  background-color: #FAFCFE;
}

.topik-table tbody tr:hover {
  background-color: #F0F7FF;
}

.topik-table tbody td {
  padding: 15px 16px;
  vertical-align: middle;
  color: #2D3748;
}

/* Status Badges */
.topik-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 30px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.topik-status-badge.status-open {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.topik-status-badge.status-open::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulse-dot 1.8s infinite;
}

.topik-status-badge.status-upcoming {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.topik-status-badge.status-upcoming::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3B82F6;
}

.topik-status-badge.status-planned {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.topik-status-badge.status-planned::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94A3B8;
}

.topik-status-badge.status-closed {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Event Type Pill */
.topik-type-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: #EFF6FF;
  color: #1E40AF;
  white-space: nowrap;
}

.topik-type-tag.ska {
  background: #FEF3C7;
  color: #92400E;
}

.topik-type-tag.intensive {
  background: #FDF2F8;
  color: #9D174D;
}

.topik-type-tag.culture {
  background: #F3E8FF;
  color: #6B21A8;
}

/* Mobile Cards View */
.topik-mobile-events {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.topik-event-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: relative;
  border-left: 4px solid var(--primary);
}

.topik-event-card.card-ska {
  border-left-color: #D97706;
}

.topik-event-card.card-intensive {
  border-left-color: #DB2777;
}

.topik-event-card.card-culture {
  border-left-color: #7C3AED;
}

.topik-event-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #E2E8F0;
}

.topik-event-card .card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
}

.topik-event-card .card-kr-sub {
  font-size: 11px;
  font-weight: 500;
  color: #64748B;
  margin-top: 2px;
}

.topik-event-card .card-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.topik-event-card .card-info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.topik-event-card .info-label {
  color: #64748B;
  font-weight: 600;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.topik-event-card .info-val {
  color: #1E293B;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

@media (max-width: 860px) {
  .topik-table thead th,
  .topik-table tbody td {
    padding: 12px 14px;
  }
  .topik-table-card {
    border-radius: 10px;
  }
}



/* Hamburger Open Animation */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(10, 25, 47, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-menu-backdrop.open {
  display: block;
  opacity: 1;
}

/* Mobile Drawer Header */
.mobile-drawer-header {
  display: none;
}
@media (max-width: 900px) {
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 12px;
    margin-bottom: 8px;
    border-bottom: 1.5px solid var(--border);
  }
  .mobile-drawer-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
  }
  .mobile-drawer-close {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
  }
  .mobile-drawer-close:active, .mobile-drawer-close:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
  }
}

/* News Detail Responsive Styles */
.news-detail-section {
  padding: 40px 0 60px;
  background: var(--bg);
}
.news-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  align-items: stretch;
}
.news-detail-article {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  overflow: hidden;
}
.news-detail-img-wrap {
  margin: -32px -32px 24px -32px;
  max-height: 420px;
  overflow: hidden;
  background: #001833;
}
.news-detail-img-wrap img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}
.news-detail-lead {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.7;
  padding: 16px 20px;
  background: rgba(0, 56, 118, 0.04);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  margin-bottom: 24px;
}
.article-body {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
}
.article-body img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  display: block;
}
.article-body table {
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
  display: block;
  border-collapse: collapse;
}
.article-body iframe {
  max-width: 100% !important;
}

@media (max-width: 900px) {
  .news-detail-section {
    padding: 24px 0 40px;
  }
  .news-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .news-detail-article {
    padding: 18px 14px;
    border-radius: var(--radius-sm);
  }
  .news-detail-img-wrap {
    margin: -18px -14px 18px -14px;
    max-height: 240px;
  }
  .news-detail-lead {
    font-size: 14px;
    padding: 12px 14px;
    line-height: 1.6;
    margin-bottom: 18px;
  }
  .article-body {
    font-size: 14.5px;
    line-height: 1.75;
  }
}


/* =====================================================
   EVENTS PHOTO GALLERY
   ===================================================== */
/* =====================================================
   LANGUAGE PILL SWITCHER (UZ / KR - Always beside hamburger)
   ===================================================== */
.lang-pill-switch {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
  min-width: 34px;
  text-align: center;
}

/* Kompyuter (desktop) versiyasida bayroqlarni yashirish: faqat UZ va KR yozuvi qoladi */
.lang-pill-btn .flag {
  display: none;
}

.lang-pill-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
}

.lang-pill-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 56, 118, 0.25);
}

/* =====================================================
   EVENTS PHOTO GALLERY (BIZNING TADBIRLAR)
   With 3D Uzbek & Korean Cultural Cityscape & Smart Talking Walkers
   ===================================================== */
#gallery {
  position: relative;
  background-color: #FAF7F2 !important;
  background-image: none;
  overflow: hidden;
  border-top: 1px solid #EAE3D5;
  border-bottom: 1px solid #EAE3D5;
  padding-top: 60px;
  padding-bottom:  0 !important;
  margin-bottom: 0 !important;
  border-bottom: none !important;
}

.cultural-cityscape-2d-wrapper {
  position: relative;
  width: 100%;
  height:  245px;
  margin-top:  40px;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  z-index: 1;
}
.cultural-cityscape-2d-wrapper::-webkit-scrollbar {
  display: none;
}

.cultural-cityscape-inner {
  position: relative;
  width: 100%;
  min-width: 1200px;
  height: 100%;
}

.flat-cityscape-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Walkers Track - aligned with ground line */
.walkers-stage {
  position: absolute;
  bottom:  35px;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 5;
  pointer-events: none;
}

.flat-walker {
  position: absolute;
  bottom: 0;
  width: 44px;
  height: 64px;
  pointer-events: auto;
  cursor: pointer;
  will-change: left, transform;
}
.flat-walker:hover .character-sprite {
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.18));
}

.character-sprite {
  width: 44px;
  height: 64px;
  transition: transform 0.2s ease;
}
.character-sprite svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Speech Bubbles attached above walker */
.speech-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.75);
  background: #FFFFFF;
  border: 2px solid #003876;
  border-radius: 14px;
  padding: 6px 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #003876;
  box-shadow: 0 4px 16px rgba(0, 56, 118, 0.16);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 5px 0;
  border-style: solid;
  border-color: #003876 transparent transparent;
  display: block;
  width: 0;
}
.speech-bubble.active {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.speech-bubble.korean {
  border-color: #C60C30;
  color: #9E0724;
}
.speech-bubble.korean::after {
  border-color: #C60C30 transparent transparent;
}

.walker-nametag {
  position: absolute;
  bottom:  -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  color: #475569;
  background: rgba(255, 255, 255, 0.92);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #CBD5E1;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 868px) {
  #gallery {
    padding-top: 36px !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: none !important;
  }
  .cultural-cityscape-2d-wrapper {
    height: 225px;
    margin-top: 24px;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .walkers-stage {
    bottom: 32px;
    height: 56px;
  }
  .flat-walker,
  .character-sprite {
    width: 38px;
    height: 54px;
  }
  .speech-bubble {
    font-size: 10px;
    padding: 4px 8px;
  }
}

#gallery .container {
  position: relative;
  z-index: 1;
}

.events-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(0, 56, 118, 0.14);
  border-color: rgba(0, 56, 118, 0.3);
}

.gallery-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #001833;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.gallery-item:hover .gallery-thumb img {
  transform: scale(1.07);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 36, 82, 0.85) 0%, rgba(0, 36, 82, 0.2) 60%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: scale(0.8);
  transition: transform 0.25s ease;
}

.gallery-item:hover .gallery-zoom-icon {
  transform: scale(1);
}

.gallery-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 36, 82, 0.85);
  color: var(--gold);
  border: 1px solid rgba(200, 155, 60, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.gallery-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.gallery-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
  margin: 0;
  transition: color 0.2s ease;
}

.gallery-item:hover .gallery-title {
  color: var(--primary-light);
}

.gallery-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Lightbox Modal */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 38, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-lightbox.open {
  display: flex;
  opacity: 1;
}

.lightbox-dialog {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: lightboxPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.lightbox-media {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media img {
  width: 100%;
  max-height: 65vh;
  object-fit: cover;
  display: block;
}

.lightbox-caption {
  padding: 20px 24px 24px;
}

.lightbox-tag {
  display: inline-block;
  background: #EFF6FF;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.lightbox-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.lightbox-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease, transform 0.2s ease;
  line-height: 1;
  padding: 0;
}

.lightbox-close:hover {
  background: #dc2626;
  transform: rotate(90deg);
}

/* =====================================================
   MOBILE RESPONSIVENESS: GALLERY (FITS SMALL SCREENS)
   ===================================================== */
@media (max-width: 868px) {
  .header-inner {
    gap: 10px !important;
  }
  .lang-pill-switch {
    display: inline-flex !important;
    margin-left: auto !important;
    padding: 2px !important;
  }
  .lang-pill-btn {
    padding: 5px 8px !important;
    font-size: 11.5px !important;
    gap: 3px !important;
  }
  /* Mobil versiyada bayroqchalar ko'rinadi */
  .lang-pill-btn .flag {
    display: inline !important;
    font-size: 12px !important;
  }
  .hamburger {
    display: flex !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
  }
  
  /* Gallery fits small screen: 2 compact columns */
  #gallery {
    padding: 32px 0 0 !important;
  }
  #gallery .section-head {
    margin-bottom: 20px !important;
  }
  #gallery .section-title {
    font-size: 22px !important;
    margin-bottom: 6px !important;
  }
  #gallery .section-desc {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
  .events-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .gallery-item {
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  }
  .gallery-thumb {
    aspect-ratio: 16 / 10 !important;
  }
  .gallery-tag {
    top: 6px !important;
    left: 6px !important;
    font-size: 9px !important;
    padding: 2px 6px !important;
  }
  .gallery-zoom-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
  }
  .gallery-info {
    padding: 10px 10px 12px !important;
    gap: 3px !important;
  }
  .gallery-title {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }
  .gallery-meta {
    font-size: 10.5px !important;
  }
  
  .lightbox-dialog {
    max-width: 92vw !important;
  }
  .lightbox-media img {
    max-height: 50vh !important;
  }
  .lightbox-caption {
    padding: 16px !important;
  }
  .lightbox-title {
    font-size: 17px !important;
  }
  .lightbox-desc {
    font-size: 12.5px !important;
  }
}

@media (max-width: 440px) {
  .logo img {
    height: 28px !important;
  }
  .lang-pill-btn {
    padding: 4px 6px !important;
    font-size: 11px !important;
  }
  .events-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .gallery-info {
    padding: 8px 8px 10px !important;
  }
  .gallery-title {
    font-size: 11.5px !important;
  }
  .gallery-meta {
    font-size: 9.5px !important;
  }
}

/* =====================================================
   INSTITUTIONAL FOOTER: POLISHED PADDING & MARGINS
   ===================================================== */
.site-footer {
  background: #071222;
  color: #94A3B8;
  font-size: 13px;
  border-top: none !important;
  margin-top: 0 !important;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
}

.footer-partners {
  background: #040A14;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-partners-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.partners-title {
  font-weight: 800;
  color: #E2E8F0;
  letter-spacing: 0.3px;
}

.partners-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.partner-item {
  color: #94A3B8;
  font-weight: 500;
}

.partner-dot {
  color: #475569;
}

.footer-main {
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.6fr 1.25fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 32px;
}

/* Col 1: Brand */
.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand .footer-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.footer-text {
  font-size: 13px;
  line-height: 1.65;
  color: #94A3B8;
  margin-bottom: 16px;
}

.footer-meta-info {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #CBD5E1;
}

/* Col 2: Map Column */
.footer-map-col {
  display: flex;
  flex-direction: column;
}

.footer-map-col h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.footer-map-card {
  background: #0B192C;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.footer-map-card iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: none;
}

/* Col 3: Contact Column */
.footer-contact {
  display: flex;
  flex-direction: column;
}

.footer-contact h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #CBD5E1;
}

.footer-contact-list svg {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-link {
  color: #FFFFFF;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-contact-link:hover {
  color: #60A5FA;
  text-decoration: underline;
}

.footer-instagram-link,
.footer-telegram-link {
  color: #CBD5E1;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.footer-instagram-link:hover,
.footer-telegram-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Bottom Bar */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 22px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: #64748B;
}

.footer-copy p {
  margin-bottom: 4px;
}

.footer-legal {
  color: #475569;
  font-size: 11px;
}

.footer-links-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.footer-links-inline a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links-inline a:hover {
  color: #FFFFFF;
}

/* =====================================================
   MOBILE RESPONSIVENESS: FOOTER SPACING & PADDING
   ===================================================== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .site-footer {
    margin-top: 0 !important;
    border-top: none !important;
  }
  .site-footer .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
  }
  .footer-partners {
    padding: 14px 0 16px !important;
  }
  .footer-partners-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .footer-main {
    padding: 32px 0 24px !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 24px !important;
  }
  .footer-brand .footer-logo {
    margin-top: 0 !important;
    margin-bottom: 14px !important;
  }
  .footer-map-card {
    border-radius: 12px !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .footer-map-card iframe {
    height: 220px !important;
    border-radius: 12px !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 14px !important;
    padding-top: 20px !important;
  }
  .footer-links-inline {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .site-footer .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
  }
  .footer-brand .footer-logo img {
    height: 36px !important;
  }
  .footer-text {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }
  .footer-map-col h4,
  .footer-contact h4 {
    font-size: 13px !important;
    margin-bottom: 12px !important;
  }
  .footer-map-card iframe {
    height: 210px !important;
  }
}

/* =====================================================
   LEVEL TEST — homepage CTA (/level-test)
   ===================================================== */
.lt-home-cta{margin-top:28px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;background:linear-gradient(135deg,var(--primary-subtle),#fff);border:1px solid var(--border);border-left:4px solid var(--gold);border-radius:var(--radius);padding:20px 24px}
.lt-home-cta b{display:block;font-size:17px;color:var(--text)}
.lt-home-cta span{font-size:14px;color:var(--text-muted)}


/* Searchable select (student pickers in the admin panel) */
.search-select-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}
.search-select-list[hidden] { display: none; }
.search-select-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}
.search-select-item:hover, .search-select-item.active { background: #EEF4FC; }
.search-select-note { padding: 9px 12px; font-size: 13px; color: var(--text-muted); }
