body.models-page {
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(147, 112, 219, 0.14), transparent 60%),
    radial-gradient(640px 380px at 90% 2%, rgba(252, 90, 141, 0.12), transparent 58%),
    linear-gradient(180deg, #fbf9ff 0%, #ffffff 38%, #fbf9ff 100%);
}

body.models-page #page {
  overflow: visible;
}

body.models-page .models-nav-item > a.h-link {
  font-weight: 700;
}

body.models-page .models-nav-item.is-current > a.h-link,
body.models-page .models-nav-item > a.h-link:hover {
  color: var(--purple) !important;
}

.models-section {
  position: relative;
  padding-top: 155px;
  overflow: hidden;
}

.models-section::before,
.models-section::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.models-section::before {
  top: 72px;
  left: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(147, 112, 219, 0.16) 0%, rgba(147, 112, 219, 0) 70%);
}

.models-section::after {
  right: -140px;
  bottom: 110px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(252, 90, 141, 0.14) 0%, rgba(252, 90, 141, 0) 72%);
}

.models-section .container {
  position: relative;
  z-index: 2;
}

.models-hero-copy {
  margin-bottom: 38px;
}

.models-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid rgba(147, 112, 219, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(31, 36, 68, 0.08);
  color: var(--purple);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.models-hero-copy .h2-title {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.models-hero-copy .p-lg {
  max-width: 760px;
  margin: 18px auto 0;
  color: #5a6075;
}

.models-hero-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 30px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.12), rgba(252, 90, 141, 0.12));
  border: 1px solid rgba(147, 112, 219, 0.18);
  box-shadow: 0 12px 26px rgba(31, 36, 68, 0.08);
  color: var(--header-color);
  font-weight: 700;
}

.models-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.models-section-head h3 {
  margin-bottom: 8px;
}

.models-section-head p {
  margin-bottom: 0;
  color: #73798e;
}

.models-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid rgba(147, 112, 219, 0.16);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(31, 36, 68, 0.08);
  backdrop-filter: blur(10px);
}

.models-toolbar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.12), rgba(252, 90, 141, 0.1));
  color: var(--header-color);
  font-weight: 700;
  white-space: nowrap;
}

.models-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 540px);
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(147, 112, 219, 0.14);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.models-search svg {
  color: #8187a0;
  flex: 0 0 auto;
}

.models-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--header-color);
  font-size: 0.98rem;
}

.models-search input::placeholder {
  color: #9aa0b6;
}

.models-empty {
  margin-bottom: 26px;
  padding: 34px 24px;
  text-align: center;
  border: 1px dashed rgba(147, 112, 219, 0.24);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 30px rgba(31, 36, 68, 0.06);
}

.models-empty h5 {
  margin-bottom: 8px;
}

.models-empty p {
  margin-bottom: 0;
  color: #73798e;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(147, 112, 219, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 42px rgba(31, 36, 68, 0.08);
  overflow: hidden;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, opacity 0.32s ease;
}

.model-card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.model-card:hover {
  transform: translateY(-6px);
  border-color: rgba(147, 112, 219, 0.28);
  box-shadow: 0 28px 56px rgba(31, 36, 68, 0.12);
}

.model-poster {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--model-accent, #7b5dd6), var(--model-accent-2, #fc5a8d));
}

.model-poster__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--model-accent, #7b5dd6), var(--model-accent-2, #fc5a8d));
}

.model-poster__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 15, 34, 0.06) 0%, rgba(11, 15, 34, 0.2) 40%, rgba(11, 15, 34, 0.82) 100%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 34%);
  pointer-events: none;
}

.model-poster__media.is-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 30%);
}

.model-poster__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  transition: transform 0.38s ease, filter 0.38s ease;
}

.model-poster__media.is-fallback .model-poster__image {
  display: none;
}

.model-card:hover .model-poster__image {
  transform: scale(1.06);
  filter: saturate(1.04) contrast(1.02);
}

.model-poster__art {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 22px 22px 78px;
}

.model-poster__eyebrow,
.model-poster__role,
.model-poster__name,
.model-poster__domain {
  position: relative;
  z-index: 1;
}

.model-poster__eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 30px;
  margin-bottom: auto;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.model-poster__name {
  color: #ffffff;
  font-size: 1.65rem;
  line-height: 1.18;
  font-weight: 800;
  text-shadow: 0 8px 28px rgba(11, 15, 34, 0.3);
}

.model-poster__role {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 34px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
}

.model-poster__domain {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  word-break: break-word;
  text-shadow: 0 4px 18px rgba(11, 15, 34, 0.28);
}

.model-preview-btn {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(17, 27, 33, 0.58);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(17, 27, 33, 0.18);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.model-preview-btn:hover {
  transform: translateY(-2px);
  background: rgba(17, 27, 33, 0.74);
  border-color: rgba(255, 255, 255, 0.34);
}

.model-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  padding: 22px;
}

.model-card__body h5 {
  margin-bottom: 0;
}

.model-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(147, 112, 219, 0.08);
  border: 1px solid rgba(147, 112, 219, 0.16);
  color: var(--header-color);
  font-size: 0.82rem;
  font-weight: 600;
}

.model-url {
  display: block;
  color: #72798d;
  font-size: 0.92rem;
  word-break: break-all;
}

.model-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.models-outline-btn,
.models-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.models-outline-btn:hover,
.models-link-btn:hover {
  transform: translateY(-2px);
}

.models-outline-btn {
  border: 1px solid rgba(147, 112, 219, 0.16);
  background: rgba(147, 112, 219, 0.06);
  color: var(--header-color);
}

.models-link-btn {
  border: 1px solid rgba(147, 112, 219, 0.18);
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.14), rgba(252, 90, 141, 0.14));
  color: var(--header-color);
}

.models-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 27, 33, 0.6);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 12000;
}

.models-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.models-modal__dialog {
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(17, 27, 33, 0.28);
}

.models-modal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(147, 112, 219, 0.12);
}

.models-modal__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.models-modal__title-wrap strong {
  color: var(--header-color);
  font-size: 1rem;
}

.models-modal__title-wrap span {
  color: #72798d;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.models-modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.models-modal__link {
  min-height: 42px;
  font-size: 0.88rem;
}

.models-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(147, 112, 219, 0.18);
  border-radius: 50%;
  background: #ffffff;
  color: var(--header-color);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.models-modal__close:hover {
  transform: translateY(-1px);
  background: rgba(147, 112, 219, 0.08);
}

.models-modal__hint {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(147, 112, 219, 0.1);
  background: rgba(147, 112, 219, 0.06);
  color: #656c82;
  font-size: 0.9rem;
}

.models-modal__body {
  min-height: 68vh;
  background: #f9f7fd;
}

.models-modal__body iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 68vh;
  border: 0;
  background: #ffffff;
}

body.models-modal-open {
  overflow: hidden;
}

html.lang-ar body.models-page {
  direction: rtl;
}

html.lang-ar body.models-page .models-section-head,
html.lang-ar body.models-page .models-toolbar,
html.lang-ar body.models-page .model-card__actions,
html.lang-ar body.models-page .models-modal__top,
html.lang-ar body.models-page .models-modal__actions {
  direction: rtl;
}

html.lang-ar body.models-page .models-section-head,
html.lang-ar body.models-page .models-hero-copy,
html.lang-ar body.models-page .model-card__body,
html.lang-ar body.models-page .models-modal__title-wrap,
html.lang-ar body.models-page .models-modal__hint {
  text-align: right;
}

html.lang-ar body.models-page .model-preview-btn {
  left: 34px;
  right: auto;
}

@media (max-width: 1199.98px) {
  .models-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .models-section {
    padding-top: 140px;
  }

  .models-toolbar,
  .models-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .models-search {
    width: 100%;
  }

  .models-modal__top {
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .models-section {
    padding-top: 130px;
  }

  .models-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .models-hero-copy .h2-title {
    font-size: 2.4rem;
  }

  .model-poster,
  .model-poster__art {
    min-height: 240px;
  }

  .model-preview-btn {
    right: 30px;
    bottom: 30px;
  }

  html.lang-ar body.models-page .model-preview-btn {
    left: 30px;
  }

  .models-modal {
    padding: 14px;
  }

  .models-modal__dialog {
    max-height: calc(100vh - 28px);
  }

  .models-modal__top,
  .models-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .models-modal__body,
  .models-modal__body iframe {
    min-height: 56vh;
  }
}

@media (max-width: 575.98px) {
  .models-kicker,
  .models-hero-count,
  .models-toolbar__count {
    width: 100%;
  }

  .models-hero-count,
  .models-toolbar__count {
    justify-content: center;
  }

  .model-card__actions > * {
    width: 100%;
  }
}
