/*
Theme Name: zhukovy
Theme URI: https://zhukovy.revalfilm.info
Author: Voronin Studio
Author URI: mailto:savoronin@me.com
Description: Тема сайта семьи художников Жуковых. Собрана вручную взамен Elementor, чтобы сайт не зависел от плагина конструктора страниц.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: zhukovy
*/

/* ---------- Базовые переменные ---------- */
:root {
	--zh-text: #e8e6e1;
	--zh-muted: #a6a3a0;
	--zh-line: #3a3a3a;
	--zh-bg: #1b1b1b;
	--zh-accent: #d8d4c8;
	--zh-max-width: 1124px;
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--zh-bg) url('assets/bg-dark.jpg') repeat top center;
	color: var(--zh-text);
	font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	font-size: 20px;
	line-height: 1.6;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

.zh-wrap {
	max-width: var(--zh-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Header ---------- */
.zh-header {
	background: rgba(0, 0, 0, 0.55);
	border-bottom: 1px solid var(--zh-line);
	position: sticky;
	top: 0;
	z-index: 20;
}

@media (max-width: 960px) {
	.zh-header {
		position: static;
	}
}

.zh-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: var(--zh-max-width);
	margin: 0 auto;
	padding: 14px 24px;
	flex-wrap: wrap;
}

.zh-brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.zh-brand img,
.zh-brand .custom-logo {
	height: 44px;
	max-height: 44px;
	width: auto;
	max-width: 120px;
	object-fit: contain;
}

.zh-brand__title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 18px;
	letter-spacing: 0.02em;
	color: var(--zh-accent);
}

.zh-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.zh-nav a {
	display: inline-block;
	padding: 8px 14px;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.08em;
	color: var(--zh-accent);
	border-radius: 3px;
	transition: background 0.15s ease;
}

.zh-nav a:hover,
.zh-nav .current-menu-item a {
	background: var(--zh-bg);
}

.zh-lang-switcher .language-chooser {
	list-style: none;
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.zh-lang-switcher a {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--zh-muted);
}

.zh-lang-switcher a span {
	text-transform: uppercase;
}

.zh-lang-switcher li.active a {
	color: var(--zh-accent);
	border-bottom: 1px solid var(--zh-accent);
}

.zh-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 26px;
	height: 18px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.zh-nav-toggle span {
	display: block;
	height: 2px;
	background: var(--zh-accent);
}

@media (max-width: 960px) {
	.zh-nav-toggle {
		display: flex;
	}

	.zh-nav ul {
		display: none;
		flex-direction: column;
		width: 100%;
		gap: 0;
	}

	.zh-nav.is-open ul {
		display: flex;
	}

	.zh-nav a {
		display: block;
		padding: 10px 4px;
	}

	.zh-header__inner {
		position: relative;
	}

	.zh-nav {
		width: 100%;
		order: 3;
	}
}

/* ---------- Hero / Main ---------- */
.zh-hero {
	padding: 56px 0 40px;
	text-align: center;
}

.zh-hero h1 {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 400;
	font-size: clamp(24px, 4vw, 34px);
	color: var(--zh-accent);
	margin: 0 0 28px;
}

.zh-hero img {
	border-radius: 4px;
	margin: 0 auto 28px;
}

.zh-home-hero {
	margin: 0 0 28px;
}

body.home .zh-main .zh-wrap {
	min-height: 90vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

@media (max-width: 700px) {
	body.home .zh-main .zh-wrap {
		min-height: 0;
		padding-top: 24px;
		padding-bottom: 24px;
	}
}


.zh-hero__text {
	max-width: 640px;
	margin: 0 auto;
	color: var(--zh-text);
	font-size: 18px;
	white-space: pre-line;
}

/* ---------- Works index (карточки-порфолио) ---------- */
.zh-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	padding: 12px 0 56px;
}

@media (max-width: 700px) {
	.zh-cards {
		grid-template-columns: 1fr;
	}
}

.zh-card {
	position: relative;
	display: block;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #ddd;
}

.zh-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.zh-card:hover img {
	transform: scale(1.04);
}

.zh-card__title {
	position: absolute;
	inset: auto 0 0 0;
	padding: 14px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
	color: #fff;
	font-size: 16px;
	letter-spacing: 0.02em;
}

.zh-page-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 400;
	font-size: clamp(22px, 3.6vw, 30px);
	color: var(--zh-accent);
	margin: 44px 0 32px;
}

/* ---------- Слайдер (Gallery-блок в паттерне "страница художника") ---------- */
.zh-slider.wp-block-gallery {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: 12px;
	margin: 0 0 40px;
	padding-bottom: 4px;
}

.zh-slider.wp-block-gallery figure {
	flex: 0 0 78%;
	scroll-snap-align: start;
	max-width: 78%;
	margin: 0;
	border-radius: 4px;
	overflow: hidden;
}

.zh-slider.wp-block-gallery img {
	width: 100%;
	height: 360px;
	object-fit: cover;
}

/* ---------- Слайдер-шорткод [zh_slider] ---------- */
.zh-photo-slider {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	margin: 0 0 40px;
}

.zh-photo-slider__track {
	display: flex;
	transition: transform 0.5s ease;
}

.zh-photo-slider__slide {
	flex: 0 0 100%;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	height: 460px;
}

.zh-photo-slider__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1);
	transition: transform 12s ease-out;
}

.zh-photo-slider__slide.is-active img {
	transform: scale(1.06);
}

.zh-photo-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.zh-photo-slider__arrow--prev {
	left: 16px;
}

.zh-photo-slider__arrow--next {
	right: 16px;
}

.zh-photo-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.zh-photo-slider__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.5);
	padding: 0;
	cursor: pointer;
}

.zh-photo-slider__dot.is-active {
	background: #fff;
}

@media (max-width: 700px) {
	.zh-photo-slider__slide {
		height: 280px;
	}
}

/* ---------- Bio pages ---------- */
.zh-bio {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
	padding: 8px 0 56px;
	align-items: start;
}

@media (max-width: 700px) {
	.zh-bio {
		grid-template-columns: 1fr;
	}
}

/* Текст/фото в две колонки (Гутенберг-блок Group с layout:grid,
   columnCount:2) — на мобильном переключаем на одну колонку.
   Хэш в имени класса у Гутенберга разный на каждой странице, поэтому
   ловим по паттерну класса, а не по точному имени. */
@media (max-width: 700px) {
	.wp-block-group[class*="wp-container-core-group-is-layout-"] {
		grid-template-columns: 1fr !important;
	}
}

/* Колонка фото справа от текста на страницах художников */
.gallery-item {
	max-width: 220px;
	margin: 0 0 10px;
}

.gallery-item img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

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

.zh-bio__text p {
	margin: 0 0 16px;
	color: var(--zh-text);
}

.zh-bio__gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.zh-bio__gallery a {
	display: block;
	border-radius: 4px;
	overflow: hidden;
}

/* ---------- Gallery pages (масштабные портфолио) ---------- */
.zh-gallery {
	column-count: 4;
	column-gap: 12px;
	padding: 8px 0 64px;
}

@media (max-width: 900px) {
	.zh-gallery {
		column-count: 2;
	}
}

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

.zh-gallery figure {
	margin: 0 0 12px;
	break-inside: avoid;
	border-radius: 4px;
	overflow: hidden;
	background: #eee;
}

.zh-gallery img {
	width: 100%;
	transition: opacity 0.2s ease;
}

.zh-gallery a:hover img {
	opacity: 0.85;
}

/* ---------- Footer ---------- */
.zh-footer {
	border-top: 1px solid var(--zh-line);
	background: #131313 url('assets/bg-dark.jpg') repeat top center;
	padding: 14px 0;
	margin-top: 24px;
}

.zh-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.zh-footer nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0;
	padding: 0;
	text-transform: lowercase;
	font-size: 13px;
	letter-spacing: 0.05em;
	color: var(--zh-muted);
}

.zh-social {
	display: flex;
	gap: 12px;
}

.zh-social a {
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--zh-muted);
	transition: color 0.15s ease;
}

.zh-social a:hover {
	color: var(--zh-accent);
}

.zh-social svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.zh-copy {
	color: var(--zh-muted);
	font-size: 13px;
}

/* ---------- Лайтбокс (клик по картинке в галерее/колонке фото) ---------- */
.zh-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
}

.zh-lightbox.is-open {
	display: flex;
}

body.zh-lightbox-open {
	overflow: hidden;
}

.zh-lightbox__img {
	max-width: 90vw;
	max-height: 88vh;
	border-radius: 2px;
}

.zh-lightbox__close,
.zh-lightbox__arrow {
	position: absolute;
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	line-height: 1;
}

.zh-lightbox__close {
	top: 18px;
	right: 24px;
	font-size: 34px;
}

.zh-lightbox__arrow {
	top: 50%;
	transform: translateY(-50%);
	font-size: 48px;
	padding: 0 14px;
}

.zh-lightbox__arrow--prev {
	left: 8px;
}

.zh-lightbox__arrow--next {
	right: 8px;
}

.zh-lightbox__counter {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: var(--zh-muted);
	font-size: 13px;
}
