/*
Theme Name: ФотоПолоска
Theme URI: https://fotopoloska.ru/
Author: ФотоПолоска
Description: Светлая минималистичная блочная тема «ФотоПолоска» для аренды фотобудок, нейрофотобудки, мобильной фотостудии и моментальной печати. Секции-паттерны, форма заявки, кнопки MAX и ВКонтакте, блог и страницы услуг.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fotopoloska
Tags: block-patterns, full-site-editing, one-column, wide-blocks, custom-colors
*/

/* ---------- База ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--ink); }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 6px;
}
img { height: auto; }

/* ---------- Шапка ---------- */
.ep-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--paper) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .ep-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ep-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .ep-header { top: 0; } }
.ep-header .wp-block-site-logo img { max-height: 40px; width: auto; }
.ep-brand-dot { color: var(--wp--preset--color--accent); }
.ep-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--paper);
	padding: 1.5rem;
}
.ep-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.1rem; font-size: 1.25rem; }
.ep-header .wp-block-navigation .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: var(--wp--custom--radius--s);
	box-shadow: var(--wp--preset--shadow--soft);
	padding: .4rem;
	min-width: 230px;
}
.ep-header .wp-block-navigation .wp-block-navigation__submenu-container a { padding: .5rem .75rem; border-radius: 8px; }
.ep-header .wp-block-navigation .wp-block-navigation__submenu-container a:hover { background: var(--wp--preset--color--sand); }
@media (max-width: 900px) { .ep-header .ep-header-phone { display: none; } }

/* ---------- Типографика ---------- */
.is-style-ep-eyebrow {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #276B4E;
	display: inline-flex; align-items: center; gap: .6rem;
}
.is-style-ep-eyebrow::before {
	content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; flex: none;
}
.has-text-align-center.is-style-ep-eyebrow { justify-content: center; display: flex; }
.ep-lead { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); line-height: 1.55; }
.ep-muted { color: var(--wp--preset--color--muted); }
.ep-accent { color: var(--wp--preset--color--accent); }
h1 em, h2 em, h3 em { font-style: normal; color: var(--wp--preset--color--accent); }

/* ---------- Секции ---------- */
.ep-section { scroll-margin-top: 90px; }
.ep-section-head { max-width: 720px; }

/* ---------- Карточки ---------- */
.is-style-ep-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--m);
	padding: clamp(1.25rem, 2.5vw, 2rem);
	height: 100%;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a.is-style-ep-card, .is-style-ep-card:has(a.ep-card-link) { cursor: pointer; }
.is-style-ep-card:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--soft); border-color: transparent; }
.is-style-ep-card-accent {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	border-radius: var(--wp--custom--radius--m);
	padding: clamp(1.25rem, 2.5vw, 2rem);
	height: 100%;
	position: relative;
}
.is-style-ep-card-accent :where(h2,h3,h4,p,li,a:not(.wp-element-button)) { color: inherit; }
.is-style-ep-card-accent .ep-muted { color: #AEB8B4; }
.wp-block-columns > .wp-block-column > .is-style-ep-card,
.wp-block-columns > .wp-block-column > .is-style-ep-card-accent { height: 100%; }

.ep-card-media img { border-radius: var(--wp--custom--radius--s); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.ep-tag {
	display: inline-block; font-size: var(--wp--preset--font-size--x-small); font-weight: 700;
	padding: .3rem .7rem; border-radius: 999px; background: var(--wp--preset--color--accent-soft); color: #276B4E;
	letter-spacing: .02em;
}
.is-style-ep-card-accent .ep-tag { background: var(--wp--preset--color--accent); color: #fff; }

/* Ссылка «Подробнее →» */
.ep-more a { font-weight: 700; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.ep-more a::after { content: "→"; transition: transform .2s ease; }
.ep-more a:hover::after { transform: translateX(4px); }

/* ---------- Списки ---------- */
.is-style-ep-check { list-style: none; padding-left: 0 !important; }
.is-style-ep-check li { position: relative; padding-left: 1.9rem; margin-bottom: .55rem; }
.is-style-ep-check li::before {
	content: ""; position: absolute; left: 0; top: .32em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
	background: var(--wp--preset--color--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%232F7D5B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat;
}
.is-style-ep-card-accent .is-style-ep-check li::before { background-color: rgba(255,255,255,.12); }

/* Стена клиентов: текстовые «логотипы» */
.is-style-ep-logos {
	list-style: none; padding: 0 !important; margin: 0;
	display: grid; grid-template-columns: repeat(5, 1fr);
	border-top: 1px solid var(--wp--preset--color--line);
	border-left: 1px solid var(--wp--preset--color--line);
}
.is-style-ep-logos li {
	display: flex; align-items: center; justify-content: center; text-align: center;
	min-height: 92px; padding: 1rem;
	border-right: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500; font-size: .95rem; letter-spacing: -.01em;
	color: #3A4440;
	transition: color .2s ease, background .2s ease;
}
.is-style-ep-logos li:hover { color: var(--wp--preset--color--ink); background: var(--wp--preset--color--white); }
.is-style-ep-logos li img { max-height: 40px; width: auto; filter: grayscale(1); opacity: .75; }
.is-style-ep-logos li:hover img { filter: none; opacity: 1; }

/* Чипы (стили нейрофото и т.п.) */
.is-style-ep-chips { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .5rem; }
.is-style-ep-chips li {
	padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--white); font-size: var(--wp--preset--font-size--small); font-weight: 600;
}

/* ---------- ФотоПолоска (фирменный приём) ---------- */
.is-style-ep-strip {
	background: var(--wp--preset--color--white);
	padding: 12px 12px 0 !important;
	border-radius: 6px;
	box-shadow: var(--wp--preset--shadow--print);
	gap: 10px !important;
	max-width: 260px;
	margin-left: auto !important; margin-right: auto !important;
	transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.is-style-ep-strip > .wp-block-image { margin: 0 !important; }
.is-style-ep-strip > .wp-block-image img { border-radius: 2px !important; aspect-ratio: 4/3; object-fit: cover; width: 100%; display: block; }
.is-style-ep-strip > p:last-child {
	margin: 0 !important; padding: .8rem 0 1rem; text-align: center;
	font-family: var(--wp--preset--font-family--display); font-size: .8rem; letter-spacing: .02em; color: var(--wp--preset--color--muted);
}
.ep-strips > .wp-block-column:nth-child(3n+1) .is-style-ep-strip { transform: rotate(-2.5deg); }
.ep-strips > .wp-block-column:nth-child(3n+2) .is-style-ep-strip { transform: rotate(1.5deg) translateY(18px); }
.ep-strips > .wp-block-column:nth-child(3n+3) .is-style-ep-strip { transform: rotate(-1deg); }
.ep-strips .is-style-ep-strip:hover { transform: rotate(0) translateY(-6px) scale(1.02); }
@media (prefers-reduced-motion: reduce) {
	.is-style-ep-strip, .is-style-ep-card { transition: none; }
}

/* Отпечаток: фото в белой рамке */
.is-style-ep-print img {
	background: #fff; padding: 10px 10px 34px; border-radius: 4px !important;
	box-shadow: var(--wp--preset--shadow--print);
}

/* Hero: коллаж */
.ep-hero-collage { position: relative; min-height: 420px; }
.ep-hero-collage .is-style-ep-strip { position: relative; z-index: 2; transform: rotate(-4deg); }
.ep-hero-collage .ep-hero-photo { position: absolute; right: 0; top: 8%; width: 62%; z-index: 1; transform: rotate(3deg); margin: 0 !important; }
.ep-hero-collage .ep-hero-photo img { border-radius: 4px !important; aspect-ratio: 4/5; object-fit: cover; }
.ep-hero-collage .ep-hero-strip-wrap { width: 46%; margin: 0 !important; }
@media (max-width: 781px) {
	.ep-hero-collage { min-height: 0; }
	.ep-hero-collage .ep-hero-photo { position: relative; width: 100%; transform: none; top: 0; }
	.ep-hero-collage .ep-hero-strip-wrap { display: none; }
}

/* Цифры / факты */
.ep-facts { border-top: 1px solid var(--wp--preset--color--line); }
.ep-fact-num { font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--x-large); font-weight: 500; line-height: 1.1; margin-bottom: .25rem !important; }

/* Шаги */
.ep-step-num {
	font-family: var(--wp--preset--font-family--display); font-weight: 500;
	width: 2.75rem; height: 2.75rem; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--wp--preset--color--accent-soft); color: #276B4E; font-size: 1rem;
}

/* FAQ */
.wp-block-details summary {
	cursor: pointer; list-style: none; position: relative; padding-right: 2.5rem;
	font-weight: 700; font-size: var(--wp--preset--font-size--large);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
	width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--wp--preset--color--line);
	display: grid; place-items: center; font-weight: 400; font-size: 1.25rem; line-height: 1;
	transition: transform .2s ease, background .2s ease;
}
.wp-block-details[open] summary::after { content: "–"; background: var(--wp--preset--color--ink); color: #fff; border-color: transparent; }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); margin-top: .75rem; }

/* Блог */
.ep-post-card .wp-block-post-featured-image img { aspect-ratio: 3/2; object-fit: cover; }
.ep-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.wp-block-post-terms a { text-decoration: none; }
.wp-block-query-pagination a { text-decoration: none; }

/* ---------- Форма заявки ---------- */
.ep-form { display: grid; gap: 1rem; }
.ep-form__row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .ep-form__row { grid-template-columns: 1fr; } }
.ep-form label { display: grid; gap: .4rem; font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.ep-form input[type="text"], .ep-form input[type="tel"], .ep-form input[type="date"], .ep-form input[type="number"], .ep-form select, .ep-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; font-weight: 500; color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white); border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 12px; padding: .85rem 1rem; transition: border-color .2s ease, box-shadow .2s ease;
	min-height: 52px;
}
.ep-form textarea { min-height: 110px; resize: vertical; }
.ep-form input:focus, .ep-form select:focus, .ep-form textarea:focus {
	outline: none; border-color: var(--wp--preset--color--ink); box-shadow: 0 0 0 4px rgba(32,38,43,.06);
}
.ep-form .ep-form__consent { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); line-height: 1.5; }
.ep-form .ep-form__consent input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--wp--preset--color--accent); flex: none; }
.ep-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ep-form button[type="submit"] {
	border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: var(--wp--preset--font-size--medium);
	background: var(--wp--preset--color--accent); color: #fff; border-radius: 999px; padding: 1.05rem 2rem;
	transition: background .2s ease, transform .2s ease; justify-self: start;
}
.ep-form button[type="submit"]:hover { background: var(--wp--preset--color--ink); }
.ep-form button[disabled] { opacity: .6; cursor: progress; }
.ep-form__status { font-weight: 600; margin: 0; }
.ep-form__status.is-ok { color: #1B7A44; }
.ep-form__status.is-error { color: #276B4E; }
.ep-form-wrap.is-sent .ep-form { display: none; }
.ep-form__success { display: none; }
.ep-form-wrap.is-sent .ep-form__success { display: block; }
.ep-form__success h3 { margin-top: 0; }

/* ---------- Контакты / мессенджеры ---------- */
.ep-contacts { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ep-contacts a.ep-btn {
	display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	padding: .7rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink);
	transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.ep-contacts a.ep-btn:hover { border-color: var(--wp--preset--color--ink); }
.ep-contacts a.ep-btn svg { width: 18px; height: 18px; flex: none; }
.ep-contacts a.ep-btn--wa svg { color: #1FAF5A; }
.ep-contacts a.ep-btn--tg svg { color: #229ED9; }
.ep-contacts a.ep-btn--vk svg { color: #0077FF; }
.ep-contacts a.ep-btn--max svg { color: #7A5CFF; }
.ep-phone { font-weight: 800; text-decoration: none !important; white-space: nowrap; font-size: var(--wp--preset--font-size--small); }
.ep-phone:hover { color: var(--wp--preset--color--accent) !important; }
.is-style-ep-card-accent .ep-contacts a.ep-btn, .ep-dark .ep-contacts a.ep-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.is-style-ep-card-accent .ep-contacts a.ep-btn:hover, .ep-dark .ep-contacts a.ep-btn:hover { border-color: #fff; }

/* Мобильная панель связи */
.ep-mobilebar { display: none; }
@media (max-width: 781px) {
	.ep-mobilebar {
		display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .5rem;
		position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 60;
		padding: .5rem; border-radius: 999px;
		background: rgba(32,38,43,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
		box-shadow: 0 10px 30px rgba(0,0,0,.25);
		padding-bottom: max(.5rem, env(safe-area-inset-bottom));
	}
	.ep-mobilebar a {
		display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px;
		border-radius: 999px; color: #fff; text-decoration: none; font-weight: 700; font-size: .875rem;
	}
	.ep-mobilebar a svg { width: 18px; height: 18px; }
	.ep-mobilebar a.is-primary { background: var(--wp--preset--color--accent); }
	body { padding-bottom: 84px; }
}

/* Подвал */
.ep-footer a { text-decoration: none; }
.ep-footer a:hover { color: var(--wp--preset--color--accent); }
.ep-footer .wp-block-list { list-style: none; padding-left: 0; }
.ep-footer .wp-block-list li { margin-bottom: .45rem; }
.ep-legal { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }

/* Мелочи */
.ep-stack-sm > * + * { margin-top: .5rem !important; }
.wp-block-columns.ep-gap-cards { gap: 1.25rem; }
@media (max-width: 781px) {
	.ep-strips > .wp-block-column .is-style-ep-strip { transform: none !important; }
	.ep-strips.wp-block-columns { flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; padding: 1rem .25rem 2rem; }
	.ep-strips.wp-block-columns > .wp-block-column { flex: 0 0 72% !important; scroll-snap-align: center; }
}

/* ---------- Доработки после проверки ---------- */
.is-style-ep-card :where(h2,h3,h4) a, .is-style-ep-card-accent :where(h2,h3,h4) a { text-decoration: none; }
.is-style-ep-card :where(h2,h3,h4) a:hover { color: var(--wp--preset--color--accent); }
.is-style-ep-card h3, .is-style-ep-card-accent h3 { hyphens: auto; overflow-wrap: break-word; }
.wp-block-columns.ep-gap-cards .is-style-ep-card h3.has-large-font-size { font-size: clamp(1rem, 1.35vw, 1.25rem) !important; }
.is-style-ep-card-accent .is-style-ep-check li::before {
	background: var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat;
}
.is-style-ep-strip > p:last-child { font-size: .72rem; line-height: 1.3; }
@media (max-width: 1024px) { .is-style-ep-logos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
	.is-style-ep-logos { grid-template-columns: repeat(2, 1fr); }
	.is-style-ep-logos li { min-height: 64px; font-size: .82rem; padding: .6rem; }
}
@media (max-width: 781px) {
	.ep-hero-collage .ep-hero-photo img { aspect-ratio: 4/3; }
	.ep-facts.wp-block-columns { flex-wrap: wrap !important; row-gap: 1.5rem; }
	.ep-facts.wp-block-columns > .wp-block-column { flex-basis: calc(50% - 1rem) !important; flex-grow: 0 !important; }
	.ep-section .wp-block-columns.ep-gap-cards { gap: 1rem; }
}
.ep-facts p, .is-style-ep-card p { hyphens: auto; }
main > .wp-block-query.alignwide { margin-top: var(--wp--preset--spacing--50); }

/* ---------- Бренд ФотоПолоска ---------- */
.is-style-ep-eyebrow::before { background: var(--wp--preset--color--mint); height: 3px; }
.ep-header .wp-block-site-logo img, .ep-footer .wp-block-site-logo img { width: auto; max-height: 44px; }
.ep-footer .wp-block-site-logo img { max-height: 40px; }
/* Если загружен логотип — текстовое название скрываем визуально (остаётся для поисковиков и экранных дикторов). */
.ep-brand:has(.wp-block-site-logo img) .wp-block-site-title {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 600px) { .ep-header .wp-block-site-logo img { max-height: 34px; } }
.ep-hero-collage .ep-hero-photo img { object-position: center 30%; }
.ep-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) {
	.ep-header .ep-header-cta { display: none; }
	.ep-header .wp-block-site-logo img { max-height: 30px; }
}

/* ---------- v3: галерея, герой, логотипы клиентов ---------- */
.ep-gallery-img { margin: 0 !important; }
.ep-gallery-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--wp--custom--radius--m) !important; display: block; }
.ep-gallery .wp-block-column { overflow: hidden; border-radius: var(--wp--custom--radius--m); }
.ep-gallery .ep-gallery-img img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.ep-gallery .ep-gallery-img:hover img { transform: scale(1.03); }
.ep-service-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--wp--custom--radius--l) !important; box-shadow: var(--wp--preset--shadow--print); }
.ep-hero-collage .ep-hero-photo { position: relative; right: auto; top: auto; width: 78%; margin: 0 0 0 auto !important; transform: none; }
.ep-hero-collage .ep-hero-photo img { aspect-ratio: 4/5; border-radius: var(--wp--custom--radius--l) !important; box-shadow: var(--wp--preset--shadow--print); }
.ep-hero-collage .ep-hero-print { position: absolute; left: 0; bottom: -6%; width: 40%; margin: 0 !important; transform: rotate(-5deg); z-index: 2; }
.ep-hero-collage .ep-hero-print img { aspect-ratio: 3/4; object-fit: cover; }
.is-style-ep-logos li img.ep-logo { max-height: 44px; max-width: 120px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.is-style-ep-logos li:hover img.ep-logo { filter: none; opacity: 1; }
@media (max-width: 781px) {
	.ep-hero-collage .ep-hero-photo { width: 100%; }
	.ep-hero-collage .ep-hero-photo img { aspect-ratio: 4/3; }
	.ep-hero-collage .ep-hero-print { display: none; }
	.ep-gallery.wp-block-columns { flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
	.ep-gallery.wp-block-columns > .wp-block-column { flex: 0 0 70% !important; scroll-snap-align: start; }
	.ep-service-photo img { aspect-ratio: 4/3; }
}
