/*
 * Тема "Первый слой": адаптив и глобальные стили.
 * Основная верстка на inline-стилях из шаблона, здесь только
 * переопределения для планшета/мобильных и мелкие дополнения.
 */

/* Меню в шапке */
.ps-nav-list {
	display: contents;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ps-nav li {
	list-style: none;
}
.ps-nav a {
	color: var(--ink);
	font-weight: 600;
	font-size: 14.5px;
}

/* Типографика контента записей и страниц */
.ps-content {
	font-size: 16.5px;
	line-height: 1.65;
	font-weight: 500;
}
.ps-content p {
	margin: 0 0 18px;
}
.ps-content h2,
.ps-content h3,
.ps-content h4 {
	margin: 32px 0 14px;
	text-transform: none;
}
.ps-content ul,
.ps-content ol {
	margin: 0 0 18px;
	padding-left: 24px;
}
.ps-content a {
	color: var(--accent-2);
	text-decoration: underline;
}
.ps-content img {
	max-width: 100%;
	height: auto;
}
.ps-content blockquote {
	margin: 0 0 18px;
	padding: 14px 20px;
	border-left: 3px solid var(--accent);
	background: var(--soft);
}

/* Пагинация блога */
.ps-pagination .nav-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.ps-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 9px;
	color: var(--ink);
	font-weight: 700;
	font-size: 14px;
}
.ps-pagination .page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-ink);
}

/* Ошибка отправки формы */
.ps-form-error {
	color: #C0392B;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

/* Планшет */
@media (max-width: 1024px) {
	.ps-h1 { font-size: 42px !important; }
	.ps-h2 { font-size: 34px !important; }

	.ps-hero-grid {
		grid-template-columns: 1fr !important;
		gap: 36px !important;
		padding-top: 48px !important;
		padding-bottom: 56px !important;
	}

	.ps-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
	.ps-grid-6 { grid-template-columns: repeat(3, 1fr) !important; }

	.ps-about-grid,
	.ps-cta-grid,
	.ps-callback-grid {
		grid-template-columns: 1fr !important;
	}
	.ps-cta-grid,
	.ps-callback-grid {
		padding: 36px 30px !important;
		gap: 28px !important;
	}

	.ps-footer-grid { grid-template-columns: repeat(2, 1fr) !important; }

	.ps-services,
	.ps-advantages,
	.ps-works,
	.ps-steps,
	.ps-reviews,
	.ps-partners,
	.ps-faq { padding-top: 56px !important; }
	.ps-prices > div,
	.ps-blog > div { padding-top: 60px !important; padding-bottom: 60px !important; }
}

/* Мобильный */
@media (max-width: 640px) {
	.ps-h1 { font-size: 34px !important; }
	.ps-h2 { font-size: 28px !important; }

	/* Шапка: меню под бургер */
	.ps-burger { display: block !important; }
	.ps-nav { display: none !important; }
	.ps-header.ps-nav-open .ps-nav {
		display: flex !important;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		padding: 18px 24px 22px;
		background: var(--bg);
		border-bottom: 1px solid var(--line);
		box-shadow: 0 16px 30px rgba(0, 0, 0, .12);
	}
	.ps-header-phone { display: none !important; }

	.ps-grid-2,
	.ps-grid-3 { grid-template-columns: 1fr !important; }
	.ps-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
	.ps-grid-6 { grid-template-columns: repeat(2, 1fr) !important; }
	.ps-footer-grid { grid-template-columns: 1fr !important; }

	/* Уменьшенные отступы секций */
	.ps-services,
	.ps-advantages,
	.ps-works,
	.ps-steps,
	.ps-reviews,
	.ps-partners,
	.ps-faq { padding-top: 48px !important; }
	.ps-hero-grid { padding-top: 40px !important; padding-bottom: 48px !important; }
	.ps-about-grid { padding-top: 52px !important; padding-bottom: 52px !important; }
	.ps-prices > div,
	.ps-blog > div { padding-top: 48px !important; padding-bottom: 48px !important; }
	.ps-cta { margin-top: 48px !important; margin-bottom: 48px !important; }
	.ps-cta-grid,
	.ps-callback-grid { padding: 30px 22px !important; border-radius: 18px !important; }
	.ps-callback { margin-top: 48px !important; }
	.ps-footer { margin-top: 48px !important; }
	.ps-footer-grid { padding-top: 44px !important; }
}
