/**
 * منصة التدريب — واجهة الزائر (خفيف · رسمي · عصري)
 */
body.jia-training-public {
  margin: 0;
  background: #f9fbfc;
  color: var(--jia-pub-ink, #163247);
  font-family: var(--jia-pub-font, "Segoe UI", Tahoma, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.jia-training-public .jia-skip-link:not(:focus):not(:focus-visible) {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

.jt-main {
  flex: 1;
}

/* —— Header —— */
.jt-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid rgba(15, 77, 112, 0.08);
}

.jt-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-block: 0.5rem;
}

.jt-header__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.jt-header__brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.jt-header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.jt-header__brand-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--jia-pub-brand-deep, #062436);
}

.jt-header__brand-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--jia-pub-muted, #5f7383);
}

.jt-header__toggle {
  margin-inline-start: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--jia-pub-brand);
}

.jt-header__collapse {
  flex: 1 1 100%;
}

@media (min-width: 992px) {
  .jt-header__collapse {
    flex: 1 1 auto;
    display: flex !important;
    justify-content: flex-end;
  }
}

.jt-header__menu {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

@media (min-width: 992px) {
  .jt-header__menu {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
  }
}

.jt-header__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--jia-pub-ink);
  transition: color 0.15s ease, background 0.15s ease;
}

.jt-header__link:hover,
.jt-header__link:focus-visible {
  color: var(--jia-pub-brand);
  background: rgba(10, 77, 110, 0.06);
}

.jt-header__link.is-active {
  color: var(--jia-pub-brand);
  font-weight: 600;
}

.jt-header__link--cta {
  color: #fff;
  background: var(--jia-pub-brand-deep, #062436);
}

.jt-header__link--cta:hover,
.jt-header__link--cta:focus-visible {
  color: #fff;
  background: var(--jia-pub-brand, #0a4d6e);
}

/* —— Hero —— */
.jt-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(2.5rem, 6vw, 3.5rem);
  background:
    linear-gradient(165deg, rgba(6, 36, 54, 0.88) 0%, rgba(10, 77, 110, 0.62) 100%),
    var(--jt-hero-image) center / cover no-repeat;
}

.jt-hero--stack .jt-hero__panel {
  max-width: 420px;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.jt-hero__title {
  margin: 0;
  font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.jt-hero__note {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.88);
}

.jt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.jt-btn--login {
  width: 100%;
  background: #fff;
  color: var(--jia-pub-brand-deep, #062436);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  margin-top: 0.35rem;
}

.jt-btn--login:hover {
  transform: translateY(-1px);
  background: #f5fafc;
  color: var(--jia-pub-brand, #0a4d6e);
}

/* —— Courses —— */
.jt-courses {
  padding: 2rem 0 2.5rem;
}

.jt-section-head__title {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--jia-pub-brand-deep);
  letter-spacing: 0.01em;
}

.jt-course-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15, 77, 112, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.jt-course-card:hover {
  border-color: rgba(10, 77, 110, 0.22);
}

.jt-course-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3f6;
}

.jt-course-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.jt-course-card__type {
  position: absolute;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  color: var(--jia-pub-brand-deep);
}

.jt-course-card__body {
  padding: 0.85rem 1rem 1rem;
}

.jt-course-card__cat {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--jia-pub-muted);
  text-transform: none;
}

.jt-course-card__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--jia-pub-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jt-pagination-wrap {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.jt-pagination-wrap .pagination {
  gap: 0.25rem;
  margin: 0;
  font-size: 0.85rem;
}

.jt-pagination-wrap .page-link {
  border-radius: 8px;
  color: var(--jia-pub-brand);
  border-color: rgba(15, 77, 110, 0.12);
  padding: 0.35rem 0.65rem;
}

.jt-pagination-wrap .page-item.active .page-link {
  background: var(--jia-pub-brand);
  border-color: var(--jia-pub-brand);
}

.jt-footer-slim {
  border-top: 1px solid rgba(15, 77, 112, 0.08);
  background: #fff;
  padding: 1rem 0 1.25rem;
}

.jt-footer-slim__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.78rem;
  color: var(--jia-pub-muted);
}

.jt-footer-slim__link {
  color: var(--jia-pub-brand);
  text-decoration: none;
  font-weight: 500;
}

.jt-footer-slim__link:hover {
  text-decoration: underline;
}

.jt-footer-slim__sep {
  opacity: 0.45;
}

.jt-footer-slim__copy {
  font-weight: 500;
}

/* —— تسجيل الدخول (التدريب) —— */
.jt-auth-shell {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.75rem) 1rem 2.5rem;
  min-height: calc(100vh - 120px);
  background:
    linear-gradient(180deg, #eef3f7 0%, #f9fbfc 55%, #fff 100%);
}

.jt-auth-shell__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(10, 77, 110, 0.12), transparent 70%);
  pointer-events: none;
}

.jt-auth-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid rgba(15, 77, 112, 0.12);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(6, 36, 54, 0.08);
  overflow: hidden;
}

.jt-auth-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(15, 77, 112, 0.08);
  background: linear-gradient(180deg, #f8fbfd 0%, #fff 100%);
}

.jt-auth-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--jia-pub-brand-deep);
}

.jt-auth-card__sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--jia-pub-muted);
}

.jt-auth-card__alert {
  margin: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.82rem;
  color: #9a3412;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}

.jt-auth-form {
  padding: 1.15rem 1.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.jt-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.jt-field__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--jia-pub-muted);
}

.jt-field__input {
  min-height: 46px;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(15, 77, 112, 0.16);
  border-radius: 10px;
  font-size: 0.92rem;
}

.jt-field__input:focus {
  outline: none;
  border-color: var(--jia-pub-brand);
  box-shadow: 0 0 0 3px rgba(10, 77, 110, 0.12);
}

.jt-field__input.is-invalid {
  border-color: #dc3545;
}

.jt-field__error {
  margin: 0;
  font-size: 0.78rem;
  color: #b42318;
}

.jt-field__error--block {
  text-align: center;
  padding: 0.5rem;
  background: #fef2f2;
  border-radius: 8px;
}

.jt-auth-form__submit {
  width: 100%;
  min-height: 50px;
  margin-top: 0.25rem;
  border: none;
  border-radius: 10px;
  background: var(--jia-pub-brand-deep);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(6, 36, 54, 0.2);
  transition: background 0.15s ease;
}

.jt-auth-form__submit:hover:not(:disabled) {
  background: var(--jia-pub-brand);
}

.jt-auth-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.jt-auth-card__foot {
  padding: 0.9rem 1.25rem 1.15rem;
  text-align: center;
  border-top: 1px solid rgba(15, 77, 112, 0.08);
}

.jt-auth-card__back {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--jia-pub-brand);
  text-decoration: none;
}

.jt-auth-card__back:hover {
  text-decoration: underline;
}