:root {
  /* Color Palette - Premium Navy/True Blue Theme */
  --primary: #1e3a8a; /* Deep Navy Blue */
  --primary-hover: #1e40af;
  --secondary: #0ea5e9; /* Sky Blue accent */
  --accent: #f59e0b; /* Amber/Gold */
  
  /* Neutral Colors */
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  
  /* Fonts */
  --font-body: 'Nanum Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'NanumSquare', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Structural Tokens */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --header-height: 80px;
  
  /* Effects */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0F172A; /* Slate dark */
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --border-color: #334155;
    --card-bg: #1E293B;
    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Reset Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* Layout Container & Sections */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding { padding: 6rem 0; }
.section-dark { 
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 40%, #b91c1c 100%);
  color: white; 
  padding: 6rem 0; 
}
.section-gray {
  background-color: var(--card-bg); /* 다크모드 대응을 위해 card-bg 사용 */
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

/* Utilities */
.text-gradient {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-dark .text-gradient {
  background: linear-gradient(
    to right,
    #BF953F 0%,
    #FCF6BA 25%,
    #B38728 50%,
    #FBF5B7 75%,
    #AA771C 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
}

.text-muted { color: var(--text-muted); }
.section-dark .text-muted { color: rgba(255, 255, 255, 0.7); }

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.section-dark .glass-panel {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 50px;
  margin-bottom: 1.5rem;
}
.hero .badge {
  color: var(--primary);
  background: rgba(30, 58, 138, 0.08);
  border: 2px solid rgba(30, 58, 138, 0.3);
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  padding: 6px 18px;
}
.section-dark .badge {
  color: #FCF6BA;
  background: linear-gradient(135deg, rgba(191,149,63,0.15) 0%, rgba(252,246,186,0.2) 50%, rgba(170,119,28,0.15) 100%);
  border: 1px solid rgba(252, 246, 186, 0.6);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: #172554;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.35);
}

.btn-primary.accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-outline-dark {
  background: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-weight: 600;
  transition: all var(--transition-normal);
}
.btn-outline-dark:hover {
  background: var(--primary);
  color: white;
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

/* Header & GNB */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: all var(--transition-normal);
  background: transparent;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--glass-border);
  box-shadow: var(--shadow-sm);
  height: 70px;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.logo { display: flex; align-items: center; }
.header-logo-img { height: 40px; width: auto; object-fit: contain; }

.nav-links { display: flex; gap: 2.5rem; }
.nav-links li a { font-weight: 700; position: relative; padding: 0.5rem 0; }
.nav-links li a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px;
  background: var(--primary); transition: width var(--transition-fast);
}
.nav-links li a:hover::after { width: 100%; }

.mobile-menu-btn {
  display: none; flex-direction: column; justify-content: space-between;
  width: 24px; height: 18px; z-index: 110;
}
.mobile-menu-btn span {
  display: block; width: 100%; height: 2px;
  background-color: var(--text-main); transition: all 0.3s;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
}
.hero-slides .slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 8s linear;
  transform: scale(1.05); /* Slight zoom effect start */
}
.hero-slides .slide.active {
  opacity: 1;
  transform: scale(1); /* Smooth zoom out */
}

.hero-bg-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0.5) 100%);
  z-index: 1;
}
.hero-title { font-size: 4.5rem; line-height: 1.2; margin-bottom: 1.5rem; color: var(--primary); font-weight: 900; letter-spacing: -0.05em; }
.hero-subtitle { font-size: 1.4rem; color: #1e293b; font-weight: 700; margin-bottom: 2.5rem; max-width: 600px; line-height: 1.6; }
.hero-desc { font-size: 1.05rem; color: #64748b; margin-bottom: 2.5rem; max-width: 600px; line-height: 1.65; }
.hero-actions { display: flex; gap: 1rem; }

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.stat-card {
  padding: 3rem 2rem;
  text-align: center;
  transition: transform var(--transition-normal);
}
.stat-card:hover { transform: translateY(-10px); }
.stat-number {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.stat-unit { font-size: 1.5rem; font-weight: 700; opacity: 0.8; }
.stat-label { font-size: 1.1rem; font-weight: 500; opacity: 0.9; }

/* Program Section */
.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
.program-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}
.program-card:hover { box-shadow: var(--shadow-lg); }
.program-img-placeholder {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  background: var(--card-bg);
  color: var(--text-main);
  position: relative;
}

/* 각 카드별 상단 포인트 컬러 라인 적용 (HTML에 클래스 추가 필요) */
.elementary-card { border-top: 4px solid #16A34A; }
.middle-card { border-top: 4px solid #0284C7; }
.high-card { border-top: 4px solid #B91C1C; }

/* 공통 배지 스타일 (배경색/텍스트색은 HTML 인라인 또는 별도 클래스로 제어) */

.program-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
/* 부서별 배지 색상 */
.badge-elementary { background: rgba(22, 163, 74, 0.1); color: #15803D; }
.badge-middle { background: rgba(2, 132, 199, 0.1); color: #0369A1; }
.badge-high { background: rgba(185, 28, 28, 0.1); color: #991B1B; }

.program-img-placeholder h3 { 
  font-size: 1.3rem; 
  letter-spacing: -0.03em; 
  margin: 0;
  line-height: 1.3;
  color: var(--text-main);
  word-break: keep-all;
  text-align: left;
}
.program-content { padding: 0.75rem 1.5rem 1.75rem 1.5rem; }
.check-list { margin-bottom: 0.5rem; }
.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: keep-all;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Teachers Section */
.teachers-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.teacher-card {
  padding: 2.5rem;
  text-align: center;
  transition: transform var(--transition-normal);
}
.teacher-card:hover { transform: translateY(-10px); }
.teacher-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--border-color);
  font-weight: 900; color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.teacher-name { font-size: 1.4rem; margin-bottom: 0.3rem; }
.teacher-subject {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Contact Form Section */
.contact-section { background-color: var(--bg-color); }
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}
.info-item { display: flex; align-items: flex-start; gap: 1rem; }
.info-icon { font-size: 1.5rem; }
.contact-form-wrapper { padding: 3rem; }
.form-group { margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--card-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.checkbox-group-full {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background-color: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .checkbox-group-full {
    grid-template-columns: repeat(2, 1fr);
  }
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Footer Section */
.footer {
  background-color: var(--card-bg); border-top: 1px solid var(--border-color); padding-top: 4rem; margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 3rem; margin-bottom: 4rem; }

.footer-logo-img { max-width: 180px; height: auto; object-fit: contain; }

.footer-links ul { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links a:hover { color: var(--primary); }
.contact-info address { font-style: normal; display: flex; flex-direction: column; gap: 0.8rem; }
.map-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-outline-small {
  font-size: 0.85rem; padding: 4px 10px; border-radius: 4px;
  border: 1px solid var(--border-color); color: var(--text-muted); transition: all 0.2s;
}
.btn-outline-small:hover { border-color: var(--primary); color: var(--primary); background-color: rgba(59, 130, 246, 0.05); }

.bottom-bar { border-top: 1px solid var(--border-color); padding: 1.5rem 0; }
.bottom-inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.85rem; }
.legal-links { display: flex; gap: 1.5rem; }

/* Floating Contact Button */
.floating-contact { position: fixed; bottom: 30px; right: 30px; z-index: 90; }
.floating-btn {
  display: flex; align-items: center; justify-content: center; width: 60px; height: 60px;
  background: var(--primary); color: white; border-radius: 50%; box-shadow: var(--shadow-lg); transition: transform var(--transition-normal);
}
.floating-btn:hover { transform: scale(1.1) translateY(-5px); background: var(--primary-dark); }
.floating-btn svg { width: 28px; height: 28px; }

/* Animations */
@keyframes fadeInSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { opacity: 0; animation: fadeInSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Responsive */
@media (max-width: 992px) {
  .hero-title { font-size: 2.8rem; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .stat-card { padding: 2rem 1rem; }
  .contact-container { grid-template-columns: 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .nav, .actions { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-title { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .program-grid { grid-template-columns: 1fr; }
  .teachers-carousel { grid-template-columns: 1fr; }
  .contact-form-wrapper { padding: 2rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .bottom-inner { flex-direction: column; gap: 1rem; text-align: center; }
}

/* Phone Number Highlights */
.phone-highlight {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}
.phone-highlight-footer {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.05em;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}
.social-links a:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-3px);
}

/* ======= Mobile Drawer ======= */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: #fff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  padding: 4px;
  line-height: 1;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.mobile-nav-link {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.mobile-nav-link:hover {
  background: rgba(30, 58, 138, 0.06);
  color: var(--primary);
}

.mobile-drawer-cta {
  padding: 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-phone-box {
  text-align: center;
  padding-top: 0.5rem;
}
.mobile-phone-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.mobile-phone-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-decoration: none;
  line-height: 1.6;
}
.mobile-phone-num:hover {
  text-decoration: underline;
}

/* Mobile Phone Card */
.mobile-phone-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.25rem;
}
.mobile-phone-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.mobile-phone-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30,58,138,0.07), rgba(59,130,246,0.09));
  border: 1px solid rgba(30,58,138,0.12);
  text-decoration: none;
  transition: all 0.2s ease;
}
.mobile-phone-card:hover {
  background: linear-gradient(135deg, rgba(30,58,138,0.14), rgba(59,130,246,0.16));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,58,138,0.12);
}
.mobile-phone-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.mobile-phone-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.04em;
}

/* Hero 버튼 2개 높이 통일 */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-buttons .btn-primary,
.hero-buttons .btn-outline-dark {
  height: 56px;
  padding: 0 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  white-space: nowrap;
}
