/* ============================================
   CSS VARIABLES - Design System
   ============================================ */
:root {
  /* Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-accent: #f3f4f6;
  --text-primary: #0a0a0a;
  --text-secondary: #525252;
  --text-muted: #a3a3a3;
  --border: #e5e5e5;
  --border-light: #f1f5f9;
  --border-hover: #d4d4d4;
  --accent: #171717;
  --accent-hover: #262626;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 12px;
  --space-lg: 18px;
  --space-xl: 24px;
  --space-2xl: 36px;
  --space-3xl: 48px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-lg: 15px;
  --font-size-xl: 16px;
  --font-size-2xl: 18px;
  --font-size-3xl: 24px;
  --font-size-4xl: 32px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  border: none;
  outline: none;
  cursor: pointer;
}

/* ============================================
   LAYOUT - Container
   ============================================ */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  padding: 24px 0 16px;
  margin-top: 24px;
}


.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px
}

.section-text {
  flex: 1;
}

.section-text h1 {
  font-size: 28px;
  font-weight: 400;
  /* Made significantly thinner */
  color: #111827;
  /* Darker, sophisticated black */
  margin-bottom: 8px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  /* Thinner tracking for elegance */
}

.section-subtitle {
  font-size: 14.5px;
  font-weight: 400;
  /* Made text less bold */
  color: #64748b;
  /* Soft muted gray */
  max-width: 600px;
  line-height: 1.6;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.section-link:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
  transform: translateX(2px);
}

.card-instructor.hidden {
  display: none;
}

/* ============================================
   FILTER SECTION
   ============================================ */
.course-filter {
  padding: 30px 0;
  /* Memberi jarak nafas lebih lega */
  position: sticky;
  top: 60px;
  background: var(--bg-primary);
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

/* Container untuk tombol dan search bar */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  /* biar bisa tumpuk di mobile */
  gap: 12px;
  /* jarak antara search & tombol */
  align-items: center;
}

/* Tombol filter (Semua / Online / Offline / Hybrid) */
.filter-buttons {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox hide scrollbar */
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-buttons::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari hide scrollbar */
}

.filter-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Search bar */
.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  /* margin-right: -200px;  <- hapus ini */
}

/* 
#course-search {
  width: 100%;
  padding: 14px 20px 14px 45px; 
  border: 1px solid var(--border);
  border-radius: 50px; 
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-secondary); 
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

#course-search:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(23, 23, 23, 0.1); 
  transform: translateY(-2px);
}
*/

/* Responsif */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .hero-section {
    padding: 24px 0;
  }

  .section-header {
    flex-direction: column;
    /* Judul dan Link tumpuk ke bawah */
    align-items: flex-start;
    gap: 10px;
  }

  .section-text h1 {
    font-size: 24px;
  }

  .section-link {
    display: none;
    /* Opsional: Sembunyikan link 'Lihat Semua' di header mobile */
  }


  .filter-container {
    flex-direction: column;
    /* Filter dan Search tumpuk */
    align-items: stretch;
    gap: 12px;
  }

  .search-container {
    max-width: 100%;
    /* Search bar full width */
  }

  .filter-buttons {
    width: 100%;
    padding-bottom: 8px;
    /* Ruang untuk scrollbar invisible */
  }

  .courses-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .course-card {
    min-height: auto;
    /* Reset tinggi */
    box-shadow: var(--shadow-sm);
  }

  .card-image-container {
    aspect-ratio: 16/9;
    /* Tetap wide */
  }

  .card-content {
    padding: 14px;
  }

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

  .search-container {
    width: 100%;
  }

  #course-search {
    width: 100%;
  }
}


/* ============================================
   COURSES GRID
   ============================================ */
.courses-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  /* lebih ramping */
  gap: 12px;
  /* 🔥 jarak antar card lebih rapat */
  row-gap: 20px;
  /* jarak antar baris */
  padding: 24px 0;
  /* kurangi jarak atas-bawah */
  justify-content: center;
  /* supaya grid tetap center */
}


/* ============================================
   COURSE CARD
   ============================================ */
.course-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  color: inherit;
  width: 100%;
  height: 100%;
  min-height: 380px;
}

.course-card:hover,
.new-course-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

/* ============================================
   CARD IMAGE SECTION
   ============================================ */
.card-image-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   CARD BADGES
   ============================================ */
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

/* Learning Mode Badge */
.learning-mode-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.mode-Online {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #1e293b;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.mode-Offline {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #1e293b;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.mode-Hybrid {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #1e293b;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Status Indicator Dots */
.learning-mode-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.mode-Online::before {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.mode-Offline::before {
  background: #f87171;
}

.mode-Hybrid::before {
  background: #fbbf24;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* ============================================
   CARD CONTENT SECTION
   ============================================ */
.card-content {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.card-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  overflow: visible;
  display: block;
}


/* ============================================
   CARD INSTRUCTOR SECTION
   ============================================ */
.card-instructor {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.instructor-photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--border);
  flex-shrink: 0;
}

.instructor-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.instructor-username {
  font-size: 14px;
  font-weight: 500;
  color: #262626;
  /* warna teks seperti di foto */
}

/* ============================================
   CARD META SECTION
   ============================================ */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.card-author {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-author::before {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

.tipe-course {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 12px;
}

.rating-count {
  color: var(--text-muted);
  font-size: 11px;
}

/* ============================================
   CARD FOOTER SECTION
   ============================================ */
/* ===== CARD FOOTER ===== */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  margin-top: auto;
  /* 🔥 ini kuncinya */
}

/* “Kelas Online / Offline / Hybrid” */
.card-type {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  /* biar tidak kapital semua */
  letter-spacing: 0.2px;
}

/* Tombol “Lihat selengkapnya” */
.card-link {
  font-size: 12px;
  font-weight: 400;
  /* tidak bold */
  color: var(--accent);
  text-transform: none;
  /* huruf kecil natural */
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: #2563eb;
  /* warna biru saat hover */
  text-decoration: underline;
}

.expired-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
  /* 📌 ini penting */
  color: white;
  background-color: #dc3545;
}

.card-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

/* 1. Sudah Dibeli (Transparent Gray - Increased Visibility) */
.card-status-badge.purchased {
  background: rgba(241, 245, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #334155;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card-status-badge.purchased i {
  font-size: 10px;
  color: #475569;
}

/* 2. Gratis (Neutral Gray-Green) */
.card-status-badge.free {
  background: rgba(255, 255, 255, 0.98);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

/* Dot for calm free status */
.card-status-badge.free::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #059669;
  border-radius: 50%;
}

/* 3. Berbayar (Neutral Gray) */
.card-status-badge.price {
  background: rgba(255, 255, 255, 0.98);
  color: #1e293b;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

@keyframes badgePop {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Status in Preview Popup */
.preview-status.purchased {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #d1fae5;
}

.preview-status.purchased svg {
  color: #10b981;
}


/* Terapkan ke class badge */

/* ============================================
   LOADING STATE
   ============================================ */
.skeleton {
  background: linear-gradient(90deg,
      var(--bg-secondary) 25%,
      #f0f0f0 50%,
      var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   COURSE HOVER PREVIEW (CSS-only)
   ============================================ */
.course-card {
  position: relative;
}

.course-preview {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 14px;
  width: 320px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

.course-card:hover .course-preview {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.course-preview-inner {
  padding: 20px 22px;
}

/* Title */
.preview-title {
  font-size: 15px;
  font-weight: 650;
  color: #111827;
  margin: 0 0 12px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* Badges row */
.preview-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.2px;
  background: #f1f5f9;
  color: #475569;
}

.preview-badge.mode-Online {
  background: #eff6ff;
  color: #2563eb;
}

.preview-badge.mode-Offline {
  background: #fef3c7;
  color: #b45309;
}

.preview-badge.mode-Hybrid {
  background: #f0fdf4;
  color: #16a34a;
}

.preview-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.preview-status.available {
  background: #f0fdf4;
  color: #15803d;
}

.preview-status.purchased {
  background: #eff6ff;
  color: #2563eb;
}

.preview-status.purchased svg {
  color: #2563eb;
}

/* Info section with subtle separator */
.preview-info-list {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.preview-info-updated {
  margin-bottom: 8px;
}

.preview-info-label {
  font-size: 10px;
  color: #94a3b8;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-bottom: 1px;
}

.preview-info-value {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.preview-info-row {
  display: flex;
  gap: 4px;
}

.preview-info-row .preview-info-item {
  font-size: 12px;
  color: #64748b;
  font-weight: 450;
}

.preview-info-row .preview-info-item+.preview-info-item::before {
  content: "·";
  margin-right: 4px;
  color: #cbd5e1;
}

/* Description */
.preview-description {
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

/* Feature list */
.preview-features {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.preview-features li {
  font-size: 12px;
  color: #4b5563;
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.5;
}

.preview-features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

/* Hide on mobile/tablet — touch devices don't have hover */
@media (max-width: 1024px) {
  .course-preview {
    display: none !important;
  }
}

/* ============================================
   PAGINATION (Clean Text-Only)
   ============================================ */
.pagination-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  margin-top: 20px;
}

.pagination {
  display: flex;
  list-style: none;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.pagination li {
  display: inline-block;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  height: auto;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  background: transparent;
  border: none;
  transition: color 0.2s ease;
  user-select: none;
}

.page-link:hover:not(.disabled):not(.page-active) {
  color: #0f172a;
  background: transparent;
  border-color: transparent;
  transform: none;
}

.page-active {
  background: transparent;
  color: #0f172a;
  border-color: transparent;
  font-weight: 600;
  box-shadow: none;
  pointer-events: none;
}

.page-prev,
.page-next {
  color: #64748b;
}

.page-prev svg,
.page-next svg {
  margin-top: 1px;
}

.page-link.disabled {
  color: #cbd5e1;
  border-color: transparent;
  background: transparent;
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
}

.page-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 2px;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets & Small Desktops */
@media (max-width: 1024px) {
  .courses-container {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
  }

  .section-text h1 {
    font-size: 28px;
  }

  .hero-section {
    padding: var(--space-2xl) 0 var(--space-xl);
  }
}

/* Tablets */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-section {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .section-text h1 {
    font-size: 24px;
  }

  .section-subtitle {
    font-size: 13px;
  }

  .section-link {
    width: 100%;
    justify-content: center;
  }

  .course-filter {
    padding: var(--space-lg) 0;
  }

  .filter-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-buttons::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .courses-container {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-xl) 0;
  }

  .card-content {
    padding: var(--space-md);
  }

  .card-footer {
    padding: 10px var(--space-md);
  }

  .card-badge,
  .learning-mode-badge {
    font-size: 9px;
    padding: 4px 8px;
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
}

.hero-section {
  padding: var(--space-lg) 0 var(--space-md);
}

.section-text h1 {
  font-size: 25px;
}

.section-subtitle {
  font-size: 14px;
}

.course-filter {
  padding: var(--space-md) 0;
}

.courses-container {
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

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

.card-description {
  font-size: 12px;
}

.card-price {
  font-size: 15px;
}

.card-badge,
.learning-mode-badge {
  top: 8px;
  font-size: 9px;
  padding: 3px 8px;
}

.card-badge {
  left: 8px;
}



.card.type {
  color: var(--text-primary, #1a202c);
  font-weight: 600;
}

.card-price {
  font-size: 1.1rem;
  /* 18px */
  font-weight: 700;
  color: var(--text-primary, #1a202c);
  margin-top: 4px;
  /* Sedikit jarak tambahan dari rating */

  .learning-mode-badge {
    right: 8px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
.course-card:focus-visible,
.new-course-card:focus-visible,
.filter-btn:focus-visible,
.section-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print Styles */
@media print {

  .course-filter,
  .section-link {
    display: none;
  }

  .course-card,
  .new-course-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--border);
  }

  .courses-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}





/* =============================
   CATEGORY SECTION
   ============================= */
.course-category {
  margin-top: 40px;
}

.category-header {
  margin-bottom: 16px;
  text-align: left;
}

.category-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}






/* Cursor animasi kedip */
.typing-cursor {
  display: inline-block;
  width: 2px;
  background: #555;
  margin-left: 2px;
  animation: blink 0.7s infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Ikon animasi halus */
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.search-icon.typing {
  transform: translateY(-50%) scale(1.15);
  opacity: 0.8;
}




.search-results {
  position: absolute;
  top: 52px;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: 350px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f9fafb;
}

/* Thumbnail */
.search-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

/* Title text */
.search-title {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
}

.search-title strong {
  color: #2563eb;
}

/* "Lihat semua hasil" */
.search-view-all {
  padding: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #2563eb;
  cursor: pointer;
  background: #f9fafb;
}

.search-view-all:hover {
  background: #f3f4f6;
}









/* ========================= */
/* Banner Section */
/* ========================= */

.banner-section {
  position: relative;
  margin: 24px 0 32px;
  border-radius: 2px;
  overflow: hidden;
  min-height: 320px;
}

/* Background layer */
.banner-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Shapes dengan Animasi Halus */
.shape-orange {
  position: absolute;
  width: 60%;
  height: 100%;
  background: linear-gradient(135deg, #ff7a59 0%, #ff6a3d 100%);
  left: -20%;
  top: 0;
  animation: gentleFloat 12s ease-in-out infinite;
}

@keyframes gentleFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.shape-mint {
  position: absolute;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, #3dd4c5 0%, #2ec4b6 100%);
  right: -15%;
  top: 0;
  animation: gentleFloat 14s ease-in-out infinite;
  animation-delay: -2s;
}

.shape-yellow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #ffd666 0%, #f9c74f 100%);
  border-radius: 50%;
  top: 20%;
  left: 35%;
  opacity: 0.85;
  animation: softPulse 8s ease-in-out infinite;
}

@keyframes softPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
}

.shape-curve {
  position: absolute;
  width: 120%;
  height: 120%;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  top: -40%;
  left: -10%;
  animation: slowRotate 40s linear infinite;
}

@keyframes slowRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.texture-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px, 90px 90px;
  opacity: 0.5;
}

/* Content - Tidak Ada Animasi */
.banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 48px;
  gap: 32px;
}

.text-box {
  background: white;
  padding: 28px 32px;
  border-radius: 4px;
  max-width: 460px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.text-box h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #222;
  line-height: 1.4;
}

.text-box p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

.text-box p strong {
  color: #222;
  font-weight: 600;
}

/* Image */
.image-container {
  flex-shrink: 0;
}

.image-container img {
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========================= */
/* Responsive */
/* ========================= */

@media (max-width: 968px) {
  .banner-section {
    min-height: 400px;
  }

  .banner-content {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .text-box {
    max-width: 100%;
  }

  .image-container img {
    max-height: 220px;
    width: 100%;
    max-width: 400px;
  }

  .shape-yellow {
    width: 150px;
    height: 150px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 640px) {
  .text-box h1 {
    font-size: 22px;
  }

  .text-box p {
    font-size: 14px;
  }

  .banner-content {
    padding: 24px 20px;
  }

  .shape-orange,
  .shape-mint {
    opacity: 0.9;
  }
}

/* Reduce motion untuk accessibility */
@media (prefers-reduced-motion: reduce) {

  .shape-orange,
  .shape-mint,
  .shape-yellow,
  .shape-curve {
    animation: none;
  }
}
































/* preview card 07/03/2026 */
/* ============================================
   COURSE HOVER PREVIEW ONLY
   ============================================ */

.courses-container {
  overflow: visible;
  position: relative;
  isolation: isolate;
}

.course-card {
  position: relative;
  overflow: visible;
  z-index: 1;
}

.course-card:hover {
  z-index: 40;
}

.course-preview {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  width: 300px;
  background: #ffffff;
  border: 1px solid #d9dee8;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
  z-index: 60;
}

.course-card:hover .course-preview {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* panah preview default: muncul di kanan card */
.course-preview::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -8px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-left: 1px solid #d9dee8;
  border-bottom: 1px solid #d9dee8;
  transform: rotate(45deg);
}

/* isi preview */
.course-preview-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: #1f2937;
}

.preview-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-badge,
.preview-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.preview-status.available {
  background: #f3f4f6;
  color: #374151;
}

.preview-status.purchased {
  background: #ede9fe;
  color: #6d28d9;
}

/* ============================================
   Metadata ala Coursera - ukuran diperkecil
   ============================================ */
.preview-info-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}

.preview-info-updated {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: #2563eb;
}

.preview-info-updated .preview-info-label {
  display: inline;
  font-size: 12px;
  font-weight: 500;
  color: #2563eb;
}

.preview-info-updated .preview-info-value {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
}

.preview-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

.preview-info-row .preview-info-item {
  display: inline;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.preview-info-row .preview-info-item::after {
  content: " · ";
  color: #9ca3af;
}

.preview-info-row .preview-info-item:last-child::after {
  content: "";
}

.preview-info-row .preview-info-label {
  display: none;
}

.preview-info-row .preview-info-value {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

/* fallback umum */
.preview-info-item {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.preview-info-label {
  display: none;
}

.preview-info-value {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* deskripsi */
.preview-description {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: #4b5563;
}

/* list fitur */
.preview-features {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #374151;
}

.preview-features li {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

/* footer */
.preview-footer {
  padding-top: 12px;
  border-top: 1px solid #ececec;
}

.preview-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: #6d28d9;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================
   CARD PALING KANAN -> preview buka ke kiri
   asumsi desktop 3 kolom
   ============================================ */
.course-card:nth-child(3n) .course-preview {
  left: auto;
  right: calc(100% + 10px);
}

.course-card:nth-child(3n) .course-preview::before {
  left: auto;
  right: -8px;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid #d9dee8;
  border-top: 1px solid #d9dee8;
}

/* ============================================
   jika layout 2 kolom
   ============================================ */
@media (max-width: 1100px) {
  .course-card:nth-child(3n) .course-preview {
    left: calc(100% + 10px);
    right: auto;
  }

  .course-card:nth-child(3n) .course-preview::before {
    left: -8px;
    right: auto;
    border-right: none;
    border-top: none;
    border-left: 1px solid #d9dee8;
    border-bottom: 1px solid #d9dee8;
  }

  .course-card:nth-child(2n) .course-preview {
    left: auto;
    right: calc(100% + 10px);
  }

  .course-card:nth-child(2n) .course-preview::before {
    left: auto;
    right: -8px;
    border-left: none;
    border-bottom: none;
    border-right: 1px solid #d9dee8;
    border-top: 1px solid #d9dee8;
  }
}

/* mobile: matikan preview */
@media (max-width: 992px) {
  .course-preview {
    display: none;
  }
}



/* badge course */


/* badge course */

/* badge course */
.badge-label {
  margin: 0;
  font-size: 12.3px;
  line-height: 1.6;
  font-weight: 400;
  font-family: var(--font-sans);
  color: var(--text-secondary);
}

.card-badge-gallery {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.badge-image-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 56px;
  height: 56px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  flex: 0 0 auto;
}

.badge-image-wrap {
  width: 56px;
  height: 56px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.badge-image[src=""] {
  opacity: 0;
}

@media (max-width: 768px) {
  .card-badge-gallery {
    gap: 8px;
  }

  .badge-image-card,
  .badge-image-wrap {
    width: 48px;
    height: 48px;
  }

  .badge-label {
    font-size: 12px;
  }
}









/*kategori baru update 17:50 14/03/2026*/

.courses-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.course-sidebar {
  position: sticky;
  top: 96px;
}

.sidebar-card {
  border-radius: 18px;
  padding: 20px 18px 18px;
}

.sidebar-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 550;
  color: #111827;
  letter-spacing: -0.01em;
}

.sidebar-group+.sidebar-group {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eef2f7;
}

.sidebar-group h4 {
  margin: 0 0 12px;
  font-size: 0.93rem;
  font-weight: 500;
  color: #1f2937;
  letter-spacing: -0.01em;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-links a {
  position: relative;
  display: block;
  padding: 8px 0 8px 14px;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.45;
  border-radius: 10px;
  background: transparent;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.sidebar-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 999px;
  background: #2f4fd2;
  transform: translateY(-50%);
  transition: height 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.sidebar-links a:hover {
  color: #2f4fd2;
  transform: translateX(2px);
}

.sidebar-links a.active {
  color: #2f4fd2;
  font-weight: 500;
}

.sidebar-links a.active::before {
  height: 18px;
  opacity: 1;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  position: relative;
  padding: 8px 0 8px 16px;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
}

.sidebar-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cbd5e1;
}

.sidebar-instructors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-instructor-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #6b7280;
  font-size: 0.92rem;
  font-weight: 400;
  padding: 6px 0 6px 14px;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.sidebar-instructor-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 999px;
  background: #2f4fd2;
  transform: translateY(-50%);
  transition: height 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.sidebar-instructor-item:hover {
  color: #2f4fd2;
  transform: translateX(2px);
}

.sidebar-instructor-item.active {
  color: #2f4fd2;
  font-weight: 500;
}

.sidebar-instructor-item.active::before {
  height: 20px;
  opacity: 1;
}

.sidebar-instructor-photo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.courses-main {
  min-width: 0;
}

.course-filter {
  margin-bottom: 24px;
}

.filter-container {
  display: block;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-container input {
  width: 100%;
}

@media (max-width: 1024px) {
  .courses-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .course-sidebar {
    position: static;
  }
}




.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

.section-text {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-search-wrap {
  flex: 0 0 420px;
  max-width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 60px;
}

.hero-search-form {
  width: 100%;
  max-width: 420px;
  /* bisa dinaikkan ke 460px / 500px */
  position: relative;
}

.search-container {
  position: relative;
  width: 100%;
}

#course-search {
  width: 100%;
  height: 40px;
  padding: 0 18px 0 48px;
  border: 1px solid #d9dee8;
  border-radius: 999px;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
  background: #fff;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 18px;
  color: #7b8190;
}

.search-results {
  width: 100%;
}


/* ============================================
   EXPLORE TAGS (Coursera-style)
   ============================================ */
.explore-tags-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0 16px;
  border-bottom: 1px solid #f1f5f9;
  /* Subtle divider from Figma */
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  -webkit-overflow-scrolling: touch;
}

.explore-tags-section::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.explore-label {
  font-size: 14px;
  font-weight: 600;
  /* Matched Figma (slightly bolder than tags) */
  color: #1f2937;
  white-space: nowrap;
  flex-shrink: 0;
}

.explore-tags {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.explore-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  /* Thinned from 600 to match Figma */
  color: #475569;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.explore-tag:hover {
  background: #f0f4ff;
  border-color: #0056d2;
  color: #0056d2;
  transform: translateY(-1px);
}

.explore-tag.active {
  background: #0056d2;
  color: #fff;
  border-color: #0056d2;
}

/* ============================================
   RESULTS HEADER
   ============================================ */
.results-header {
  padding: 24px 0 16px;
}

.results-title {
  font-size: 20px;
  font-weight: 400;
  /* Reduced to look considerably less thick */
  color: #111827;
  letter-spacing: -0.01em;
}

/* ============================================
   PILL FILTER DROPDOWNS (Coursera-style)
   ============================================ */
.filter-pills-section {
  padding: 8px 0 16px;
  /* Reduced padding and removed border-bottom */
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vertical-divider {
  width: 1px;
  height: 24px;
  background-color: #e2e8f0;
  margin: 0 4px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  text-decoration: none;
}

.pill-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.pill-btn.pill-active {
  background: #0056d2;
  color: #fff;
  border-color: #0056d2;
}

.pill-btn.pill-outline {
  border-style: dashed;
  color: #64748b;
}

.pill-btn.pill-outline:hover {
  border-color: #0056d2;
  color: #0056d2;
}

.pill-btn.pill-clear {
  color: #dc2626;
  border-color: #fecaca;
}

.pill-btn.pill-clear:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.pill-arrow {
  transition: transform 0.2s ease;
}

.pill-dropdown {
  position: relative;
}

.pill-dropdown.open .pill-arrow {
  transform: rotate(180deg);
}

.pill-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 6px 0;
  animation: pillFadeIn 0.15s ease;
}

.pill-dropdown.open .pill-dropdown-menu {
  display: block;
}

@keyframes pillFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pill-dropdown-item {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s ease;
}

.pill-dropdown-item:hover {
  background: #f1f5f9;
}

.pill-dropdown-item.active {
  color: #0056d2;
  font-weight: 600;
  background: #f0f4ff;
}

/* ============================================
   COURSES GRID SECTION (Full-Width)
   ============================================ */
.courses-grid-section {
  padding: 32px 0;
}

.courses-grid-section .courses-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .courses-grid-section .courses-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .courses-grid-section .courses-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .courses-grid-section .courses-container {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PAGINATION (Overrides Removed for text style)
   ============================================ */

/* ============================================
   MOBILE RESPONSIVE FOR NEW COMPONENTS
   ============================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .explore-tags-section {
    padding: 16px 0;
  }

  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .results-title {
    font-size: 18px;
  }

  .courses-grid-section .courses-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pagination {
    gap: 12px;
  }

  .page-link {
    min-width: auto;
    height: auto;
    font-size: 14px;
    padding: 2px 4px;
  }
}

/* ============================================
   PRIVATE ACCESS MODAL - MODERN REDESIGN
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  /* Controlled by JS */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon-container {
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #0f172a;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 4px;
}

.modal-close-btn:hover {
  color: #0f172a;
}

.modal-body {
  padding: 32px;
}

.modal-description {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  color: #1e293b;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.input-with-icon input:focus {
  outline: none;
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}

.input-with-icon input[readonly] {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.form-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
}

.btn-text-link {
  background: none;
  border: none;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: opacity 0.2s ease;
}

.btn-text-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.modal-footer {
  margin-top: 12px;
}

.btn-verify-primary {
  width: 100%;
  padding: 14px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-verify-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-verify-primary:active {
  transform: translateY(0);
}

.btn-verify-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .modal-card {
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
    transform: translateY(100%);
  }

  .modal-overlay.active .modal-card {
    transform: translateY(0);
  }

  .modal-body {
    padding: 24px;
  }
}

/* ============================================
   COURSES EMPTY STATE (Not Found)
   ============================================ */
.courses-grid-section {
  position: relative;
  min-height: 400px;
}

.courses-empty-state {
  grid-column: 1 / -1;
  /* spans full grid width */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  animation: fadeIn 0.8s ease-out;
}

.empty-illustration-wrapper {
  margin-bottom: 32px;
  max-width: 380px;
  width: 100%;
}

.empty-illustration {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.05));
}

.courses-empty-state h3 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.courses-empty-state p {
  font-size: 15px;
  color: #64748b;
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.courses-empty-state p strong {
  color: #0f172a;
  font-weight: 600;
}

.empty-actions {
  display: flex;
  justify-content: center;
}

.btn-reset-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.btn-reset-filter:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
  color: #ffffff;
}

.btn-reset-filter svg {
  transition: transform 0.4s ease;
}

.btn-reset-filter:hover svg {
  transform: rotate(180deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .courses-empty-state {
    padding: 60px 16px;
  }

  .empty-illustration-wrapper {
    max-width: 280px;
  }

  .courses-empty-state h3 {
    font-size: 20px;
  }

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