/* Layocraft base styles. Design tokens are overridden by Layocraft Builder. */
:root {
	--lc-primary: #10263b;
	--lc-secondary: #e0a526;
	--lc-text: #1f2933;
	--lc-muted: #5b6470;
	--lc-bg: #ffffff;
	--lc-surface: #f7f5f0;
	--lc-border: #e3e1dc;
	--lc-on-primary: #ffffff;
	--lc-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--lc-font-heading: var(--lc-font-body);
	--lc-container: 1200px;
	--lc-narrow: 760px;
	--lc-radius: 8px;
	--lc-gap: clamp(16px, 3vw, 32px);
}

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

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

body {
	margin: 0;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: var(--lc-bg);
	color: var(--lc-text);
	font-family: var(--lc-font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--lc-font-heading);
	color: var(--lc-primary);
	line-height: 1.2;
	margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }
a { color: var(--lc-primary); text-underline-offset: 3px; }
a:hover { color: var(--lc-secondary); }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0 0 1.5em; }

:focus-visible { outline: 3px solid var(--lc-secondary); outline-offset: 2px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
.lc-skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000;
	left: 8px; top: 8px; padding: 12px 16px; background: #fff; color: var(--lc-primary);
}

.lc-main { flex: 1 0 auto; }
.lc-container { width: 100%; max-width: var(--lc-container); margin-inline: auto; padding-inline: var(--lc-gap); }
.lc-container--narrow { max-width: var(--lc-narrow); }
.lc-container--full { max-width: none; padding-inline: 0; }
.lc-section { padding-block: clamp(32px, 6vw, 72px); }

.lc-page-header { padding-top: clamp(32px, 5vw, 56px); margin-bottom: 24px; }
.lc-page-title { margin-bottom: 0.3em; }
.lc-post-meta { color: var(--lc-muted); font-size: 0.9rem; margin: 0 0 0.5em; }
.lc-entry-content { padding-bottom: clamp(32px, 6vw, 72px); }
.lc-entry-content > *:last-child { margin-bottom: 0; }
.lc-featured img { border-radius: var(--lc-radius); width: 100%; }

.lc-btn, .wp-element-button, button[type="submit"], input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 22px; border: 0; border-radius: var(--lc-radius);
	background: var(--lc-primary); color: var(--lc-on-primary); font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer; transition: background .2s ease;
}
.lc-btn:hover, button[type="submit"]:hover, input[type="submit"]:hover { background: var(--lc-secondary); color: var(--lc-primary); }

input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="password"], textarea, select {
	width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: inherit;
	border: 1px solid var(--lc-border); border-radius: var(--lc-radius); background: #fff;
}
.search-form { display: flex; gap: 8px; margin-bottom: 1.5em; }
.search-form label { flex: 1; }

/* Post listing */
.lc-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--lc-gap); }
.lc-card { display: flex; flex-direction: column; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); overflow: hidden; background: #fff; }
.lc-card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lc-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.lc-card-title { font-size: 1.25rem; }
.lc-card-title a { text-decoration: none; }
.lc-card-excerpt { color: var(--lc-muted); flex: 1; }
.lc-card-more { font-weight: 600; }

.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--lc-border); border-radius: var(--lc-radius); text-decoration: none; }
.page-numbers.current { background: var(--lc-primary); border-color: var(--lc-primary); color: var(--lc-on-primary); }

.post-navigation .nav-links { justify-content: space-between; margin-top: 32px; }
.post-navigation a { text-decoration: none; display: flex; flex-direction: column; }
.lc-nav-label { font-size: 0.85rem; color: var(--lc-muted); }

.lc-404 { text-align: center; }
.lc-404-code { font-size: clamp(4rem, 14vw, 9rem); font-weight: 800; line-height: 1; color: var(--lc-secondary); margin: 0 0 12px; }
.lc-404 .search-form { max-width: 480px; margin-inline: auto; }

.lc-comments { margin-bottom: 64px; }
.lc-comment-list { padding-left: 0; list-style: none; }
.lc-comment-list .children { list-style: none; }

/* Fallback header and footer (shown only when Layocraft Builder is inactive) */
.lc-fallback-header { border-bottom: 1px solid var(--lc-border); background: #fff; }
.lc-fallback-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.lc-fallback-brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.lc-fallback-logo { max-height: 48px; width: auto; }
.lc-fallback-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.lc-fallback-nav a { text-decoration: none; font-weight: 500; }
.lc-fallback-nav .sub-menu { display: none; }
.lc-fallback-toggle { display: none; background: none; border: 0; min-width: 44px; min-height: 44px; cursor: pointer; }
.lc-fallback-bars, .lc-fallback-bars::before, .lc-fallback-bars::after { display: block; width: 24px; height: 2px; background: var(--lc-primary); position: relative; content: ""; }
.lc-fallback-bars::before { position: absolute; top: -7px; }
.lc-fallback-bars::after { position: absolute; top: 7px; }
.lc-fallback-footer { border-top: 1px solid var(--lc-border); padding-block: 24px; color: var(--lc-muted); font-size: 0.9rem; }
.lc-fallback-footer p { margin: 0; }

@media (max-width: 782px) {
	.lc-fallback-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.lc-fallback-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; border-bottom: 1px solid var(--lc-border); padding: 16px var(--lc-gap); z-index: 50; }
	.lc-fallback-nav.is-open { display: block; }
	.lc-fallback-nav ul { flex-direction: column; gap: 12px; }
	.lc-fallback-header { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
