/* صفحه ویدیوهای آموزشی Gpattern — کارت‌ها بر پایه بنر Final CTA */

body.gp-vid-lock {
  overflow: hidden;
}

.gp-videos {
  position: relative;
  isolation: isolate;
  padding-block-end: 2.5rem;
  background: #fff;
}

.gp-videos__top {
  margin-block-end: -1px;
}

.gp-videos__top > .gp-vid-hero,
.gp-videos__top > .gp-quick {
  position: relative;
  z-index: 1;
}

.gp-videos .gp-top::after {
  height: 7.5rem;
  background: linear-gradient(to bottom, transparent 0%, rgba(244, 249, 255, 0.35) 42%, var(--gp-seam) 100%);
}

.gp-videos__top > .gp-quick {
  margin-block-end: 1.25rem;
}

.gp-videos > .gp-section:not(.gp-final-cta) {
  position: relative;
  background: #fff;
  overflow: visible;
}

.gp-videos > .gp-section > .gp-container {
  position: relative;
  z-index: 3;
}

/* ── Hero ─────────────────────────────────────────────── */
.gp-vid-hero {
  padding-block: 0;
  background: transparent;
}

.gp-vid-hero__panel {
  position: relative;
  overflow: hidden;
  border-radius: clamp(1.5rem, 3vw, 2.5rem);
  border: 2px solid #fff;
  background: #e8f1ff;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
}

.gp-vid-hero__visual {
  position: relative;
}

.gp-vid-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.28) 34%, transparent 58%);
  pointer-events: none;
}

.gp-vid-hero__banner {
  display: block;
  width: 100%;
  height: clamp(280px, 38vw, 460px);
  object-fit: cover;
  object-position: center 42%;
}

.gp-vid-hero__content {
  position: absolute;
  z-index: 2;
  inset-block: 0;
  inset-inline-start: clamp(1.5rem, 4.5vw, 3.5rem);
  inset-inline-end: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-inline-size: min(28rem, 52%);
}

.gp-vid-hero__title {
  margin: 0 0 0.55rem;
  color: #071a3a;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.gp-vid-hero__title span {
  color: var(--gp-primary);
}

.gp-vid-hero__lead {
  margin: 0 0 1.1rem;
  max-inline-size: 26rem;
  color: #5b6b7c;
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.75;
}

.gp-vid-hero__content .gp-btn--primary {
  align-self: flex-start;
}

/* ── Catalog / filters / cards ────────────────────────── */
.gp-vid-list {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-block-start: -3.25rem;
  padding-block: calc(1.75rem + 3.25rem) 4.5rem;
  background: transparent !important;
}

.gp-vid-list__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #f4f9ff;
  background-image: var(--gp-lazy-bg, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 7.5rem,
    #000 calc(100% - 7.5rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 7.5rem,
    #000 calc(100% - 7.5rem),
    transparent 100%
  );
}

.gp-videos .gp-final-cta {
  margin-block-start: -4.5rem;
  padding-block-start: calc(clamp(1.25rem, 2.5vw, 2rem) + 3.25rem);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.72) 38%, #ffffff 68%, #f8fbff 100%);
}

@media (scripting: none) {
  .gp-vid-list__bg {
    background-image: url("/images/gpattern/videos/bg.png");
  }
}

.gp-vid-list__head {
  max-inline-size: 40rem;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.gp-vid-list__title {
  margin: 0 0 0.55rem;
  color: #071a3a;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.gp-vid-list__lead {
  margin: 0 auto;
  max-inline-size: 34rem;
  color: #777777;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-weight: 500;
  line-height: 1.85;
}

.gp-vid-list__lead::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 4px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: var(--gp-primary);
}

.gp-vid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-block-end: 1.15rem;
}

.gp-vid-search {
  position: relative;
  flex: 1 1 16rem;
  min-width: 0;
}

.gp-vid-search__ico {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0.9rem;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.gp-vid-search input {
  width: 100%;
  min-height: 2.85rem;
  padding-block: 0.65rem;
  padding-inline: 2.55rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.gp-vid-search input::placeholder {
  color: #94a3b8;
}

.gp-vid-search input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.gp-vid-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.gp-vid-sort__label {
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
}

.gp-vid-sort__select {
  min-height: 2.85rem;
  padding-block: 0.55rem;
  padding-inline: 0.9rem 2.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.85rem center;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}

.gp-vid-toolbar__tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.gp-vid-filter-open {
  display: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #fff;
  color: var(--gp-primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.gp-vid-filter-open__count {
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: var(--gp-primary);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

.gp-vid-catalog {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.gp-vid-filters__bar,
.gp-vid-filter-backdrop {
  display: none;
}

.gp-vid-filters__body {
  display: grid;
  gap: 0.85rem;
}

.gp-vid-filters__actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.55rem;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid #e5eef9;
  background: #fff;
}

.gp-vid-filters__reset,
.gp-vid-filters__apply {
  min-height: 2.6rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.gp-vid-filters__reset {
  border: 1px solid #dbe4f0;
  background: #fff;
  color: #475569;
}

.gp-vid-filters__apply {
  border: 0;
  background: var(--gp-primary);
  color: #fff;
}

.gp-vid-empty {
  margin: 2rem 0 0;
  padding: 1.5rem 1rem;
  border-radius: 14px;
  border: 1px dashed #bfdbfe;
  background: rgba(255, 255, 255, 0.8);
  color: #64748b;
  text-align: center;
  font-weight: 600;
}

.gp-vid-card.is-hidden,
.gp-vid-pager.is-hidden {
  display: none;
}

.gp-vid-filters {
  display: grid;
  gap: 0.85rem;
}

.gp-vid-filter {
  padding: 1rem 0.95rem;
  border-radius: 14px;
  border: 1px solid #e5eef9;
  background: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.04);
}

.gp-vid-filter__title {
  margin: 0 0 0.75rem;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
}

.gp-vid-filter__list,
.gp-vid-filter__checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
}

.gp-vid-filter__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.4rem 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.gp-vid-filter__link .gp-ico {
  flex-shrink: 0;
  color: var(--gp-primary);
}

.gp-vid-filter__link.gp-is-active {
  color: var(--gp-primary);
  background: #eff6ff;
  border-inline-start: 3px solid var(--gp-primary);
}

.gp-vid-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.2rem;
  padding: 0.25rem 0.2rem;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.gp-vid-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--gp-primary);
  cursor: pointer;
}

.gp-vid-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gp-vid-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e8eef7;
  background: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gp-vid-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
  text-decoration: none;
}

.gp-vid-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.gp-vid-card__play {
  position: absolute;
  z-index: 1;
  inset: 0;
  margin: auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.gp-vid-card__play::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.42rem 0 0.42rem 0.68rem;
  border-color: transparent transparent transparent #1d4ed8;
  transform: translateX(2px);
}

.gp-vid-card__time {
  position: absolute;
  z-index: 1;
  inset-block-end: 0.55rem;
  inset-inline-start: 0.55rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.gp-vid-card__body {
  padding: 0.85rem 0.95rem 1rem;
}

.gp-vid-card__tag {
  display: inline-block;
  margin: 0 0 0.45rem;
  color: var(--gp-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.gp-vid-card__title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.5;
}

.gp-vid-card__title a {
  color: #0f172a;
  text-decoration: none;
}

.gp-vid-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
}

.gp-vid-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.gp-vid-card__dot {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: #cbd5e1;
}

.gp-vid-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block-start: 1.6rem;
}

.gp-vid-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--gp-primary);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.gp-vid-pager__btn.gp-is-active {
  border-color: var(--gp-primary);
  background: var(--gp-primary);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .gp-vid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.1);
  }

  .gp-vid-card__media:hover img {
    transform: scale(1.04);
  }

  .gp-vid-filter__link:hover {
    background: #f8fbff;
    color: var(--gp-primary);
  }

  .gp-vid-pager__btn:hover:not(.gp-is-active) {
    background: #eff6ff;
    border-color: #bfdbfe;
  }

  .gp-vid-card__title a:hover {
    color: var(--gp-primary);
  }
}

@media (max-width: 1100px) {
  .gp-vid-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .gp-vid-filter-open {
    display: inline-flex;
  }

  .gp-vid-catalog {
    display: block;
  }

  .gp-vid-filter-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 220;
    background: rgba(7, 26, 58, 0.46);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  .gp-vid-filter-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

  .gp-vid-filters {
    position: fixed;
    z-index: 221;
    inset-inline: 0;
    inset-block-end: 0;
    display: flex;
    flex-direction: column;
    max-height: min(88dvh, 42rem);
    margin: 0;
    padding: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    background: #f8fbff;
    box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.18);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), visibility 260ms ease;
  }

  .gp-vid-filters.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .gp-vid-filters__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.7rem;
  }

  .gp-vid-filters__heading {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
  }

  .gp-vid-filters__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    cursor: pointer;
  }

  .gp-vid-filters__body {
    display: grid;
    gap: 0.75rem;
    overflow: auto;
    padding: 0 0.9rem 0.4rem;
    -webkit-overflow-scrolling: touch;
  }

  .gp-vid-filters__actions {
    position: sticky;
    inset-block-end: 0;
    margin: 0;
    padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    border-block-start: 1px solid #e5eef9;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.04);
  }

  .gp-vid-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .gp-vid-search {
    flex: 0 0 auto;
    width: 100%;
  }

  .gp-vid-toolbar__tools {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .gp-vid-sort {
    min-width: 0;
  }

  .gp-vid-sort__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .gp-vid-sort__select {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .gp-vid-hero__banner {
    height: 320px;
    object-position: 28% center;
  }

  .gp-vid-hero__visual::after {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 46%, rgba(255, 255, 255, 0.12) 100%);
  }

  .gp-vid-hero__content {
    inset-inline: 1.15rem;
    max-inline-size: none;
  }

  .gp-vid-hero__title {
    font-size: 1.45rem;
  }

  .gp-vid-grid {
    grid-template-columns: 1fr;
  }

  .gp-vid-card__title {
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  .gp-vid-toolbar__tools {
    grid-template-columns: 1fr;
  }

  .gp-vid-filter-open,
  .gp-vid-sort__select {
    width: 100%;
    justify-content: center;
  }
}
