/*
Theme Name: Tonchovski Blog
Theme URI: https://tonchovskilaw.bg/blog/
Author: Адвокат Ивайло Тончовски
Author URI: https://tonchovskilaw.bg/
Description: Минимална собствена тема за блога на Адвокат Ивайло Тончовски, визуално съобразена със статичния сайт.
Version: 1.0.6
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tonchovski-blog
*/

/* The approved static design system is loaded before this file. */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	background: #fff;
	color: var(--navy);
	font-weight: 600;
}

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

.blog-page-hero p {
	max-width: 760px;
}

.blog-page-hero h1,
.blog-card__title,
.article-content h2,
.article-content h3 {
	font-variant-numeric: lining-nums;
	font-feature-settings: "lnum" 1;
}

.blog-index {
	max-width: 920px;
}

.blog-list {
	display: grid;
	gap: 0;
}

.blog-card {
	display: grid;
	grid-template-columns: minmax(220px, 320px) 1fr;
	gap: 34px;
	align-items: center;
	padding: 36px 0;
	border-bottom: 1px solid var(--line);
}

.blog-card:first-child {
	padding-top: 0;
}

.blog-card__media {
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface);
	color: var(--gold-ink);
}

.blog-card__media:hover {
	color: var(--navy);
}

.blog-card__image,
.blog-card__placeholder {
	width: 100%;
	aspect-ratio: 16 / 10;
}

.blog-card__image {
	height: auto;
	object-fit: cover;
	transition: transform var(--transition);
}

.blog-card__media:hover .blog-card__image {
	transform: scale(1.02);
}

.blog-card__placeholder {
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
	font-family: var(--font-serif);
	font-size: 2rem;
	letter-spacing: .08em;
}

.blog-card__meta,
.article-meta {
	display: flex;
	gap: 10px 18px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 10px;
	color: var(--text-muted);
	font-size: .82rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.blog-card__meta a,
.article-meta a {
	color: var(--gold-ink);
	font-weight: 600;
}

.blog-card__title {
	margin-bottom: 10px;
	font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.blog-card__title a {
	color: var(--navy);
}

.blog-card__title a:hover {
	color: var(--gold-ink);
}

.blog-card__excerpt {
	margin-bottom: 12px;
	color: var(--text-muted);
}

.blog-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--navy);
}

.blog-card__more:hover {
	color: var(--gold-ink);
}

.blog-pagination {
	margin-top: 44px;
}

.blog-pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.blog-pagination .page-numbers {
	display: inline-grid;
	min-width: 42px;
	min-height: 42px;
	padding: 8px 12px;
	place-items: center;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--navy);
	font-weight: 600;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
	border-color: var(--gold-ink);
	background: var(--gold-ink);
	color: #fff;
}

.article-shell {
	max-width: 840px;
}

/* Prevent the shared static-site .post card layout from affecting single posts. */
.single-post article.post.section {
	display: block;
	grid-template-columns: none;
	gap: 0;
	align-items: initial;
	padding: 84px 0;
	border-bottom: 0;
}

.article-header {
	margin-bottom: 36px;
}

.article-header h1 {
	margin-bottom: 18px;
}

.article-lead {
	font-size: 1.18rem;
	color: var(--text-muted);
}

.article-featured-image {
	width: 100%;
	height: auto;
	margin: 0 0 42px;
	border-radius: 10px;
}

.article-content {
	color: #263e5b;
}

.article-content > * {
	max-width: 760px;
	margin-right: auto;
	margin-left: auto;
}

.article-content > .alignwide {
	max-width: 960px;
	margin-right: -60px;
	margin-left: -60px;
}

.article-content > .alignfull {
	width: calc(100vw - 32px);
	max-width: none;
	margin-right: calc(50% - 50vw + 16px);
	margin-left: calc(50% - 50vw + 16px);
}

.article-content h2 {
	margin-top: 2em;
	margin-bottom: .65em;
}

.article-content h3,
.article-content h4 {
	margin-top: 1.7em;
	margin-bottom: .6em;
}

.article-content p,
.article-content li {
	font-size: 1.04rem;
}

.article-content ul,
.article-content ol {
	padding-left: 1.4em;
	margin-top: 0;
	margin-bottom: 1.35em;
}

.article-content ul {
	list-style: disc;
}

.article-content ol {
	list-style: decimal;
}

.article-content a {
	color: var(--gold-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.article-content blockquote,
.wp-block-quote {
	margin-top: 1.8em;
	margin-bottom: 1.8em;
	padding: 18px 24px;
	border-left: 4px solid var(--gold);
	background: var(--surface);
	color: var(--navy);
}

.article-content blockquote p:last-child {
	margin-bottom: 0;
}

.article-content img,
.article-content .wp-block-image img {
	height: auto;
	border-radius: var(--radius);
}

.article-content figcaption {
	margin-top: 8px;
	color: var(--text-muted);
	font-size: .86rem;
	text-align: center;
}

.article-content table {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: collapse;
}

.article-content th,
.article-content td {
	padding: 12px 14px;
	border: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.article-content th {
	background: var(--surface);
	color: var(--navy);
}

.article-note {
	margin-top: 46px;
	padding: 22px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text-muted);
	font-size: .92rem;
}

.article-rights {
	margin-top: 18px;
	padding: 20px 24px;
	border: 1px solid var(--line);
	border-left: 4px solid var(--gold);
	border-radius: var(--radius);
	background: #fff;
	color: var(--text-muted);
	font-size: .92rem;
}

.article-rights h2 {
	margin: 0 0 8px;
	font-family: var(--font-sans);
	font-size: 1rem;
	letter-spacing: .02em;
}

.article-rights p {
	margin: 0;
}

.article-navigation {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 42px;
	padding-top: 30px;
	border-top: 1px solid var(--line);
}

.article-navigation a {
	display: block;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	font-weight: 600;
}

.article-navigation .nav-next {
	text-align: right;
}

.blog-empty {
	padding: 42px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	text-align: center;
}

.blog-search-form {
	display: flex;
	gap: 10px;
	max-width: 620px;
	margin: 26px auto 0;
}

.blog-search-form label {
	flex: 1;
}

.blog-search-form input[type="search"] {
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid var(--line-field);
	border-radius: var(--radius);
	font: inherit;
}

.wp-caption,
.wp-caption-text,
.gallery-caption {
	max-width: 100%;
}

.sticky {
	position: relative;
}

.bypostauthor {
	display: block;
}

@media (max-width: 1000px) {
	body.menu-open {
		overflow: hidden;
	}

	.nav {
		max-height: calc(100vh - 78px);
		overflow-y: auto;
	}

	body.admin-bar .nav {
		inset: 110px 0 auto 0;
		max-height: calc(100vh - 110px);
	}
}

@media (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}

	body.admin-bar .nav {
		inset: 124px 0 auto 0;
		max-height: calc(100vh - 124px);
	}
}

@media (max-width: 720px) {
	.single-post article.post.section {
		padding: 60px 0;
	}

	.blog-card {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.article-content > .alignwide {
		margin-right: auto;
		margin-left: auto;
	}

	.article-navigation {
		grid-template-columns: 1fr;
	}

	.article-navigation .nav-next {
		text-align: left;
	}
}

@media (max-width: 520px) {
	.nav {
		max-height: calc(100vh - 70px);
	}

	body.admin-bar .nav {
		inset: 116px 0 auto 0;
		max-height: calc(100vh - 116px);
	}

	.blog-search-form {
		flex-direction: column;
	}
}
