/* LMS Course Module — Glass Futurism */

.lms-catalog-section {
  position: relative;
}

/* ─── Hero ─── */
.lms-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 2.25rem 2rem;
  margin-bottom: 1.75rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 95, 0.92) 45%, rgba(34, 176, 175, 0.35) 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.22);
  color: #fff;
}

.lms-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 176, 175, 0.28) 0%, transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(99, 102, 241, 0.22) 0%, transparent 38%);
  pointer-events: none;
}

.lms-hero-glow {
  position: absolute;
  width: 55%;
  height: 48px;
  bottom: -18px;
  left: 22%;
  background: radial-gradient(ellipse, rgba(34, 176, 175, 0.45) 0%, transparent 72%);
  filter: blur(14px);
  pointer-events: none;
}

.lms-hero-content {
  position: relative;
  z-index: 1;
}

.lms-hero-kicker {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
  background: rgba(34, 176, 175, 0.14);
  border: 1px solid rgba(94, 234, 212, 0.28);
}

.lms-hero h1 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff !important;
}

.lms-hero p {
  max-width: 42rem;
  color: rgba(226, 232, 240, 0.92) !important;
  font-size: 1rem;
  line-height: 1.6;
}

/* ─── Filter bar ─── */
.lms-filter-bar {
  margin-bottom: 2rem;
}

.lms-filter-glass {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.65rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 12px 36px rgba(15, 23, 42, 0.08);
}

.lms-filter-field {
  flex: 1 1 140px;
  min-width: 0;
}

.lms-filter-field--search {
  flex: 2 1 220px;
}

.lms-filter-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b !important;
}

.lms-filter-input {
  width: 100%;
  height: 42px;
  padding: 0 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lms-filter-input:focus {
  outline: none;
  border-color: rgba(34, 176, 175, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 176, 175, 0.15);
}

.lms-filter-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 42px;
  padding: 0 1.1rem;
  border: 1px solid rgba(34, 176, 175, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 176, 175, 0.95) 0%, rgba(20, 130, 130, 0.98) 100%);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 18px rgba(34, 176, 175, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lms-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px rgba(34, 176, 175, 0.38);
  color: #fff;
}

.lms-filter-btn i {
  font-size: 0.82rem;
  opacity: 0.95;
}

/* ─── Course cards ─── */
.lms-course-grid {
  margin-top: 0.25rem;
}

.lms-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  color: #1e293b;
}

.lms-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 176, 175, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 18px 42px rgba(15, 23, 42, 0.14), 0 0 28px rgba(34, 176, 175, 0.18);
}

.lms-card-thumb {
  position: relative;
  height: 176px;
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #3949ab;
  overflow: hidden;
}

.lms-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.lms-card:hover .lms-card-thumb img {
  transform: scale(1.05);
}

.lms-card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.55) 100%);
  pointer-events: none;
}

.lms-card-badges {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.75rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lms-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.15rem 1.2rem 1.2rem;
}

.lms-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #0f172a !important;
}

.lms-card-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #475569 !important;
}

.lms-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.lms-card-instructor {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155 !important;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lms-card-instructor i {
  color: #22b0af;
  margin-right: 0.2rem;
}

.lms-card-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(34, 176, 175, 0.95), rgba(20, 130, 130, 0.98));
  border: 1px solid rgba(34, 176, 175, 0.4);
  box-shadow: 0 4px 14px rgba(34, 176, 175, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lms-card-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34, 176, 175, 0.35);
  color: #fff !important;
}

.lms-card-btn i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.lms-card-btn:hover i {
  transform: translateX(2px);
}

.lms-badge {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.lms-badge-free { background: rgba(220, 252, 231, 0.92); color: #166534; }
.lms-badge-paid { background: rgba(255, 237, 213, 0.92); color: #c2410c; }
.lms-badge-video { background: rgba(219, 234, 254, 0.92); color: #1e40af; }
.lms-badge-audio { background: rgba(243, 232, 255, 0.92); color: #6b21a8; }
.lms-badge-book { background: rgba(252, 231, 243, 0.92); color: #9d174d; }

.lms-catalog-empty {
  color: #64748b !important;
}

.lms-pagination {
  margin-top: 0.5rem;
}

/* ─── Shared LMS utilities (checkout, stats, etc.) ─── */
.lms-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.lms-stat-card h4 { margin: 0; color: #3949ab; font-weight: 700; }
.lms-stat-card p { margin: 0; font-size: 0.85rem; color: #475569; }

.lms-checkout-box {
  background: #fafafa;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
}

.lms-payment-option {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.lms-payment-option:has(input:checked) {
  border-color: #3949ab;
  background: #e8eaf6;
}

/* Legacy card class support on other LMS pages */
.lms-card.card .card-body {
  background: transparent;
  padding: 1.15rem 1.2rem 1.2rem;
}

.lms-card.card .card-title {
  color: #0f172a !important;
}

/* ─── Dark mode ─── */
html[data-theme="dark"] .lms-hero {
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.98) 0%, rgba(30, 41, 59, 0.95) 50%, rgba(34, 176, 175, 0.22) 100%);
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .lms-filter-glass {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 36px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .lms-filter-label {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .lms-filter-input {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

html[data-theme="dark"] .lms-filter-input:focus {
  border-color: rgba(34, 176, 175, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 176, 175, 0.12);
}

html[data-theme="dark"] .lms-card {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 36px rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
}

html[data-theme="dark"] .lms-card:hover {
  border-color: rgba(34, 176, 175, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 42px rgba(0, 0, 0, 0.45), 0 0 32px rgba(34, 176, 175, 0.15);
}

html[data-theme="dark"] .lms-card-title,
html[data-theme="dark"] .lms-card.card .card-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .lms-card-desc {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .lms-card-instructor {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .lms-card-instructor i {
  color: #5eead4;
}

html[data-theme="dark"] .lms-card-thumb {
  background: linear-gradient(145deg, #1e293b, #334155);
  color: #7dd3fc;
}

html[data-theme="dark"] .lms-badge-free {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.2);
}

html[data-theme="dark"] .lms-badge-paid {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
  border-color: rgba(253, 186, 116, 0.2);
}

html[data-theme="dark"] .lms-badge-video {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.2);
}

html[data-theme="dark"] .lms-badge-audio {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
  border-color: rgba(216, 180, 254, 0.2);
}

html[data-theme="dark"] .lms-badge-book {
  background: rgba(236, 72, 153, 0.22);
  color: #f9a8d4;
  border-color: rgba(249, 168, 212, 0.2);
}

html[data-theme="dark"] .lms-catalog-empty {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .lms-checkout-box {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

html[data-theme="dark"] .lms-stat-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .lms-stat-card h4 {
  color: #7dd3fc;
}

html[data-theme="dark"] .lms-stat-card p {
  color: #94a3b8;
}

@media (max-width: 767px) {
  .lms-catalog-section.pt-115 {
    padding-top: 88px !important;
  }

  .lms-catalog-section.pb-120 {
    padding-bottom: 70px !important;
  }

  .lms-hero {
    padding: 1.35rem 1.15rem;
    margin-bottom: 1rem;
  }

  .lms-hero h1 {
    font-size: 1.45rem;
  }

  .lms-filter-bar {
    margin-bottom: 1.25rem;
  }

  .lms-filter-glass {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.55rem;
  }

  .lms-filter-field,
  .lms-filter-field--search {
    flex: 0 0 auto;
    width: 100%;
  }

  .lms-filter-label {
    margin-bottom: 0.2rem;
  }

  .lms-filter-input {
    height: 40px;
  }

  .lms-filter-btn {
    width: 100%;
    height: 40px;
    margin-top: 0.15rem;
  }

  .lms-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .lms-card-btn {
    justify-content: center;
  }
}

@media print {
  .no-print { display: none !important; }
  .user-sidebar, .portal-sidebar-toggle-wrap { display: none !important; }
  .col-lg-9 { width: 100% !important; max-width: 100% !important; }
}
