/* ====== #content: 교재/Unit/Lesson 선택 ====== */
#page-content {
  background: #f5f5f7;
}

.content-header {
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(10px, 1vw, 16px) clamp(16px, 2vw, 28px);
  background: #fff;
  border-bottom: 1px solid #e8e8ed;
}

.content-header::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: clamp(28px, 3.696vw, 56px);
  background: url('../../assets/images/subjects/pattern.webp') no-repeat center / 100vw clamp(28px, 3.696vw, 56px);
  z-index: 0;
  pointer-events: none;
}

.content-header-left .header-bi {
  height: clamp(20px, 1.5vw, 28px);
  width: auto;
  cursor: pointer;
}

.content-header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: clamp(6px, 0.6vw, 12px) clamp(8px, 1vw, 16px);
  background: #f0f0f2;
  border: none;
  border-radius: clamp(10px, 1vw, 18px);
  font-family: 'NanumSquare', 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-size: var(--fs-tiny);
  font-weight: 400;
  color: #bfbfbf;
  cursor: pointer;
  transition: 0.15s;
}

.tab-btn.active {
  background: #66108e;
  color: #ffffff;
  font-size: var(--fs-tiny);
  font-weight: 800;
}

.tab-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.tab-btn:hover:not(.active):not(.disabled) {
  background: #e0e0e4;
}

.tab-arrow {
  color: #c7c7cc;
  font-size: 16px;
}

.content-header-right .logout-link {
  color: #86868b;
  font-size: 14px;
  text-decoration: none;
}

.content-header-right .logout-link:hover {
  color: #ff3b30;
}

.content-main {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding: clamp(14px, 1.7vw, 28px) clamp(16px, 2vw, 32px);
}

.breadcrumb {
  font-family: 'NanumSquare', 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-size: var(--fs-small);
  font-weight: 400;
  color: #9a8daa;
  margin-bottom: clamp(12px, 1vw, 20px);
  padding: clamp(4px, 0.5vw, 8px) 0;
  border-bottom: 1px solid #f4e1f9;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

/* ====== Subject 행 (이미지 + 레벨 칩) ====== */
.subject-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 28px);
  margin-bottom: clamp(12px, 1.5vw, 28px);
}

/* ====== 과목별 Lesson 테마 ====== */
#page-content[data-subject="english"] .content-main { background-color: #fdf3ff; }
#page-content[data-subject="english"] .breadcrumb { border-bottom-color: #dbefc2; }
#page-content[data-subject="english"] .content-header::after { background-image: url('../../assets/images/subjects/pattern_english.webp'); }

#page-content[data-subject="general"] .content-main { background-color: #ffffc8; }
#page-content[data-subject="general"] .breadcrumb { border-bottom-color: #f2f0af; }
#page-content[data-subject="general"] .content-header::after { background-image: url('../../assets/images/subjects/pattern_general.webp'); }
/* GA 카드 이미지: 원본 344px 기준 (1920 → 17.917vw) — 축소 방지 */
#page-content[data-subject="general"] .card-thumb > img { width: 17.917vw; }

.subject-img {
  background: #fff;
  border-radius: clamp(10px, 1vw, 18px);
  padding: clamp(6px, 0.5vw, 12px);
  box-shadow: 0 0.3646vw 0.15625vw rgba(0,0,0,0.1);
  overflow: hidden;
}

.subject-img img {
  display: block;
  width: clamp(180px, 24.64vw, 360px);
  height: auto;
}

.level-box {
  background: #fff;
  border-radius: clamp(10px, 1vw, 18px);
  padding: clamp(8px, 0.8vw, 16px);
  box-shadow: 0 0.1042vw 0.4167vw rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 0.8vw, 16px);
}

.level-chip {
  cursor: pointer;
  transition: 0.15s;
}

.level-chip:not(.is-disabled):hover {
  transform: scale(1.02);
}

.level-chip:not(.is-disabled):active {
  transform: scale(0.95);
}

.level-chip img {
  display: block;
  width: clamp(160px, 21.77vw, 320px);
  height: auto;
}

.level-chip.is-disabled {
  cursor: default;
  pointer-events: none;
}

@media (max-width: 767px) {
  .subject-row {
    flex-direction: column;
    align-items: stretch;
  }
  .subject-img img,
  .level-chip,
  .level-chip img {
    width: 100%;
  }
}

.lesson-book-label {
  font-family: 'HelveticaRounded', 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: #f4dc78;
  margin: clamp(16px, 2vw, 36px) 0 clamp(12px, 1.5vw, 28px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(130px, 11.146vw, 180px), 1fr));
  gap: clamp(10px, 1.0417vw, 20px);
}

.content-card {
  cursor: default;
  transition: 0.15s;
}

.content-card.clickable {
  cursor: pointer;
}

.content-card.clickable:hover {
  transform: translateY(-0.2083vw);
  box-shadow: 0 0.4167vw 1.25vw rgba(0,0,0,0.1);
}

.content-card.disabled {
  cursor: default;
}

.card-thumb {
  position: relative;
  overflow: hidden;
}

.card-thumb > img {
  display: block;
  width: clamp(130px, 11.146vw, 180px);
  height: auto;
}

.card-labels {
  position: absolute;
  top: clamp(4px, 0.5vw, 10px);
  left: clamp(6px, 0.8vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2vw;
}

.card-label {
  display: block;
  font-family: 'HelveticaRounded', 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-weight: 700;
  font-size: var(--fs-small);
  color: #ffffff;
  white-space: pre-line;
}

.card-label::before {
  content: '';
  display: inline-block;
  width: clamp(8px, 0.677vw, 12px);
  height: clamp(8px, 0.625vw, 12px);
  margin-right: 0.3vw;
  background: url('../../assets/images/subjects/star.webp') no-repeat center / contain;
  vertical-align: baseline;
}

.contents-title {
  font-size: var(--fs-small);
  margin-bottom: clamp(12px, 1vw, 20px);
  color: #1d1d1f;
}

.content-footer {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-top: 1px solid #e8e8ed;
}

.content-footer img {
  width: clamp(60px, 6.25vw, 110px);
}

/* ====== Activity 카드 (2×2) ====== */
#content-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.0417vw;
  justify-items: start;
}
@media (max-width: 767px) {
  #content-container { grid-template-columns: 1fr; }
}

.activity-card {
  position: relative;
  cursor: default;
  transition: 0.15s;
}

.activity-card.clickable {
  cursor: pointer;
}

.activity-card.clickable:hover {
  transform: translateY(-0.2083vw);
}

.activity-card-bg {
  background: #fff;
  border-radius: clamp(10px, 1vw, 18px);
  padding: clamp(10px, 1vw, 18px);
  box-shadow: 0 0.1042vw 0.4167vw rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.activity-card-bg img {
  display: block;
  width: clamp(260px, 34.43vw, 480px);
  height: auto;
}

.activity-title {
  font-family: 'HelveticaRounded', 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2.1875vw, 34px);
  color: #79597e;
  margin-top: clamp(6px, 0.5vw, 10px);
}

.activity-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868b;
  font-size: clamp(14px, 1.5vw, 24px);
  font-weight: 700;
  border-radius: clamp(10px, 1vw, 18px);
}
