/*
 * Additive contemporary layer for the legacy MagazineBook theme.
 * This file intentionally modernizes presentation without replacing
 * the original stylesheet architecture.
 */

:root {
	--mb-surface: #ffffff;
	--mb-surface-soft: #f6f8fb;
	--mb-surface-strong: #eef3f8;
	--mb-border-soft: rgba(15, 23, 42, 0.12);
	--mb-border-strong: rgba(15, 23, 42, 0.18);
	--mb-text: #13212b;
	--mb-text-soft: #52606d;
	--mb-accent: #0d6e97;
	--mb-accent-strong: #0b5574;
	--mb-focus-ring: 0 0 0 3px rgba(13, 110, 151, 0.22);
	--mb-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.07);
	--mb-radius-sm: 10px;
	--mb-radius-md: 16px;
	--mb-radius-lg: 22px;
}

html {
	scroll-behavior: smooth;
}

body {
	color: var(--mb-text);
	text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
optgroup,
textarea {
	font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

.mb-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	vertical-align: -0.12em;
	fill: currentColor;
}

.menu-toggle .mb-icon,
.search-icon .mb-icon {
	width: 1.1em;
	height: 1.1em;
	vertical-align: middle;
}

.mb-social-links a .mb-icon,
.posted-on .mb-icon,
.byline .mb-icon,
.comments-link .mb-icon {
	margin-right: 0.38rem;
}

.theme-stretched-link {
	position: static;
}

.theme-stretched-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.theme-overlay-link {
	pointer-events: none;
	display: block;
}

.theme-banner-slider .splide__slide,
.banner-featured-post,
.mb-featured-article .mb-article-block {
	position: relative;
}

.mb-article-block-content,
.theme-banner-content .cat-links a,
.theme-banner-content .theme-banner-meta a,
.theme-banner-content .theme-banner-title a,
.mb-article-block-content .cat-links a,
.mb-article-block-content .entry-meta a,
.mb-article-block-content .entry-title a {
	position: relative;
	z-index: 2;
}

.theme-banner-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
}

.front-page-banner-section .theme-banner-content a,
.front-page-banner-section .theme-banner-title a,
.front-page-banner-section .theme-banner-meta a,
.front-page-banner-section .cat-links a {
	text-decoration: none;
}

.front-page-banner-section .theme-banner-content a:hover,
.front-page-banner-section .theme-banner-content a:focus {
	text-decoration: none;
}

.theme-banner-slider .splide__pagination {
	bottom: 0.9rem;
	gap: 0.15rem;
}

.theme-banner-slider .splide__pagination__page {
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0;
	border: 0;
	background: transparent;
	opacity: 1;
}

.theme-banner-slider .splide__pagination__page::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 0 0 1px rgba(19, 33, 43, 0.18);
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-banner-slider .splide__pagination__page.is-active::after {
	background: #ffffff;
	box-shadow: 0 0 0 2px rgba(13, 110, 151, 0.28);
	transform: translate(-50%, -50%) scale(1.32);
}

.theme-banner-slider .splide__pagination__page:hover::after,
.theme-banner-slider .splide__pagination__page:focus-visible::after {
	background: #ffffff;
	box-shadow: 0 0 0 2px rgba(13, 110, 151, 0.22);
}

a {
	text-underline-offset: 0.15em;
	text-decoration-thickness: 0.08em;
}

a:hover,
a:focus {
	text-decoration-thickness: 0.12em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.menu-toggle:focus-visible {
	outline: 0;
	box-shadow: var(--mb-focus-ring);
	border-radius: var(--mb-radius-sm);
}

img {
	height: auto;
}

figure {
	margin: 0;
}

.site-content,
.site-main,
.widget,
.entry-content,
.entry-summary {
	overflow-wrap: anywhere;
}

.entry-content > *:where(:not(.alignfull)),
.entry-summary > *:where(:not(.alignfull)),
.page-content > *:where(:not(.alignfull)) {
	max-width: 100%;
}

.entry-content p,
.entry-summary p,
.page-content p,
.widget p {
	line-height: 1.72;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.page-content h2,
.page-content h3,
.page-content h4 {
	line-height: 1.22;
	letter-spacing: -0.015em;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
	min-height: 46px;
	padding: 0.72rem 0.9rem;
	border: 1px solid var(--mb-border-soft);
	border-radius: var(--mb-radius-sm);
	background: var(--mb-surface);
	color: var(--mb-text);
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

textarea {
	min-height: 140px;
	resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
	border-color: var(--mb-border-strong);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--mb-accent);
	box-shadow: var(--mb-focus-ring);
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.wp-block-button__link {
	min-height: 46px;
	padding: 0.78rem 1.15rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--mb-accent) 0%, var(--mb-accent-strong) 100%);
	color: #ffffff;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: var(--mb-shadow-soft);
	filter: saturate(1.05);
}

.main-navigation a,
.menu-toggle,
.widget,
.archive-card,
.banner-featured-post,
.theme-banner-slider,
input,
textarea,
select,
button {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.widget,
.comment-body,
.post-navigation,
.posts-navigation,
.page-links {
	border-radius: var(--mb-radius-md);
}

.widget {
	border: 1px solid rgba(15, 23, 42, 0.06);
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	overflow: hidden;
	border-radius: var(--mb-radius-sm);
}

table th,
table td {
	padding: 0.85rem 0.9rem;
	border: 1px solid rgba(15, 23, 42, 0.08);
}

table th {
	background: var(--mb-surface-strong);
	font-weight: 600;
}

blockquote,
.wp-block-quote,
.wp-block-pullquote {
	margin: 1.6rem 0;
	padding: 1.2rem 1.3rem;
	border-left: 4px solid var(--mb-accent);
	border-radius: 0 var(--mb-radius-md) var(--mb-radius-md) 0;
	background: var(--mb-surface-soft);
}

pre,
code,
kbd,
samp {
	border-radius: 8px;
}

pre {
	padding: 1rem 1.1rem;
	background: #111827;
	color: #f8fafc;
	overflow-x: auto;
}

code,
kbd,
samp {
	padding: 0.15em 0.4em;
	background: rgba(15, 23, 42, 0.06);
	color: #102738;
}

.wp-block-image img,
.wp-block-cover,
.wp-block-gallery,
.post-thumbnail img {
	border-radius: var(--mb-radius-md);
}

.wp-block-group,
.wp-block-columns,
.wp-block-media-text,
.wp-block-cover,
.wp-block-query,
.wp-block-latest-posts,
.wp-block-table {
	margin-top: 1.4rem;
	margin-bottom: 1.4rem;
}

.screen-reader-text:focus {
	border-radius: 8px;
	box-shadow: var(--mb-focus-ring);
}

@media (max-width: 991.98px) {
	.archive-card,
	.banner-featured-post,
	.theme-banner-slider,
	.widget {
		border-radius: 14px;
	}
}

@media (max-width: 767.98px) {
	.site-branding {
		padding-top: 0.85rem;
	}

	.main-header-nav-bar .main-navigation a {
		padding-top: 0.6rem;
		padding-bottom: 0.6rem;
	}

	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="number"],
	input[type="tel"],
	input[type="date"],
	textarea,
	select,
	button,
	input[type="button"],
	input[type="reset"],
	input[type="submit"],
	.button,
	.wp-block-button__link {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
