/* 강의 목록 페이지 스타일 - 크리투스 스타일 참고 */

/* =========================================
   0. 멤버십 배너 (페이지 내부)
   ========================================= */
.membership-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s;
}

.membership-banner:hover {
  background: linear-gradient(135deg, #234b75 0%, #3a6d9e 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 95, 0.3);
}

.membership-banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.membership-badge {
  padding: 6px 14px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

.membership-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.membership-title {
  font-size: 15px;
  font-weight: 700;
}

.membership-subtitle {
  font-size: 13px;
  opacity: 0.85;
}

.membership-cta {
  padding: 10px 20px;
  background: #ffffff;
  color: #1e3a5f;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s;
}

.membership-banner:hover .membership-cta {
  background: #f3f4f6;
  transform: translateX(4px);
}

/* =========================================
   1. 기본 컨테이너
   ========================================= */
.course-list-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  background-color: #f9fafb;
}

@media (min-width: 640px) {
  .course-list-container {
    padding: 48px 32px;
  }
}

@media (min-width: 1024px) {
  .course-list-container {
    padding: 56px 40px;
  }
}

/* =========================================
   2. 페이지 헤더
   ========================================= */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  margin: 0;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 32px;
  }
}

/* =========================================
   2.5. 카테고리 필터 버튼 (블로그 스타일)
   ========================================= */
.category-filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}

.category-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

.category-btn:hover {
  color: #1f2937;
  border-color: #3b82f6;
  background: #eff6ff;
}

.category-btn.active {
  color: #ffffff;
  background: #3b82f6;
  border-color: #3b82f6;
}

@media (max-width: 640px) {
  .category-filter-section {
    gap: 8px;
  }

  .category-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* =========================================
   3. 필터/검색 영역 (미사용)
   ========================================= */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px 24px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .filter-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-tab {
  padding: 0 20px;
  height: 38px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  background-color: #f3f4f6;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-tab:hover {
  color: #111827;
  background-color: #e5e7eb;
}

.filter-tab.active {
  color: #ffffff;
  background-color: #3b82f6;
  font-weight: 600;
}

.filter-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* 카테고리 드롭다운 */
.category-select {
  position: relative;
}

.category-select select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  height: 36px !important;
  padding: 0 30px 0 12px !important;
  font-size: 14px !important;
  color: #374151 !important;
  background-color: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  cursor: pointer;
  box-sizing: border-box !important;
  line-height: 34px !important;
}

.category-select select:focus {
  outline: none;
  border-color: #3b82f6 !important;
}

.select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
}


/* =========================================
   4. 강의 카드 그리드
   ========================================= */
.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .course-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

/* =========================================
   5. 강의 카드
   ========================================= */
.course-card {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  border-color: #d1d5db;
}

/* 하이라이트 카드 (라스트스킬 등 주요 강의) */
.course-card-highlighted {
  border: 2px solid transparent;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
              linear-gradient(135deg, #fbbf24, #f59e0b, #d97706) border-box;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
  position: relative;
}

/* 하이라이트 배지 - 썸네일 내부 좌상단 */
.course-card-highlighted .card-thumbnail::after {
  content: '🔥 신규 모집';
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.course-card-highlighted:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(251, 191, 36, 0.35);
}

@keyframes highlight-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(251, 191, 36, 0.5); }
}

.course-card-highlighted {
  animation: highlight-pulse 2s ease-in-out infinite;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* 썸네일 */
.card-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 비율 */
  background-color: #1f2937;
  overflow: hidden;
}

.card-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.course-card:hover .card-thumbnail img {
  transform: scale(1.05);
}

/* 배지들 */
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
}

.badge-discount {
  background-color: #ef4444;
  color: #ffffff;
}

.badge-type {
  background-color: rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

.badge-live {
  background-color: #ef4444;
}

.badge-vod {
  background-color: rgba(0, 0, 0, 0.7);
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

/* 찜하기 버튼 */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.wishlist-btn:hover {
  background-color: #ffffff;
  transform: scale(1.1);
}

.wishlist-btn svg {
  color: #9ca3af;
  transition: all 0.2s;
}

.wishlist-btn.active svg {
  color: #ef4444;
  fill: #ef4444;
}

/* 카드 컨텐츠 */
.card-content {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 짧은 설명 */
.card-description {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 500;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 10px 0;
  line-height: 1.5;
  min-height: 48px; /* 2줄 고정 높이 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 메타 정보: 강의수 · 강사명 */
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.meta-divider {
  color: #d1d5db;
}

.meta-item.instructor {
  color: #6b7280;
}

/* 부제목 */
.card-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 12px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 모집 기간 */
.card-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 16px;
  padding: 6px 12px;
  background-color: #f3f4f6;
  border-radius: 6px;
}

.card-period svg {
  color: #9ca3af;
  flex-shrink: 0;
}

/* 가격 정보 - 통일된 높이 */
.card-pricing {
  border-top: 1px solid #f3f4f6;
  padding-top: 14px;
  margin-top: auto;
  min-height: 52px; /* 무료/유료 높이 통일 */
  display: flex;
  align-items: center;
}

.price-row-free {
  display: flex;
  align-items: center;
}

.price-free {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
}

.price-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.discount-rate {
  font-size: 14px;
  font-weight: 700;
  color: #ef4444;
}

.price-original {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
}

.price-current {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

/* =========================================
   6. 빈 상태
   ========================================= */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #9ca3af;
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* =========================================
   7. 반응형 조정
   ========================================= */
@media (max-width: 767px) {
  /* 멤버십 배너 모바일 */
  .membership-banner {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .membership-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .membership-text {
    align-items: center;
  }

  .membership-cta {
    width: 100%;
    text-align: center;
  }

  .filter-section {
    gap: 16px;
  }

  .filter-tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-controls {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }

  .category-select {
    width: 100%;
  }

  .category-select select {
    width: 100% !important;
    height: 40px !important;
    line-height: 38px !important;
  }

  .card-title {
    font-size: 16px;
  }

  .price-monthly {
    font-size: 16px;
  }
}
