/* ── 본문용 라이트 테마 색상 변수 ── */
: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; }

/* ── SCROLLBAR ── */
::-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; }

/* ── LOGO STYLING ── */
.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; position: relative; }
.footer-logo { font-size: 1.6rem; }
.en-edu { color: var(--dark-accent2); margin-left: 2px; transition: 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: 0.3s; 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 LINKS ── */
.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); }

/* ── SUBPAGE HEADER ── */
.page-header { padding: 160px 40px 80px; background: linear-gradient(135deg, var(--dark-bg) 0%, #0f2442 100%); text-align: center; position: relative; overflow: hidden; }
.page-header::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(0,200,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,200,255,0.05) 1px, transparent 1px); background-size: 40px 40px; z-index: 1; opacity: 0.5; }
.page-header-content { position: relative; z-index: 2; animation: fadeInUp 0.8s ease both; }
.page-title { font-size: 2.8rem; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: -1px; }
.page-subtitle { font-size: 1.15rem; color: var(--dark-text-muted); font-weight: 300; }

/* ── BOARD SECTION ── */
.board-section { padding: 80px 40px 120px; max-width: 1200px; margin: 0 auto; animation: fadeInUp 0.8s 0.2s ease both; }

/* Board Top Controls */
.board-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.board-total { font-size: 1rem; color: var(--text-muted); }
.board-total strong { color: var(--accent); font-weight: 700; }

.board-search { display: flex; gap: 8px; }
.board-search select { padding: 10px 15px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 0.95rem; color: var(--text); outline: none; }
.search-input-wrap { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.search-input-wrap input { border: none; padding: 10px 15px; width: 220px; outline: none; font-size: 0.95rem; }
.search-input-wrap button { background: var(--primary); border: none; padding: 0 15px; cursor: pointer; border-left: 1px solid var(--border); color: var(--text); font-weight: bold; transition: 0.2s; }
.search-input-wrap button:hover { background: #e2e8f0; }

/* Board Table */
.table-responsive { width: 100%; overflow-x: auto; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.board-table { width: 100%; border-collapse: collapse; min-width: 800px; text-align: center; }
.board-table th { background: #f8fafc; padding: 18px 15px; font-size: 1rem; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border); }
.board-table td { padding: 18px 15px; font-size: 0.95rem; color: var(--text-muted); border-bottom: 1px solid var(--border); transition: background 0.2s; }
.board-table tbody tr:hover td { background: rgba(37,99,235,0.02); }
.board-table tbody tr:last-child td { border-bottom: none; }

/* Col Widths */
.col-num { width: 80px; }
.col-title { width: auto; text-align: left !important; }
.col-date { width: 120px; }
.col-views { width: 80px; }

/* Content Styles in Table */
.board-table .title-link { color: var(--text); text-decoration: none; font-weight: 500; font-size: 1.05rem; display: inline-block; width: 100%; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 600px; vertical-align: middle; }
.board-table .title-link:hover { color: var(--accent); }
.badge.notice { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; background: rgba(37,99,235,0.1); color: var(--accent); white-space: nowrap; }
.badge.new { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; background: #ef4444; color: #fff; font-size: 0.7rem; border-radius: 50%; margin-left: 6px; vertical-align: middle; font-weight: bold; }

/* Notice Rows (Pinned) */
.board-table tr.notice-row td { background: rgba(37,99,235,0.015); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.page-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); color: var(--text-muted); font-weight: 600; text-decoration: none; transition: 0.2s; }
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 10px rgba(37,99,235,0.2); }
.page-btn.wide { width: auto; padding: 0 15px; }

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

/* ── FOOTER ── */
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); }

/* ── RESPONSIVE ── */
@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; }
  
  .page-header { padding: 120px 20px 60px; }
  .board-section { padding: 40px 20px 80px; }
  
  .board-top { flex-direction: column; align-items: stretch; }
  .board-search { flex-direction: column; }
  .search-input-wrap { width: 100%; }
  .search-input-wrap input { width: 100%; }
  
  /* 모바일에서 테이블 레이아웃 최적화 */
  .board-table .col-views { display: none; }
  .board-table th.col-views, .board-table td.col-views { display: none; }
  .board-table .title-link { max-width: 200px; }
}