.gallery-template-page {
  direction: inherit;
  text-align: inherit;
}

.gallery-template-page[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

.gallery-template-page[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

.gallery-template-breadcrumbs {
  border-top: 1px solid rgba(62, 62, 62, 0.17);
  font-size: 14px;
  background: #fff;
}

.gallery-template-breadcrumbs__inner {
  max-width: 1712px;
  margin: 0 auto;
  padding: 0 104px;
}

.gallery-template-breadcrumbs__list {
  margin: 0;
  padding: 14px 0 10px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  direction: ltr;
  justify-content: flex-end;
}

.gallery-template-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #777;
}

.gallery-template-breadcrumbs__item:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 7px solid #f47721;
  margin: 0 12px;
}

.gallery-template-page[dir="ltr"] .gallery-template-breadcrumbs__item:not(:last-child)::after {
  border-right: 0;
  border-left: 7px solid #f47721;
}

.gallery-template-breadcrumbs__text {
  text-decoration: none;
  color: #000;
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
  opacity: 0.4;
}

.gallery-template-breadcrumbs__link {
  color: #000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
}

.gallery-template-hero {
  position: relative;
  margin: 0 8px;
  min-height: 182px;
  background: #e9e9e9;
  overflow: hidden;
}

.gallery-template-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-template-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(233, 233, 233, 0.3), rgba(233, 233, 233, 0.95));
}

.gallery-template-hero__corner-deco {
  position: absolute;
  left: 5px;
  bottom: 0;
  width: 420px;
  height: 84px;
  line-height: 0;
  z-index: 2;
  pointer-events: none;
}

.gallery-template-hero__corner-deco-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-template-hero__inner {
  position: relative;
  z-index: 3;
  max-width: 1712px;
  margin: 0 auto;
  min-height: 182px;
  padding: 24px 112px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.gallery-template-hero__title {
  color: #000;
  font-size: 56px;
  font-weight: 600;
  line-height: 0.99;
}

.gallery-template-hero__desc {
  margin: 0;
  color: #3d4043;
  font-size: 18px;
  opacity: 0.75;
}

.gallery-template-content {
  max-width: 1712px;
  margin: 0 auto;
  padding: 22px 104px 72px;
}

.gallery-template-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.gallery-template-tabs__link {
  flex: 1 1 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  text-decoration: none;
  background: #bdbdbd;
  color: #fff;
  border-radius: 4px;
  padding: 10px 18px;
  font-family: "Rubik", sans-serif;
  font-size: 20px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.gallery-template-tabs__link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.gallery-template-tabs__link.is-active {
  background: #f36518;
}

.gallery-template-grid {
  column-count: 4;
  column-gap: 14px;
}

.gallery-template-grid__item {
  margin: 0 0 14px;
  break-inside: avoid;
  border-radius: 4px;
  overflow: hidden;
}

.gallery-template-grid__link {
  display: block;
}

.gallery-template-grid__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-template-grid__link:hover .gallery-template-grid__image {
  transform: scale(1.015);
  filter: brightness(0.92);
}

.gallery-template-empty {
  margin: 0;
  font-size: 18px;
  opacity: 0.7;
}

@media (max-width: 1280px) {
  .gallery-template-breadcrumbs__inner,
  .gallery-template-content {
    padding-inline: 44px;
  }

  .gallery-template-hero__inner {
    padding-inline: 52px;
  }

  .gallery-template-grid {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .gallery-template-breadcrumbs__inner,
  .gallery-template-content {
    padding-inline: 18px;
  }

  .gallery-template-hero__inner {
    padding-inline: 26px;
    min-height: 152px;
  }

  .gallery-template-hero__title {
    font-size: 40px;
  }

  .gallery-template-hero__desc {
    font-size: 16px;
  }

  .gallery-template-hero__corner-deco {
    width: 320px;
    height: 64px;
  }

  .gallery-template-tabs {
    flex-direction: column;
  }

  .gallery-template-tabs__link {
    width: 100%;
  }

  .gallery-template-grid {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .gallery-template-grid {
    column-count: 1;
  }

  .gallery-template-hero__title {
    font-size: 34px;
  }

  .gallery-template-hero__corner-deco {
    left: 0;
    width: clamp(150px, 48vw, 230px);
    height: auto;
  }
}
