/*
Theme Name: СТК Пилот
Description: Тема сайта stk-pilot.ru, восстановленного из Битрикс24-лендинга.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: stk-pilot
*/

:root {
	--stk-primary: #3949a0;
	--stk-primary-dark: #2c3a85;
	--stk-black: #111;
	--stk-gray: #f4f5f8;
	--stk-text: #212121;
	--stk-container: 1140px;
	--stk-wide: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: "Open Sans", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--stk-text);
	background: #fff;
}

img { max-width: 100%; height: auto; }
a { color: var(--stk-primary); }
a:hover { color: var(--stk-primary-dark); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

.container {
	max-width: var(--stk-container);
	margin: 0 auto;
	padding: 0 15px;
}

/* ---------- шапка ---------- */

.site-topbar {
	background: #fff;
	border-bottom: 1px solid #eee;
	padding: 14px 0;
}

.site-topbar .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.site-logo img, .site-logo .custom-logo { max-height: 72px; width: auto; display: block; }
.site-logo .site-name { font-size: 26px; font-weight: 700; font-style: italic; color: var(--stk-black); text-decoration: none; }

.site-contacts {
	display: flex;
	gap: 34px;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-contacts li { display: flex; align-items: center; gap: 10px; }
.site-contacts svg { width: 20px; height: 20px; fill: var(--stk-primary); flex-shrink: 0; }
.site-contacts .label { display: block; font-size: 12px; text-transform: uppercase; color: #777; line-height: 1.2; }
.site-contacts .value { display: block; font-weight: 700; color: var(--stk-black); text-decoration: none; line-height: 1.3; }
.site-contacts a.value:hover { text-decoration: underline; }

.site-nav {
	background: var(--stk-black);
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar .site-nav { top: 32px; }

.site-nav .container { display: flex; align-items: center; min-height: 54px; }

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

.site-nav a {
	display: block;
	padding: 15px 0;
	color: #fff;
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .02em;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: #8c9bf0; }

.nav-toggle {
	display: none;
	margin-left: auto;
	background: none;
	border: 0;
	color: #fff;
	padding: 12px 0;
	cursor: pointer;
}

.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: block;
	width: 28px;
	height: 3px;
	background: #fff;
	position: relative;
	transition: .2s;
}

.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }

@media (max-width: 991px) {
	.site-contacts { gap: 16px; }
	.nav-toggle { display: block; }
	.site-nav .menu-wrap { display: none; width: 100%; }
	.site-nav.is-open .menu-wrap { display: block; }
	.site-nav .container { flex-wrap: wrap; }
	.site-nav ul { flex-direction: column; gap: 0; padding-bottom: 10px; }
	.site-nav a { padding: 9px 0; }
}

@media (max-width: 600px) {
	.site-topbar .container { justify-content: center; }
	.site-contacts { justify-content: center; }
	.site-contacts li.contact-address { display: none; }
	.admin-bar .site-nav { top: 0; }
}

/* ---------- контент ---------- */

.site-main { min-height: 50vh; }

.entry-content > * {
	max-width: var(--stk-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: 15px;
	padding-right: 15px;
}

.entry-content > .alignwide { max-width: var(--stk-wide); }
.entry-content > .alignfull { max-width: none; padding-left: 0; padding-right: 0; }
.entry-content > * + * { margin-top: 30px; }
.entry-content > *:first-child:not(.alignfull) { margin-top: 40px; }
.entry-content > *:last-child { margin-bottom: 60px; }

.entry-content h1, .entry-content h2 {
	font-style: italic;
	font-weight: 700;
	line-height: 1.15;
	margin-bottom: 0;
}

.entry-content h1 { font-size: clamp(32px, 5vw, 60px); }
.entry-content h2 { font-size: clamp(26px, 3.6vw, 42px); }
.entry-content h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; }

.entry-content .wp-block-separator {
	border: 0;
	border-top: 2px solid #e3e3e3;
	max-width: 200px;
	margin-top: 50px;
	margin-bottom: 50px;
}

.wp-block-cover .wp-block-cover__inner-container { max-width: 900px; margin: 0 auto; padding: 40px 20px; color: #fff; }
.wp-block-cover h1, .wp-block-cover h2, .wp-block-cover h3 { color: #fff; text-transform: uppercase; }
.wp-block-cover p { font-size: clamp(18px, 2vw, 24px); }

.wp-block-columns .wp-block-column {
	background: var(--stk-gray);
	padding: 0 0 24px;
	display: flex;
	flex-direction: column;
}

.wp-block-columns .wp-block-column > .wp-block-image { margin: 0 0 16px; }
.wp-block-columns .wp-block-column > .wp-block-image img { width: 100%; aspect-ratio: 540 / 318; object-fit: cover; }
.wp-block-columns .wp-block-column > p { font-size: 22px; padding: 0 16px; margin: 0 0 16px; }
.wp-block-columns .wp-block-column > .wp-block-buttons { margin-top: auto; }
.wp-block-columns .wp-block-column > h3 { padding: 16px 16px 0; margin: 0 0 8px; }

.wp-block-button__link, .stk-form button {
	background: var(--stk-primary);
	color: #fff;
	border-radius: 0;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 14px;
	padding: 14px 32px;
	text-decoration: none;
	border: 0;
	cursor: pointer;
}

.wp-block-button__link:hover, .stk-form button:hover { background: var(--stk-primary-dark); color: #fff; }

.wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- форма ---------- */

.stk-form { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; }
.stk-form h3 { text-align: center; margin: 0 0 6px; font-style: italic; }
.stk-form input[type=text], .stk-form input[type=tel], .stk-form textarea {
	width: 100%;
	padding: 13px 15px;
	border: 1px solid #ddd;
	background: #f7f7f7;
	font: inherit;
}
.stk-form textarea { min-height: 110px; resize: vertical; }
.stk-form .consent { font-size: 13px; color: #666; display: flex; gap: 8px; align-items: flex-start; }
.stk-form .hp { position: absolute; left: -9999px; }
.stk-form-notice { max-width: 560px; margin: 0 auto 14px; padding: 12px 16px; background: #e8f5e9; color: #1b5e20; text-align: center; }
.stk-form-notice.error { background: #fdecea; color: #b71c1c; }

/* ---------- записи ---------- */

.posts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; padding: 40px 0 60px; }
.post-card { background: var(--stk-gray); }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.post-card .post-card-body { padding: 20px; }
.post-card h2 { font-size: 22px; margin: 0 0 8px; font-style: italic; }
.post-card h2 a { color: var(--stk-black); text-decoration: none; }
.post-card time { font-size: 13px; color: #777; }
.page-header { padding-top: 40px; }
.page-header h1 { font-style: italic; font-size: clamp(30px, 4vw, 46px); margin: 0; }
.entry-header { max-width: var(--stk-container); margin: 40px auto 0; padding: 0 15px; }
.entry-header h1 { font-style: italic; font-size: clamp(28px, 4vw, 44px); margin: 0 0 6px; }
.pagination { padding-bottom: 60px; }

/* ---------- подвал ---------- */

.site-footer { background: var(--stk-black); color: #bbb; padding: 40px 0 24px; font-size: 14px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.footer-grid h4 { color: #fff; text-transform: uppercase; font-size: 13px; margin: 0 0 10px; letter-spacing: .05em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #333; margin-top: 28px; padding-top: 18px; text-align: center; }
