:root {
	--theme-main: #0f5e78;
	--theme-main-dark: #0a3f51;
	--theme-main-light: #e5f4f7;
	--theme-accent-bg: #d9eff4;
	--color-text: #171b1f;
	--color-muted: #66717c;
	--color-border: #dfe5ea;
	--color-soft: #f6f8fa;
	--color-white: #ffffff;
	--shadow-soft: 0 12px 32px rgba(17, 24, 39, 0.08);
	--wrap: 1180px;
}

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

body {
	margin: 0;
	background: #f2f4f6;
	color: var(--color-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
}

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

a {
	color: var(--theme-main);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--theme-main-dark);
	text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.75rem;
	line-height: 1.18;
	letter-spacing: 0;
}

p {
	margin: 0 0 1rem;
}

button,
input,
select,
textarea {
	font: inherit;
}

.screen-reader-text {
	position: absolute;
	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 {
	z-index: 100000;
	top: 1rem;
	left: 1rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip: auto;
	background: var(--color-white);
	color: var(--theme-main-dark);
	box-shadow: var(--shadow-soft);
}

.content-wrap,
.site-header__inner,
.site-navigation__inner,
.site-footer__inner,
.site-footer__bottom {
	width: min(calc(100% - 32px), var(--wrap));
	margin: 0 auto;
}

.site-header {
	background: var(--color-white);
	border-top: 4px solid var(--theme-main);
	box-shadow: 0 1px 0 rgba(17, 24, 39, 0.06);
}

.site-header__inner {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(300px, 728px);
	gap: 1.5rem;
	align-items: center;
	padding: 1.3rem 0;
}

.site-branding {
	min-width: 0;
}

.custom-logo-link,
.text-logo {
	display: inline-flex;
	align-items: flex-start;
	flex-direction: column;
	max-width: 100%;
	color: var(--color-text);
	text-decoration: none;
}

.custom-logo-link img {
	width: auto;
	max-height: 76px;
}

.text-logo__name {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 850;
	letter-spacing: 0;
	color: var(--theme-main-dark);
}

.text-logo__tagline {
	margin-top: 0.2rem;
	color: var(--color-muted);
	font-size: 0.94rem;
	font-weight: 600;
}

.site-header__ad {
	min-width: 0;
}

.ad-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--theme-main-light);
	background: var(--theme-accent-bg);
	color: var(--theme-main-dark);
	text-align: center;
}

.ad-slot img,
.ad-slot iframe {
	max-width: 100%;
	border: 0;
}

.ad-slot--header {
	min-height: 90px;
}

.ad-slot--sidebar {
	min-height: 250px;
}

.ad-slot--fallback {
	position: relative;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)),
		var(--theme-accent-bg);
	border-style: dashed;
}

.ad-slot--fallback::before {
	content: "";
	position: absolute;
	inset: 10px;
	border: 1px solid var(--theme-main-light);
	pointer-events: none;
}

.ad-slot--fallback span {
	position: relative;
	font-size: 0.82rem;
	font-weight: 750;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.site-navigation {
	background: var(--theme-main-dark);
}

.site-navigation__inner {
	display: flex;
	align-items: center;
	min-height: 48px;
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: 0.65rem;
	margin: 0;
	padding: 0.8rem 0;
	border: 0;
	background: transparent;
	color: var(--color-white);
	font-weight: 750;
	cursor: pointer;
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 99px;
	content: "";
}

.menu-toggle__icon {
	position: relative;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
	position: absolute;
	left: 0;
}

.menu-toggle__icon::before {
	top: -7px;
}

.menu-toggle__icon::after {
	top: 7px;
}

.menu-wrap {
	width: 100%;
}

.primary-menu,
.primary-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.primary-menu li {
	position: relative;
}

.primary-menu a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0.72rem 0.92rem;
	color: var(--color-white);
	font-size: 0.94rem;
	font-weight: 750;
	line-height: 1.2;
	text-decoration: none;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
	background: var(--theme-main);
	color: var(--color-white);
}

.primary-menu .sub-menu {
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 0;
	display: none;
	width: 230px;
	background: var(--color-white);
	box-shadow: var(--shadow-soft);
}

.primary-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
	display: block;
}

.primary-menu .sub-menu a {
	min-height: 0;
	padding: 0.76rem 0.9rem;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-text);
	font-weight: 650;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu a:focus {
	background: var(--theme-main-light);
	color: var(--theme-main-dark);
}

.site-main {
	padding: 2rem 0 2.5rem;
}

.site-main--front {
	padding-top: 1.4rem;
}

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 1.7rem;
	align-items: start;
}

.content-column,
.site-sidebar,
.single-article,
.empty-state,
.archive-header {
	min-width: 0;
}

.magazine-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
	gap: 1.2rem;
	margin-bottom: 1.7rem;
}

.magazine-hero--count-1 {
	grid-template-columns: 1fr;
}

.magazine-hero__side {
	display: grid;
	gap: 1.2rem;
}

.post-card {
	overflow: hidden;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.post-card__media {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--theme-main-light);
	text-decoration: none;
}

.post-card__media img,
.fallback-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fallback-thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
		linear-gradient(120deg, var(--theme-main-dark), var(--theme-main));
	color: var(--color-white);
}

.fallback-thumb::before {
	content: "";
	position: absolute;
	inset: 14px;
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.fallback-thumb span {
	position: relative;
	padding: 0.45rem 0.7rem;
	background: rgba(0, 0, 0, 0.16);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.post-card__content {
	padding: 1rem;
}

.post-card__category {
	display: inline-flex;
	margin-bottom: 0.65rem;
	padding: 0.18rem 0.5rem;
	background: var(--theme-main-light);
	color: var(--theme-main-dark);
	font-size: 0.72rem;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.post-card__category:hover,
.post-card__category:focus {
	background: var(--theme-main);
	color: var(--color-white);
	text-decoration: none;
}

.post-card__title {
	margin-bottom: 0.5rem;
	font-size: 1.22rem;
}

.post-card__title a {
	color: var(--color-text);
	text-decoration: none;
}

.post-card__title a:hover,
.post-card__title a:focus {
	color: var(--theme-main);
}

.entry-meta {
	color: var(--color-muted);
	font-size: 0.84rem;
	font-weight: 600;
}

.post-card__excerpt {
	margin-top: 0.8rem;
	color: #3e4852;
}

.post-card__excerpt p {
	margin-bottom: 0;
}

.post-card--hero {
	height: 100%;
}

.post-card--hero .post-card__media {
	aspect-ratio: 16 / 9;
}

.post-card--hero .post-card__content {
	padding: 1.15rem 1.2rem 1.25rem;
}

.post-card--hero .post-card__title {
	font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.post-card--compact {
	display: grid;
	grid-template-columns: 42% minmax(0, 1fr);
	min-height: 0;
}

.post-card--compact .post-card__media {
	aspect-ratio: auto;
	min-height: 178px;
}

.post-card--compact .post-card__content {
	padding: 0.9rem;
}

.post-card--compact .post-card__title {
	font-size: 1.03rem;
}

.post-card--compact .entry-meta {
	font-size: 0.78rem;
}

.front-content {
	margin-top: 0;
}

.content-section {
	margin-bottom: 2rem;
}

.section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.9rem;
	border-bottom: 2px solid var(--color-border);
}

.section-heading h2 {
	position: relative;
	margin: 0;
	padding-bottom: 0.55rem;
	font-size: 1.35rem;
}

.section-heading h2::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--theme-main);
}

.section-heading a {
	color: var(--color-text);
	text-decoration: none;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.15rem;
}

.post-grid--compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-header {
	margin-bottom: 1.2rem;
	padding: 1.35rem;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 8px;
}

.archive-header h1 {
	margin-bottom: 0.3rem;
}

.archive-description {
	color: var(--color-muted);
}

.archive-list {
	display: grid;
	gap: 1rem;
}

.post-card--list {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
}

.post-card--list .post-card__media {
	aspect-ratio: auto;
	min-height: 190px;
}

.single-article,
.empty-state {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 8px;
}

.single-article {
	padding: clamp(1.2rem, 3vw, 2rem);
}

.single-article__header {
	margin-bottom: 1.3rem;
}

.single-article__title {
	max-width: 850px;
	font-size: clamp(2rem, 5vw, 3.15rem);
}

.single-article__media {
	margin-bottom: 1.5rem;
	overflow: hidden;
	border-radius: 8px;
	background: var(--theme-main-light);
}

.single-article__media img,
.single-article__media .fallback-thumb {
	width: 100%;
	max-height: 560px;
	object-fit: cover;
}

.single-article__media .fallback-thumb {
	aspect-ratio: 16 / 8;
}

.entry-content {
	font-size: 1.05rem;
}

.entry-content > * {
	max-width: 760px;
}

.entry-content img,
.entry-content figure,
.entry-content .wp-block-image,
.entry-content .wp-block-gallery,
.entry-content .wp-block-embed {
	max-width: 100%;
}

.entry-content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.entry-content blockquote {
	margin: 1.4rem 0;
	padding: 1rem 1.2rem;
	border-left: 4px solid var(--theme-main);
	background: var(--theme-main-light);
}

.page-links,
.post-navigation,
.comments-area,
.pagination {
	margin-top: 1.5rem;
}

.post-navigation,
.comments-area {
	padding: 1rem;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 8px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.3rem;
	min-height: 2.3rem;
	padding: 0.3rem 0.7rem;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	color: var(--color-text);
	font-weight: 700;
	text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover,
.page-numbers:focus {
	background: var(--theme-main);
	border-color: var(--theme-main);
	color: var(--color-white);
	text-decoration: none;
}

.site-sidebar {
	display: grid;
	gap: 1rem;
}

.sidebar-block {
	padding: 1rem;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 8px;
}

.sidebar-block--ad {
	padding: 0;
	border: 0;
	background: transparent;
}

.sidebar-block h2 {
	margin-bottom: 0.8rem;
	padding-bottom: 0.45rem;
	border-bottom: 2px solid var(--theme-main-light);
	font-size: 1.05rem;
}

.search-form {
	display: flex;
	gap: 0.45rem;
}

.search-field {
	min-width: 0;
	flex: 1;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	background: var(--color-white);
}

.search-submit,
.wp-block-search__button,
input[type="submit"],
button[type="submit"] {
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--theme-main);
	border-radius: 4px;
	background: var(--theme-main);
	color: var(--color-white);
	font-weight: 750;
	cursor: pointer;
}

.search-submit:hover,
.search-submit:focus,
.wp-block-search__button:hover,
.wp-block-search__button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
button[type="submit"]:hover,
button[type="submit"]:focus {
	background: var(--theme-main-dark);
	border-color: var(--theme-main-dark);
}

.sidebar-post-list,
.footer-post-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sidebar-post-list {
	display: grid;
	gap: 0.75rem;
}

.sidebar-post-list li {
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--color-border);
}

.sidebar-post-list li:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.sidebar-post-list a,
.footer-post-list a {
	color: var(--color-text);
	font-weight: 750;
	text-decoration: none;
}

.sidebar-post-list a:hover,
.sidebar-post-list a:focus,
.footer-post-list a:hover,
.footer-post-list a:focus {
	color: var(--theme-main);
}

.sidebar-post-list span {
	display: block;
	margin-top: 0.15rem;
	color: var(--color-muted);
	font-size: 0.8rem;
}

.empty-state {
	padding: 2rem;
}

.empty-state--front {
	margin-bottom: 1.5rem;
}

.site-footer {
	background: #111820;
	color: #d8e1e8;
}

.site-footer a {
	color: #ffffff;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) minmax(160px, 0.5fr);
	gap: 1.5rem;
	padding: 2rem 0;
}

.site-footer .text-logo__name {
	color: #ffffff;
	font-size: 1.65rem;
}

.site-footer .text-logo__tagline,
.site-footer__tagline,
.site-footer__disclaimer {
	color: #b8c5cf;
}

.site-footer .custom-logo-link img {
	max-height: 62px;
}

.site-footer h2 {
	font-size: 1rem;
	color: #ffffff;
}

.footer-post-list {
	display: grid;
	gap: 0.55rem;
}

.footer-contact-link {
	display: inline-flex;
	padding: 0.5rem 0.75rem;
	background: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

.footer-contact-link:hover,
.footer-contact-link:focus {
	background: var(--theme-main);
	text-decoration: none;
}

.site-footer__bottom {
	padding: 1rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #b8c5cf;
	font-size: 0.9rem;
}

.site-footer__bottom p {
	margin: 0;
}

@media (max-width: 980px) {
	.site-header__inner,
	.layout-with-sidebar,
	.magazine-hero,
	.site-footer__inner {
		grid-template-columns: 1fr;
	}

	.site-header__ad {
		max-width: 728px;
	}

	.site-sidebar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sidebar-block--ad {
		grid-column: span 2;
	}
}

@media (max-width: 780px) {
	.site-header__inner {
		padding: 1rem 0;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.site-navigation__inner {
		display: block;
	}

	.menu-wrap {
		display: none;
		padding-bottom: 0.6rem;
	}

	.site-navigation.is-open .menu-wrap {
		display: block;
	}

	.primary-menu {
		display: block;
		border-top: 1px solid rgba(255, 255, 255, 0.14);
	}

	.primary-menu a {
		justify-content: space-between;
		min-height: 0;
		padding: 0.85rem 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	}

	.primary-menu .sub-menu,
	.primary-menu .sub-menu .sub-menu {
		position: static;
		display: block;
		width: auto;
		padding-left: 1rem;
		background: rgba(0, 0, 0, 0.12);
		box-shadow: none;
	}

	.primary-menu .sub-menu a {
		border-color: rgba(255, 255, 255, 0.12);
		color: var(--color-white);
	}

	.primary-menu .sub-menu a:hover,
	.primary-menu .sub-menu a:focus {
		background: rgba(255, 255, 255, 0.08);
		color: var(--color-white);
	}

	.post-grid,
	.post-grid--compact,
	.site-sidebar {
		grid-template-columns: 1fr;
	}

	.sidebar-block--ad {
		grid-column: auto;
	}

	.post-card--list,
	.post-card--compact {
		grid-template-columns: 1fr;
	}

	.post-card--list .post-card__media,
	.post-card--compact .post-card__media {
		aspect-ratio: 16 / 10;
		min-height: 0;
	}
}

@media (max-width: 520px) {
	.content-wrap,
	.site-header__inner,
	.site-navigation__inner,
	.site-footer__inner,
	.site-footer__bottom {
		width: min(calc(100% - 24px), var(--wrap));
	}

	.site-main {
		padding-top: 1rem;
	}

	.post-card__content,
	.post-card--hero .post-card__content,
	.single-article,
	.empty-state,
	.archive-header {
		padding: 1rem;
	}

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

	.search-submit {
		width: 100%;
	}
}
