/* Gallery page layout. The shared header, banner and footer intentionally remain untouched. */
.h5-gallery-pending {
  min-height: 620px;
  visibility: hidden;
}

.h5-gallery-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f8ff 0%, #efefff 52%, #f8f7ff 100%) !important;
}

.h5-gallery-bg::before,
.h5-gallery-bg::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(83, 64, 255, .08);
  pointer-events: none;
}

.h5-gallery-bg::before { left: -170px; bottom: -120px; }
.h5-gallery-bg::after { right: -190px; top: 35%; }

.h5-gallery-section {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  padding-top: 56px !important;
  padding-bottom: 64px !important;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left !important;
}

.h5-gallery-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.h5-gallery-filter {
  position: sticky;
  top: 24px;
  padding: 22px 18px 20px;
  border: 1px solid rgba(74, 61, 180, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 18px 55px rgba(61, 53, 150, .08);
  backdrop-filter: blur(12px);
}

.h5-filter-heading,
.h5-gallery-heading,
.h5-filter-label,
.h5-gallery-card-title,
.h5-filter-promo h3 { color: #17164d; }

.h5-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 800;
}

.h5-filter-heading span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.h5-filter-heading i { color: #493cff; }

.h5-filter-reset {
  border: 0;
  padding: 3px;
  background: transparent;
  color: #4b3cff;
  font-size: 12px;
  cursor: pointer;
}

.h5-gallery-search {
  position: relative;
  margin-bottom: 20px;
}

.h5-gallery-search i {
  position: absolute;
  top: 50%;
  left: 13px;
  color: #817fa4;
  transform: translateY(-50%);
}

.h5-gallery-search input {
  width: 100%;
  height: 42px;
  border: 1px solid #e4e3f3;
  border-radius: 10px;
  padding: 0 12px 0 38px;
  background: #fff;
  color: #272556;
  outline: 0;
  font-size: 13px;
}

.h5-gallery-search input:focus {
  border-color: #6358ff;
  box-shadow: 0 0 0 3px rgba(81, 66, 255, .1);
}

.h5-filter-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
}

.h5-category-list { display: grid; gap: 5px; }

.h5-category-button {
  display: grid;
  grid-template-columns: 21px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 7px 9px;
  background: transparent;
  color: #272556;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.h5-category-button:hover { background: #f0efff; transform: translateX(2px); }
.h5-category-button.active { background: linear-gradient(90deg, #dcd9ff, #c9c8ff); color: #4434f5; }
.h5-category-button i { width: 18px; text-align: center; }

.h5-category-count {
  min-width: 29px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #ebeaff;
  color: #34316b;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.h5-category-button.active .h5-category-count { background: #5142ff; color: #fff; }

.h5-filter-promo {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 18px;
  padding: 22px 18px;
  background: linear-gradient(145deg, #f0efff, #fff);
}

.h5-filter-promo::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  right: -32px;
  bottom: -34px;
  border: 14px solid #5746ff;
  border-radius: 50%;
  opacity: .18;
}

.h5-filter-promo h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.12; }
.h5-filter-promo p { margin: 0 0 16px; color: #555379; font-size: 12px; line-height: 1.45; }

.h5-filter-promo a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 17px;
  background: #4d3bff;
  box-shadow: 0 8px 20px rgba(77, 59, 255, .23);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.h5-filter-promo a:hover { color: #fff; text-decoration: none; }

.h5-gallery-main { min-width: 0; }

.h5-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.h5-gallery-heading { margin: 0; font-size: clamp(25px, 2.5vw, 34px); line-height: 1.2; font-weight: 800; }
.h5-gallery-heading span { color: #4e3bff; }

.h5-toolbar-actions { display: flex; align-items: center; gap: 10px; }

.h5-mobile-filter,
.h5-view-button,
.h5-gallery-sort {
  height: 42px;
  border: 1px solid #e8e6f5;
  border-radius: 10px;
  background: rgba(255,255,255,.9);
  color: #29265c;
}

.h5-gallery-sort { min-width: 166px; padding: 0 36px 0 13px; cursor: pointer; font-size: 12px; }
.h5-view-button,
.h5-mobile-filter { display: inline-grid; place-items: center; width: 42px; padding: 0; cursor: pointer; }
.h5-view-button.active { border-color: #4e3bff; background: #4e3bff; color: #fff; }
.h5-mobile-filter { display: none; width: auto; grid-auto-flow: column; gap: 8px; padding: 0 13px; }

.h5-gallery-grid.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 16px;
  margin: 0;
}

.h5-gallery-grid .picture-item,
.h5-gallery-grid .picture-item.column,
.h5-gallery-grid .picture-item.col-md-4 {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  flex: none;
}

.h5-gallery-grid .picture-item[hidden] { display: none !important; }

.h5-gallery-grid .aspect { position: static; height: auto; padding: 0; }
.h5-gallery-grid .aspect__inner { position: static; padding: 0 !important; }

.h5-gallery-grid .picture-item a {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1.18 / 1;
  border-radius: 10px;
  background: #e8e7ef;
  box-shadow: 0 7px 24px rgba(39, 34, 93, .09);
}

.h5-gallery-grid .picture-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.h5-gallery-grid .picture-item a::after {
  content: "\f00e";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(29, 24, 91, .42);
  color: #fff;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 22px;
  opacity: 0;
  transition: opacity .25s ease;
}

.h5-gallery-grid .picture-item a:hover::after { opacity: 1; }
.h5-gallery-grid .picture-item a:hover img { transform: scale(1.045); }

.h5-gallery-card-title {
  margin: 9px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.h5-gallery-card-meta { display: none; color: #6c698c; font-size: 12px; }
.h5-gallery-grid .my-sizer-element { display: none !important; }

.h5-gallery-grid.is-list { grid-template-columns: 1fr; gap: 12px; }
.h5-gallery-grid.is-list .picture-item {
  display: grid !important;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid #ebe9f6;
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.82);
}
.h5-gallery-grid.is-list .picture-item[hidden] { display: none !important; }
.h5-gallery-grid.is-list .picture-item a { aspect-ratio: 16 / 9; }
.h5-gallery-grid.is-list .h5-gallery-card-title { margin: 0 0 5px; font-size: 16px; }
.h5-gallery-grid.is-list .h5-gallery-card-meta { display: block; margin: 0; }

.h5-gallery-empty {
  display: none;
  border: 1px dashed #cbc8ea;
  border-radius: 16px;
  padding: 54px 20px;
  background: rgba(255,255,255,.58);
  color: #5c5981;
  text-align: center;
}

.h5-gallery-empty.visible { display: block; }

.h5-gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 42px;
}

.h5-page-button {
  min-width: 38px;
  height: 38px;
  border: 1px solid #e7e5f5;
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
  color: #302d64;
  cursor: pointer;
  font-size: 13px;
}

.h5-page-button:hover:not(:disabled), .h5-page-button.active { border-color: #4e3bff; background: #4e3bff; color: #fff; }
.h5-page-button:disabled { opacity: .4; cursor: default; }
.h5-page-gap { color: #6e6a91; }

@media (max-width: 1199.98px) {
  .h5-gallery-grid.row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .h5-gallery-section { padding-top: 38px !important; }
  .h5-gallery-layout { grid-template-columns: 1fr; }
  .h5-gallery-filter { position: static; display: none; }
  .h5-gallery-filter.open { display: block; }
  .h5-gallery-main > .h5-gallery-filter { margin-bottom: 20px; }
  .h5-mobile-filter { display: inline-grid; }
}

@media (max-width: 767.98px) {
  .h5-gallery-section { width: 100%; padding: 30px 18px 48px !important; }
  .h5-gallery-toolbar { align-items: flex-start; flex-direction: column; }
  .h5-toolbar-actions { width: 100%; }
  .h5-gallery-sort { min-width: 0; flex: 1; }
  .h5-gallery-grid.row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .h5-gallery-grid.is-list .picture-item { grid-template-columns: 120px 1fr; }
  .h5-page-button { min-width: 34px; height: 36px; padding: 0 8px; }
}

@media (max-width: 479.98px) {
  .h5-view-button { display: none; }
  .h5-gallery-grid.row { grid-template-columns: 1fr; }
  .h5-gallery-grid .picture-item a { aspect-ratio: 1.35 / 1; }
  .h5-gallery-pagination { gap: 5px; }
}
