/* 코스 상세 페이지 V2 스타일 - React LMS 변환 */

/* =========================================
   1. 기본 컨테이너
   ========================================= */
.course-detail-container {
  min-height: 100vh;
  background-color: #ffffff;
  padding-top: 16px; /* 프로모 배너가 헤더 아래에 있으므로 최소 간격만 */
}

.course-main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px;
}

/* 뒤로가기 링크 */
.back-to-courses {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.back-to-courses:hover {
  color: #111827;
}

.back-to-courses svg {
  flex-shrink: 0;
}

/* 상세 페이지용 프로모션 배너 */
.detail-page-banner {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1e3a5f 100%);
  border-radius: 12px;
  text-decoration: none;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.detail-page-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.detail-page-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.3);
}

.detail-page-banner .promo-banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.detail-page-banner .promo-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 16px;
  white-space: nowrap;
}

.detail-page-banner .promo-text {
  flex: 1;
  min-width: 0;
}

.detail-page-banner .promo-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: #ffffff;
}

.detail-page-banner .promo-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.detail-page-banner .promo-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.detail-page-banner .promo-price {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
}

.detail-page-banner .promo-arrow {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s;
}

.detail-page-banner:hover .promo-arrow {
  transform: translateX(4px);
}

@media (max-width: 767px) {
  .detail-page-banner {
    padding: 14px 16px;
    margin-bottom: 20px;
  }

  .detail-page-banner .promo-banner-content {
    flex-wrap: wrap;
    gap: 10px;
  }

  .detail-page-banner .promo-text {
    flex: 1 1 100%;
    order: 2;
  }

  .detail-page-banner .promo-title {
    font-size: 15px;
  }

  .detail-page-banner .promo-subtitle {
    font-size: 12px;
  }

  .detail-page-banner .promo-cta {
    order: 1;
    margin-left: auto;
  }

  .detail-page-banner .promo-price {
    font-size: 14px;
  }
}

@media (min-width: 640px) {
  .course-main-wrapper {
    padding: 32px 24px;
  }
}

@media (min-width: 1024px) {
  .course-main-wrapper {
    padding: 48px 32px;
  }
}

.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .course-grid {
    grid-template-columns: 8fr 4fr;
    gap: 48px;
  }
}

/* =========================================
   2. 왼쪽 컨텐츠 영역
   ========================================= */
.course-content-column {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* =========================================
   3. 히어로 섹션
   ========================================= */
.course-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-image-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: #e5e7eb;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.hero-image:hover {
  transform: scale(1.02);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================
   4. 버튼 스타일
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: #3b82f6;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-outline {
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
  background-color: #f9fafb;
}

.btn-outline svg {
  color: #3b82f6;
}

/* =========================================
   5. 모집 기간
   ========================================= */
.recruitment-period {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.period-label {
  font-weight: 700;
  color: #111827;
  margin-right: 8px;
}

/* =========================================
   6. 모바일 사이드바
   ========================================= */
.mobile-sidebar {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-sidebar {
    display: none;
  }
}

/* =========================================
   7. 클래스 소개 섹션
   ========================================= */
.course-intro {
  padding: 32px 0;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 24px;
}

.intro-banner {
  position: relative;
  width: 100%;
  background-color: #fde047;
  border-radius: 16px;
  padding: 32px;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .intro-banner {
    padding: 48px;
  }
}

.intro-banner-content {
  position: relative;
  z-index: 10;
  max-width: 480px;
}

.intro-banner-title {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .intro-banner-title {
    font-size: 30px;
  }
}

.intro-banner-text {
  color: #1f2937;
  margin-top: 12px;
  font-size: 16px;
}

@media (min-width: 768px) {
  .intro-banner-text {
    font-size: 18px;
  }
}

.intro-banner-icon {
  position: absolute;
  right: -20px;
  bottom: -20px;
  transform: rotate(-10deg);
  opacity: 0.9;
  background: #ede9fe;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 4px solid rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .intro-banner-icon {
    right: 40px;
    bottom: 20px;
  }
}

.intro-banner-icon svg {
  color: #8b5cf6;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.intro-description {
  margin-top: 32px;
  color: #4b5563;
  line-height: 1.8;
}

/* 클래스 소개 - 섹션 스타일 */
.intro-description .intro-section {
  margin-bottom: 32px;
  padding: 24px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.intro-description .intro-section:last-child {
  margin-bottom: 0;
}

.intro-description .intro-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #fde047;
}

.intro-description .intro-section p {
  margin-bottom: 12px;
  color: #4b5563;
  line-height: 1.7;
}

.intro-description .intro-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.intro-description .intro-section ul li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: #374151;
}

.intro-description .intro-section ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.intro-description .intro-section ul li strong {
  color: #111827;
}

/* Feature Grid - 4열 그리드 */
.intro-description .feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .intro-description .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.intro-description .feature-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.intro-description .feature-item strong {
  display: block;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
}

.intro-description .feature-item span {
  font-size: 12px;
  color: #6b7280;
}

/* Highlight Box - 강조 섹션 */
.intro-description .highlight-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
}

.intro-description .highlight-box h3 {
  border-bottom-color: #f59e0b;
}

/* Problem-Solution 섹션 */
.intro-description .problem-solution {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intro-description .problem {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid #ef4444;
}

.intro-description .problem h4 {
  font-size: 15px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 8px;
}

.intro-description .problem p {
  margin-bottom: 8px;
  font-size: 14px;
}

.intro-description .problem .solution {
  color: #10b981;
  font-weight: 500;
  margin-bottom: 0;
}

/* Benefit List */
.intro-description .benefit-list li::before {
  content: "★";
  color: #f59e0b;
}

/* Testimonial 섹션 */
.intro-description .testimonial {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border-color: #8b5cf6;
}

.intro-description .testimonial h3 {
  border-bottom-color: #8b5cf6;
}

.intro-description .review-quotes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intro-description .review-quotes blockquote {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  margin: 0;
  font-style: italic;
  color: #4b5563;
  border-left: 3px solid #8b5cf6;
  font-size: 14px;
}

/* =========================================
   8. 커리큘럼 섹션
   ========================================= */
.course-curriculum {
  padding: 32px 0;
  border-top: 1px solid #e5e7eb;
}

.curriculum-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 섹션 그룹 */
.curriculum-section-group {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  background-color: #f9fafb;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.section-header:hover {
  background-color: #f3f4f6;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: #3b82f6;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
}

.section-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.section-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-count {
  font-size: 13px;
  color: #6b7280;
}

.chevron-icon {
  color: #9ca3af;
  transition: transform 0.2s;
}

.section-header[aria-expanded="false"] .chevron-icon {
  transform: rotate(-90deg);
}

.section-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.section-items.collapsed {
  max-height: 0;
}

.curriculum-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  padding: 16px 20px;
  border-top: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

@media (min-width: 640px) {
  .curriculum-item {
    flex-direction: row;
    align-items: center;
  }
}

.curriculum-item:hover {
  background-color: #f9fafb;
}

/* 완료 체크 아이콘 */
.completed-check {
  width: 20px;
  height: 20px;
  background-color: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.completed-check svg {
  color: #ffffff;
  width: 12px;
  height: 12px;
}

/* 자료 배지 */
.badge-material {
  background-color: #fef3c7;
  color: #d97706;
}

.curriculum-item-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.curriculum-icon {
  margin-top: 4px;
}

.live-indicator {
  width: 20px;
  height: 20px;
  background-color: #3b82f6;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.vod-circle {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
}

.curriculum-info {
  flex: 1;
}

.curriculum-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.type-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-live {
  background-color: #dbeafe;
  color: #2563eb;
}

.badge-vod {
  background-color: #f3f4f6;
  color: #4b5563;
}

.badge-notice {
  background-color: #fef3c7;
  color: #f59e0b;
}

.notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.curriculum-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.curriculum-section {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.curriculum-duration {
  margin-top: 12px;
  text-align: right;
  font-size: 14px;
  color: #9ca3af;
  font-family: monospace;
}

@media (min-width: 640px) {
  .curriculum-duration {
    margin-top: 0;
  }
}

/* 잠금 상태 (공개일 전) 스타일 */
.curriculum-item.locked {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f9fafb;
}

.curriculum-item.locked:hover {
  background-color: #f3f4f6;
}

.curriculum-item.locked .curriculum-title,
.curriculum-item.locked .locked-title {
  color: #9ca3af;
}

.curriculum-item.locked .lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.curriculum-release-date {
  flex-shrink: 0;
}

.release-badge {
  display: inline-block;
  font-size: 11px;
  color: #f59e0b;
  font-weight: 600;
  background-color: #fef3c7;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

/* 섹션 헤더 공개일 배지 */
.section-release-badge {
  display: inline-block;
  font-size: 11px;
  color: #f59e0b;
  font-weight: 600;
  background-color: #fef3c7;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: 10px;
  white-space: nowrap;
}

/* 잠금된 섹션 */
.curriculum-section-group.section-locked .section-header {
  opacity: 0.85;
}

.curriculum-section-group.section-locked .section-name {
  color: #6b7280;
}

/* =========================================
   9. 강사 프로필 섹션
   ========================================= */
.instructor-section {
  padding: 32px 0;
  border-top: 1px solid #e5e7eb;
  margin-bottom: 80px;
}

.instructor-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.instructor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #f3f4f6;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
}

.instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instructor-role {
  font-size: 12px;
  color: #6b7280;
  display: block;
  margin-bottom: 4px;
}

.instructor-name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

/* =========================================
   10. 사이드바 컬럼 (데스크탑)
   ========================================= */
.course-sidebar-column {
  display: none;
}

@media (min-width: 1024px) {
  .course-sidebar-column {
    display: block;
  }
}

.sidebar-sticky {
  position: sticky;
  top: 120px; /* 헤더(80px) + 여백(40px) */
}

/* =========================================
   11. 사이드바 컨테이너
   ========================================= */
.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =========================================
   12. 가격 카드
   ========================================= */
.pricing-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  padding: 24px;
}

.course-title-sidebar {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 24px;
}

.price-section {
  margin-bottom: 24px;
}

/* 할인 배지 - 업계 표준 스타일 */
.discount-badge {
  display: inline-block;
  background: #dc2626;
  color: white;
  font-size: 18px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* 가격 행 */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

/* 정가 (취소선) */
.price-row .original-price {
  font-size: 16px;
  color: #9ca3af;
  text-decoration: line-through;
}

/* 현재가 (할인가) */
.price-row .current-price {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

/* 할부 정보 */
.installment-info {
  font-size: 14px;
  color: #6b7280;
  margin-top: 8px;
}

/* 무료 강의 스타일 */
.price-value {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 4px;
}

.price-amount {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.price-amount.free {
  color: #059669;
}

/* =========================================
   13. 사이드바 액션 버튼
   ========================================= */
.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-action:hover {
  background-color: #f9fafb;
}

.btn-action.wishlisted {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

.btn-action.wishlisted svg {
  color: #ef4444;
}

/* 수강 진행률 */
.progress-section {
  margin-bottom: 20px;
  padding: 16px;
  background-color: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #bae6fd;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
}

.progress-value {
  font-size: 16px;
  font-weight: 700;
  color: #0284c7;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e0f2fe;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #0ea5e9);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-detail {
  margin-top: 8px;
  font-size: 12px;
  color: #0369a1;
  text-align: right;
}

.btn-enter-classroom {
  width: 100%;
  background-color: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s;
  margin-bottom: 24px;
}

.btn-enter-classroom:hover {
  background-color: #2563eb;
}

.btn-enroll {
  width: 100%;
  background-color: #10b981;
  color: #ffffff;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s;
  margin-bottom: 24px;
}

.btn-enroll:hover {
  background-color: #059669;
}

/* =========================================
   14. 태그 목록
   ========================================= */
.course-tags {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: #6b7280;
  border-top: 1px solid #f3f4f6;
  padding-top: 20px;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-item svg {
  color: #9ca3af;
}

/* =========================================
   15. 관리자 카드
   ========================================= */
.admin-card {
  background-color: #f3f4f6;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.admin-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-admin {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-copy {
  background-color: rgba(156, 163, 175, 0.5);
  color: #ffffff;
}

.btn-copy:hover {
  background-color: #9ca3af;
}

.btn-delete {
  background-color: #f87171;
  color: #ffffff;
}

.btn-delete:hover {
  background-color: #ef4444;
}
