/**
 * Дополнительные стили темы WordPress
 * Карточка блога, пагинация, страница одной статьи (single), страница блога (home)
 */

/* ========== Страница блога (список записей, URL /blog/) ========== */
/* Скрываем плавающую шапку: на странице записей body получает класс .blog (не .home) */
body.blog .header {
	display: none !important;
}

/* Секция 11 на странице блога: динамическая высота по контенту, без ограничений .screen */
body.blog .screen.screen-11 {
	height: auto !important;
	min-height: 0;
	overflow: visible !important;
	opacity: 1 !important;
	transform: none !important;
	display: block !important;
	flex: none;
	width: 1342px;
	max-width: 100%;
	margin: 70px auto 10px auto;
	padding: 40px 0 40px;
	box-sizing: border-box;
}

body.blog .section-11-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -50px;;
    width: 100%;
    margin: 0;
    font-family: "SNFBSTRD handwrite SNFBSTRD handwrite", sans-serif;
    font-weight: 400;
    font-size: 55px;
    line-height: 1.05;
    color: #313131;
    text-align: center;
}

/* ========== Страница одной статьи, обычная страница, 404 ========== */
/* Скрываем шапку на записи блога, обычных страницах (page.php), 404; не на главной (home) */
body.single .header,
body.page:not(.home) .header,
body.error404 .header {
	display: none !important;
}

body.home.blog .header{
	display:flex !important;
}

@media screen and (max-width:809px){
	body.home.blog .header{
		display:none !important;
	}
}

/* Сбрасываем ограничения .screen, иначе контент не виден */
.screen-single.single-post {
	position: relative;
	width: 1342px;
	max-width: 100%;
	margin: 0 auto;
	padding: 40px 0 60px;
	box-sizing: border-box;
	height: auto !important;
	min-height: 0;
	overflow: visible !important;
	opacity: 1 !important;
	transform: none !important;
	display: block !important;
	flex: none;
}

.single-post-inner {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 0px 25px;
}

/* Подзаголовок над заголовком — мелкий серый текст */
.single-post-caption {
	margin: 0 0 8px;
	font-family: 'TT Hoves Regular', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #8C8888;
	text-align: center;
}

/* Основной заголовок — тот же стиль, что и «Блог» (section-11-title) */
.single-post-title {
	margin: 0 0 16px;
	font-family: "SNFBSTRD handwrite SNFBSTRD handwrite", sans-serif;
	font-weight: 400;
	font-size: 55px;
	line-height: 1.05;
	color: #313131;
	text-align: center;
}

/* Дата под заголовком */
.single-post-date {
	display: block;
	margin: 0 0 32px;
	font-family: 'TT Hoves Regular', sans-serif;
	font-size: 25px;
	line-height: 1.2;
	color: #8C8888;
	text-align: center;
}

/* Картинка записи */
.single-post-image-wrap {
	width: 100%;
	margin: 0 0 40px;
	border-radius: 25px;
	overflow: hidden;
}

.single-post-image {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* Текст статьи */
.single-post-content.entry-content {
	font-family: 'TT Hoves Regular', sans-serif;
	font-size: 18px;
	line-height: 1.6;
	color: #313131;
}

.single-post-content.entry-content h2 {
	margin: 1.5em 0 0.5em;
	font-family: 'TT Hoves Medium', sans-serif;
	font-weight: 600;
	font-size: 35px;
	line-height: 1.3;
	color: #313131;
}

.single-post-content.entry-content p {
	margin: 0 0 1em;
	font-size: 25px;
	line-height: 1.3;
}

.single-post-content.entry-content h2:first-child {
	margin-top: 0;
}

.single-post-content.entry-content ul,
.single-post-content.entry-content ol {
	margin: 0 0 1em;
	padding-left: 1.5em;
}

.single-post-content.entry-content li {
	margin: 0.25em 0;
	font-size: 25px;
}

.single-post-content.entry-content a {
	color: #313131;
	text-decoration: none;
}

.single-post-content.entry-content a:hover {
	text-decoration: underline;
}

/* ========== Страница 404 (оформление) ========== */
.error-404-page .error-404-inner {
	text-align: center;
	padding: 40px 25px 60px;
}

.error-404-code {
	font-family: "SNFBSTRD handwrite SNFBSTRD handwrite", sans-serif;
	font-weight: 400;
	font-size: clamp(80px, 18vw, 160px);
	line-height: 1;
	color: rgba(49, 49, 49, 0.08);
	margin: 0 0 8px;
	letter-spacing: -0.02em;
	user-select: none;
}

.error-404-caption {
	font-family: 'TT Hoves Regular', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #8C8888;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin: 0 0 12px;
}

.error-404-page .error-404-title {
	margin: 0 0 24px;
}

.error-404-content {
	margin: 0 auto 40px;
	max-width: 520px;
}

.error-404-content p {
	margin: 0;
	font-size: 20px;
	line-height: 1.5;
	color: #8C8888;
}

.error-404-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	align-items: center;
}

.error-404-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: 'TT Hoves Medium', sans-serif;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	border-radius: 999px;
	padding: 14px 28px;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.error-404-btn--primary {
	background: #f57c00;
	color: #fff;
	box-shadow: 0 2px 12px rgba(245, 124, 0, 0.35);
}

.error-404-btn--primary:hover {
	background: #e65100;
	box-shadow: 0 4px 16px rgba(245, 124, 0, 0.5);
	color: #fff;
}

.error-404-btn--secondary {
	background: transparent;
	color: #313131;
	border: 2px solid #e0e0e0;
}

.error-404-btn--secondary:hover {
	border-color: #313131;
	background: rgba(49, 49, 49, 0.04);
	color: #313131;
}

@media (max-width: 480px) {
	.error-404-actions {
		flex-direction: column;
	}
	.error-404-btn {
		width: 100%;
		max-width: 280px;
	}
}

/* Блок «Наши другие статьи» */
.single-post-others {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid #eee;
}

.single-post-others-title {
	position: relative;
	margin: 0 0 8px;
	font-family: "SNFBSTRD handwrite SNFBSTRD handwrite", sans-serif;
	font-weight: 400;
	font-size: 55px;
	line-height: 1.05;
	color: #313131;
	text-align: center;
}

.single-post-others-caption {
	margin: 0 0 32px;
	font-family: 'TT Hoves Regular', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #8C8888;
	text-align: center;
}

.single-post-others-grid {
	margin-top: 0;
}

/* Плавающая кнопка «Вернуться на главную»: по умолчанию круг с иконкой, при наведении растягивается влево и показывается текст */
@keyframes single-post-back-pulse {
	0%, 100% {
		box-shadow: 0 2px 12px rgba(245, 124, 0, 0.35);
	}
	50% {
		box-shadow: 0 2px 24px rgba(245, 124, 0, 0.65);
	}
}

.single-post-back {
	position: fixed;
	bottom: 290px;
	right: 24px;
	z-index: 1000;
	margin: 0;
}

/* Кнопка «Блог» — выше оранжевой, синяя, пульсация синей тенью */
.single-post-back--blog {
	bottom: 360px;
}

@keyframes single-post-back-pulse-blue {
	0%, 100% {
		box-shadow: 0 2px 12px rgba(33, 150, 243, 0.4);
	}
	50% {
		box-shadow: 0 2px 24px rgba(33, 150, 243, 0.7);
	}
}

.single-post-back--blog .single-post-back-link {
	background: #2196f3;
	box-shadow: 0 2px 12px rgba(33, 150, 243, 0.4);
	animation: single-post-back-pulse-blue 2s ease-in-out infinite;
}

/* Ховер только для десктопа (ширина > 810px) */
@media (min-width: 811px) {
.single-post-back--blog .single-post-back-link:hover {
	background: #1976d2;
	box-shadow: 0 4px 16px rgba(33, 150, 243, 0.55);
	animation: none;
}

.single-post-back--blog .single-post-back-link:hover .single-post-back-text {
	max-width: 80px;
}
}

.single-post-back-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: 'TT Hoves Medium', sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #fff;
	text-decoration: none;
	background: #f57c00;
	border: none;
	border-radius: 999px;
	box-shadow: 0 2px 12px rgba(245, 124, 0, 0.4);
	animation: single-post-back-pulse 2s ease-in-out infinite;
	transition: width 0.3s ease, max-width 0.3s ease, padding 0.3s ease, background 0.2s ease;
	overflow: hidden;
	width: 52px;
	height: 52px;
	min-width: 52px;
	padding: 0 0 0 0;
}

.single-post-back-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	transition: opacity 0.25s ease, width 0.25s ease, margin 0.25s ease;
	position:absolute;
	top:13px;
	left:13px;
}

.single-post-back-icon svg {
	display: block;
}

.single-post-back-text {
	text-align:center;
	white-space: nowrap;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
}

/* При наведении: только для десктопа (ширина > 810px) */
@media (min-width: 811px) {
.single-post-back-link:hover {
	width: auto;
	max-width: 280px;
	min-width: 52px;
	padding: 0 15px 0 20px;
	background: #e65100;
	box-shadow: 0 4px 16px rgba(245, 124, 0, 0.5);
	animation: none;
	text-decoration: none;
	color: #fff;
}

.single-post-back-link:hover .single-post-back-icon {
	opacity: 0;
	width: 0;
	margin: 0;
}

.single-post-back-link:hover .single-post-back-text {
	max-width: 220px;
	opacity: 1;
}
}

/* Вся карточка — ссылка на запись (опционально) */
.section-11-card-image-wrap {
	display: block;
	text-decoration: none;
	color: inherit;
}

.section-11-card-title a {
	text-decoration: none;
	color: inherit;
}

.section-11-card-title a:hover {
	text-decoration: underline;
}

/* Пагинация блога */
.feedback-pagination {
	width: 1342px;
	max-width: 100%;
	margin: 40px auto 0;
	padding-bottom: 40px;
	box-sizing: border-box;
}

.feedback-pagination .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-family: 'TT Hoves Regular', sans-serif;
	font-size: 18px;
}

.feedback-pagination .nav-links a,
.feedback-pagination .nav-links .current {
	padding: 8px 14px;
	text-decoration: none;
	color: #313131;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.feedback-pagination .nav-links a:hover {
	border-color: #313131;
	background: #f5f5f5;
}

.feedback-pagination .nav-links .current {
	background: #313131;
	color: #fff;
	border-color: #313131;
}

.feedback-pagination .nav-links .prev,
.feedback-pagination .nav-links .next {
	font-weight: 500;
}

@media screen and (max-width:1439px){

	.single-post-content.entry-content h2 {
		margin: 1.5em 0 0.5em;
		font-family: 'TT Hoves Medium', sans-serif;
		font-weight: 600;
		font-size: 40px;
		line-height: 1.3;
		color: #313131;
	}

	.single-post-content.entry-content p {
		margin: 0 0 1em;
		font-size: 30px;
		line-height: 1.3;
	}

}

@media screen and (max-width:810px){

	.single-post-content.entry-content h2 {
		margin: 1.5em 0 0.5em;
		font-family: 'TT Hoves Medium', sans-serif;
		font-weight: 600;
		font-size: 40px;
		line-height: 1.3;
		color: #313131;
	}

	.single-post-content.entry-content p {
		margin: 0 0 1em;
		font-size: 30px;
		line-height: 1.3;
	}

}

@media screen and (max-width:429px){

	.single-post-content.entry-content h2 {
		margin: 1.5em 0 0.5em;
		font-family: 'TT Hoves Medium', sans-serif;
		font-weight: 600;
		font-size: 40px;
		line-height: 1.3;
		color: #313131;
	}

	.single-post-content.entry-content p {
		margin: 0 0 1em;
		font-size: 30px;
		line-height: 1.3;
	}

}