/* ============================================================
 * HIFIVE 2026 - 학생용 페이지 공통 스타일
 * (헤더 / PC 네비 / 사이드메뉴 / 레이아웃 / 공통 변수)
 * ============================================================ */

:root {
  --primary: #ff6b35;
  --primary-light: #ff8c5a;
  --primary-bg: #fff4ef;
  --accent: #2d7dd2;
  --success: #28a745;
  --danger: #d9534f;
  --blue: #4a90e2;
  --blue-bg: #e8f1fb;
  --red: #e05c5c;
  --red-bg: #fdeaea;
  --text-main: #1a1a2e;
  --text-sub: #555577;
  --text-muted: #999bbb;
  --bg: #f5f6fa;
  --card: #ffffff;
  --border: #e8e9f3;
  --shadow: 0 2px 16px rgba(80,80,160,0.08);
  --radius: 12px;
}

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

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: #ffffff;
  color: var(--text-main);
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: #fff;
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-main);
  text-decoration: none;
}
.logo .hi { color: var(--primary); }
.logo-bar {
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
  margin-right: 3px;
}
.logo-img {
  height: 32px;
  width: auto;
  display: block;
}
@media (max-width: 480px) {
  .logo-img { height: 26px; }
}
.logo-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  border-left: 1px solid var(--border);
  padding-left: 14px;
  white-space: nowrap;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-userinfo {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  white-space: nowrap;
}
.header-id-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.btn-logout {
  font-size: 13px;
  color: var(--text-sub);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-logout:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }
.btn-member {
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
  white-space: nowrap;
}
.btn-member:hover { color: var(--primary); }
.hamburger {
  width: 32px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s;
}
@media (max-width: 767px) {
  .header-userinfo, .header-id-badge { display: none; }
  .logo-sub { display: none; }
  .header-right { gap: 8px; }
  .btn-logout { font-size: 12px; padding: 5px 9px; }
  .btn-member { font-size: 12px; }
}
@media (max-width: 380px) {
  .header-right { gap: 6px; }
  .btn-logout { font-size: 11px; padding: 4px 7px; }
  .btn-member { font-size: 11px; }
}

/* ── PC Desktop Nav Bar ── */
.pc-nav {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.pc-nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}
.pc-nav-item {
  display: block;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  border-right: 1px solid var(--border);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.pc-nav-item:first-child { border-left: 1px solid var(--border); }
.pc-nav-item:hover { background: var(--primary-bg); color: var(--primary); }
.pc-nav-item.active { color: var(--primary); font-weight: 700; border-bottom: 2px solid var(--primary); }

@media (min-width: 768px) {
  .pc-nav { display: block; }
  .hamburger { display: none; }
}
@media (max-width: 767px) {
  .pc-nav { display: none !important; }
}

/* ── Side Menu ── */
.side-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}
.side-overlay.open { display: block; opacity: 1; }

.side-menu {
  position: fixed;
  top: 0; right: 0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: #fff;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.side-menu.open { transform: translateX(0); }
.side-menu-header {
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: 54px;
  flex-shrink: 0;
}
.side-menu-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.side-menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.side-menu-close:hover { background: rgba(255,255,255,0.2); }
.side-menu-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.side-menu-item {
  display: block;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.side-menu-item:hover { background: var(--primary-bg); color: var(--primary); }
.side-menu-item.active { color: var(--primary); font-weight: 700; background: var(--primary-bg); }

/* ── Main Layout ── */
main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* ── Common entry animation ── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.5s ease forwards;
}
.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.12s; }
.fade-up:nth-child(3) { animation-delay: 0.19s; }
.fade-up:nth-child(4) { animation-delay: 0.26s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
