:root {
  --font-sans: "Inter", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  /*--site-bg: #fff;*/
  --card-bg: #fdfbf7;
  --artwork-bg: #fff;
  --media-bg: #f2eee7;
  --text: #211f1c;
  --muted: #756f67;
  --line: #e3ddd4;
  --accent: #9a7650;
}
html[lang="ru"] {
  --font-sans: "Inter", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}
html[lang="en"] {
  --font-sans: "Inter", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}
html[lang="ar"] {
  --font-sans: "Noto Naskh Arabic", "Inter", system-ui, sans-serif;
  --font-serif: "Noto Naskh Arabic", serif;
}
html[lang="zh"] {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Noto Sans SC", Arial, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
}

html {
	font-size: 16px; /* Default root size for scaling (adjustable) */
}

@media (max-width: 768px) {
	html {
		font-size: 14px; /* Scale down for smaller screens */
	}
  .lang-current {
/*      display: none !important;*/
  }
}


@media (max-width: 480px) {
	html {
	font-size: 12px; /* Further scale down for very small screens */
	}
}

/* General Font Styling */
body {
	font-family: var(--font-sans);
	font-optical-sizing: auto;
	font-weight: 200;
	font-style: normal;
	margin: 0;
	padding: 0;
	color: #000000;
}

/* Full-screen background slideshow */
.hero {
	height: 100vh;
	width: 100%;
	position: relative;
	overflow: hidden;
}

.slides {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 1s ease-in-out;
}

.slides.active {
	opacity: 1;
}

/* Navigation Arrows */
.arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	cursor: pointer;
	user-select: none;
	z-index: 10;
	background-color: rgba(0, 0, 0, 0.4);
	border-radius: 50%;
	transition: transform 0.3s ease, background-color 0.3s ease;
}

.arrow:hover {
	transform: translateY(-50%) scale(1.2);
	background-color: rgba(255, 255, 255, 0.2);
}

.arrow-left {
	left: 2rem;
}

.arrow-right {
	right: 2rem;
}

.arrow svg {
	width: 1.5rem;
	height: 1.5rem;
	fill: white;
}

/* Header Styling */
.header {
	position: relative;
	top: 0;
	left: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	padding: 3rem 7rem;
	background-color: transparent;
/*      transition: background-color 0.3s ease-in-out, padding 0.3s ease-in-out;*/
}

.header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 1), transparent);
	z-index: -1;
	pointer-events: none;
}

.header img {
/*      filter: invert(1); */
}

.header a {
	display: inline-block;
}

.nav-links {
	display: flex;
	flex-direction: row;
	gap: 2.5rem;
	white-space: nowrap;
	margin-left: 4rem;
	align-items: center;
}

.nav-links a, .nav-links button {
	color: black;
	text-decoration: underline;
	font-weight: bold;
	font-size: 1.3em;
	padding: 0.3rem 1rem;
	border-radius: 10px;
	transition: background-color 0.3s ease, color 0.3s ease;
	background-color: rgba(0, 0, 0, 0.6);
	color: white;
	text-decoration: none;
}

.nav-links a:hover,
.nav-links a.is-active {
	text-decoration: none;
	background-color: #332f2f;
	color: white;
}

/* Footer Styling */
.footer {
	font-size: 1.1rem;
	line-height: 1.2rem;
	background-color: white;
	padding: 2rem 1rem;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

.footer-column {
	text-align: left;
}

.footer-logo {
	text-align: center;
}

.footer-column h3 {
	font-weight: bold;
	margin-bottom: 1rem;
	color: #333;
}

.footer-column p {
	margin: 0.5rem 0;
	color: #555;
}

.custom-divider {
	width: 100%;
	height: 2px; /* Line thickness */
	margin: 2rem 0; /* Spacing above and below */
	background: repeating-linear-gradient(
	to right,
	#ddd, /* Line color */
	#ddd 15px, /* Dash length */
	transparent 0px, /* Start of gap */
	transparent 30px /* Gap length */
	);
	border: none; /* Remove default border */
}

/* General Container */
.artworks {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

/* Artwork Styling */
.artworks figure {
	text-align: center;
	margin: 0;
}

.artworks img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	transition: transform 0.3s ease-in-out;
}

.artworks img:hover {
	transform: scale(1.05); /* Slight zoom on hover */
}

.artworks figcaption {
	margin-top: 0.5rem;
	font-size: 1.1rem;
	color: #333;
}

.artworks h3 {
	font-size: 1.5rem;
	margin: 0;
	font-weight: bold;
	color: #222;
}

.artworks p {
	font-size: 1rem;
	color: #777;
}

/* Carousel Container */
.carousel {
	position: relative;
	text-align: center;
	overflow: hidden;
}

/* Row Styling */
.columns.is-vcentered {
	margin-bottom: 2rem; /* Spacing between rows */
}

/* Artwork Description */
.artwork-description h3 {
	font-size: 2rem;
	font-weight: bold;
	margin-bottom: 0.5rem;
	color: #222;
}

.artwork-description h4 {
	font-size: 1.2rem;
	color: #777;
	margin-bottom: 1rem;
}

.artwork-description p {
	font-size: 1rem;
	color: #555;
	line-height: 1.6;
	text-align: left; /* Align text to the left */
}

/* Artwork Image */
.columns.is-vcentered .column.is-4 .column.is-5 img {
	width: 100%;
	height: auto;
	border-radius: 8px; /* Optional: Add rounded corners */
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: Add subtle shadow */
}

/* Adjust Spacing */
.columns.is-vcentered {
	margin-bottom: 2rem; /* Space between rows */
}

/* Outline Button Styling */
.read-more-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.2rem;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	color: #000000;
	border: 1px solid #cccccc; /* Outline style */
	border-radius: 18px; /* Rounded pill shape */
	transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
	background-color: transparent; /* No background fill */
	box-shadow: none; /* Optional: no shadow for minimalism */
	cursor: pointer;
}

/* Hover State */
.read-more-outline:hover {
	color: #0055aa; /* Darker blue on hover */
	border-color: #0055aa; /* Change border color */
	box-shadow: 0 0px 12px rgba(0, 85, 170, 0.4); /* Subtle glow */
}

/* Arrow Icon */
.read-more-outline .arrow-icon {
	width: 1.2rem;
	height: 1.2rem;
	margin-left: 0.5rem;
	transition: transform 0.3s ease;
}

.read-more-outline:hover .arrow-icon {
	transform: translateX(5px); /* Slide arrow to the right */
}

.icon-text {
	margin-bottom: 1rem; /* или больше — по вкусу */
}

.rounded-image {
	border-radius: 8px;
}

/* Все элементы, содержащие "цитатный" текст */
em,
blockquote,
.citation,
.quote,
.text-art-style {
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 400;
	font-size: 1.6em;
	line-height: 1.0;
/*  color: #444;*/
}

.feedback-success,
.feedback-error {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.5rem;
	border-radius: 6px;
	font-weight: 500;
	font-size: 1.1rem;
	margin-bottom: 1.5rem;
	color: #222;
}

.feedback-success {
	background-color: #e0f4e9;
	border: 1px solid #a5d6a7;
}

.feedback-error {
	background-color: #fdecea;
	border: 1px solid #f5c6cb;
}

/* Смайлик */
.feedback-emoji {
	font-size: 1.6em; /* ~25% больше */
	line-height: 1;
}


/* Стиль логотипа */
.logo img {
  max-width: 100%;
  height: auto;
}

/* Адаптация под мобильные */
@media (max-width: 768px) {
	section {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
  .logo img {
    max-width: 150px;
    height: auto;
  }
  .nav-links {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-left: 0;
  }
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .header {
  	padding-bottom: 1rem;
  }
  .footer-logo {
  	display: none;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
/* EOF marker */

/* === Font family override === */
body{ font-family: var(--font-sans); }

/* === Serif accents (headings/quotes) === */
em, i, blockquote, q, .citation, .quote, .text-art-style{ font-family: var(--font-serif); }

/* === Direction-aware helpers (LTR/RTL) === */
.text-start{text-align:start}.text-end{text-align:end}
.ms-1{margin-inline-start:.25rem}.me-1{margin-inline-end:.25rem}
.ps-1{padding-inline-start:.25rem}.pe-1{padding-inline-end:.25rem}

/* Декоративные цитаты */
blockquote.quote {
	font-style: italic;
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.6em;
	color: #444;
	border-left: 4px solid #ccc;
	padding-left: 1rem;
	margin: 2rem 0;
}

/* Параграфы с дыханием */
.paragraph {
	margin-bottom: 1.4rem;
	font-size: 1.2em;
	line-height: 1.5;
	font-weight: 400;
}

.video-preview {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-preview img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

/* Play всегда на месте */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Треугольник внутри */
.play-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-left: 16px solid #333;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* Эффект наведения */
.video-preview:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.video-preview:hover img {
  opacity: 0.85;
}

/* Анимация самой кнопки при hover */
.video-preview:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Параграфы в страницах работ */
.artwork-p p {
	margin-bottom: 1.4rem;
	font-size: 1.15em;
	line-height: 1.3;
	font-weight: 400;
}

.emoji {
  font-style: normal;                 /* отменяем курсива для эмодзи */
  font-synthesis: none;               /* запретить синтетический italic */
  /* фиксируем эмодзи-шрифт, чтобы браузер не менял гарнитуру */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

span.icon {
	padding-right: .75em;
}

.content {
	font-weight: 400 !important;
	font-size: 1.15em;
}

p {
	font-weight: 400;
	font-size: 1.15em;
}

.columns .column img {
  width: 100%;
  /*height: 300px;    */   /* выбери удобную для себя */
  object-fit: cover;   /* "обрезает" изображение по контейнеру */
  /* border-radius: 8px; */  /* если нужен скруглённый угол, как у .rounded-image */
}

/* Кнопки купить под картиной */
.artwork-cta {
  position: sticky; top: 2rem;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.96));
  backdrop-filter: blur(3px);
  border: 1px solid rgba(0,0,0,.06);
}

.artwork-cta .price {
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}

.artwork-cta .is-divider {
  height: 1px; background: rgba(0,0,0,.08);
  margin: .75rem 0 1rem;
}

/* На узких экранах «липкость» не нужна */
@media (max-width: 768px) {
  .artwork-cta { position: static; }
}

.button.is-golden {
  background-color: #c1b67f;
  color: #fff;
}

.button.is-golden:hover,
.button.is-golden:focus,
.button.is-golden:active {
  background-color: #b4a661; /* чуть темнее при hover (по желанию) */
  color: #fff;
}

.about_box {
	background-color: #f4e5e8;
}

blockquote p {
    font-size: 0.8em !important;
}

.is-nowrap {
  white-space: nowrap;
}

		.catalog-page {
			padding: 54px 24px 90px;
		}

		.container.catalog-container {
			width: 100%;
			max-width: 1152px !important;
			margin-right: auto;
			margin-left: auto;
			padding-right: 0;
			padding-left: 0;
		}

		.catalog-header {
			display: flex;
			align-items: flex-end;
			justify-content: space-between;
			gap: 32px;
			margin-bottom: 34px;
			padding-bottom: 20px;
			border-bottom: 1px solid var(--line);
		}

		.catalog-header__brand {
			margin: 0;
			font-family: "Prata", Georgia, serif;
			font-size: clamp(27px, 2.5vw, 38px);
			font-weight: 400;
			letter-spacing: .035em;
		}

		.catalog-header__title {
			margin: 0;
			color: var(--muted);
			font-size: 12px;
			font-weight: 600;
			letter-spacing: .24em;
			text-transform: uppercase;
		}

		.artwork-card {
			position: relative;
			overflow: hidden;
			margin-bottom: 38px;
			border: 1px solid var(--line);
			border-radius: 0;
			background: var(--card-bg);
			box-shadow: none;
		}

		.artwork-card:last-child {
			margin-bottom: 0;
		}

		.artwork-card__number {
			position: absolute;
			z-index: 3;
			top: 0;
			right: 0;
			display: grid;
			width: 54px;
			height: 54px;
			place-items: center;
			border-left: 1px solid rgba(255,255,255,.55);
			border-bottom: 1px solid rgba(255,255,255,.55);
			background: rgba(30,27,23,.56);
			color: #fff;
			font-size: 12px;
			font-weight: 600;
			letter-spacing: .16em;
			backdrop-filter: blur(10px);
		}

		.artwork-gallery.columns {
			margin: 0 !important;
			gap: 1px;
			background: var(--line);
		}

		.artwork-gallery > .column {
			padding: 0 !important;
		}

		.media-slide {
			position: relative;
			min-width: 0;
			/*height: 540px;*/
			overflow: hidden;
		}

		/*
			У оригиналов фиксированная ширина 320 px.
			Поэтому картины не становятся то шире, то уже при изменении окна.
			Разная ориентация влияет только на высоту изображения.
		*/
		.media-slide--artwork {
			display: grid;
			place-items: center;
			padding: 32px;
			background: var(--artwork-bg);
		}

		.media-slide__artwork-frame {
			/*width: 320px;*/
			/*width: 0px;*/
			max-width: 100%;
			padding: 40px;
		}

		.media-slide__artwork-frame img {
			display: block;
			width: 100%;
			height: auto;
		}

		.media-slide--interior {
			background: var(--media-bg);
		}

		.media-slide--interior > img {
			display: block;
			width: 100%;
			height: 100%;
			object-fit: cover;
			object-position: center;
		}

		.media-slide__label {
			position: absolute;
			left: 18px;
			bottom: 18px;
			padding: 9px 12px;
			border: 1px solid rgba(255,255,255,.5);
			background: rgba(29,26,22,.57);
			color: #fff;
			font-size: 10px;
			font-weight: 600;
			letter-spacing: .16em;
			text-transform: uppercase;
			backdrop-filter: blur(8px);
		}

		.media-slide__label--light {
			border-color: var(--line);
			background: rgba(255,255,255,.9);
			color: var(--text);
		}

		.artwork-card__dots {
			display: none;
		}

		.artwork-card__body {
			/*padding: 38px 40px 42px;*/
			padding: 15px 40px 15px 40px;
		}

		.artwork-details.columns {
			margin-top: 0;
			margin-bottom: 0;
			align-items: stretch;
		}

		.artwork-details > .column {
			display: flex;
			flex-direction: column;
		}

		.artwork-card__type,
		.artwork-label {
			display: block;
			margin: 0 0 10px;
			color: var(--muted);
			font-size: 11px;
			font-weight: 600;
			letter-spacing: .16em;
			line-height: 1.35;
			text-transform: uppercase;
		}

		.artwork-card__title {
			margin: 0 0 16px;
			color: var(--text);
			font-family: "Prata", Georgia, serif;
			font-size: clamp(22px, 3.2vw, 36px);
			font-weight: 400;
			line-height: 1.07;
			letter-spacing: -.02em;
		}

		.artwork-card__description {
			max-width: 680px;
			margin: 0;
			color: var(--muted);
			font-size: 16px;
			line-height: 1.75;
		}

		.artwork-facts,
		.artwork-materials {
			border-left: 1px solid var(--line);
		}

		.artwork-facts {
			justify-content: flex-start;
			padding-right: 2rem !important;
			padding-left: 2rem !important;
		}

		.artwork-size strong,
		.artwork-year strong {
			display: block;
			color: var(--text);
			font-family: "Prata", Georgia, serif;
			font-size: 25px;
			font-weight: 400;
			line-height: 1.15;
			letter-spacing: -.015em;
		}

		.artwork-year {
			margin-top: 34px;
		}

		.artwork-materials {
			justify-content: flex-start;
		}

		.artwork-materials p {
			max-width: 520px;
			margin: 0;
			color: var(--text);
			font-size: 16px;
			line-height: 1.72;
		}

		.artwork-materials .artwork-button {
			width: 100%;
			max-width: 320px;
			margin-top: 28px;
		}

		.artwork-button.button {
			display: flex;
			min-height: 82px;
			height: auto;
			justify-content: space-between;
			gap: 20px;
			padding: 20px 22px;
			border: 1px solid var(--accent);
			border-radius: 0;
			background: transparent;
			color: var(--text);
			box-shadow: none;
			white-space: normal;
			font-family: "Onest", Arial, sans-serif;
			font-size: 12px;
			font-weight: 600;
			letter-spacing: .07em;
			line-height: 1.5;
			text-align: left;
			text-transform: uppercase;
			transition:
				background-color .2s ease,
				color .2s ease,
				transform .2s ease;
		}

		.artwork-button.button:hover {
			border-color: var(--text);
			background: var(--text);
			color: #fff;
			transform: translateY(-2px);
		}

		.artwork-button__arrow {
			flex: none;
			font-family: Georgia, serif;
			font-size: 24px;
			font-weight: 400;
			line-height: 1;
		}

		.artwork-button.button:focus-visible,
		.artwork-card__dot:focus-visible {
			outline: 2px solid var(--accent);
			outline-offset: 4px;
		}

		@media screen and (max-width: 1023px) {
			.media-slide {
				height: 480px;
			}

			.media-slide__artwork-frame {
				width: 286px;
			}

			.artwork-facts {
				border-left: 0;
				padding-right: .75rem !important;
				padding-left: .75rem !important;
			}

			.artwork-materials .artwork-button {
				max-width: 430px;
			}
		}

		@media screen and (max-width: 768px) {
			.catalog-page {
				padding: 26px 12px 55px;
			}

			.catalog-header {
				align-items: flex-start;
				margin-bottom: 18px;
			}

			.catalog-header__title {
				padding-top: 7px;
				font-size: 10px;
			}

			.artwork-card {
				margin-bottom: 22px;
			}

			.artwork-card__number {
				width: 44px;
				height: 44px;
				font-size: 10px;
			}

			.artwork-gallery.columns {
				display: flex;
				flex-wrap: nowrap;
				gap: 0;
				overflow-x: auto;
				scroll-snap-type: x mandatory;
				scrollbar-width: none;
				overscroll-behavior-inline: contain;
			}

			.artwork-gallery.columns::-webkit-scrollbar {
				display: none;
			}

			.artwork-gallery > .column {
				flex: 0 0 100%;
				width: 100%;
				max-width: 100%;
				scroll-snap-align: start;
				scroll-snap-stop: always;
			}

			.media-slide {
				height: 480px;
			}

			.media-slide--artwork {
				padding: 28px 24px;
			}

			.media-slide__artwork-frame {
				width: min(78vw, 320px);
			}

			.media-slide__label {
				left: 12px;
				bottom: 12px;
				padding: 8px 10px;
				font-size: 9px;
			}

			.artwork-card__dots {
				display: flex;
				justify-content: center;
				gap: 7px;
				padding: 12px 0 0;
			}

			.artwork-card__dot {
				width: 7px;
				height: 7px;
				padding: 0;
				border: 0;
				border-radius: 999px;
				background: #c9c1b6;
				cursor: pointer;
				transition:
					width .2s ease,
					background-color .2s ease;
			}

			.artwork-card__dot.is-active {
				width: 24px;
				background: var(--accent);
			}

			.artwork-card__body {
				padding: 24px 19px 21px;
			}

			.artwork-details.columns {
				display: block;
			}

			.artwork-details > .column {
				padding: 0;
			}

			.artwork-card__type,
			.artwork-label {
				font-size: 10px;
			}

			.artwork-card__title {
				font-size: clamp(32px, 9.5vw, 42px);
			}

			.artwork-card__description {
				font-size: 15px;
				line-height: 1.7;
			}

			.artwork-facts,
			.artwork-materials {
				border-left: 0;
			}

			.artwork-facts {
				display: block !important;
				margin-top: 24px;
				padding-top: 22px !important;
				padding-right: 0 !important;
				padding-left: 0 !important;
				border-top: 1px solid var(--line);
			}

			.artwork-size strong,
			.artwork-year strong {
				font-size: 27px;
			}

			.artwork-year {
				margin-top: 23px;
			}

			.artwork-materials {
				margin-top: 22px;
				padding-top: 21px !important;
				border-top: 1px solid var(--line);
			}

			.artwork-materials p {
				font-size: 15px;
				line-height: 1.7;
			}

			.artwork-materials .artwork-button {
				max-width: none;
				margin-top: 22px;
			}

			.artwork-button.button {
				min-height: 74px;
				padding-inline: 17px;
				font-size: 11px;
			}
		}

		@media (prefers-reduced-motion: reduce) {
			html {
				scroll-behavior: auto;
			}

			.artwork-button.button,
			.artwork-card__dot {
				transition: none;
			}
		}


    /* Pinterest-like masonry на CSS Columns */
    .masonry { column-count: 3; column-gap: 1rem; }
    .masonry-item {
      break-inside: avoid; -webkit-column-break-inside: avoid;
      display: inline-block; width: 100%; margin: 0 0 1rem;
    }
    /*.card { box-shadow: var(--bulma-shadow, 0 2px 3px rgba(10,10,10,.1)), 0 0 0 1px rgba(10,10,10,.1); }*/
    .card-image .image img { display: block; width: 100%; height: auto; }
    .card-content { padding: 0.75rem 1rem 1rem; }
    .card .title { margin: 0.5rem 0 0; font-size: 1.25em; }
    @media (max-width: 1023px) { .masonry { column-count: 2; } }
    @media (max-width: 768px)  { .masonry { column-count: 1; } }
    /* Контейнер держит размер (плейсхолдер), картинки внутри накладываются */
    .preview-swap {
      position: relative;
      width: 100%;
      overflow: hidden;
      /* Ключ: сохраняем габариты, используя известные width/height у img */
      aspect-ratio: var(--ar, 1 / 1);
    }

    /* Оба изображения занимают одно и то же место */
    .preview-swap > img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;

      /* Важно: чтобы разные размеры исходников не ломали блок */
      object-fit: cover;      /* если надо без обрезки — поменяй на contain */
      object-position: center;

      transition: opacity 1560ms ease, transform 1560ms ease, filter 1560ms ease;
      will-change: opacity, transform;
    }

    /* Базовое изображение */
    .preview-swap > img.is-base { opacity: 1; transform: scale(1); }

    /* Альтернативное */
    .preview-swap > img.is-alt  { opacity: 0; transform: scale(1.01); }

    /* Ховер: плавно показываем alt */
    .preview-swap:has(> img.is-alt):hover > img.is-base { opacity: 0; transform: scale(0.99); filter: saturate(0.98); }
    .preview-swap:hover > img.is-alt  { opacity: 1; transform: scale(1.00); }

    /* Для клавиатуры (доступность): если фокус внутри ссылки */
    a:focus-visible .preview-swap > img.is-alt { opacity: 1; }
    a:focus-visible .preview-swap:has(> img.is-alt) > img.is-base { opacity: 0; }

    /* Когда нужно “панорамировать” по вертикали */
    .preview-swap.is-pan-y > img.is-alt {
      object-fit: contain;      /* чтобы не обрезать, а показать всю ширину */
      object-position: top;     /* старт сверху */
      transform: translateY(0);
    }

    .preview-swap.is-pan-y:hover > img.is-alt {
      animation: panY var(--pan-dur, 6s) ease-in-out infinite alternate;
    }
    @keyframes panY {
      from { transform: translateY(0); }
      to   { transform: translateY(calc(-1px * var(--pan-dy, 0))); }
    }
  

/* === Lang Switcher minimal styles === */
.lang-switcher{position:relative}
.lang-current{background:none;border:0;cursor:pointer;font:inherit;display:flex;align-items:center;gap:4px;color:inherit;padding:0}
.lang-menu{position:absolute;top:100%;left:0;list-style:none;margin:4px 0 0;padding:0;min-width:80px;display:none;z-index:100}
.lang-menu li a{display:block;padding:6px 10px;color:#fff;margin-top:10px;}
.lang-menu li a:hover{background:#332f2f}
.lang-switcher.open .lang-menu{display:block}
@media (max-width:768px){
	.lang-menu{position:static;border:none;background:transparent;box-shadow:none;display:flex;gap:8px;margin-top:4px}
	.lang-menu li a{padding:4px 6px}
}
/* === /Lang Switcher styles === */
/*


 */
[hidden] { display: none !important; }
.public-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.5rem; }
.public-gallery figure { margin:0; min-width:0; }
.public-gallery img,.public-gallery video { width:100%; height:auto; border-radius:8px; }
.public-text-section { margin:2rem 0; }
.public-text-section-body p:not(:last-child) { margin-bottom:1em; }
.public-contact [role=status]:empty { display:none; }
.public-contact textarea { min-height:160px; }
.public-contact .feedback-success,.public-contact .feedback-error { margin-top:1rem; }
.public-slideshow .arrow { border:0; padding:0; }
.public-slideshow .header { width:100%; }
.public-slideshow .slides { pointer-events:none; }
.public-slideshow .slides img { width:100%; height:100%; object-fit:cover; }
.public-medium { margin:0; }
.public-medium img { max-width:100%; height:auto; }
.public-medium figcaption { margin-top:.5rem; }
.public-medium .video-preview { display:block; }
.public-extra { margin-block:2rem; }
.public-extra > .title { text-align:center; }
html[dir=rtl] span.icon { padding-right:0!important; padding-left:.75em!important; }
html[dir=rtl] .nav-links { margin-left:0; margin-right:4rem; }
html[dir=rtl] .artwork-facts,html[dir=rtl] .artwork-materials { border-left:0; border-right:1px solid var(--line); }
@media(max-width:768px) {
 .header { padding:2rem 1.5rem 1rem; justify-content:center; }
 .nav-links { white-space:normal; }
 html[dir=rtl] .nav-links { margin-right:0; }
 .footer { grid-template-columns:1fr; text-align:center; }
 .footer-column { text-align:center; }
 .public-gallery { grid-template-columns:1fr; }
 html[dir=rtl] .artwork-facts,html[dir=rtl] .artwork-materials { border-right:0; }
}
@media(prefers-reduced-motion:reduce) { .slides,.preview-swap>img { transition:none; } }

.button.is-golden { white-space:normal; height:auto; min-height:2.5em; }
.public-contact + .content img[width="350"] { width:350px; max-width:100%; }

/* Catalogue copy must not compound the legacy 1.15em paragraph rule. */
.artwork-card__description,.catalogue-sold .card-content>.content{font-size:16px}
.artwork-card__description p,.catalogue-sold .card-content>.content p{font-size:inherit;line-height:inherit}
.catalogue-sold .card .title.is-6{font-size:20px}
/* The interior is wrapped in a link in Rails; keep the original image sizing. */
.media-slide--interior>a{display:block;height:100%}
.media-slide--interior>a>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}

/* Match the author's .paragraph text without compounding .content and p sizes. */
.public-contact-page .content{font-size:1.2rem;line-height:1.5}
.public-contact-page .content p{font-size:inherit;line-height:inherit}
.public-contact .is-submit{min-height:54px;min-width:190px;max-width:100%;padding:14px 28px;font-size:18px;font-weight:600;border-radius:12px;background:#876b3d;border-color:#876b3d;color:#fff;box-shadow:0 5px 14px #876b3d24}
.public-contact .is-submit:hover:not(:disabled){background:#74592e;border-color:#74592e;color:#fff;box-shadow:0 6px 18px #876b3d38}
.public-contact .is-submit:focus-visible{outline:3px solid #bca270;outline-offset:3px}
.public-contact .is-submit:disabled{opacity:.6;cursor:wait;box-shadow:none}
.public-contact .is-submit .arrow-icon{width:21px;height:21px}
@media(prefers-reduced-motion:reduce){.public-contact .is-submit,.public-contact .is-submit .arrow-icon{transition:none}}

/* About columns are composed from editable text and the CMS media collection. */
.public-about .media-stack > .public-medium{margin-bottom:1.5rem}
.public-about .public-medium video{display:block;width:100%;height:auto;border-radius:12px}

/* Session-only preview markers, outside the artwork's public layout. */
.admin-preview-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 24px;background:#fff3d6;border-bottom:1px solid #e6cf98;color:#634c1d;font:14px/1.5 system-ui,sans-serif}
.admin-preview-banner__text{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.admin-preview-banner a{color:#634c1d;text-decoration:underline;white-space:nowrap}
.admin-preview-badge{display:inline-block;width:fit-content;padding:3px 10px;border:1px solid #d6b66f;border-radius:999px;background:#fff7e5;color:#72521a;font:600 12px/1.5 system-ui,sans-serif;margin:0 0 8px}
.admin-preview-banner .admin-preview-badge{margin:0}
@media(max-width:650px){.admin-preview-banner{align-items:flex-start;flex-direction:column;padding:10px 16px}}

/* A block wraps only its own photos; incomplete lines stay centred at the chosen size. */
.public-gallery-block{--gallery-columns:3;--gallery-gap:1.5rem;margin:0 auto 2rem;width:100%}
.public-gallery-block.gallery-columns-1{--gallery-columns:1}
.public-gallery-block.gallery-columns-2{--gallery-columns:2}
.public-gallery-block.gallery-columns-3{--gallery-columns:3}
.public-gallery-block.gallery-columns-4{--gallery-columns:4}
.public-gallery-block.gallery-columns-6{--gallery-columns:6}
.public-gallery-block.gallery-width-inset{width:83.3333%}
.public-gallery-block.gallery-width-narrow{width:66.6667%}
.public-gallery-block>.public-gallery{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:var(--gallery-gap)}
.public-gallery-block>.public-gallery>.public-medium{--effective-span:min(var(--media-span,1),var(--gallery-columns));flex:0 0 calc((100% + var(--gallery-gap))*var(--effective-span)/var(--gallery-columns) - var(--gallery-gap));min-width:0}
.public-gallery-block .public-medium>a{display:block}
.public-gallery-block .public-medium img{display:block;width:100%;height:auto}
/* Size the image to its frame before cropping, so overflow cannot clip just one edge. */
.public-gallery-block.gallery-fit-crop .public-medium>a[data-type=image],.public-gallery-block.gallery-fit-crop .public-medium>a[data-type=video]{position:relative;aspect-ratio:4/3;overflow:hidden;border-radius:8px}
.public-gallery-block.gallery-fit-crop .public-medium>a[data-type] img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.public-gallery-block.gallery-fit-crop .public-medium>video{aspect-ratio:4/3;object-fit:cover;object-position:50% 50%}
@media(max-width:768px){
 .public-gallery-block{--gallery-gap:1rem}
 .public-gallery-block.gallery-width-inset,.public-gallery-block.gallery-width-narrow{width:100%}
 .public-gallery-block.gallery-columns-2{--gallery-columns:1}
 .public-gallery-block.gallery-columns-3,.public-gallery-block.gallery-columns-4,.public-gallery-block.gallery-columns-6{--gallery-columns:2}
}

/* Equal media height is per physical row; captions remain outside the frame. */
.public-gallery-block>[data-row-height=tallest] [data-gallery-frame]{height:var(--row-media-height,auto);aspect-ratio:auto;overflow:hidden;display:flex;align-items:center;justify-content:center}
.public-gallery-block>[data-row-height=tallest] [data-gallery-frame] img{width:100%;height:100%;object-fit:contain}
.public-gallery-block.gallery-fit-crop>[data-row-height=tallest] [data-gallery-frame] img{object-fit:cover}
.public-gallery-block>[data-row-height=tallest] video[data-gallery-frame]{width:100%;object-fit:contain}
.public-gallery-block.gallery-fit-crop>[data-row-height=tallest] video[data-gallery-frame]{object-fit:cover}

.public-gallery-block.gallery-fit-crop>[data-row-height=tallest] .public-medium>[data-gallery-frame]{aspect-ratio:auto}

.public-artwork .column.is-5>.public-medium{margin-bottom:.75rem}

/* Artwork enquiries keep the painting in view without leaving its page. */
.artwork-inquiry{border:0;border-radius:20px;padding:34px;width:min(850px,calc(100% - 32px));max-height:90dvh;overflow:auto;color:#34322e;background:#fffdf8;box-shadow:0 24px 90px #0005;text-align:start}
.artwork-inquiry::backdrop{background:#17161299;backdrop-filter:blur(5px)}
.inquiry-layout{display:grid;grid-template-columns:minmax(160px,1fr) minmax(0,2fr);gap:32px}
.inquiry-artwork img{width:100%;max-height:290px;object-fit:contain;border-radius:10px;display:block;margin-bottom:18px}
.inquiry-artwork p{font-size:14px;line-height:1.5;color:#777;margin:0 0 8px}.inquiry-artwork strong{font-size:19px}
.inquiry-fields h2{font-size:24px;line-height:1.3;margin:0 24px 24px 0}.inquiry-fields .label{font-size:16px}.inquiry-fields .input,.inquiry-fields .textarea{font-size:16px}.inquiry-close{position:absolute;inset-inline-end:12px;top:8px;background:none;border:0;font-size:30px;cursor:pointer;color:#777}
.inquiry-feedback{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:30px;text-align:center;background:#fffdf8ed;backdrop-filter:blur(5px);z-index:2;border-radius:20px}
.inquiry-feedback[hidden]{display:none}.inquiry-feedback strong{font-size:30px}.inquiry-feedback p{font-size:17px;max-width:480px}.inquiry-feedback.is-error strong{color:#ad4138}.inquiry-spinner{width:40px;height:40px;border:3px solid #c5b18155;border-top-color:#9f8044;border-radius:50%;animation:inquiry-spin .8s linear infinite}.inquiry-feedback:not(.is-pending) .inquiry-spinner{display:none}.inquiry-feedback.is-pending button{display:none}
@keyframes inquiry-spin{to{transform:rotate(360deg)}}
@media(max-width:600px){.artwork-inquiry{padding:28px 20px}.inquiry-layout{grid-template-columns:1fr;gap:20px}.inquiry-artwork{display:grid;grid-template-columns:80px 1fr;column-gap:14px}.inquiry-artwork img{grid-row:1/3;max-height:100px;margin:0}.inquiry-artwork strong{font-size:17px}.inquiry-fields h2{font-size:21px;margin-bottom:18px}}
@media(prefers-reduced-motion:reduce){.inquiry-spinner{animation:none}}
