.ArticleView {
  display: none !important;
}

.image-gallery-wrapper li:nth-child(5) a::after {
  content: "نمایش همه" !important;
  position: absolute;
  color: white;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  left: 0;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 40px;
  /* 200% */
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.7);
  backdrop-filter: blur(3px);
  z-index: 2;
}
body:not(.rtl) .image-gallery-wrapper li:nth-child(5) a::after {
  content: "All Images";
}

.image-gallery-wrapper li:nth-child(n + 6) {
  display: none;
}

.image-gallery-wrapper li:nth-child(5) a::before {
  content: url("../assets/icons/chevron.svg");
  position: absolute;
  top: 42%;
  left: 25%;
  --icon: 18px;
  filter: brightness(0) invert(1);
  /* تمام رنگ‌ها سفید میشن */
  z-index: 5;
}

.image-gallery-wrapper .ImagesItem {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 16px;
  row-gap: 32px;
}
.news_Inner_Wrapper:has(.ImagesItem > li:only-child) .news_Inner_Galler_Header,
.news_Inner_Wrapper:has(.ImagesItem > li:only-child) .gallery-image-container {
  display: none !important;
}
/* First image: full-width across all 4 columns */
.image-gallery-wrapper .gallery:first-child {
  grid-column: 1 / -1;
  height: unset !important;
  overflow: hidden;
}

/* Other images: perfect squares */

.image-gallery-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.image-gallery-wrapper li a {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.image-gallery-wrapper li {
  height: unset !important;
}

/* GALLERY DETAIL */
@media (max-width: 900px) {
  .gallery-detail-wrapper .print-share {
    gap: 32px !important;
  }
  .gallery-detail-wrapper .title-box {
    padding: 24px 16px 52px 24px !important;
  }
  .gallery-detail-wrapper .row {
    padding-inline: 0 !important;
  }
  .gallery-detail-wrapper .gallery-detail-content {
    padding-inline: 0 !important;
  }
  .job-offer-detail .header {
    height: 200px !important;
  }
}

.gallery-detail-wrapper .categ a {
  border-radius: 8px;
  padding: 4px 30px;
  display: flex;
  background: var(--Gray-G99, #f2f2f2);
}
.gallery-detail-wrapper .image-wrapper img {
  width: auto;
  height: auto;
  object-fit: cover;
  margin-inline: auto;
}
.gallery-detail-wrapper .image-wrapper {
  width: 100%;
}

@media (max-width: 900px) {
  .gallery-detail-wrapper .image-wrapper img {
    width: 300px !important;
  }
  .gallery-detail-wrapper .image-gallery-wrapper {
    padding: 0 !important;
    box-shadow: none !important;
  }

  .gallery-detail-wrapper .gallery-image-container {
  }
  .gallery-detail-wrapper .gallery-image-container .top-image {
    width: 100%;
    height: 226px;
    border-radius: 12px;
    overflow: hidden;
  }
  .gallery-detail-wrapper .gallery-image-container .top-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .gallery-detail-wrapper .image-gallery-wrapper .ImagesItem {
    display: flex !important;
    gap: 16px;
    height: auto;
    width: 100%;
    overflow-x: scroll !important;
    scroll-snap-type: x mandatory;
  }
  .gallery-detail-wrapper .image-gallery-wrapper li {
    display: flex;
    width: 148px !important;
    flex-shrink: 0;
    scroll-snap-align: start;
    height: 102px !important;
  }
  .gallery-detail-wrapper .image-gallery-wrapper li:nth-child(1) {
    display: none;
  }
  .gallery-detail-wrapper .image-gallery-wrapper li:nth-child(5) a::before {
    display: none !important;
  }
  .gallery-detail-wrapper .image-gallery-wrapper li:nth-child(5) a::after {
    display: none !important;
  }
  .gallery-detail-wrapper .image-gallery-wrapper li:nth-child(n + 6) {
    display: inline !important;
  }
  .gallery-wrapper {
    grid-template-columns: repeat(1, minmax(100%, 1fr)) !important;
  }
  .gallery-wrapper .each-box {
    width: 100% !important;
  }
}
.gallery-detail-wrapper .image-gallery-wrapper li {
  border-radius: 8px;
  overflow: hidden;
  height: 128px;
  width: 100%;
  position: relative;
}
.gallery-detail-wrapper .image-gallery-wrapper li:nth-child(5) a::after {
  content: "";
  position: absolute;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--Gray-G00, #121212);
  opacity: 0.7;

  z-index: 2;
}
.gallery-detail-wrapper .image-gallery-wrapper li:nth-child(n + 6) {
  display: none;
}
.gallery-detail-wrapper .image-gallery-wrapper .ImagesItem {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 24px;
  row-gap: 56px;
  padding: 0;
}
.gallery-detail-wrapper .gallery-image-container .more-button {
  bottom: 14px;
  left: 76px;
  z-index: 10;
}

/* First image: full-width across all 4 columns */
.gallery-detail-wrapper .image-gallery-wrapper .gallery:first-child {
  grid-column: 1 / -1;
  height: 556px;
  border-radius: 8px;
  overflow: hidden;
}

/* Other images: perfect squares */

.gallery-detail-wrapper .image-gallery-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-detail-wrapper .image-gallery-wrapper li a {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.gallery-image-container {
  border-top: 1px solid #e4e4e4;
}
.gallery-image-container video {
  height: max-content;
}
.gallery-image-container iframe {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  border: 0;
}

.gallery-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 40px;
  column-gap: 16px;
  width: 100%;
  justify-items: start;
  transition: all 300ms;
}

@media (max-width: 1200px) {
  .gallery-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-wrapper .each-box {
  width: 100%;
  border-radius: 0;
  padding: 16px;
  position: relative;
  transition: all 300ms;
  background-color: white;
}
.gallery-wrapper .each-box:hover {
  box-shadow: 0 3px 48px 0 rgba(18, 18, 18, 0.1);
}
.gallery-wrapper .each-box .image {
  display: flex;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  position: relative;
}
.gallery-wrapper .each-box .categ {
  border-radius: 8px 0 0 8px;
  padding: 2px 16px;
  bottom: 16px;
  min-width: 108px;
  height: 28px;
  backdrop-filter: blur(4px);
  transition: all 300ms;
  display: flex;
  align-items: center;
  justify-content: center;
}
body:not(.rtl) .gallery-wrapper .each-box .categ {
  border-radius: 0 8px 8px 0;
}
.gallery-wrapper .each-box .title {
  min-height: 56px;
}
.gallery-wrapper .each-box .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-wrapper .each-box .bottom .button .count {
  padding: 2px 8px 2px 14px;
}
.gallery-wrapper .each-box .bottom .button .icon {
  width: 32px;
  height: 32px;
  transition: all 300ms;
}
body:not(.rtl) .gallery-wrapper .each-box .bottom .button .icon .ezIcon {
  --icon-rotate: 180deg;
}
.gallery-wrapper .each-box:hover .bottom .button .icon {
  background-color: var(--Primary-P40) !important;
}
.gallery-wrapper .each-box::after {
  content: "";
  width: 70%;
  height: 4px;
  background: var(--Primary-P30);
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: all 400ms ease;
  border-radius: 0 0 4px 4px;
  opacity: 0;
}

.gallery-wrapper .each-box:hover::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.news-archive-categ::before {
  content: "";
  width: 100vw;
  height: 380px;
  background-size: cover;
  background-image: url(/Portals/_default/skins/ez-skin/assets/images/events-banner.png);
  background-repeat: no-repeat;
  position: absolute;
  left: 50%;
  top: -70px;
  transform: translateX(-50%);
  z-index: -1;
}
.news-archive-categ .categ-list {
  justify-content: center;
}
.news-archive-categ .categ-list .each-categ {
  opacity: 0.6;
  transition: all 300ms;
  padding: 8px 16px;
  border-bottom: 1.5px solid var(--Gray-G100, #fff);
  white-space: nowrap;
}
.news-archive-categ .categ-list .each-categ.active {
  opacity: 1;
}
.news-archive-categ .categ-list .each-categ:hover {
  opacity: 1;
}

@media (max-width: 992px) {
  .news-archive-categ .categ-list {
    justify-content: start !important;
    overflow-y: auto;
    scroll-snap-type: x mandatory;
    /* Firefox */
    scrollbar-width: none;

    /* IE & Edge قدیمی */
    -ms-overflow-style: none;
  }
  .news-archive-categ .categ-list::-webkit-scrollbar {
    display: none;
  }
  .news-archive-categ .categ-list .each-categ {
    scroll-snap-align: start;
  }
}
