/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #aaaaaa;
  --gray-600: #666666;
  --header-height: 56px;
  --font-brand: 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif;
  --font-body: 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===========================
   HEADER
   =========================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 100;
}

.header-inner {
  display: flex;
  width: 100%;
  height: 100%;
}

.header-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.header-item.brand {
  justify-content: center;
}

.brand-logo {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--black);
  user-select: none;
}

.header-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--black);
}

button.header-link {
  background: none;
  border: 1.5px solid var(--gray-400);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 0.9rem;
}

button.header-link:hover {
  border-color: var(--black);
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.login-link {
  font-weight: 700;
  color: var(--black);
  border: 1.5px solid var(--black);
  padding: 5px 16px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.login-link:hover {
  background: var(--black);
  color: var(--white);
}

/* ===========================
   MAIN
   =========================== */
.main {
  margin-top: var(--header-height);
  flex: 1;
}

/* ===========================
   BANNER / SLIDER
   =========================== */
.banner-section {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-red    { background-color: #e63946; }
.slide-orange { background-color: #f4a261; }
.slide-yellow { background-color: #f9c74f; }
.slide-green  { background-color: #52b788; }

.slide-label {
  font-family: var(--font-brand);
  font-size: 3.5rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.85);
  user-select: none;
}

/* ===========================
   SLIDER DOTS
   =========================== */
.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}

.dot.active {
  background: var(--white);
  transform: scale(1.3);
}

/* ===========================
   COURSES CARD SECTION
   =========================== */
.courses-section {
  padding: 48px 5% 64px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-family: var(--font-brand);
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
  color: var(--black);
}

/* ===========================
   COURSES CARD SECTION - GRID
   =========================== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.course-card {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--white);
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.course-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-dark  { background: var(--black); }
.thumb-mid   { background: var(--gray-600); }
.thumb-light { background: var(--gray-100); }

.course-tag {
  font-family: var(--font-brand);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--white);
}

.thumb-light .course-tag {
  color: var(--gray-400);
}

.course-info {
  padding: 16px;
}

.course-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.course-desc {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 12px;
  font-weight: 300;
}

.course-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* ===========================
   COURSES CARD SECTION - BADGE
   =========================== */
.course-badge.available {
  background: var(--black);
  color: var(--white);
}

/* ===========================
   COURSES CARD SECTION - BADGE - LIMIT TIME
   =========================== */
.course-badge.enrolled {
  background: #e8f5e9;
  color: #2e7d32;
}

/* ===========================
   COURSES CARD SECTION - BADGE - UPCOMING
   =========================== */
.course-badge.upcoming {
  background: var(--gray-200);
  color: var(--gray-400);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  padding: 40px 5%;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  justify-content: space-between;
}

.footer-profile {
  flex: 1;
}

.footer-legal {
  flex: 1;
  text-align: right;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.9;
  font-weight: 300;
}

.footer-links {
  list-style: none;
  margin-bottom: 16px;
}

.footer-links li + li {
  margin-top: 6px;
}

.footer-link-item {
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 400;
  transition: color 0.2s;
}

.footer-link-item:hover {
  color: var(--black);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 16px;
}

/* ===========================
   RESPONSIVE - MOBILE
   =========================== */
@media (max-width: 600px) {

  /* HEADER */
  .header-link {
    font-size: 0.72rem;
    gap: 3px;
  }

  .icon {
    width: 13px;
    height: 13px;
  }

  .brand-logo {
    font-size: 1.2rem;
  }

  .login-link {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* BANNER */
  .banner-section {
    height: 180px;
  }

  .slide-label {
    font-size: 2rem;
  }

  /* COURSE CARD GRID */
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .courses-section {
    padding: 32px 4% 48px;
  }

  /* FOOTER */
  .footer-inner {
    flex-direction: column;
    gap: 28px;
  }

  .footer-legal {
    text-align: left;
  }
}

/* ===========================
   PAGINATION BAR (공통)
   =========================== */
.pagination-bar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}

.pagination-bar .pg-total {
  position: absolute;
  left: 0;
  font-size: 0.82rem;
  color: var(--gray-600);
  font-weight: 500;
  white-space: nowrap;
}

.pg-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: 5px;
  background: var(--white);
  color: var(--black);
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pg-btn:hover:not(.disabled):not(.active) {
  border-color: var(--black);
  background: var(--gray-100);
}

.pg-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  font-weight: 700;
}

.pg-btn.disabled {
  color: var(--gray-400);
  border-color: var(--gray-200);
  pointer-events: none;
  cursor: not-allowed;
}
