/* ==========================================================================
   NOVDA LMS — Modern High-Contrast Subject Cards & Smooth Animations
   Fixes color washouts, guarantees 100% crystal-clear readability
   ========================================================================== */

.n-modern-subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

@media (max-width: 991px) {
  .n-modern-subject-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .n-modern-subject-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Base Card — Pure White, Ultra-Clean, High Contrast */
.n-modern-subject-card {
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  position: relative !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.25s ease !important;
  will-change: transform, box-shadow;
}

/* Top Color Accent Line */
.n-subject-top-stripe {
  height: 4.5px;
  width: 100%;
  transition: height 0.25s ease;
}

.n-modern-subject-card:hover {
  transform: translateY(-6px) !important;
  border-color: #10B981 !important;
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.12) !important;
}

.n-modern-subject-card:hover .n-subject-top-stripe {
  height: 6px;
}

/* Card Interactive Toggle */
.n-modern-subject-toggle {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 24px 22px 18px;
  cursor: pointer;
  font-family: inherit;
  flex: 1;
}

.n-modern-subject-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  width: 100%;
}

.n-modern-subject-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.n-modern-subject-card:hover .n-modern-subject-icon {
  transform: scale(1.1) rotate(4deg);
}

.n-modern-subject-badge {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

/* Crystal-Clear Text Styling — High Contrast */
.n-modern-subject-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #0F172A !important; /* Pitch dark Slate 900 */
  margin: 0 0 8px 0 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.25 !important;
}

.n-modern-subject-desc {
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: #334155 !important; /* High-contrast Slate 700 */
  line-height: 1.6 !important;
  margin: 0 0 18px 0 !important;
  min-height: 46px !important;
}

.n-modern-subject-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 14px;
  border-top: 1px dashed #CBD5E1;
  margin-top: auto;
}

.n-modern-learn-btn {
  font-size: 13.5px;
  font-weight: 700;
  color: #059669;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.n-modern-subject-card:hover .n-modern-learn-btn {
  color: #047857;
}

.n-modern-arrow-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
}

.n-modern-subject-card.expanded .n-modern-arrow-bubble {
  transform: rotate(180deg);
  background: #059669;
  color: #FFFFFF;
}

/* Accordion Drawer */
.n-modern-subject-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding 0.3s ease;
  padding: 0 22px;
}

.n-modern-subject-card.expanded .n-modern-subject-drawer {
  max-height: 280px;
  opacity: 1;
  padding: 0 22px 22px;
}

.n-modern-detail-text {
  font-size: 14px;
  font-weight: 500;
  color: #1E293B; /* Slate 800 — solid & clear */
  line-height: 1.65;
  margin: 0 0 16px 0;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
}

.n-modern-enroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.n-modern-enroll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}
