/* Courses Discovery Section (Home Page)
 * Replicates the clean, rounded card design with category/level/price filters
 * and a 3-column product grid with search and pagination.
 */

.imz-home-discovery-wrap {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto 48px;
  position: relative;
  z-index: 5;
  margin-top: 40px;
}

.imz-home-discovery-title {
  text-align: center;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  color: #0b1f4f;
  margin: 0 0 32px;
  letter-spacing: -0.02em;
}

/* Outer Card Container */
.imz-discovery-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 16px 45px rgba(28, 75, 152, 0.07);
  margin-left: 4%;
  margin-right: 4%;
}

.imz-discovery-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

/* Left Sidebar */
.imz-discovery-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: #e2e8f0 1px solid;
  padding: 15px;
  border-radius: 15px;
  background-color: #ffffff;
}

.imz-sidebar-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9dbde;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.imz-sidebar-pill-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.imz-sidebar-pill-btn.active {
  background: #eff6ff;
  border-color: #1554c8;
  color: #1554c8;
  font-weight: 600;
}

.imz-sidebar-group {
  display: flex;
  flex-direction: column;
}

.imz-sidebar-group-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 0 0 10px;
}

/* Category Links */
.imz-sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.imz-sidebar-cat-btn {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imz-sidebar-cat-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.imz-sidebar-cat-btn.active {
  background: #eaf2ff;
  color: #1554c8;
  font-weight: 500;
}

/* Level & Price Pills */
.imz-sidebar-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.imz-sidebar-toggle-pill {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.imz-sidebar-toggle-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.imz-sidebar-toggle-pill.active {
  border-color: #1554c8;
  background: #eff6ff;
  color: #1554c8;
  font-weight: 500;
}

/* Right Main Area */
.imz-discovery-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Search Bar */
.imz-discovery-searchbar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 24px;
}

.imz-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.imz-search-input-wrap svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.imz-search-input {
  border: 0;
  outline: none;
  font-size: 13.5px;
  color: #0f172a;
  background: transparent;
  width: 100%;
}

.imz-search-input::placeholder {
  color: #94a3b8;
}

.imz-search-count {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

/* 3-Column Course Grid */
.imz-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Individual Course Card */
.imz-c-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.imz-c-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(21, 84, 200, 0.10);
}

/* Card Badges Row */
.imz-c-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.imz-badge-cat {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  white-space: nowrap;
}

.imz-badge-level {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.imz-badge-level.discovery {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.imz-badge-level.fluency {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
}

.imz-badge-level.beginner {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
}

.imz-badge-level.intermediate {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  color: #7e22ce;
}

.imz-badge-level.advanced {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}

.imz-badge-flag {
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  white-space: nowrap;
}

/* Title & Description */
.imz-c-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 41px;
}

.imz-c-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

/* Meta: Duration & Mode */
.imz-c-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.imz-c-meta-col {
  display: flex;
  flex-direction: column;
}

.imz-c-meta-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 2px;
}

.imz-c-meta-val {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

/* Ideal for */
.imz-c-ideal {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fee Box */
.imz-c-fee-box {
  background: #f0f6ff;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

.imz-c-fee-lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.imz-c-fee-val {
  font-size: 14.5px;
  font-weight: 800;
  color: #1554c8;
}

/* Action Buttons */
.imz-c-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.imz-btn-view-details {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a !important;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.imz-btn-view-details:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a !important;
}

.imz-btn-enroll-now {
  flex: 1.15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1554c8;
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.imz-btn-enroll-now:hover {
  background: #0d3d9a;
}

.imz-btn-enroll-now.single {
  flex: 1;
}

/* Pagination */
.imz-c-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.imz-p-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.imz-p-btn:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.imz-p-btn.active {
  background: #1554c8;
  border-color: #1554c8;
  color: #ffffff;
  font-weight: 600;
}

.imz-p-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Empty State */
.imz-c-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
  font-size: 14.5px;
}

.imz-c-empty-btn {
  margin-top: 14px;
  display: inline-block;
  background: #1554c8;
  color: #ffffff;
  border: 0;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1100px) {
  .imz-courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .imz-courses-grid {
    grid-template-columns: 1fr;
  }

  .imz-home-discovery-wrap {
    width: calc(100% - 32px);
  }

  .imz-discovery-card {
    padding: 24px 18px;
  }
}