/**
 * Sidnik — base styles.
 *
 * Elementor Site Settings (Global Colors / Global Fonts) drive the look.
 * This file is a light reset plus styling for pages not built with Elementor
 * (blog, archives, search, 404), which pick up the same Elementor globals.
 */

/* Tokens — declared on body because Elementor's global variables live on body.elementor-kit-*. */
body {
	--sidnik-container: 1200px;
	--sidnik-gutter: 20px;
	--sidnik-color-heading: var(--e-global-color-primary, #0c2f51);
	--sidnik-color-text: var(--e-global-color-text, #4a5568);
	--sidnik-color-accent: var(--e-global-color-accent, #b8732f);
	--sidnik-color-border: rgba(0, 0, 0, 0.1);
	--sidnik-font-heading: var(--e-global-typography-primary-font-family, system-ui), -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--sidnik-font-body: var(--e-global-typography-text-font-family, system-ui), -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */

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

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

body {
	margin: 0;
	font-family: var(--sidnik-font-body);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.6;
	color: var(--sidnik-color-text);
	background-color: #fff;
	font-variant-numeric: lining-nums; /* Playfair Display defaults to old-style figures; the design uses lining ones. */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	font-family: var(--sidnik-font-heading);
	font-weight: 600;
	line-height: 1.2;
	color: var(--sidnik-color-heading);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
	margin: 0 0 1em;
}

a {
	color: var(--sidnik-color-accent);
	text-decoration: none;
	transition: color 0.2s ease;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

img {
	border: 0;
}

figure {
	margin: 0;
}

hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--sidnik-color-border);
}

blockquote {
	margin: 1.5em 0;
	padding: 0.25em 0 0.25em 1.25em;
	border-left: 3px solid var(--sidnik-color-accent);
	font-style: italic;
}

code,
kbd,
pre,
samp {
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
}

pre {
	overflow: auto;
	padding: 1em;
	background: #f5f5f5;
	border-radius: 6px;
}

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

th,
td {
	padding: 0.6em 0.8em;
	border: 1px solid var(--sidnik-color-border);
	text-align: left;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 0.65em 0.9em;
	font: inherit;
	color: inherit;
	background-color: #fff;
	border: 1px solid var(--sidnik-color-border);
	border-radius: 6px;
}

textarea {
	min-height: 140px;
}

/* ---------- Layout ---------- */

.sidnik-container {
	width: 100%;
	max-width: var(--sidnik-container);
	margin-inline: auto;
	padding-inline: var(--sidnik-gutter);
}

.sidnik-container--narrow {
	--sidnik-container: 800px;
}

.site-main:not(.site-main--elementor) {
	padding-block: 3rem;
}

/* ---------- Buttons (theme-rendered only; Elementor buttons are styled in Elementor) ---------- */

.sidnik-button,
.search-submit,
.comment-form input[type="submit"] {
	display: inline-block;
	padding: 0.8em 1.6em;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background-color: var(--sidnik-color-accent);
	border: 0;
	border-radius: 50px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.sidnik-button:hover,
.search-submit:hover,
.comment-form input[type="submit"]:hover {
	color: #fff;
	opacity: 0.9;
}

/* ---------- Fallback header & footer (until Elementor templates are selected) ---------- */

.site-header {
	border-bottom: 1px solid var(--sidnik-color-border);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	min-height: 80px;
	padding-block: 0.75rem;
}

.site-title {
	font-family: var(--sidnik-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--sidnik-color-heading);
}

.custom-logo {
	width: auto;
	max-height: 64px;
}

.site-header .menu,
.site-footer .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-navigation a,
.site-footer .menu a {
	color: var(--sidnik-color-heading);
	font-weight: 500;
}

.site-navigation a:hover,
.site-navigation .current-menu-item > a,
.site-footer .menu a:hover {
	color: var(--sidnik-color-accent);
}

.site-footer {
	padding-block: 1.5rem;
	font-size: 0.875rem;
	border-top: 1px solid var(--sidnik-color-border);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.site-footer__copy {
	margin: 0;
}

/* ---------- Blog, archives, search ---------- */

.page-header {
	margin-bottom: 2.5rem;
}

.page-title,
.entry-title {
	margin: 0;
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
}

.entry-header {
	margin-bottom: 2rem;
}

.entry-meta {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	opacity: 0.75;
}

.entry-thumbnail {
	margin-bottom: 2rem;
}

.entry-thumbnail img {
	width: 100%;
	border-radius: 10px;
}

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

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1em;
	padding-left: 1.5em;
}

.post-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2.5rem 2rem;
}

.post-card__thumb img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 10px;
}

.post-card__title {
	margin: 1rem 0 0;
	font-size: 1.25rem;
}

.post-card__title a {
	color: inherit;
}

.post-card__title a:hover {
	color: var(--sidnik-color-accent);
}

.post-card__excerpt p {
	margin: 0.75rem 0 0;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 3rem;
}

.page-numbers {
	padding: 0.4em 0.85em;
	border: 1px solid var(--sidnik-color-border);
	border-radius: 6px;
}

.page-numbers.current {
	color: #fff;
	background-color: var(--sidnik-color-accent);
	border-color: var(--sidnik-color-accent);
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 480px;
}

.search-form label {
	flex: 1;
}

.site-main--404 {
	padding-block: 6rem;
	text-align: center;
}

/* ---------- Comments ---------- */

.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--sidnik-color-border);
}

.comment-list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	padding-left: 1.5rem;
	list-style: none;
}

.comment-body {
	padding-block: 1rem;
	border-bottom: 1px solid var(--sidnik-color-border);
}

.comment-body .avatar {
	margin-right: 0.75rem;
	border-radius: 50%;
}

/* ---------- WordPress core classes ---------- */

.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption-text,
figcaption {
	margin-top: 0.5em;
	font-size: 0.875rem;
	opacity: 0.75;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip: auto;
	clip-path: none;
	color: #111;
	background-color: #fff;
	box-shadow: 0 0 0 2px var(--sidnik-color-accent);
}

/* ---------- Elementor ---------- */

/* No stray gap under the last paragraph of a Text Editor widget. */
.elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

/*
 * Utility classes for a widget's Advanced → CSS Classes field.
 * sidnik-balance         Evens out line lengths so no word is left alone on the last line.
 * sidnik-hide-br-mobile  Manual line breaks (<br>) apply from tablet up; on phones the text
 *                        wraps naturally. Keep a space before each <br> so words don't join.
 */
.sidnik-balance,
.sidnik-balance :is(p, h1, h2, h3, h4, h5, h6, .elementor-heading-title) {
	text-wrap: balance;
}

@media (max-width: 767px) {
	.sidnik-hide-br-mobile br {
		display: none;
	}
}
