/*
 * theme.css — minimal WordPress integration layer.
 *
 * The original stylesheet (assets/css/style.css) is untouched. This file only
 * adds what WordPress requires on top of it: menus, entry
 * content, breadcrumbs, forms and accessibility helpers. Nothing here changes
 * the approved design.
 */

/* ---------------------------------------------------------------- ----------
   1. Accessibility
   -------------------------------------------------------------------------- */

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	display: block;
	background: #356a8d;
	color: #fff;
	padding: 12px 20px;
	font-size: 14px;
	letter-spacing: .4px;
	text-decoration: none;
}

.skip-link:focus {
	left: 0;
	outline: 3px solid #3c779e;
	outline-offset: 2px;
}

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

.screen-reader-text:focus {
	background: #f5faff;
	clip-path: none;
	color: #25465e;
	display: block;
	font-size: 14px;
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 12px 18px;
	top: 5px;
	width: auto;
	z-index: 100001;
}

/* ---------------------------------------------------------------- ----------
   2. Header, primary menu and mobile toggle
   -------------------------------------------------------------------------- */

header {
	position: relative;
}

nav ul.pos-primary-menu {
	display: flex;
	align-items: center;
	gap: 36px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
}

nav ul.pos-primary-menu li {
	position: relative;
	list-style: none;
}

nav ul.pos-primary-menu a {
	display: inline-block;
	padding: 6px 0;
	white-space: nowrap;
}

nav ul.pos-primary-menu li li a {
	white-space: normal;
}

nav ul.pos-primary-menu .current-menu-item > a,
nav ul.pos-primary-menu .current_page_item > a,
nav ul.pos-primary-menu .current-menu-ancestor > a {
	color: #356a8d;
}

nav ul.pos-primary-menu ul.sub-menu {
	position: absolute;
	top: calc(100% + 12px);
	left: -16px;
	z-index: 60;
	display: none;
	flex-direction: column;
	gap: 0;
	min-width: 210px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: var(--paper, #f5faff);
	border: 1px solid var(--line, #d3e4ef);
	box-shadow: 0 16px 34px rgba(37, 70, 94, .12);
}

nav ul.pos-primary-menu li:hover > ul.sub-menu,
nav ul.pos-primary-menu li:focus-within > ul.sub-menu {
	display: flex;
}

nav ul.pos-primary-menu ul.sub-menu a {
	display: block;
	padding: 9px 18px;
	font-size: 13px;
}

nav ul.pos-primary-menu ul.sub-menu li:last-child a {
	padding-bottom: 11px;
}

/* The original stylesheet's bare "nav a" rules were written for the four
   static anchors: at ≤600px it hides every nav link except the second, and
   between 601–760px "header nav a:first-child, a:last-child" matched every
   WordPress menu link (each <a> is the first child of its <li>), which hid
   the whole menu. Re-enable menu links here (theme.css loads after the
   original sheet; higher specificity wins) and re-apply the original
   first/last hiding only to real menu items of a full-length menu. */
nav ul.pos-primary-menu li a {
	display: inline-block;
}

@media (min-width: 601px) and (max-width: 760px) {
	nav ul.pos-primary-menu li a {
		display: inline-block;
	}

	header nav ul.pos-primary-menu.has-four-plus > li:first-child > a,
	header nav ul.pos-primary-menu.has-four-plus > li:last-child > a {
		display: none;
	}
}

/* Mobile toggle — hidden on the widths the original design covers. */
.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 1px solid var(--line, #d3e4ef);
	border-radius: 0;
	cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--ink, #25465e);
	transition: transform .2s ease;
}

.nav-toggle-bar {
	position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle-bar::before {
	top: -6px;
}

.nav-toggle-bar::after {
	top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
	top: 0;
	transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
	top: 0;
	transform: rotate(-45deg);
}

@media (max-width: 600px) {
	.nav-toggle {
		display: inline-flex;
	}

	nav ul.pos-primary-menu {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 70;
		display: none;
		flex-direction: column;
		gap: 0;
		max-height: 70vh;
		overflow-y: auto;
		padding: 4px 6% 14px;
		background: var(--paper, #f5faff);
		border-top: 1px solid var(--line, #d3e4ef);
		border-bottom: 1px solid var(--line, #d3e4ef);
		box-shadow: 0 18px 30px rgba(37, 70, 94, .10);
	}

	nav.menu-open ul.pos-primary-menu {
		display: flex;
	}

	nav ul.pos-primary-menu li a {
		display: block;
		padding: 13px 0;
		font-size: 14px;
		border-bottom: 1px solid var(--line, #d3e4ef);
	}

	nav ul.pos-primary-menu li:last-child > a {
		border-bottom: 0;
	}

	nav ul.pos-primary-menu ul.sub-menu {
		position: static;
		display: flex;
		min-width: 0;
		padding: 0 0 6px 16px;
		border: 0;
		box-shadow: none;
		background: transparent;
	}

	nav ul.pos-primary-menu ul.sub-menu a {
		padding: 8px 0;
		border-bottom: 0;
	}
}

/* ---------------------------------------------------------------- ----------
   3. Footer menu and e-mail address
   -------------------------------------------------------------------------- */

footer .footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
}

footer .footer-nav a:hover {
	color: #3d6f93;
}

.footer-email {
	display: inline-block;
	margin-left: 8px;
	color: #356a8d;
	border-bottom: 1px solid transparent;
}

.footer-email:hover,
.footer-email:focus {
	border-bottom-color: #356a8d;
	color: #285574;
}

/* ---------------------------------------------------------------- ----------
   4. Layout shell for inner pages
   -------------------------------------------------------------------------- */

.site-main {
	display: block;
}

.pos-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

.pos-main-col {
	min-width: 0;
}

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

.page-header .eyebrow {
	margin-bottom: 14px;
}

.page-title,
.entry-title {
	margin: 0 0 18px;
	font-family: 'Italiana', Georgia, serif;
	font-size: clamp(40px, 4.2vw, 62px);
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -.7px;
	color: var(--ink, #25465e);
	overflow-wrap: break-word;
}

.archive-description {
	max-width: 780px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--muted, #5c7588);
}

.section-title {
	margin: 0 0 26px;
	font-family: 'Italiana', Georgia, serif;
	font-size: clamp(30px, 3vw, 40px);
	font-weight: 400;
	line-height: 1.2;
	color: var(--ink, #25465e);
}

.pos-front-content {
	border-top: 1px solid var(--line, #d3e4ef);
}

/* ---------------------------------------------------------------- ----------
   5. Entry (single post and page content)
   -------------------------------------------------------------------------- */

.pos-breadcrumbs {
	margin: 0 0 22px;
	font-size: 12px;
	letter-spacing: .4px;
	color: var(--muted, #5c7588);
}

.pos-breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pos-breadcrumb-item a {
	color: #356a8d;
	border-bottom: 1px solid transparent;
}

.pos-breadcrumb-item a:hover,
.pos-breadcrumb-item a:focus {
	border-bottom-color: #356a8d;
}

.pos-breadcrumb-sep {
	margin-left: 6px;
	color: #7fa9c2;
}

.pos-breadcrumb-item.is-current {
	color: var(--ink, #25465e);
}

.entry-categories {
	margin: 0 0 14px;
	font-size: 11px;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: #547d99;
}

.entry-categories a {
	color: #547d99;
	border-bottom: 1px solid transparent;
}

.entry-categories a:hover,
.entry-categories a:focus {
	color: #356a8d;
	border-bottom-color: #356a8d;
}

.entry-meta {
	margin: 0 0 30px;
	font-size: 13px;
	letter-spacing: .3px;
	color: var(--muted, #5c7588);
}

.entry-meta .meta-sep {
	margin: 0 7px;
	color: #9fb9cc;
}

.post-thumbnail {
	margin: 0 0 34px;
}

.post-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--line, #d3e4ef);
}

.entry-content {
	font-size: 17px;
	line-height: 1.78;
	color: #3c5a72;
}

.entry-content > * {
	margin-top: 0;
}

.entry-content p {
	margin-bottom: 22px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin: 40px 0 16px;
	color: var(--ink, #25465e);
}

.entry-content h2 {
	font-size: clamp(30px, 3vw, 40px);
}

.entry-content h3 {
	font-size: 26px;
}

.entry-content a {
	color: #356a8d;
	border-bottom: 1px solid #a9cadd;
}

.entry-content a:hover,
.entry-content a:focus {
	color: #285574;
	border-bottom-color: #285574;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 24px;
	padding-left: 24px;
}

.entry-content li {
	margin-bottom: 8px;
}

.entry-content blockquote {
	margin: 32px 0;
	padding: 6px 0 6px 26px;
	border-left: 3px solid #b8dced;
	font-family: 'Italiana', Georgia, serif;
	font-size: clamp(24px, 2.4vw, 32px);
	line-height: 1.4;
	color: var(--ink, #25465e);
}

.entry-content img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.entry-content figure {
	margin: 0 0 26px;
}

.entry-content figcaption {
	margin-top: 8px;
	font-size: 12px;
	color: var(--muted, #5c7588);
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--line, #d3e4ef);
	margin: 40px 0;
}

.entry-content .alignleft {
	float: left;
	margin: 6px 28px 18px 0;
}

.entry-content .alignright {
	float: right;
	margin: 6px 0 18px 28px;
}

.entry-content .aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .alignwide {
	clear: both;
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .alignfull {
	clear: both;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
}

.wp-block-image {
	margin-bottom: 26px;
}

.page-links {
	clear: both;
	margin-top: 30px;
	font-size: 14px;
}

.entry-footer {
	margin-top: 34px;
	padding-top: 20px;
	border-top: 1px solid var(--line, #d3e4ef);
	font-size: 13px;
	color: var(--muted, #5c7588);
}

.entry-footer .tags-links .tags-label {
	font-size: 10px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: #5b819b;
}

.entry-footer a {
	color: #356a8d;
	border-bottom: 1px solid transparent;
}

.entry-footer a:hover,
.entry-footer a:focus {
	border-bottom-color: #356a8d;
}

/* ---------------------------------------------------------------- ----------
   6. Buttons, search form and generic form controls
   -------------------------------------------------------------------------- */

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

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="tel"],
textarea,
select {
	width: 100%;
	max-width: 100%;
	padding: 13px 15px;
	font-size: 15px;
	color: var(--ink, #25465e);
	background: #fff;
	border: 1px solid var(--line, #d3e4ef);
	border-radius: 0;
	transition: border-color .2s ease;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="search"]:hover,
textarea:hover {
	border-color: #b7d2e3;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid #3c779e;
	outline-offset: 2px;
}

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 540px;
}

.search-form .search-field {
	flex: 1 1 240px;
}

.search-form .search-submit {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 12px 24px;
	background: #356a8d;
	color: #fff;
	border: 0;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background .2s ease;
}

.search-form .search-submit:hover,
.search-form .search-submit:focus {
	background: #285574;
}

.page-header-search {
	margin-top: 24px;
}

.pos-404 .search-form {
	margin-bottom: 22px;
}

.pos-404-copy {
	max-width: 620px;
	color: var(--muted, #5c7588);
	font-size: 16px;
}

.pos-404-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin-top: 26px;
}

.no-results .search-form {
	margin-top: 22px;
}

/* ---------------------------------------------------------------- ----------
   7. Content embeds and media
   -------------------------------------------------------------------------- */

.entry-content .wp-block-embed {
	margin-bottom: 26px;
}

iframe,
embed,
object,
video {
	max-width: 100%;
}

/* ---------------------------------------------------------------- ----------
   8. Reduced motion (matches the original stylesheet)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.nav-toggle-bar,
	.nav-toggle-bar::before,
	.nav-toggle-bar::after {
		transition: none !important;
	}
}
