/* ================================================
   main_body.css — LMS 공통 본문 / 컴포넌트 스타일
   /lms/main_b.php <style> 블록에서 분리
   ================================================ */

/* ══ 본문용 라이트 테마 색상 변수 ══ */
:root {
  --primary:   #f8fafc;
  --secondary: #ffffff;
  --accent:    #2563eb;
  --accent2:   #059669;
  --text:      #1e293b;
  --text-muted:#64748b;
  --card-bg:   #ffffff;
  --border:    rgba(0,0,0,0.08);
}

/* ══ 헤더/푸터/플로팅메뉴용 다크 테마 원본 색상 변수 ══ */
:root {
  --nav-bg:          rgba(10,22,40,0.95);
  --nav-bg-scrolled: rgba(10,22,40,0.98);
  --dark-bg:         #0a1628;
  --dark-accent:     #00c8ff;
  --dark-accent2:    #00ff9d;
  --dark-text-muted: #8a9bb5;
  --dark-border:     rgba(0,200,255,0.15);
}

/* ══ 전역 리셋 ══ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--primary);
  color: var(--text);
  overflow-x: hidden;
}

/* ══ 스크롤바 ══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb { background: var(--dark-accent); border-radius: 3px; }

/* ══ NAV ══ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 40px; height: 90px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--nav-bg); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dark-border); transition: all 0.3s;
}
nav.scrolled {
  height: 80px;
  background: var(--nav-bg-scrolled);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border-color: transparent;
}

/* ══ 로고 ══ */
.nav-logo, .footer-logo {
  display: inline-flex; align-items: baseline;
  font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem;
  letter-spacing: 1px; color: var(--dark-accent);
  text-decoration: none; text-transform: lowercase;
  transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1); position: relative;
}
.footer-logo { font-size: 1.6rem; }
.en-edu { color: var(--dark-accent2); margin-left: 2px; transition: text-shadow 0.3s ease; }
.ko-text {
  font-family: 'Noto Sans KR', sans-serif; font-size: 1.15rem;
  font-weight: 700; letter-spacing: -0.5px; margin-left: 10px;
  background: linear-gradient(135deg, #ffffff 0%, var(--dark-text-muted) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.85; transition: all 0.3s ease; text-transform: none;
}
.footer-logo .ko-text { font-size: 0.85rem; }

.nav-logo:hover, .footer-logo:hover {
  transform: translateY(-2px);
  text-shadow: 0 4px 20px rgba(0,200,255,0.4);
}
.nav-logo:hover .en-edu, .footer-logo:hover .en-edu { text-shadow: 0 4px 20px rgba(0,255,157,0.4); }
.nav-logo:hover .ko-text, .footer-logo:hover .ko-text {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
  transform: scale(1.05) translateX(2px);
}

/* ══ GNB 링크 ══ */
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links > li { position: relative; padding: 30px 0; }
.nav-links a {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.5px;
  color: var(--dark-text-muted); text-decoration: none;
  transition: color 0.2s; padding: 4px 8px;
}
.nav-links a:hover, .nav-links a.active { color: var(--dark-accent); }

/* 서브메뉴 */
.sub-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--nav-bg-scrolled); min-width: 150px; text-align: center;
  list-style: none; padding: 10px 0; border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3); border: 1px solid var(--dark-border);
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.nav-links > li:hover .sub-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}
.sub-menu li { padding: 0; }
.sub-menu a {
  display: block; padding: 12px 20px; font-size: 0.95rem; font-weight: 500;
  color: var(--dark-text-muted); transition: all 0.2s;
}
.sub-menu a:hover { color: var(--dark-accent); background: rgba(0,200,255,0.05); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--dark-accent); display: block; transition: 0.3s; }

.user-menu { display: flex; gap: 12px; align-items: center; }
.btn-login {
  padding: 8px 18px; border: 1px solid var(--dark-accent); background: transparent;
  color: var(--dark-accent); border-radius: 24px; font-size: 0.9rem;
  font-weight: 600; text-decoration: none; transition: 0.3s;
}
.btn-login:hover { background: rgba(0,200,255,0.1); }

/* ══ HERO ══ */
#hero {
  min-height: 80vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding: 140px 40px 80px;
}
.hero-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-slider .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 6s linear;
  transform: scale(1);
}
.hero-slider .slide.active { opacity: 1; transform: scale(1.05); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(248,250,252,0.95) 0%, rgba(248,250,252,0.8) 50%, rgba(248,250,252,0.3) 100%);
  z-index: 0;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(37,99,235,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(37,99,235,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite; z-index: 1;
}
@keyframes gridMove { to { background-position: 60px 60px; } }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 1; }
.orb1 { width: 500px; height: 500px; background: rgba(37,99,235,0.1); top: -100px; right: -100px; }
.orb2 { width: 400px; height: 400px; background: rgba(5,150,105,0.08); bottom: -100px; left: -50px; }

.hero-content { position: relative; z-index: 2; max-width: 1000px; width: 100%; margin: 0 auto; }
.greeting-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 20px; border: 1px solid rgba(37,99,235,0.2);
  background: var(--secondary); font-size: 0.85rem; font-weight: 600;
  color: var(--accent); margin-bottom: 24px; animation: fadeInUp 0.6s ease both;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.hero-title {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; line-height: 1.3; margin-bottom: 20px; color: var(--text);
  animation: fadeInUp 0.7s 0.1s ease both;
}
.hero-title .hl { color: var(--accent); }
.hero-subtitle {
  font-size: 1.05rem; line-height: 1.6; color: var(--text-muted);
  max-width: 620px; margin-bottom: 40px; animation: fadeInUp 0.7s 0.2s ease both;
}

/* ══ 통계 박스 ══ */
.dashboard-stats { display: flex; gap: 24px; margin-bottom: 40px; animation: fadeInUp 0.7s 0.3s ease both; }
.stat-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px; min-width: 160px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.stat-box .label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 8px; }
.stat-box .num { font-family: 'Rajdhani', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-box .num span { font-size: 1.1rem; color: var(--text-muted); margin-left: 4px; font-family: 'Noto Sans KR', sans-serif; }

/* ══ CTA 버튼 ══ */
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; animation: fadeInUp 0.7s 0.4s ease both; }
.btn-primary {
  padding: 14px 32px; border-radius: 6px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.95rem; text-decoration: none;
  transition: all 0.2s; box-shadow: 0 4px 14px rgba(37,99,235,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.4); }
.btn-secondary {
  padding: 14px 32px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--secondary); color: var(--text); font-weight: 600;
  font-size: 0.95rem; text-decoration: none; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ══ 섹션 공통 ══ */
section { padding: 80px 40px; max-width: 1280px; margin: 0 auto; }
.section-header { margin-bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; }
.section-title { font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.section-title .hl { color: var(--accent); }
.section-more { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.section-more:hover { color: var(--accent); }

/* ══ 탭 ══ */
.tabs { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 2px solid var(--border); padding-bottom: 0; }
.tab-btn {
  padding: 12px 20px; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; font-size: 1rem; font-weight: 600;
  color: var(--text-muted); transition: all 0.3s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ══ 게시판 (공지/QnA) ══ */
#board-section { padding-top: 60px; padding-bottom: 20px; }
.board-container {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.board-tabs { display: flex; align-items: center; border-bottom: 2px solid var(--border); margin-bottom: 20px; gap: 0; }
.board-tab-btns { display: flex; gap: 20px; }
.board-more-top {
  margin-left: auto;
  padding: 5px 16px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}
.board-more-top:hover { background: var(--accent); color: #fff; }
.board-tab-btn {
  padding: 10px 15px; font-size: 1.1rem; font-weight: 700;
  background: none; border: none; border-bottom: 3px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: var(--text-muted); transition: 0.3s;
}
.board-tab-btn.active { color: var(--text); border-color: var(--accent); }
.board-tab-content { display: none; }
.board-tab-content.active { display: block; animation: fadeIn 0.4s ease; }

.board-list { list-style: none; }
.board-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 10px; border-bottom: 1px solid var(--border); transition: 0.2s;
}
.board-list li:last-child { border-bottom: none; }
.board-list li:hover { background: rgba(37,99,235,0.02); }
.board-list .title-wrap { display: flex; align-items: center; gap: 12px; flex-grow: 1; }
.board-list a { text-decoration: none; color: var(--text); font-size: 0.95rem; font-weight: 500; transition: 0.2s; }
.board-list a:hover { color: var(--accent); }
.board-list .meta { display: flex; gap: 16px; color: var(--text-muted); font-size: 0.85rem; align-items: center; min-width: 80px; justify-content: flex-end; }

/* ══ 배지 ══ */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.badge.notice   { background: rgba(37,99,235,0.1); color: var(--accent); }
.badge.qna-wait { background: rgba(245,158,11,0.1); color: #d97706; }
.badge.qna-done { background: rgba(5,150,105,0.1); color: var(--accent2); }
.badge.faq      { background: rgba(124,58,237,0.1); color: #7c3aed; }

.board-more { text-align: right; padding: 10px 20px 4px; }
.board-more a { font-size: 0.85rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.board-more a:hover { text-decoration: underline; }

/* ══ 과정 카드 ══ */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 24px; }
.course-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; transition: all 0.3s;
  cursor: pointer; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.course-card:hover { transform: translateY(-8px); border-color: rgba(37,99,235,0.3); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.course-thumb { height: 160px; background: #e2e8f0; position: relative; overflow: hidden; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }
.course-card:hover .course-thumb img { transform: scale(1.05); }
.play-btn-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.2); opacity: 0; transition: 0.3s; backdrop-filter: blur(2px);
}
.course-card:hover .play-btn-overlay { opacity: 1; }
.play-btn-overlay .icon {
  width: 52px; height: 52px; background: var(--accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; padding-left: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.course-info { padding: 24px; }
.course-tag {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  background: rgba(5,150,105,0.1); color: var(--accent2);
  font-size: 0.75rem; font-weight: 700; margin-bottom: 12px;
}
.course-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); line-height: 1.4; word-break: keep-all; }
.course-ep { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }

/* 썸네일 뱃지 */
.thumb-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.vod-badge { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.badge-rc { background: #e67e22; color: #fff; }
.badge-pp { background: #e74c3c; color: #fff; }

/* 썸네일 없을 때 */
.thumb-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: #94a3b8; font-size: 2.5rem; }

/* 강의 없음 안내 */
.section-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 0.95rem; }
.course-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }

/* ══ 프로그레스 바 ══ */
.progress-wrap { margin-top: 8px; }
.progress-info { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.progress-info .percent { color: var(--accent); font-weight: 700; }
.progress-bg { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #3b82f6); width: 0; transition: width 1.5s ease-out; border-radius: 3px; }

/* ══ 푸터 ══ */
footer {
  border-top: 1px solid var(--dark-border); padding: 40px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px; background: var(--dark-bg);
}
.footer-copy { font-size: 0.85rem; color: var(--dark-text-muted); }

/* ══ 플로팅 퀵 메뉴 ══ */
.floating-menu {
  position: fixed; right: 30px; bottom: 40px; z-index: 999;
  animation: fadeInUp 0.8s 0.5s ease both;
}
.btn-floating {
  display: flex; align-items: center; gap: 8px;
  background: var(--dark-bg); color: var(--dark-accent);
  padding: 16px 24px; border-radius: 40px; font-weight: 700;
  font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 10px 25px rgba(10,22,40,0.3);
  border: 1px solid var(--dark-border); transition: all 0.3s;
}
.btn-floating:hover { transform: translateY(-5px); background: #11284d; box-shadow: 0 15px 30px rgba(10,22,40,0.4); }

/* ══ 카테고리 탭 ══ */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.cat-tab {
  padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text-muted); font-size: 0.88rem;
  font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.cat-tab.active, .cat-tab:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ══ 반응형 ══ */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 80px; left: 0; right: 0;
    background: var(--nav-bg-scrolled); padding: 20px;
    border-bottom: 1px solid var(--dark-border);
  }
  .nav-links.open { display: flex; }
  .nav-links > li { padding: 10px 0; }
  .sub-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; background: rgba(0,0,0,0.2); display: none; margin-top: 10px; }
  .nav-toggle { display: flex; }
  section { padding: 60px 20px; }
  #hero { padding: 100px 20px 60px; }
  .dashboard-stats { flex-direction: column; gap: 16px; }
  .floating-menu { right: 20px; bottom: 20px; }
  .btn-floating { padding: 12px 20px; font-size: 0.95rem; }
}
@media (max-width: 560px) {
  .course-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
}
