/* === FLEX LAYOUT FOR NEWTHEME FAYL === */

/* === Прижать футер === */
html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

header {
  flex: 0 0 auto;
}

main {
  flex: 1 0 auto;
}

footer {
  flex: 0 0 auto;
}
/* === / AND === */

/* === TOP BAR === */
.top-bar {
	background: #0abdc6;
	color: #fff;
	font-size: 0.95rem;
}
.top-flex {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.4rem 0;
}
.top-left,
.top-right {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.top-left ul.lang-switcher {
	list-style: none;
	display: flex;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
}
.top-left ul.lang-switcher li a {
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	transition: opacity .2s;
}
.top-left ul.lang-switcher li a:hover {
	opacity: 0.7;
}

/* Аккаунт/регистрация */
.top-right a {
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	transition: opacity .2s;
}
.top-right a:hover {
	opacity: 0.75;
}
.top-right .sep {
	color: rgba(255,255,255,0.6);
}

/* Адаптив */
@media (max-width: 768px) {
	.top-flex {
		flex-direction: column;
		gap: 0.5rem;
		text-align: center;
	}
}
/* And */

body {
	font-family: 'Inter', sans-serif;
	color: #111;
	background: #fff;
	margin: 0;
	line-height: 1.6;
}

.container {
	width: 100%;
	max-width: 1420px;
	margin: 0 auto;
}

/* ---------- HEADER ---------- */
.site-header {
	background: #fff;
	border-bottom: 2px solid #0abdc6;
	position: sticky;
	top: 0;
	z-index: 1000;
}
.header-flex {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 0;
}
.branding .site-title {
	font-size: 1.8rem;
	font-weight: 700;
	color: #0abdc6;
	text-decoration: none;
}

.branding .tagline {
	font-family: "Poppins", "Segoe UI", sans-serif;
	font-size: 1.1rem;
	font-weight: 600;
	background: linear-gradient(90deg, #318CE7 0%, #0abdc6 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	margin: 0;
	text-shadow: none;
}

.branding .tagline:hover {
	font-family: "Poppins", "Segoe UI", sans-serif;
	font-size: 1.1rem;
	font-weight: 600;
	background: linear-gradient(90deg, #0abdc6 0%, #318CE7 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	margin: 0;
	text-shadow: none;
}


/* === Custom logo dynamic controls === */
.custom-logo {
	max-width: var(--logo-size, 120px);
	height: auto;
	display: block;
}

.site-header .branding {
	display: flex;
	justify-content: var(--logo-align, flex-start);
	align-items: center;
}

/* ---------- /And ---------- */

/* ---------- CONTENT ---------- */
.content-wrap {
	display: flex;
	gap: 1rem;
	margin: 2rem 0;
}
.main-area { flex: 3; }
.sidebar { flex: 1; }

/* ---------- FOOTER ---------- */
.site-footer {
	background: #0abdc6;
	color: #fff;
	padding: 1rem 0;
}
.footer-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}
.footer-flex a {
	color: #fff;
	text-decoration: underline;
}

/* ---------- RESPONSIVE ---------- */

/* Tablets */
@media (max-width: 1024px) {
	.content-wrap {
		flex-direction: column;
	}
	.sidebar {
		order: 2;
	}
}

/* Mobiles */
@media (max-width: 768px) {
	.header-flex {
		flex-wrap: wrap;
	}

	.menu-toggle {
		display: block;
	}

	.main-nav ul {
		flex-direction: column;
		width: 100%;
		background: #fff;
		border-top: 2px solid #0abdc6;
		margin-top: 1rem;
		padding: 1rem 0;
		display: none;
	}
	.main-nav ul.open {
		display: flex;
	}
	.main-nav ul li {
		text-align: center;
		padding: 0.5rem 0;
	}

	.content-wrap {
		flex-direction: column;
	}
	.footer-flex {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}

/* Part 2 */
/* === FLEX EXTENSIONS FOR ARCHIVE / INDEX / 404 === */

/* Error page */
.flex-center {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 70vh;
	text-align: center;
}
.error-box {
	max-width: 500px;
}
.error-title {
	font-size: 5rem;
	font-weight: 800;
	color: #0abdc6;
	margin-bottom: 0.5rem;
}
.btn-home {
	display: inline-block;
	background: #0abdc6;
	color: #fff;
	padding: 0.8rem 1.5rem;
	border-radius: 5px;
	text-decoration: none;
	margin-top: 1rem;
}
.btn-home:hover {
	background: #0899a7;
}

/* Archive / Index Grid */
.archive-grid,
.post-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	margin-top: 2rem;
}
.archive-card,
.post-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	overflow: hidden;
	flex: 1 1 calc(33.333% - 2rem);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.archive-card:hover,
.post-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.archive-card .thumb img,
.post-card .thumb img {
	width: 100%;
	height: auto;
	display: block;
}
.entry-title {
	font-size: 1.2rem;
	margin: 1rem;
	color: #111;
}
.excerpt {
	margin: 0 1rem 1rem;
	color: #555;
	font-size: 0.95rem;
}

/* Responsive grid */
@media (max-width: 1024px) {
	.archive-card, .post-card { flex: 1 1 calc(50% - 2rem); }
}
@media (max-width: 768px) {
	.archive-card, .post-card { flex: 1 1 100%; }
}

/* === CONTENT TEMPLATES === */

.no-results {
	padding: 5rem 1rem;
	text-align: center;
}
.no-results-box h1 {
	font-size: 2rem;
	color: #0abdc6;
	margin-bottom: 1rem;
}
.no-results-box p {
	color: #555;
}

/* Page content */
.page-entry {
	padding: 2rem 0;
}
.page-entry .entry-title {
	font-size: 2rem;
	color: #0abdc6;
	margin-bottom: 1rem;
}
.entry-content {
	color: #333;
	line-height: 1.8;
}

/* Search results */
.search-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 2rem;
	transition: box-shadow .2s ease, transform .2s ease;
}
.search-card-inner {
	display: flex;
	flex-wrap: wrap;
	text-decoration: none;
	color: inherit;
}
.search-card .thumb img {
	width: 220px;
	height: auto;
	display: block;
}
.search-text {
	flex: 1;
	padding: 1rem;
}
.search-text .entry-title {
	font-size: 1.3rem;
	color: #0abdc6;
	margin-top: 0;
}
.search-card:hover {
	box-shadow: 0 4px 10px rgba(0,0,0,0.08);
	transform: translateY(-3px);
}

/* Post entry */
.post-entry {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 2rem;
	margin-bottom: 2rem;
}
.post-entry .entry-title {
	color: #0abdc6;
	margin-bottom: .5rem;
}
.post-entry .entry-meta {
	font-size: .9rem;
	color: #777;
	margin-bottom: 1rem;
}
.post-entry .entry-content {
	color: #333;
}
.post-entry .entry-footer {
	margin-top: 1.5rem;
	font-size: .9rem;
	color: #888;
	border-top: 1px solid #eee;
	padding-top: .5rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
	.search-card-inner {
		flex-direction: column;
	}
	.search-card .thumb img {
		width: 100%;
	}
}

/* === SIDEBAR STYLES — NEWTHEME FAYL === */

.sidebar {
	flex: 1;
	background: #fafafa;
	padding: 1rem;
	border-left: 2px solid #0abdc6;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.widget-area {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

#secondary {
    width: 100%;
}

#secondary-left {
    width: 100%;
}

/* Общие стили для виджетов */
.widget {
	background: #fff;
	border-radius: 10px;
	padding: 1rem 1.2rem;
	box-shadow: 0 2px 6px rgba(0,0,0,0.05);
	transition: all 0.3s ease;
}

.widget:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.widget h2,
.widget .wp-block-heading {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 0.8rem;
	border-bottom: 2px solid #0abdc6;
	display: inline-block;
	padding-bottom: 0.2rem;
	color: #0abdc6;
}

.widget ul,
.widget ol {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget li {
	margin: 0.4rem 0;
}

.widget a {
	color: #111;
	text-decoration: none;
	transition: color 0.2s ease;
}

.widget a:hover {
	color: #0abdc6;
}

/* Searh */
.widget_search,
.wp-block-search {
	margin-bottom: 1rem;
}
.wp-block-search {
	display: flex;
	align-items: center;
	background: #fff;
	border: 2px solid #0abdc6;
	border-radius: 40px;
	padding: 0.3rem 0.6rem;
	box-shadow: 0 2px 6px rgba(0,0,0,0.05);
	width: 100%;
	transition: all 0.3s ease;
}
.wp-block-search:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.wp-block-search__input {
	flex: 1;
	border: none;
	outline: none;
	padding: 0.6rem 1rem;
	font-size: 1rem;
	background: transparent;
}
.wp-block-search__button {
	background: #0abdc6;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	cursor: pointer;
	font-size: 1.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}
.wp-block-search__button:hover {
	background: #0899a7;
	transform: scale(1.05);
}
.wp-block-search__label {
	display: none;
}

/* Тёмная тема */
@media (prefers-color-scheme: dark) {
	.sidebar {
		background: rgba(255,255,255,0.3);
		border-color: #0abdc6;
	}
	.widget {
		background: rgba(255,255,255,0.2);
		box-shadow: 0 3px 10px rgba(0,0,0,0.05);
	}
	.widget h2,
	.widget .wp-block-heading {
		color: #0abdc6;
	}
	.widget a {
		color: #000000;
	}
	.widget a:hover {
		color: #0abdc6;
	}
	.wp-block-search {
		background: #0abdc6;
		border: none;
	}
	.wp-block-search__input {
		color: #fff;
	}
}

/* Адаптив */
@media (max-width: 1024px) {
	.sidebar {
		border-left: none;
		border-top: 2px solid #0abdc6;
		margin-top: 2rem;
	}
}
@media (max-width: 768px) {
	.sidebar {
		padding: 1rem;
		box-shadow: none;
	}
}

/* === COMMENTS SECTION === */
.comments-area {
	margin-top: 3rem;
	background: #fff;
	padding: 1.5rem;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.comments-title {
	font-size: 1.3rem;
	font-weight: 600;
	color: #0abdc6;
	margin-bottom: 1.2rem;
	border-bottom: 2px solid #0abdc6;
	display: inline-block;
	padding-bottom: 0.2rem;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list li {
	margin-bottom: 1.5rem;
	border-bottom: 1px solid #eee;
	padding-bottom: 1.2rem;
}

.comment-meta {
	margin-bottom: 0.4rem;
	color: #666;
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	gap: 8px;
}

.comment-author img {
	border-radius: 50%;
	width: 48px;
	height: 48px;
	margin-right: 0.6rem;
}

.comment-content {
	color: #333;
	line-height: 1.6;
}

.reply {
	margin-top: 0.5rem;
}
.reply a {
	color: #0abdc6;
	font-weight: 500;
	text-decoration: none;
}
.reply a:hover {
	text-decoration: underline;
}

/* Comment form */
.comment-form {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-top: 2rem;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	width: 100%;
	padding: 0.8rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1rem;
	font-family: inherit;
}

.comment-form textarea:focus,
.comment-form input:focus {
	border-color: #0abdc6;
	outline: none;
	box-shadow: 0 0 0 2px rgba(10,189,198,0.15);
}

.comment-form input[type="submit"] {
	background: #0abdc6;
	color: #fff;
	border: none;
	padding: 0.8rem 1.5rem;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease;
}

.comment-form input[type="submit"]:hover {
	background: #0899a7;
}

/* Responsive */
@media (max-width: 768px) {
	.comment-author img {
		width: 40px;
		height: 40px;
	}
}

/* === SEARCH PAGE LAYOUT === */
body.search .content-wrap.search-layout {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	min-width: 1420px;
	margin: 2rem auto;
}

body.search .main-area {
	flex: 3;
	background: #fff;
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

body.search .sidebar-right {
	flex: 1;
	background: #fff;
	border-radius: 10px;
	padding: 1rem;
	box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Заголовок */
body.search .page-header {
	margin-bottom: 1.5rem;
}
body.search .page-title span {
	color: #0abdc6;
}

/* Карточки результатов */
.search-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
}

.search-grid article {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	overflow: hidden;
	flex: 1 1 calc(50% - 2rem);
	transition: box-shadow .2s ease, transform .2s ease;
}

.search-grid article:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-grid .thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.search-grid .entry-title {
	font-size: 1.2rem;
	margin: 1rem;
	color: #0abdc6;
}

.search-grid .excerpt {
	margin: 0 1rem 1rem;
	color: #555;
	font-size: 0.95rem;
}

/* Адаптив */
@media (max-width: 1024px) {
	body.search .content-wrap.search-layout {
		flex-direction: column;
		min-width: auto;
	}
	.search-grid article {
		flex: 1 1 100%;
	}
}