.ebp-main-gallery {
  --ebp-main-columns: 4;
  --ebp-card-dir: column;
  box-sizing: border-box;
  max-width: 100%;
  color: #fdfdfd;
  font-family: "Yekan Bakh", "Vazirmatn", Tahoma, Arial, sans-serif;
}
.ebp-main-gallery *,
.ebp-main-gallery *::before,
.ebp-main-gallery *::after {
  box-sizing: border-box;
}

/* Header */
.ebp-main-gallery__header {
  margin-block-end: 24px;
}
.ebp-main-gallery__badge {
  display: inline-flex;
  margin-block-end: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(201, 162, 75, 0.12);
  color: #c9a24b;
  font-size: 12px;
  font-weight: 600;
}
.ebp-main-gallery__title {
  margin: 0 0 12px;
  color: #fdfdfd;
  font-size: 40px;
  line-height: 1.25;
}
.ebp-main-gallery__description,
.ebp-main-gallery__description p {
  margin-block-start: 0;
  color: #a9b2c9;
}
.ebp-main-gallery__description p:last-child {
  margin-block-end: 0;
}

/* Filters */
.ebp-main-gallery__filters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  justify-content: safe var(--ebp-filter-justify, center);
  gap: 12px;
  margin-block-end: 28px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.ebp-main-gallery__filters::-webkit-scrollbar {
  display: none;
}
.ebp-main-gallery__filter-group {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
}
.ebp-main-gallery__filter {
  appearance: none;
  padding: 8px 16px;
  border: 1px solid #26304f;
  border-radius: 999px;
  background: transparent;
  color: #a9b2c9;
  font: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  transition: all 180ms ease;
}
.ebp-main-gallery__filter:hover,
.ebp-main-gallery__filter[aria-pressed="true"] {
  border-color: #c9a24b;
  color: #fdfdfd;
}
.ebp-main-gallery__filter[aria-pressed="true"] {
  background: #c9a24b;
  color: #0a1124;
}

/* Featured media */
.ebp-main-gallery__featured {
  width: 100%;
  margin-block-end: 24px;
  overflow: hidden;
  border-radius: 16px;
}
.ebp-main-gallery__featured-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #111a32;
  cursor: pointer;
}
.ebp-main-gallery__featured-image,
.ebp-main-gallery__featured-poster,
.ebp-main-gallery__featured-video-preview,
.ebp-main-gallery__featured-fallback {
  display: flex;
  width: 100%;
  height: 440px;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}
.ebp-main-gallery__featured-fallback {
  color: #c9a24b;
  font-size: 64px;
}
.ebp-main-gallery__featured-media:focus-visible {
  outline: 2px solid #c9a24b;
  outline-offset: 4px;
}
.ebp-main-gallery__featured .ebp-main-gallery__play {
  width: 64px;
  height: 64px;
  font-size: 28px;
}

/* Grid + equal-height cards
   The grid stretches every card in a row to the tallest card's height; each card
   is a flex column whose media area keeps a stable height and whose content area
   grows to absorb the remaining height, so cards stay equal regardless of text
   length and without any JavaScript height calculation. */
.ebp-main-gallery__grid {
  display: grid;
  grid-template-columns: repeat(var(--ebp-main-columns), minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}
.ebp-main-gallery__card {
  display: flex;
  flex-direction: var(--ebp-card-dir, column);
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: rgba(16, 25, 51, 0.55);
  border-radius: 16px;
}
.ebp-main-gallery__media-button {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  padding: 0;
  border: 0;
  background: #111a32;
  cursor: pointer;
}
.ebp-main-gallery__image,
.ebp-main-gallery__poster,
.ebp-main-gallery__video-preview,
.ebp-main-gallery__video-fallback {
  display: flex;
  width: 100%;
  height: 280px;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  background: #111a32;
}
.ebp-main-gallery__video-fallback {
  color: #c9a24b;
  font-size: 48px;
}
.ebp-main-gallery__play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #c9a24b;
  color: #0a1124;
  font-size: 24px;
  pointer-events: none;
}
.ebp-main-gallery__play svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.ebp-main-gallery__card-content {
  flex: 1 1 auto;
  padding: 16px;
  text-align: center;
}
.ebp-main-gallery__card-title {
  margin: 0;
  color: #fdfdfd;
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: break-word;
}
.ebp-main-gallery__card-text {
  margin: 4px 0 0;
  color: #a9b2c9;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: break-word;
}

/* JavaScript assigns this class from the card's position inside its current
   responsive row. The pattern therefore restarts on every row and AJAX page. */
.ebp-main-gallery__card--row-reversed {
  flex-direction: column-reverse;
}

/* Focus */
.ebp-main-gallery__media-button:focus-visible,
.ebp-main-gallery__filter:focus-visible,
.ebp-main-gallery__lightbox button:focus-visible {
  outline: 2px solid #c9a24b;
  outline-offset: 3px;
}

/* Loading + empty + pagination */
.ebp-main-gallery--loading {
  opacity: 0.6;
  transition: opacity 180ms ease;
}
.ebp-main-gallery__empty {
  margin: 24px 0;
  color: #a9b2c9;
}
.ebp-main-gallery__pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-block-start: 32px;
}
.ebp-main-gallery__pagination[hidden] {
  display: none;
}
.ebp-main-gallery__showcase-navigation { display: none; }
.ebp-main-gallery__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #a9b2c9;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.ebp-main-gallery__page svg,
.ebp-main-gallery__page i {
  display: block;
  width: 1em;
  height: 1em;
  font-size: inherit;
}
.ebp-main-gallery__page[aria-current="true"] {
  border-color: #26304f;
  color: #fdfdfd;
}
.ebp-main-gallery__page:hover:not(:disabled) {
  border-color: #c9a24b;
  color: #fdfdfd;
}
.ebp-main-gallery__page:disabled {
  opacity: 0.35;
  cursor: default;
}
.ebp-main-gallery__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 32px;
  padding: 0 2px;
  color: #a9b2c9;
  user-select: none;
}

/* Lightbox */
body.ebp-main-gallery-lock {
  overflow: hidden;
}
.ebp-main-gallery__lightbox[hidden],
.ebp-main-gallery__lightbox-image[hidden],
.ebp-main-gallery__lightbox-video[hidden],
.ebp-main-gallery__lightbox-caption[hidden] {
  display: none !important;
}
.ebp-main-gallery__card {
  transition: border-color 180ms ease;
}
.ebp-main-gallery__lightbox-close svg,
.ebp-main-gallery__lightbox-nav svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.ebp-main-gallery__lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
.ebp-main-gallery__lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.92);
}
.ebp-main-gallery__lightbox-dialog {
  position: relative;
  z-index: 1;
  display: block;
  width: min(1180px, 100%);
  outline: none;
}
.ebp-main-gallery__lightbox-figure {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.ebp-main-gallery__lightbox-figure {
  touch-action: pan-y;
}
.ebp-main-gallery__lightbox-image {
  -webkit-user-drag: none;
  touch-action: pan-y;
}
.ebp-main-gallery__lightbox-image,
.ebp-main-gallery__lightbox-video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  margin: auto;
  border-radius: 8px;
  object-fit: contain;
}
.ebp-main-gallery__lightbox-embed {
  position: relative;
  width: min(1120px, 100%);
  aspect-ratio: 16 / 9;
  margin: auto;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.ebp-main-gallery__lightbox-embed iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.ebp-main-gallery__lightbox-caption {
  margin-block-start: 12px;
  color: #fdfdfd;
}
.ebp-main-gallery__lightbox-close,
.ebp-main-gallery__lightbox-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: #0a1124;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}
.ebp-main-gallery__lightbox-close {
  position: absolute;
  z-index: 3;
  inset-block-start: 8px;
  inset-inline-end: 8px;
}
.ebp-main-gallery__lightbox-nav {
  position: absolute;
  z-index: 2;
  inset-block-start: 50%;
  transform: translateY(-50%);
}
.ebp-main-gallery__lightbox-nav[data-main-lightbox-previous] {
  inset-inline-start: 8px;
}
.ebp-main-gallery__lightbox-nav[data-main-lightbox-next] {
  inset-inline-end: 8px;
}

/* Responsive column + media-height fallbacks (Elementor responsive controls override these when set). */
@media (max-width: 1024px) {
  .ebp-main-gallery {
    --ebp-main-columns: 2;
  }
  .ebp-main-gallery__featured-image,
  .ebp-main-gallery__featured-poster,
  .ebp-main-gallery__featured-video-preview,
  .ebp-main-gallery__featured-fallback {
    height: 360px;
  }
}
@media (max-width: 767px) {
  .ebp-main-gallery {
    --ebp-main-columns: 1;
  }
  .ebp-main-gallery__title {
    font-size: 30px;
  }
  .ebp-main-gallery__grid--showcase { display:flex; overflow:hidden; flex-wrap:nowrap; scroll-snap-type:x mandatory; }
  .ebp-main-gallery__grid--showcase .ebp-main-gallery__card { flex:0 0 100%; scroll-snap-align:start; }
  .ebp-main-gallery__showcase-navigation { display:flex; justify-content:center; align-items:center; gap:12px; margin-top:16px; }
  .ebp-main-gallery__showcase-arrow { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0; border:1px solid #26304f; border-radius:50%; background:transparent; color:#fdfdfd; font-size:24px; cursor:pointer; }
  .ebp-main-gallery__image,
  .ebp-main-gallery__poster,
  .ebp-main-gallery__video-preview,
  .ebp-main-gallery__video-fallback {
    height: 240px;
  }
  .ebp-main-gallery__featured-image,
  .ebp-main-gallery__featured-poster,
  .ebp-main-gallery__featured-video-preview,
  .ebp-main-gallery__featured-fallback {
    height: 240px;
  }
  .ebp-main-gallery__lightbox {
    padding: 16px;
  }
}
