/*
Theme Name: 2kviza Theme
Theme URI: https://example.com/
Author: 2kviza
Description: Тема для сайта с двумя квизами. Работает в паре с плагином Quiz Manager.
Version: 1.1.1
Text Domain: twokviza
*/

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #1b1b1d;
	background: #f5f6f8;
	line-height: 1.5;
}
a { color: #d34085; text-decoration: none; }
a:hover { text-decoration: underline; }

.site-main { padding: 20px 16px 40px; min-height: 100vh; }
.content-wrap { max-width: 1100px; margin: 0 auto; }

.page-title { font-size: 28px; font-weight: 700; margin: 0 0 18px; }
.page-content { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 4px 20px rgba(0,0,0,.04); }

.page-template-quiz .page-content {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

body.qm-bare {
	margin: 0;
	min-height: 100vh;
	background: #fff;
}
body.qm-bare::before, body.qm-bare::after { content: none; }

/* Quiz media safety overrides: keep car images fully visible. */
body.page-template-quiz :is(img, picture img, video) {
	max-width: 100%;
	height: auto;
	object-fit: contain !important;
	object-position: center;
}

body.page-template-quiz [class*="image"],
body.page-template-quiz [class*="img"],
body.page-template-quiz [class*="media"],
body.page-template-quiz [class*="preview"],
body.page-template-quiz [class*="photo"],
body.page-template-quiz [class*="banner"] {
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-size: contain !important;
}

/* Catch plugin blocks that set background-image inline. */
body.page-template-quiz [style*="background-image"] {
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-size: contain !important;
}

/* Increase height only for image blocks inside quiz step content. */
body.page-template-quiz [class*="step"] [style*="background-image"],
body.page-template-quiz [class*="question"] [style*="background-image"] {
	min-height: clamp(260px, 30vw, 420px);
	aspect-ratio: 16 / 9;
}
.qm-question-layout--with-image .qm-step{
	display: grid;
    align-content: center;
}
.qm-question-layout--with-image{
	height: 600px;
}
@media (max-width: 600px) {
	.page-title { font-size: 22px; }
	body.page-template-quiz [class*="step"] [style*="background-image"],
	body.page-template-quiz [class*="question"] [style*="background-image"] {
		min-height: 210px;
	}
}
