/* Gallery CPT archive ----------------------------------------------------- */
.post-type-archive-gallery .jad-gallery-archive {
  padding-block: 3rem 4.5rem;
  background: var(--jad-cream);
}

.post-type-archive-gallery .jad-gallery-archive__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.post-type-archive-gallery .jad-gallery-archive__card {
  min-width: 0;
}

.post-type-archive-gallery .jad-gallery-archive__title {
  margin: 0 0 0.3rem;
  color: var(--jad-forest);
  font-size: clamp(1.05rem, 1.3vw, 1.35rem);
  line-height: 1.35;
  text-align: center;
}

.post-type-archive-gallery .jad-gallery-archive__title a {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-type-archive-gallery .jad-gallery-archive__title a:hover,
.post-type-archive-gallery .jad-gallery-archive__title a:focus-visible {
  color: var(--jad-gold);
}

.post-type-archive-gallery .jad-gallery-archive__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  color: rgba(29, 65, 50, 0.68);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.post-type-archive-gallery .jad-gallery-archive__preview {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 6 / 4;
  border-radius: var(--jad-radius-lg);
  background: #17211c;
  box-shadow: var(--jad-shadow-card);
  isolation: isolate;
}

.post-type-archive-gallery .jad-gallery-archive__slides,
.post-type-archive-gallery .jad-gallery-archive__slide,
.post-type-archive-gallery .jad-gallery-archive__image-link {
  width: 100%;
  height: 100%;
}

.post-type-archive-gallery .jad-gallery-archive__slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.post-type-archive-gallery .jad-gallery-archive__slide.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.post-type-archive-gallery .jad-gallery-archive__image-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
}

.post-type-archive-gallery .jad-gallery-archive__backdrop,
.post-type-archive-gallery .jad-gallery-archive__veil,
.post-type-archive-gallery .jad-gallery-archive__image {
  position: absolute;
  inset: 0;
}

.post-type-archive-gallery .jad-gallery-archive__backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.78) saturate(0.92);
  transform: scale(1.1);
}

.post-type-archive-gallery .jad-gallery-archive__veil {
  z-index: 1;
  background: rgba(9, 24, 17, 0.24);
}

.post-type-archive-gallery .jad-gallery-archive__image {
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0.65rem;
  object-fit: contain;
  object-position: center;
}

.post-type-archive-gallery .jad-gallery-archive__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(9, 24, 17, 0.62);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}

.post-type-archive-gallery .jad-gallery-archive__previous {
  inset-inline-start: 0.65rem;
}

.post-type-archive-gallery .jad-gallery-archive__next {
  inset-inline-end: 0.65rem;
}

.post-type-archive-gallery .jad-gallery-archive__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

html[lang^="ar"] .post-type-archive-gallery .jad-gallery-archive__arrow svg {
  transform: scaleX(-1);
}

.post-type-archive-gallery .jad-gallery-archive__arrow:hover {
  background: rgba(9, 24, 17, 0.84);
}

.post-type-archive-gallery .jad-gallery-archive__arrow:focus-visible,
.post-type-archive-gallery .jad-gallery-archive__image-link:focus-visible {
  outline: 3px solid var(--jad-gold-soft);
  outline-offset: -3px;
}

.post-type-archive-gallery .jad-gallery-archive__status {
  position: absolute;
  inset-inline-start: 50%;
  bottom: 0.6rem;
  z-index: 5;
  min-width: 3.5rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(9, 24, 17, 0.66);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transform: translateX(-50%);
}

html[dir="rtl"] .post-type-archive-gallery .jad-gallery-archive__status {
  transform: translateX(50%);
}

.post-type-archive-gallery .jad-gallery-archive__empty-preview {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 1.5rem;
  border: 1px solid var(--jad-border);
  border-radius: var(--jad-radius-lg);
  background: var(--jad-white);
  color: var(--jad-forest);
  text-align: center;
  text-decoration: none;
}

.post-type-archive-gallery .jad-gallery-archive__pagination {
  margin-top: 3rem;
}

.post-type-archive-gallery .jad-gallery-archive__pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.post-type-archive-gallery .jad-gallery-archive__pagination .page-numbers a,
.post-type-archive-gallery .jad-gallery-archive__pagination .page-numbers span {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(29, 65, 50, 0.22);
  border-radius: 999px;
  color: var(--jad-forest);
  text-decoration: none;
}

.post-type-archive-gallery .jad-gallery-archive__pagination .page-numbers .current {
  background: var(--jad-forest);
  color: #fff;
}

.post-type-archive-gallery .jad-gallery-archive__empty {
  margin: 0;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .post-type-archive-gallery .jad-gallery-archive__slide {
    transition: opacity 180ms ease;
  }

  .post-type-archive-gallery .jad-gallery-archive__arrow {
    transition: background-color 180ms ease, transform 180ms ease;
  }

  .post-type-archive-gallery .jad-gallery-archive__arrow:hover {
    transform: translateY(-50%) scale(1.04);
  }
}

@media (max-width: 1024px) {
  .post-type-archive-gallery .jad-gallery-archive__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .post-type-archive-gallery .jad-gallery-archive {
    padding-block: 2rem 3rem;
  }

  .post-type-archive-gallery .jad-gallery-archive__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-type-archive-gallery .jad-gallery-archive__slide,
  .post-type-archive-gallery .jad-gallery-archive__arrow {
    transition: none;
  }
}
/* End Gallery CPT archive */
