/* Physics SciEd Student Dashboard — One-Line Colored Cards Hotfix v1.0
   Goal:
   1) force the four student quick-tool cards to align in one horizontal row on desktop;
   2) reduce visual bulk;
   3) add gentle color identity to each card while keeping a professional production look.
*/

:root {
  --psc-dash-navy: #10233F;
  --psc-dash-gold: #F7C928;
  --psc-dash-border: #E7DFC3;
  --psc-dash-muted: #5C667A;

  --psc-card-virtual-bg: #FFF7D8;
  --psc-card-virtual-bd: #E6C860;

  --psc-card-library-bg: #EAF2FF;
  --psc-card-library-bd: #AFC6F5;

  --psc-card-assessment-bg: #EEF8E8;
  --psc-card-assessment-bd: #B7D8A6;

  --psc-card-research-bg: #F5EEFF;
  --psc-card-research-bd: #CDB9F2;
}

.student-navbar {
  border-bottom: 3px solid var(--psc-dash-gold) !important;
}

.student-welcome-panel {
  padding: 1.15rem 1.35rem !important;
}

.student-feature-links {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 0.7rem !important;
  margin-top: 1rem !important;
  align-items: stretch !important;
}

.student-feature-links > * {
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  grid-column: auto !important;
  flex: initial !important;
}

.student-feature-link,
.student-feature-link.student-library-feature-link,
.student-feature-link.student-assessment-feature-link,
.student-feature-link.student-research-feature-link {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0.65rem !important;
  min-height: 56px !important;
  padding: 0.55rem 0.85rem !important;
  border: 1px solid var(--psc-dash-border) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  text-decoration: none !important;
  overflow: hidden !important;
  position: relative !important;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease !important;
}

.student-feature-links > :nth-child(1) {
  background: var(--psc-card-virtual-bg) !important;
  border-color: var(--psc-card-virtual-bd) !important;
}
.student-feature-link.student-library-feature-link,
.student-feature-links > :nth-child(2) {
  background: var(--psc-card-library-bg) !important;
  border-color: var(--psc-card-library-bd) !important;
}
.student-feature-link.student-assessment-feature-link,
.student-feature-links > :nth-child(3) {
  background: var(--psc-card-assessment-bg) !important;
  border-color: var(--psc-card-assessment-bd) !important;
}
.student-feature-link.student-research-feature-link,
.student-feature-links > :nth-child(4) {
  background: var(--psc-card-research-bg) !important;
  border-color: var(--psc-card-research-bd) !important;
}

.student-feature-links > :nth-child(1)::before,
.student-feature-link.student-library-feature-link::before,
.student-feature-link.student-assessment-feature-link::before,
.student-feature-link.student-research-feature-link::before,
.student-feature-links > :nth-child(2)::before,
.student-feature-links > :nth-child(3)::before,
.student-feature-links > :nth-child(4)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
}
.student-feature-links > :nth-child(1)::before { background: #D7AF20; }
.student-feature-link.student-library-feature-link::before,
.student-feature-links > :nth-child(2)::before { background: #6A95E8; }
.student-feature-link.student-assessment-feature-link::before,
.student-feature-links > :nth-child(3)::before { background: #6FA24F; }
.student-feature-link.student-research-feature-link::before,
.student-feature-links > :nth-child(4)::before { background: #8A67C7; }

.student-feature-link:hover,
.student-feature-link:focus-visible,
.student-feature-link.student-library-feature-link:hover,
.student-feature-link.student-assessment-feature-link:hover,
.student-feature-link.student-research-feature-link:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(16, 35, 63, 0.06) !important;
  outline: none !important;
}

.student-feature-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(16, 35, 63, 0.12) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--psc-dash-navy) !important;
}

.student-feature-icon i {
  font-size: 0.95rem !important;
}

.student-feature-link > span:not(.student-feature-icon) {
  min-width: 0 !important;
  display: block !important;
}

.student-feature-link strong {
  display: block !important;
  margin: 0 !important;
  color: var(--psc-dash-navy) !important;
  font-size: 0.82rem !important;
  line-height: 1.2 !important;
  font-weight: 750 !important;
}

.student-feature-link small,
.student-feature-link > i:last-child {
  display: none !important;
}

@media (max-width: 1180px) {
  .student-feature-links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .student-feature-links {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  .student-feature-link,
  .student-feature-link.student-library-feature-link,
  .student-feature-link.student-assessment-feature-link,
  .student-feature-link.student-research-feature-link {
    min-height: 54px !important;
    padding: 0.52rem 0.72rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-feature-link {
    transition: none !important;
  }

  .student-feature-link:hover,
  .student-feature-link:focus-visible {
    transform: none !important;
  }
}
