/*
Theme Name: Test Work Child
Description: Custom child theme based on Twenty Twenty for test work 2026
Author: Alexander Podolnitsky
Template: twentytwenty
Version: 1.0.0
Text Domain: test-work-child
*/

:root {
    --main-bg: #FFF;
    --nav-bg: #D8D8D8;
    --section: #F4F4F4;
	--main-text: #000;
	--secondary-text: #969696;
	--like: #43AE62;
	--like-hover: #457C56;
	--dislike: #ED8A19;
	--dislike-hover: #BD7328;
    --hover: #969696;
}

.main {
	background: var(--main-bg);
	color: var(--main-text);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
    padding: 30px 0;
}

.container {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: 1200px;
	padding-left: 30px;
	padding-right: 30px;
	width: 100%;
}

.header, .footer {
	background: var(--section);
	box-sizing: border-box;
	padding: 30px 0;
    max-width: min(1600px, calc(100vw - 60px));
    margin: 30px auto 0;
	width: 100%;
}

.footer {
	margin-top: auto;
}

.nav {
	background: var(--nav-bg);
	box-sizing: border-box;
    max-width: min(1600px, calc(100vw - 60px));
    margin: 0 auto;
	width: 100%;
}

.nav-list {
	display: flex;
	gap: 62px;
	padding-bottom: 18px;
	padding-top: 18px;
}

.nav a {
	color: var(--main-text);
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
}

.nav a:hover {
    color: var(--hover);
}

.main-block {
    display: flex;
	box-sizing: border-box;
    max-width: min(1600px, calc(100vw - 60px));
    margin: 0 auto;
	gap: clamp(23px, 2vw, 36px);
    padding-bottom: 80px;
    padding-top: 48px;
	width: 100%;
}

.main-block > *:first-child {
	flex: 1 1 auto;
    min-width: 0;
	width: auto;
}

.posts {
	box-sizing: border-box;
    background: var(--section);
    padding: 40px 30px;
	width: 100%;
}

.sidebar {
	box-sizing: border-box;
	background: var(--section);
	padding: 40px 30px;
    height: 100px;
	flex: 0 0 clamp(300px, 22vw, 360px);
	width: clamp(300px, 22vw, 360px);
}

.logo,
.posts h1,
.sidebar h2,
.footer h2
{
    color: var(--main-text);
	font-size: 32px;
	font-weight: 400;
	margin: 0;
    text-decoration: none;
}

.post-list {
    display: flex;
    flex-direction: column;
	gap: 28px;
	margin-top: 48px;
}

.post {
    background: var(--main-bg);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin: 0;
	height: 170px;
	max-width: none;
	min-height: 170px;
	width: 100%;
}

.post-image {
	flex: 0 0 170px;
}

.post-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 32px 34px 25px;
}

.post-image {
    display: block;
	flex: 0 0 170px;
	height: 170px;
	min-height: 170px;
    overflow: hidden;
    text-decoration: none;
	width: 170px;
}

.post-image img {
    display: block;
	height: 170px;
	min-height: 170px;
    object-fit: cover;
	width: 170px;
}

.post-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	box-sizing: border-box;
	height: 170px;
	overflow: hidden;
	padding: 12px 20px 10px;
}

.post h2 {
	font-family: "Inter", sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 28px;
	margin: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.post h2 a {
	color: var(--main-text);
	font-family: "Inter", sans-serif;
	display: block;
	font-size: 24px;
	font-weight: 700;
	line-height: 28px;
	text-decoration: none;
}

.excerpt {
	color: var(--secondary-text);
	display: block;
	font-family: "Inter", sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 22px;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.post-footer {
	align-items: center;
	display: flex;
	font-family: "Inter", sans-serif;
	flex-shrink: 0;
	justify-content: space-between;
	font-weight: 400;
	line-height: 22px;
	margin-top: 0;
}

.author {
	color: var(--secondary-text);
	font-size: 18px;
	font-style: italic;
	margin: 0;
}

.author strong {
	color: var(--main-text);
	font-weight: 400;
}

.likes {
	align-items: center;
	display: flex;
	gap: 10px;
}

.likes span {
    color: var(--like);
	font-weight: 700;
	text-align: center;
}

.like {
    height: 22px;
    width: 22px;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.like-up {
	background: var(--like);
}

.like-up:hover {
    background: var(--like-hover);
    text-decoration: none;
}

.like-up:focus {
    text-decoration: none;
}

.like-up:disabled {
    background: var(--like-hover);
    cursor: not-allowed;
}

.like-down {
	background: var(--dislike);
}

.like-down:focus  {
    text-decoration: none;

}

.like-down:hover  {
    background: var(--dislike-hover);
    text-decoration: none;
}

.like-down:disabled  {
    background: var(--dislike-hover);
    cursor: not-allowed;
}

.pagination {
	margin-top: 30px;
}

.pagination ul {
	align-items: center;
	display: flex;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pagination li {
	align-items: center;
	display: flex;
	justify-content: center;
	min-width: 20px;
}

.pagination a,
.pagination span {
    color: var(--main-text);
	align-items: center;
	display: inline-flex;
	font-size: 14px;
	font-weight: 400;
	justify-content: center;
	text-decoration: none;
}

.pagination a:hover {
	color: var(--secondary-text);
	text-decoration: none;
}

.pagination .current {
	background: var(--main-text);
	border-radius: 50%;
	color: var(--main-bg);
	height: 32px;
	min-width: 32px;
}

.pagination .prev,
.pagination .next {
	font-weight: 700;
	min-width: auto;
}

.pagination .dots {
	min-width: auto;
}

.home #site-header,
.home #site-footer {
	display: none;
}

@media (max-width: 900px) {
	body {
		background: var(--main-bg);
	}

	.main {
		box-sizing: border-box;
		margin: 0 auto;
		min-height: auto;
		padding: 30px 15px;
	}

	.header,
	.nav,
	.main-block,
	.footer {
		margin-top: 0;
		max-width: none;
		width: 100%;
	}

	.header {
		margin-top: 0;
	}

	.main-block {
		flex-direction: column;
		gap: 29px;
		padding-bottom: 0;
		padding-top: 29px;
	}

	.main-block > *:first-child,
	.posts {
		flex-basis: auto;
		box-sizing: border-box;
		width: 100%;
	}

	.posts {
		padding: 30px;
	}

	.sidebar {
		display: block;
		flex: 0 0 auto;
		height: auto;
		min-height: 100px;
		width: 100%;
	}

	.post-list {
		gap: 28px;
		margin-top: 30px;
	}

	.post {
		height: 188px;
		max-width: none;
		min-height: 188px;
	}

	.post-image,
	.post-image img {
		height: 188px;
		min-height: 188px;
		width: 165px;
	}

	.post-image {
		flex-basis: 165px;
	}

	.post-content {
		height: 188px;
		padding: 20px;
	}

	.post h2,
	.post h2 a {
		font-size: 24px;
		line-height: 28px;
	}

	.excerpt,
	.author {
		font-size: 18px;
	}
}

@media (max-width: 650px) {
	.main {
		padding: 30px 15px;
	}

	.logo,
	.posts h1,
	.sidebar h2,
	.footer h2 {
		font-size: 32px;
	}

	.header {
		padding-bottom: 30px;
		padding-top: 30px;
	}

	.nav-list {
		gap: 0;
		justify-content: space-between;
		white-space: nowrap;
	}

	.nav a {
		font-size: 14px;
	}

	.main-block {
		gap: 24px;
		padding-top: 45px;
	}

	.posts {
		padding: 30px 23px;
	}

	.post-list {
		gap: 28px;
		margin-top: 44px;
	}

	.post {
		flex-direction: column;
		height: auto;
		max-width: none;
		min-height: 0;
		width: 300px;
	}

	.post-image,
	.post-image img {
		flex: 0 0 auto;
		height: 170px;
		min-height: 170px;
		max-width: 100%;
		width: 300px;
	}

	.post-image img {
		height: 170px;
		object-fit: cover;
		width: 300px;
	}

	.post-content {
		height: auto;
		min-height: 290px;
		overflow: visible;
		padding: 30px;
	}

	.post h2,
	.post h2 a {
		font-size: 28px;
		line-height: 34px;
	}

	.excerpt,
	.author {
		font-size: 20px;
		line-height: 26px;
	}

	.excerpt {
		white-space: normal;
	}

	.post-footer {
		align-items: center;
		gap: 10px;
		margin-top: auto;
		white-space: nowrap;
	}

	.author {
		font-size: 14px;
		line-height: 18px;
		white-space: nowrap;
	}

	.likes {
		flex-shrink: 0;
		gap: 6px;
		margin-left: auto;
		white-space: nowrap;
	}

	.likes .counter {
		font-size: 18px;
		font-weight: 700;
		min-width: 20px;
	}

	.like {
		height: 22px;
		width: 22px;
	}

	.pagination {
		margin-top: 32px;
	}

	.pagination ul {
		gap: 14px;
		justify-content: space-between;
	}

	.pagination a,
	.pagination span {
		font-size: 16px;
	}
}
