/* ═══════════════════════════════════════
   LoftAcademy — 공통 스타일
   밝고 깔끔한 학습 UI, 교실 분위기
═══════════════════════════════════════ */

:root {
  /* 메인 팔레트 */
  --navy:       #1B3A6B;
  --navy-light: #2563EB;
  --sky:        #EFF6FF;
  --sky-mid:    #DBEAFE;
  --chalk:      #F8FAFF;   /* 칠판 뒤 화이트 */
  --warm:       #FFFBF0;   /* 교실 따뜻함 */

  /* 강사별 컬러 (확장용) */
  --instructor-thomas: #1B3A6B;
  --instructor-02:     #065F46;
  --instructor-03:     #7C3AED;

  /* 텍스트 */
  --text-primary:   #111827;
  --text-secondary: #4B5563;
  --text-muted:     #9CA3AF;
  --text-link:      #2563EB;

  /* 테두리/배경 */
  --border:     #E5E7EB;
  --border-mid: #D1D5DB;
  --bg-section: #F3F4F6;
  --white:      #FFFFFF;

  /* 상태 */
  --success: #059669;
  --warn:    #D97706;
  --badge-new: #DC2626;

  /* 타이포 */
  --font: 'Pretendard', 'Noto Sans KR', 'Segoe UI', -apple-system, sans-serif, 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI Emoji';
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* 기타 */
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--chalk);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }

/* ── 네비바 ── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: #1B3A6B;
  border-bottom: 2px solid #2563EB;
  min-height: 60px;
  display: flex; align-items: center; flex-wrap: nowrap;
  padding: 0 5%;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(27,58,107,.3);
  width: 100%;
  box-sizing: border-box;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 900;
  color: #ffffff; flex-shrink: 0; text-decoration: none;
}
.nav-logo-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: .9rem; font-weight: 900;
}
.nav-logo-sub { font-size: .7rem; color: rgba(255,255,255,0.6); font-weight: 500; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  padding: 6px 14px; border-radius: 8px;
  font-size: .88rem; font-weight: 600;
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.15); color: #ffffff;
}
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800;
}

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 20px;
  border-radius: var(--radius); font-size: .9rem; font-weight: 700;
  transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary {
  background: var(--navy); color: white;
}
.btn-primary:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-outline {
  background: white; color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--sky); }
.btn-sky {
  background: var(--sky-mid); color: var(--navy-light);
}
.btn-sky:hover { background: #BFDBFE; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* ── 배지 ── */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
}
.badge-navy { background: var(--sky-mid); color: var(--navy); }
.badge-new  { background: #FEE2E2; color: var(--badge-new); }
.badge-free { background: #D1FAE5; color: #065F46; }
.badge-pro  { background: #FEF3C7; color: #92400E; }

/* ── 카드 ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── 섹션 공통 ── */
.section { padding: 64px 5%; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.sec-label {
  font-size: .75rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--navy-light);
  margin-bottom: 8px;
}
.sec-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 900; color: var(--text-primary);
  line-height: 1.25; margin-bottom: 12px;
}
.sec-desc {
  font-size: .98rem; color: var(--text-secondary);
  line-height: 1.8; max-width: 600px;
}

/* ── 강좌 카드 그리드 ── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 32px;
}
.course-card { cursor: pointer; }
.course-card-thumb {
  width: 100%; height: 160px;
  background: var(--sky-mid);
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.course-card-thumb-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.course-card-body { padding: 18px 20px; }
.course-card-instructor {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.instructor-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--navy-light);
}
.course-card-title {
  font-size: 1rem; font-weight: 800;
  color: var(--text-primary); margin-bottom: 6px; line-height: 1.35;
}
.course-card-desc {
  font-size: .82rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 12px;
}
.course-card-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: .75rem; color: var(--text-muted); font-weight: 600;
}
.course-card-meta span { display: flex; align-items: center; gap: 3px; }

/* ── 강사 카드 ── */
.instructor-card {
  display: flex; align-items: center; gap: 20px;
  padding: 24px; cursor: pointer;
}
.instructor-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--navy); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 900; flex-shrink: 0;
  border: 3px solid var(--sky-mid);
}
.instructor-name { font-size: 1.05rem; font-weight: 800; margin-bottom: 3px; }
.instructor-title { font-size: .82rem; color: var(--text-secondary); margin-bottom: 8px; }
.instructor-stats { display: flex; gap: 16px; }
.instructor-stat { font-size: .75rem; color: var(--text-muted); }
.instructor-stat strong { color: var(--navy); font-weight: 800; }

/* ── 프로그레스 바 ── */
.progress-bar {
  height: 6px; background: var(--border);
  border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--navy-light);
  border-radius: 999px; transition: width .5s ease;
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-hamburger { display: flex !important; }
  .section { padding: 40px 5%; }
  .course-grid { grid-template-columns: 1fr; }
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 12px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  margin-left: auto;
  flex-shrink: 0;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
}
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0; right: 0;
  background: rgba(10,30,70,0.98);
  z-index: 200;
  flex-direction: column;
  padding: 8px 0;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  font-weight: 500;
}
.nav-mobile-menu a:last-child { border-bottom: none; }

/* ══════════════════════════════════════
   모바일 최적화 (390px 기준 iPhone)
   ══════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── 네비 ── */
  .nav { padding: 0 16px; min-height: 56px; gap: 8px; }
  .nav-logo { font-size: 1rem; }
  .nav-logo-icon { width: 30px; height: 30px; font-size: .78rem; }
  .nav-logo-sub { display: none; }

  /* ── 섹션 ── */
  .section { padding: 32px 16px; }
  .sec-title { font-size: 1.45rem; }
  .sec-desc { font-size: .92rem; }

  /* ── 강좌 카드 ── */
  .course-grid { gap: 14px; margin-top: 20px; }
  .course-card-thumb { height: 140px; }
  .course-card-body { padding: 14px 16px; }
  .course-card-title { font-size: .95rem; }

  /* ── 강사 카드 ── */
  .instructors-row { grid-template-columns: 1fr; gap: 12px; }
  .instructor-card { padding: 18px 16px; gap: 14px; }
  .instructor-avatar { width: 60px; height: 60px; font-size: 1.3rem; }
  .instructor-name { font-size: .98rem; }

  /* ── CTA 배너 ── */
  .cta-banner { padding: 28px 20px; flex-direction: column; align-items: flex-start; }
  .cta-banner h3 { font-size: 1.15rem; }
  .cta-banner p { font-size: .85rem; }

  /* ── 버튼 ── */
  .btn-lg { padding: 12px 22px; font-size: .95rem; }
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; margin-top: 20px !important; }
  .about-grid .card { padding: 18px 14px !important; }
}
@media (max-width: 380px) {
  .about-grid { grid-template-columns: 1fr !important; }
}
