/* assets/css/training.css */

.sub-hero {
  padding: 56px 0;
}

.breadcrumbs {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 8px;
}
.breadcrumbs a {
  color: var(--muted);
}
.breadcrumbs a:hover {
  color: var(--text);
}

.page-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
}

.page-lead {
  color: #b9c2ea;
  max-width: 860px;
  margin-bottom: 0;
}

/* Toolbox أعلى الدورات (مثل المشاريع) */
.toolbar {
  margin-top: 16px;
  margin-bottom: 10px;
}
.toolbox {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.search-box {
  position: relative;
}
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9bb0d3;
  font-size: .95rem;
}
.search-box input {
  width: 100%;
  padding-left: 34px;
}

.filters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 6px 14px;
  font-size: .85rem;
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.chip.active {
  background: var(--gold);
  color: #0b1020;
  border-color: var(--gold);
  font-weight: 700;
}

/* layout */
.training-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .training-layout {
    grid-template-columns: 1fr;
  }
}

/* الفلتر الجانبي */
.side-filters {
  text-align: right;
  background:
    radial-gradient(circle at 0 0, rgba(241,196,76,.12), transparent 60%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px 10px 14px 14px;
  position: sticky;
  top: 80px;
}
@media (max-width: 900px) {
  .side-filters {
    position: static;
  }
}

.side-filters-header {
  display: flex;
  flex-direction: row;
  direction: rtl;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 14px;
}
.side-filters-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  color: var(--gold);
  font-size: 1.05rem;
  margin: 0;
  box-shadow: 0 0 6px rgba(212,175,55,.25);
}
.side-filters-title {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
  text-align: right;
}
.side-filters-title h3 {
  margin: 0;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.side-count {
  font-size: .85rem;
  color: #9bb0d3;
  margin-bottom: 6px;
  text-align: right;
}
.side-divider {
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(255,255,255,.15), transparent);
  margin: 6px 0 10px;
}

.filter-group {
  text-align: right;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255,255,255,.08);
}
.filter-group:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 8px;
}
.filter-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: .9rem;
  color: #cfe0ff;
  font-weight: 600;
  justify-content: flex-end;
  flex-direction: row-reverse;
}
.filter-group-title i {
  font-size: .95rem;
  color: var(--gold);
}
.filter-group small {
  display: block;
  color: #9bb0d3;
  font-size: .82rem;
  margin-bottom: 4px;
}

.filter-group label {
  display: block;
  direction: rtl;
  text-align: right;
  font-size: .9rem;
  color: #cfe0ff;
  cursor: pointer;
  margin-bottom: 8px;
  line-height: 1.8;
}
.filter-group label input {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 6px;
  margin-right: 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.filter-group label:hover {
  color: var(--gold);
}

.filters-reset {
  text-align: right;
  margin-top: 6px;
}
.filters-reset button {
  background: none;
  border: 0;
  color: #9bb0d3;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  flex-direction: row-reverse;
  padding: 4px 0;
}
.filters-reset button:hover {
  color: var(--gold);
}

/* شبكة الدورات */
.courses {
  display: grid;
  gap: 18px;
  margin-top: 0;
}
@media (min-width: 900px) {
  .courses {
    grid-template-columns: repeat(3, 1fr);
  }
}
.course {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: .25s ease;
  display: flex;
  flex-direction: column;
}
.course:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}
.course-thumb {
  aspect-ratio: 16 / 9;
  background: #0a1430 center/cover no-repeat;
}
.course-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
}
.course-meta {
  color: #9bb0d3;
  font-size: .9rem;
  margin-bottom: 8px;
}
.course-body p {
  margin: 0 0 8px;
  color: #cfe0ff;
  font-size: .94rem;
}
.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.tag {
  background: #0a1430;
  border: 1px solid #1e2e57;
  color: #cfe0ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .85rem;
}
.price {
  font-weight: 800;
  color: var(--gold);
  margin-top: 8px;
  font-size: .95rem;
}
.free {
  color: #00ffcc;
  font-weight: 700;
}
.btn-enroll {
  margin-top: 10px;
  padding: 10px 16px;
  text-align: center;
  border-radius: 10px;
  display: inline-block;
  font-size: .92rem;
  border: none;
  cursor: pointer;
}

/* المدربون */
.instructors {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
@media (min-width: 900px) {
  .instructors {
    grid-template-columns: repeat(4, 1fr);
  }
}
.instr {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  padding: 18px;
  transition: .25s;
}
.instr:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}
.instr-avatar,
.instr-avatar-img {
  width: 90px;
  height: 90px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.instr-avatar {
  background: radial-gradient(circle at 30% 20%, #f1c44c, #6f42c1);
  color: #0b1020;
  font-size: 2rem;
  font-weight: 800;
}
.instr-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.instr h3 {
  margin: 0;
  font-size: 1.1rem;
}
.instr p {
  margin: 4px 0;
  color: #b9c2ea;
  font-size: .9rem;
}

/* CTA */
.cta-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background:
    linear-gradient(0deg, rgba(11,16,32,.45), rgba(11,16,32,.45)),
    url('/img/programing.jpg') center/cover no-repeat;
  text-align: center;
}
