/*
Theme Name: Vatican Style
Theme URI: https://eusebia.vseproi.de
Description: Светлая новостная тема в стиле Vatican News: красная шапка с логотипом и названием, серый подвал, сетка карточек.
Version: 1.5
Text Domain: vatican-style
*/

:root {
	--vn-dark: #0f1f38;
	--vn-dark-soft: #16294a;
	--vn-red: #c8102e;
	--vn-red-dark: #9c0d24;
	--vn-gray: #4b5563;
	--vn-gray-dark: #374151;
	--vn-text: #333333;
	--vn-muted: #6b7280;
	--vn-border: #e5e7eb;
	--vn-bg: #ffffff;
	--vn-bg-soft: #f5f6f8;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--vn-bg);
	color: var(--vn-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--vn-dark);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Шапка: красная, логотип и название по левому краю */
.site-header {
	background: var(--vn-red);
}

.site-header-inner {
	padding-top: 24px;
	padding-bottom: 18px;
	text-align: left;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 24px;
	justify-content: flex-start;
}

.site-logo {
	line-height: 0;
	flex-shrink: 0;
}

.site-logo a {
	display: inline-block;
}

.site-logo img {
	max-height: 90px;
	width: auto;
	height: auto;
}

.brand-text {
	text-align: left;
}

.brand-text .site-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2em;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	color: #ffffff;
}

.brand-text .site-title a {
	color: #ffffff;
}

.brand-text .site-title a:hover {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
}

.brand-text .site-description {
	margin: 6px 0 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9em;
}

.main-navigation {
	background: var(--vn-red);
}

.main-navigation .primary-menu {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation .primary-menu li {
	margin: 0;
}

.main-navigation .primary-menu a {
	display: block;
	color: #ffffff;
	padding: 13px 18px;
	font-size: 0.9em;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.main-navigation .primary-menu a:hover,
.main-navigation .primary-menu .current-menu-item > a {
	background: var(--vn-red-dark);
	color: #ffffff;
	text-decoration: none;
}

/* Контент */
.site-main {
	padding: 48px 0;
}

.page-header {
	margin-bottom: 28px;
}

.page-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.9em;
	color: var(--vn-dark);
	margin: 0 0 8px;
	line-height: 1.3;
}

.page-header p {
	color: var(--vn-muted);
	margin: 0;
}

.entry-header {
	margin-bottom: 1.2em;
}

.entry-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.7em;
	line-height: 1.3;
	margin: 0 0 0.4em;
	font-weight: 700;
	color: var(--vn-dark);
}

.entry-title a {
	color: var(--vn-dark);
}

.entry-title a:hover {
	color: var(--vn-red);
	text-decoration: none;
}

.entry-meta {
	font-size: 0.85em;
	color: var(--vn-muted);
}

.entry-meta a {
	color: var(--vn-red);
}

.post-thumbnail {
	margin-bottom: 1.5em;
}

.post-thumbnail img {
	width: 100%;
	border-radius: 4px;
}

.entry-single {
	max-width: 820px;
	margin: 0 auto;
}

.entry-content p {
	margin: 0 0 1.2em;
}

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

.entry-content ul,
.entry-content ol {
	padding-left: 1.2em;
}

.page-content {
	max-width: 900px;
	margin: 0 auto;
}

/* Сетка карточек (лента постов, архивы) */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.post-card {
	background: #fff;
	border: 1px solid var(--vn-border);
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
	box-shadow: 0 8px 24px rgba(15, 31, 56, 0.12);
	transform: translateY(-2px);
}

.post-card .card-thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.post-card .card-body {
	padding: 18px 18px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.post-card .card-cat {
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--vn-red);
	margin-bottom: 8px;
}

.post-card .card-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.15em;
	line-height: 1.35;
	margin: 0 0 10px;
}

.post-card .card-title a {
	color: var(--vn-dark);
}

.post-card .card-title a:hover {
	color: var(--vn-red);
	text-decoration: none;
}

.post-card .card-excerpt {
	font-size: 0.88em;
	color: var(--vn-muted);
	margin: 0 0 14px;
	flex: 1;
}

.post-card .card-meta {
	font-size: 0.8em;
	color: var(--vn-muted);
	border-top: 1px solid var(--vn-border);
	padding-top: 12px;
}

/* Пагинация */
.pagination {
	margin-top: 40px;
	text-align: center;
}

.pagination .nav-links {
	display: inline-flex;
	gap: 6px;
}

.pagination .page-numbers {
	display: inline-block;
	min-width: 42px;
	padding: 8px 13px;
	border: 1px solid var(--vn-border);
	border-radius: 3px;
	color: var(--vn-dark);
}

.pagination .page-numbers.current {
	background: var(--vn-dark);
	border-color: var(--vn-dark);
	color: #fff;
}

.pagination .page-numbers:hover {
	border-color: var(--vn-dark);
	text-decoration: none;
}

/* Подвал: серый, текст белый */
.site-footer {
	background: var(--vn-gray);
	color: #ffffff;
	padding: 48px 0 0;
}

.footer-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px;
	padding-bottom: 36px;
}

.footer-column h3 {
	color: #ffffff;
	font-size: 0.95em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0 0 14px;
}

.footer-column p {
	font-size: 0.88em;
	margin: 0 0 10px;
	color: #ffffff;
}

.footer-column ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-column ul li {
	margin-bottom: 8px;
}

.footer-column ul a {
	color: #ffffff;
	font-size: 0.88em;
}

.footer-column ul a:hover {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: underline;
}

.footer-bottom {
	background: var(--vn-gray-dark);
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding: 18px 0;
	text-align: center;
	font-size: 0.82em;
	color: rgba(255, 255, 255, 0.85);
}

.footer-bottom p {
	margin: 0;
}

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

@media (max-width: 900px) {
	.posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-columns {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

@media (max-width: 640px) {
	.posts-grid {
		grid-template-columns: 1fr;
	}

	.site-main {
		padding: 32px 0;
	}

	.main-navigation .primary-menu {
		flex-direction: column;
		align-items: center;
	}

	.site-branding {
		gap: 14px;
	}

	.brand-text .site-title {
		font-size: 1.4em;
	}

	.site-logo img {
		max-height: 60px;
	}
}