html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 0;
}

html:hover::-webkit-scrollbar {
  width: 8px;
}

html:hover::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

html:hover::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

@font-face {
  font-family: 'MyFont';
  src: url('/assets/fonts/Montserrat-ExtraLight.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  align-items: baseline;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  background-color: #fffdf7;
  font-family: 'MyFont', sans-serif;
}

h3,
p {
  color: #353535;
  padding: 12px;
  margin: 0;
}

/* --- Галерея --- */

.gallery-wrapper {
  width: 100%;
  max-width: 1440px;
}

.gallery {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.gallery.ready {
  margin-top: 130px;
  width: 100%;
  visibility: visible;
  opacity: 1;
  display: block;
}

.gallery-item {
  padding: 0.5%;
  margin: 0 auto 10px;
  width: 100%;
  height: auto;
}

.gallery-item:hover {
  transform: scale(1.005);
}

.gallery-item img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.gallery-item.mini {
  max-width: 19%;
  margin: -5px 50px 21px 70px;
}

.gallery-item.small {
  padding-left: 5%;
  max-width: 23%;
}

.gallery-item.medium {
  max-width: 30%;
}

.gallery-item.big {
  padding-left: 5%;
  max-width: 50%;
}

/* карточка галереи с кнопками */

.gallery-card-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.gallery-image-link {
  display: block;
}

.gallery-main-img {
  transition: opacity .18s ease, filter .18s ease;
}

.gallery-card-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(to top, rgba(0, 0, 0, .32), rgba(0, 0, 0, 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1;
}

.gallery-item:hover .gallery-card-media::after,
.gallery-item:focus-within .gallery-card-media::after {
  opacity: 1;
}

.gallery-action {
  position: absolute;
  bottom: 10px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(.96);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  z-index: 3;
}

.gallery-action--details {
  left: 10px;
}

.gallery-action--product {
  right: 10px;
}

.gallery-item:hover .gallery-action,
.gallery-item:focus-within .gallery-action {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.gallery-action:hover {
  background: #fffdf7;
  transform: translateY(-1px) scale(1.03);
}

.gallery-action img {
  width: 40px;
  height: 40px;
  max-width: none;
  object-fit: contain;
  display: block;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.gallery-item.is-sale-preview .gallery-main-img {
  filter: saturate(1.03) contrast(1.02);
}

.bottom-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bottom-container h3 {
  color: #2d2d2d;
  font-size: 20px;
  padding: 10px 0 0;
  text-align: center;
}

.bottom-container img {
  box-shadow: none;
}

/* legacy: если где-то ещё осталась старая кнопка "подробнее" */

.details-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.details-icon {
  width: 20px;
  height: 20px;
  margin-left: 5px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .details-icon,
.bottom-container:hover .details-icon {
  opacity: 1;
  transform: scale(1);
}

.details-link:hover .details-icon {
  transform: scale(1.1);
}

.details-link:hover h3 {
  color: #272727d6;
}

/* --- Обо мне --- */

.artist-profile {
  margin-top: 60px;
  width: 69%;
  max-width: 1440px;
}

.artist-profile h1 {
  font-size: 2em;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.profile-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.profile-text {
  width: 60%;
}

.artist-image-container {
  width: 35%;
  display: flex;
  justify-content: center;
}

.artist-image {
  max-width: 100%;
  border-radius: 8px;
}

.artist-profile h2 {
  font-size: 1.5em;
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
  font-weight: bold;
}

.artist-profile p {
  font-size: 17px;
  line-height: 1.5;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: justify;
}

.artist-profile ul {
  list-style-type: disc;
  padding-left: 20px;
}

.artist-profile ul li {
  font-size: 17px;
  margin-bottom: 10px;
  font-weight: bold;
}

/* --- Дополнительные стили --- */

.fancybox-thumbs {
  display: none !important;
}

.scroll-image {
  position: fixed;
  top: 50px;
  left: 50px;
  z-index: -1;
}

.scroll-image img {
  width: 250px;
  height: auto;
}

#custom-footer {
  position: absolute;
  right: 99px;
  width: 240px;
}

#custom-footer img {
  width: 100%;
}

/* ===== Charity ===== */

.page-charity .page-charity-gallery {
  position: relative;
}

.page-charity .page-charity-gallery .grid-sizer,
.page-charity .page-charity-gallery .gallery-item {
  width: 25%;
}

.page-charity .page-charity-gallery .gutter-sizer {
  width: 30px;
}

.page-charity .page-charity-gallery .gallery-item {
  padding: 0 !important;
  margin: 0 0 30px 0 !important;
  box-sizing: border-box;
}

.page-charity .page-charity-gallery .gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.page-charity .charity-buy {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.85);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.page-charity .shop-icon {
  border-radius: 999px;
}

.page-charity .gallery-item:hover .charity-buy {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1.03);
}

.page-charity .page-charity-gallery.ready {
  margin-left: 10% !important;
  margin-right: 0 !important;
}

.page-charity .charity-intro {
  max-width: 50%;
  margin: 120px auto 20px;
  padding: 0 15px;
  border-bottom: 2px solid #ddd;
}

.page-charity .charity-intro h1 {
  margin: 0 0 10px;
  font-size: 34px;
}

.page-charity .charity-intro p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  font-weight: bold;
}

body.page-charity {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
}

/* ===== Фильтры галереи ===== */

.nav-filter-toggle {
  display: inline-flex;
  align-items: center;
}

.filter-toggle {
  font-family: inherit;
  font-size: inherit;
  font-weight: bold;
  color: #fffdf7;
  height: auto;
  padding: 7px 20px;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  display: block;
  line-height: normal;
  text-align: center;
  transition: all 0.2s ease-in-out;
}

.filter-toggle:hover {
  background-color: #3f3f3f70;
  color: #f3f0f0;
  transform: scale(0.97);
}

.filter-toggle:focus {
  outline: none;
}

.filter-toggle:focus-visible {
  outline: 2px solid rgba(255, 230, 162, 0.95);
  outline-offset: 2px;
}

.gallery-filters-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 46px;
  z-index: 1200;
  background: rgba(113, 111, 111, 0.96);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.gallery-filters--icons {
  display: flex;
  justify-content: center;
}

.gallery-filters--icons button {
  width: 37px;
  height: 37px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: transparent;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.gallery-filters--icons .filter-icon {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
  opacity: 0.85;
  transition: transform .15s ease, opacity .15s ease;
  border-radius: 999px;
  pointer-events: none;
}

.gallery-filters--icons button:hover .filter-icon {
  opacity: 1;
  transform: scale(1.06);
}

.gallery-filters--icons button.is-active {
  outline: none;
  background: rgb(0 0 0 / 20%);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.35),
    inset -2px -2px 6px rgba(255, 255, 255, 0.10);
  transform: translateY(1px);
}

.gallery-filters--icons button.is-active .filter-icon {
  opacity: 1;
  transform: scale(0.92);
}

.gallery-filters--icons button:active {
  transform: translateY(1px);
}

.gallery-filters.is-busy {
  pointer-events: none;
  opacity: .65;
}

/* ===== Блог / Telegram ===== */

.tg-page {
  margin-top: 100px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.tg-page__content {
  width: 80%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 14px 40px;
  box-sizing: border-box;
}

blockquote.telegram-post {
  margin: 18px 0;
  padding: 0;
  border: 0;
}

blockquote.telegram-post + blockquote.telegram-post {
  margin-top: 22px;
}

iframe[id^="telegram-post-"] {
  display: block;
  width: 100% !important;
  border: 0 !important;
  margin: 0 !important;
}

.bb {
  width: 80%;
  max-width: 1440px;
  margin: 0 auto 18px;
}

.bb__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  border-radius: 9px;
  touch-action: pan-y;
  user-select: none;
}

.bb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}

.bb__img.is-active {
  opacity: 1;
}

.tg-slider {
  position: relative;
  width: 100%;
}

.tg-slider__viewport {
  overflow: hidden;
}

.tg-slider__track {
  display: flex;
  gap: 18px;
  transition: transform .35s ease;
  will-change: transform;
}

.tg-slide {
  flex: 0 0 86%;
  opacity: .35;
  transition: opacity .25s ease;
  position: relative;
}

.tg-slide:hover {
  opacity: .85;
}

.tg-slide.is-active {
  opacity: 1;
}

.tg-slide__tg {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 5;
  text-decoration: none;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .85);
  color: #222;
}

.tg-slide__tg:hover {
  background: rgba(255, 255, 255, 1);
}

.tg-slider blockquote.telegram-post {
  margin: 0;
}

.tg-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  cursor: pointer;
  font-size: 26px;
  line-height: 44px;
}

.tg-slider__btn.is-prev {
  left: -6px;
}

.tg-slider__btn.is-next {
  right: -6px;
}

.blog-sep {
  width: 100%;
  max-width: 1440px;
  height: 2px;
  margin: 40px auto 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .12), rgba(0, 0, 0, 0));
}

/* ===== Главная ===== */

.home-page {
  background: #f7f4ee;
  color: #26231f;
}

.home-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 70px 32px 90px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.35fr);
  gap: 72px;
  align-items: center;
  margin-bottom: 72px;
}

.home-eyebrow {
  margin: 0 0 22px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #777067;
}

.home-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: #2a261f;
}

.home-lead {
  max-width: 430px;
  margin: 28px 0 34px;
  font-size: 17px;
  line-height: 1.7;
  color: #5d574f;
}

.home-hero-link,
.home-section-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #28241f;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid rgba(40, 36, 31, 0.35);
  padding-bottom: 7px;
  transition: opacity 0.2s ease, gap 0.2s ease;
}

.home-hero-link:hover,
.home-section-link:hover {
  gap: 20px;
  opacity: 0.7;
}

.home-hero-media {
  position: relative;
}

.home-hero-media::before {
  content: "";
  position: absolute;
  inset: -24px -24px auto auto;
  width: 42%;
  height: 65%;
  z-index: 0;
}

.home-hero-image-link {
  position: relative;
  display: block;
  z-index: 1;
}

.home-hero-image-link img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(38, 33, 26, 0.18);
}

.home-featured {
  border-top: 1px solid rgba(38, 33, 26, 0.14);
  padding-top: 34px;
}

.home-section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.home-section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 400;
}

.home-works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.home-work-card {
  min-width: 0;
}

.home-work-image {
  display: block;
  overflow: hidden;
  background: #e8e1d6;
}

.home-work-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.home-work-card:hover .home-work-image img {
  transform: scale(1.035);
}

.home-work-info {
  padding-top: 13px;
}

.home-work-info h3 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 400;
  color: #2c2822;
}

.home-work-info p {
  margin: 0;
  font-size: 13px;
  color: #777067;
}

/* ===== Адаптив ===== */

@media (max-width: 1200px) {
  .page-charity .page-charity-gallery .grid-sizer,
  .page-charity .page-charity-gallery .gallery-item {
    width: 33.3333%;
  }
}

@media (max-width: 980px) {
  .home-main {
    padding: 46px 20px 70px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .home-hero-media {
    order: -1;
  }

  .home-works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-item {
    width: 90%;
  }

  .gallery-item.mini,
  .gallery-item.small,
  .gallery-item.medium,
  .gallery-item.big {
    padding: 5%;
    max-width: 100%;
  }

  .gallery-card-media::after {
    opacity: 1;
  }

  .gallery-action {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    width: 48px;
    height: 48px;
  }

  .gallery-action img {
    width: 30px;
    height: 30px;
  }

  .artist-profile {
    width: 90%;
    padding: 15px;
  }

  .profile-content {
    flex-direction: column;
    align-items: center;
  }

  .profile-text {
    width: 100%;
  }

  .artist-image-container {
    width: 100%;
    margin-top: 20px;
  }

  .artist-profile h1 {
    font-size: 1.8em;
  }

  .artist-profile h2 {
    font-size: 1.3em;
  }

  .gallery-filters-panel {
    top: 58px;
    width: 92vw;
  }

  .gallery-filters--icons {
    width: 100%;
  }

  .gallery-filters--icons button {
    width: 42px;
    height: 42px;
  }

  .gallery-filters--icons .filter-icon {
    width: 24px;
    height: 24px;
  }

  .page-charity .page-charity-gallery.ready {
    margin-left: -4% !important;
    margin-right: 0 !important;
  }

  .page-charity .gallery-wrapper {
    padding: 0 12px;
    box-sizing: border-box;
  }

  .page-charity .charity-intro {
    max-width: 100% !important;
    margin: 95px auto 15px !important;
    padding: 0 12px !important;
  }

  .page-charity .charity-intro h1 {
    font-size: 26px;
  }

  .page-charity .charity-intro p {
    font-size: 15px;
  }

  .page-charity .page-charity-gallery .grid-sizer,
  .page-charity .page-charity-gallery .gallery-item {
    width: 50% !important;
  }

  .page-charity .page-charity-gallery .gutter-sizer {
    width: 14px !important;
  }

  .page-charity .page-charity-gallery .gallery-item {
    margin-bottom: 14px !important;
  }

  .page-charity .charity-buy {
    opacity: 1 !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, 0.9);
  }

  .page-charity .gallery-item:hover .charity-buy {
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .tg-page__content {
    width: 95%;
    padding: 14px 10px 28px;
  }

  blockquote.telegram-post {
    margin: 14px 0;
  }

  blockquote.telegram-post + blockquote.telegram-post {
    margin-top: 16px;
  }

  .bb {
    width: 100%;
  }

  .bb__frame {
    aspect-ratio: 16/10;
    border-radius: 8px;
  }

  .tg-slider__btn {
    display: none;
  }

  .tg-slider__viewport {
    overflow: visible;
  }

  .tg-slider__track {
    display: block;
    transform: none !important;
  }

  .tg-slide {
    width: 100%;
    opacity: 1 !important;
    margin: 0 0 16px;
  }
}

@media (max-width: 600px) {
  .modal-content {
    margin: 20% auto;
    width: 95%;
  }

  .gallery-item.mini {
    margin: 0;
  }
}

@media (max-width: 560px) {
  .home-main {
    padding: 32px 16px 56px;
  }

  .home-hero h1 {
    font-size: 40px;
  }

  .home-lead {
    font-size: 15px;
  }

  .home-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-works-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .home-hero-image-link img {
    max-height: none;
  }
}

@media (max-width: 480px) {
  .page-charity .page-charity-gallery .grid-sizer,
  .page-charity .page-charity-gallery .gallery-item {
    width: 100% !important;
  }

  .page-charity .page-charity-gallery .gutter-sizer {
    width: 10px !important;
  }

  .page-charity .charity-buy {
    width: 60px !important;
    height: 60px !important;
    left: 8px !important;
    bottom: 8px !important;
  }

  .page-charity .charity-buy-icon {
    width: 22px !important;
    height: 22px !important;
  }
}
/* ===== Safe organic gallery layout ===== */

.gallery-wrapper {
  max-width: 1480px;
  padding: 0 clamp(16px, 3vw, 44px);
  box-sizing: border-box;
}

.gallery.ready {
  margin-top: 130px;
  padding-bottom: 80px;
}

/* убираем старые случайные сдвиги */
.gallery:not(.page-charity-gallery) > .gallery-item {
  margin: 0 0 34px !important;
  box-sizing: border-box;
  transition: none;
}

.gallery:not(.page-charity-gallery) > .gallery-item:hover {
  transform: none;
}

/* размеры карточек — мягкая "вертикальная галерея" */
.gallery:not(.page-charity-gallery) > .gallery-item.mini {
  width: 20%;
  max-width: 20%;
  padding: 0 10px 0 0 !important;
}

.gallery:not(.page-charity-gallery) > .gallery-item.small {
  width: 26%;
  max-width: 26%;
  padding: 0 12px 0 0 !important;
}

.gallery:not(.page-charity-gallery) > .gallery-item.medium {
  width: 34%;
  max-width: 34%;
  padding: 0 14px 0 0 !important;
}

.gallery:not(.page-charity-gallery) > .gallery-item.big {
  width: 47%;
  max-width: 47%;
  padding: 0 16px 0 0 !important;
}

/* органичная неровность, но без transform */
.gallery:not(.page-charity-gallery) > .gallery-item:nth-child(7n+2) {
  padding-top: 18px !important;
}

.gallery:not(.page-charity-gallery) > .gallery-item:nth-child(7n+4) {
  padding-top: 34px !important;
}

.gallery:not(.page-charity-gallery) > .gallery-item:nth-child(7n+6) {
  padding-top: 12px !important;
}

.gallery:not(.page-charity-gallery) > .gallery-item:nth-child(9n+5) {
  padding-top: 46px !important;
}

/* сама картинка */
.gallery-card-media {
  border-radius: 4px;
  overflow: hidden;
  background: #eee8dc;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
  transition: box-shadow .28s ease;
}

.gallery-card-media:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.gallery-main-img {
  width: 100%;
  max-width: none;
  transition: opacity .18s ease, filter .18s ease;
}

/* подпись */
.gallery:not(.page-charity-gallery) .bottom-container {
  justify-content: center;
  margin-top: 8px;
}

.gallery:not(.page-charity-gallery) .bottom-container h3 {
  font-size: 17px;
  line-height: 1.25;
  padding: 7px 0 0;
}

/* планшет */
@media (max-width: 980px) {
  .gallery:not(.page-charity-gallery) > .gallery-item.mini,
  .gallery:not(.page-charity-gallery) > .gallery-item.small {
    width: 45%;
    max-width: 45%;
  }

  .gallery:not(.page-charity-gallery) > .gallery-item.medium {
    width: 48%;
    max-width: 48%;
  }

  .gallery:not(.page-charity-gallery) > .gallery-item.big {
    width: 68%;
    max-width: 68%;
  }

  .gallery:not(.page-charity-gallery) > .gallery-item:nth-child(n) {
    padding-top: 0 !important;
  }

  .gallery:not(.page-charity-gallery) > .gallery-item:nth-child(3n+2) {
    padding-top: 20px !important;
  }
}

/* телефон — ровная колонка */
@media (max-width: 768px) {
  .gallery-wrapper {
    padding: 0 16px;
  }

  .gallery.ready {
    margin-top: 95px;
  }

  .gallery:not(.page-charity-gallery) > .gallery-item,
  .gallery:not(.page-charity-gallery) > .gallery-item.mini,
  .gallery:not(.page-charity-gallery) > .gallery-item.small,
  .gallery:not(.page-charity-gallery) > .gallery-item.medium,
  .gallery:not(.page-charity-gallery) > .gallery-item.big {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 0 32px !important;
  }
}
.gallery:not(.page-charity-gallery) .bottom-container.gallery-caption {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-top: 8px;
}

.gallery:not(.page-charity-gallery) .gallery-item-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 7px 0 0;
  text-align: left;
  font-size: 17px;
  line-height: 1.25;
  color: #2d2d2d;
}

.gallery-item-year {
  flex: 0 0 auto;
  padding-top: 7px;
  
  line-height: 1.25;
  
  white-space: nowrap;
}
/* ===== Избранные работы: название-ссылка ===== */

.home-work-card {
  min-width: 0;
}

.home-work-info {
  padding-top: 13px;
}

.home-work-info h3 {
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 400;
}

.home-work-title-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: #2c2822;
  text-decoration: none;

  transform-origin: left center;
  transition: transform .22s ease, color .22s ease;
}

.home-work-title-link span {
  display: inline-block;
}

.home-work-title-icon {
  width: 18px;
  height: 18px;

  opacity: 0;
  transform: translateX(-4px) scale(.82);

  box-shadow: none !important;
  border-radius: 0 !important;

  transition: opacity .22s ease, transform .22s ease;
}

/* ховер срабатывает от наведения на всю карточку, включая бокс изображения */
.home-work-card:hover .home-work-title-link {
  color: #111;
  transform: scale(1.045);
}

.home-work-card:hover .home-work-title-icon {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* более точный вариант: именно при наведении на изображение */
.home-work-card:has(.home-work-image:hover) .home-work-title-link {
  color: #111;
  transform: scale(1.045);
}

.home-work-card:has(.home-work-image:hover) .home-work-title-icon {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.gallery-loader {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  z-index: 999;

  pointer-events: none;
  opacity: 1;
  transition: opacity .35s ease;
}

.gallery-loader.is-hidden {
  opacity: 0;
}

.gallery-loader__line {
  width: 100%;
  height: 3px;
  background: rgba(38, 33, 26, .08);
  overflow: hidden;
}

.gallery-loader__line span {
  display: block;
  width: 0%;
  height: 100%;
  background: #7a6a4d;
  transition: width .22s ease;
  position: relative;
}

.gallery-loader__line span::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.55),
    transparent
  );
  animation: galleryLoaderShine 1.1s linear infinite;
}

.gallery-loader__text {
  display: inline-block;
  margin: 12px 0 0 50%;
  transform: translateX(-50%);

  padding: 9px 18px;
  border-radius: 999px;

  font-size: 16px;
  line-height: 1.2;
  color: #7a6a4d;
  background: rgba(247, 244, 238, .96);
  box-shadow: 0 10px 28px rgba(38, 33, 26, .14);
}

@keyframes galleryLoaderShine {
  from {
    left: -40%;
  }

  to {
    left: 100%;
  }
}

@media (max-width: 768px) {
  .gallery-loader {
    top: 62px;
  }

  .gallery-loader__text {
    font-size: 14px;
    padding: 8px 15px;
  }
}