/* ==========================================================================
   learn.drsoufiane.com — additions on top of the shared design system
   ========================================================================== */

.brand-sub {
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-blue-light);
  background: rgba(79, 127, 255, 0.12);
  border: 1px solid rgba(79, 127, 255, 0.25);
}

.container.narrow { max-width: 880px; }
.tag-alt { background: rgba(34, 211, 238, 0.1); color: #67e8f9; border-color: rgba(34, 211, 238, 0.22); }
a.tag { transition: border-color var(--transition), background var(--transition); }
a.tag:hover { border-color: var(--accent-blue-light); background: rgba(79, 127, 255, 0.14); }

/* ---------- Level sections (home) ---------- */
.level-section { padding-bottom: 56px; }
.level-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.level-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 4px; }
.level-head p { margin: 0; font-size: 1rem; }

/* ---------- Subject cards ---------- */
.subject-card { display: flex; flex-direction: column; height: 100%; }
.subject-card p { flex-grow: 1; }
.subject-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- Subject page ---------- */
.jump-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.jump-links .count {
  margin-left: 8px;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(79, 127, 255, 0.18);
  color: var(--accent-blue-light);
}

.material-group { padding-top: 40px; scroll-margin-top: 90px; }
.material-head { margin-bottom: 20px; }
.material-head h2 { font-size: 1.6rem; margin-bottom: 4px; }
.material-head p { margin: 0; font-size: 0.98rem; }

.file-list { display: flex; flex-direction: column; gap: 12px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), transform var(--transition);
}
.file-item:hover { border-color: var(--border-light); transform: translateY(-2px); }
.file-icon {
  flex-shrink: 0;
  width: 48px; height: 56px;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 8px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(160deg, #ef4444, #b91c1c);
}
.file-info { flex: 1; min-width: 0; }
.file-title { font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.file-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.file-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn-sm { padding: 9px 16px; font-size: 0.85rem; gap: 7px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
}
.empty-state p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.more-subjects { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border); }
.more-subjects h3 { font-size: 1.05rem; }

@media (max-width: 720px) {
  .level-head { flex-direction: column; align-items: flex-start; }
  .file-item { flex-wrap: wrap; }
  .file-info { flex-basis: calc(100% - 70px); }
  .file-actions { width: 100%; justify-content: flex-end; }
  .brand-sub { display: none; }
}
