/* ======================================================== */
/* --- Modern Academy Course Directory Listing Styles       */
/* ======================================================== */
.academy-listing-wrapper {
  max-width: 1050px;
  margin: 60px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 0 24px;
}

.listing-header-block {
  margin-bottom: 40px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.listing-main-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.5px;
}

/* Minimal navigation tabs for filtering tracks */
.track-filter-menu {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.filter-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* ======================================================== */
/* --- Tracks Directory Layout Grid                         */
/* ======================================================== */
.academy-tracks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.academy-compact-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.academy-compact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.card-main-body {
  padding: 24px 24px 16px 24px;
  flex: 1;
}

/* Tiny tracking categorization header label pills */
.card-track-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  display: inline-block;
  align-self: flex-start;
  margin: 20px 0 0 24px;
  border-radius: 4px;
}

.card-track-badge.automation {
  background: #f5f3ff;
  color: #6366f1;
}

.card-track-badge.routing {
  background: #e0f2fe;
  color: #0369a1;
}

.card-track-title {
  margin: 12px 0 8px 0;
}

.card-track-title a {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.35;
}

.card-track-title a:hover {
  color: #4f46e5;
}

.card-track-teaser {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 20px 0;
}

/* Core specifications inside standard card frame blocks */
.card-spec-row {
  display: flex;
  gap: 12px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 14px;
  margin-bottom: 16px;
}

.spec-metric {
  font-size: 0.82rem;
  color: #64748b;
}

.spec-metric strong {
  color: #1e293b;
}

/* Technological tag indicators footer row elements */
.skills-tags-footer {
  display: flex;       /* Forces tags to align horizontally side-by-side */
  flex-wrap: wrap;     /* Allows tags to gracefully drop to a 2nd line if they run out of room */
  gap: 8px 6px;        /* Adds explicit vertical and horizontal spacing between wrapped elements */
  margin-top: auto;    /* Pushes the tags neatly to the absolute bottom of the card content */
  width: 100%;
}

.skill-mini-tag {
  font-size: 0.72rem;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap; /* CRUCIAL: Stops a single long tag (like BGP Path Attributes) from breaking in half */
  display: inline-block;
}

/* --- Card Action Bottom Footer Bar                      */
/* ======================================================== */
.card-action-footer {
  background: #f8fafc;
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-student-metric {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

.btn-card-explore {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4f46e5;
  text-decoration: none;
  transition: color 0.15s ease;
}

.btn-card-explore:hover {
  color: #0f172a;
}

/* Grid breakdown overrides scaling down across viewports breakpoints */
@media (max-width: 960px) {
  .academy-tracks-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-header-block { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .academy-tracks-grid { grid-template-columns: 1fr; }
  .track-filter-menu { width: 100%; overflow-x: auto; padding-bottom: 4px; }
}
