/*
 * Theme styles.
 * Only functional rules and styles for markup that has no equivalent in the
 * compiled design stylesheet (WordPress menus, pagination, editor content).
 */

[hidden] {
	display: none !important;
}

/* ---- Overflow protection for editable text --------------------------- */
.container-x {
	overflow-wrap: break-word;
}
.container-x :where(p, h1, h2, h3, h4, h5, h6, li, a, button, span, div) {
	overflow-wrap: break-word;
}
.container-x :where(.grid, .flex) > * {
	min-width: 0;
}
.container-x :where(a, button) {
	max-width: 100%;
}
/* Highlighted title part: stays on one line while it fits, then wraps. */
.theme-accent {
	display: inline-block;
	max-width: 100%;
	white-space: normal;
	overflow-wrap: anywhere;
}

/* ---- Fixed header offsets ------------------------------------------- */
body.admin-bar .site-header {
	top: 32px;
}
@media screen and (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}

/* ---- Logo ------------------------------------------------------------ */
.site-logo-img {
	height: var(--logo-height, 56px) !important;
	width: auto !important;
	display: block;
}
.site-logo-text {
	line-height: var(--logo-height, 56px);
	display: block;
	font-family: var(--font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-on-dark);
}
.site-brand-text {
	margin-left: 0.75rem;
	font-family: var(--font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-on-dark);
}

/* ---- WordPress menu markup ------------------------------------------ */
.theme-nav-link {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-on-dark-muted);
	transition: color 0.15s ease;
}
.theme-nav-link:hover,
.theme-nav-link:focus {
	color: var(--color-on-dark);
}

.theme-mobile-list li {
	border-bottom: 1px solid var(--color-on-dark-border-soft);
}
.theme-mobile-list li:last-child {
	border-bottom: 0;
}
.theme-mobile-list .theme-nav-link {
	display: block;
	padding: 0.75rem 0;
	text-align: left;
	font-size: 15px;
	font-weight: 500;
	color: var(--color-on-dark);
}

.theme-footer-link {
	font-size: 0.875rem;
	color: var(--color-on-dark-muted);
	transition: color 0.15s ease;
}
.theme-footer-link:hover,
.theme-footer-link:focus {
	color: var(--color-on-dark-accent);
}

/* ---- Inner page offset under the fixed header ----------------------- */
.theme-page-main {
	padding-top: 5rem;
}
@media (min-width: 768px) {
	.theme-page-main {
		padding-top: 6rem;
	}
}

/* ---- Editor content (pages and posts) ------------------------------- */
.entry-content {
	color: var(--color-charcoal);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.625;
}
.entry-content > * + * {
	margin-top: 1rem;
}
.entry-content h2 {
	font-family: var(--font-heading);
	font-size: 1.875rem;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--color-navy);
}
.entry-content h3 {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--color-navy);
}
.entry-content h4 {
	font-family: var(--font-heading);
	font-size: 1.25rem;
	line-height: 1.4;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--color-navy);
}
.entry-content a {
	color: var(--color-emerald);
	text-decoration: underline;
}
.entry-content ul,
.entry-content ol {
	padding-left: 1.25rem;
}
.entry-content ul {
	list-style: disc;
}
.entry-content ol {
	list-style: decimal;
}
.entry-content li + li {
	margin-top: 0.35rem;
}
.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 5px;
}
.entry-content blockquote {
	border-left: 3px solid var(--color-section-rule);
	padding-left: 1rem;
	color: var(--color-muted-text);
}
.entry-content table {
	width: 100%;
	border-collapse: collapse;
}
.entry-content th,
.entry-content td {
	border: 1px solid var(--color-soft-border);
	padding: 0.5rem 0.75rem;
	text-align: left;
}

/* ---- Pagination ----------------------------------------------------- */
.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 3rem;
}
.pagination .page-numbers {
	padding: 0.5rem 0.9rem;
	border: 2px solid var(--color-soft-border);
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-navy);
	transition: background-color 0.15s ease;
}
.pagination .page-numbers:hover {
	background-color: var(--color-offwhite);
}
.pagination .page-numbers.current {
	background-color: var(--color-navy);
	border-color: var(--color-navy);
	color: var(--color-on-dark);
}

/* ---- Reveal animations (mirrors the design motion) ------------------ */
.reveal,
.stagger-item {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}
.reveal.is-visible,
.stagger-item.is-visible {
	opacity: 1;
	transform: none;
}
body.is-customizer .reveal,
body.is-customizer .stagger-item {
	opacity: 1;
	transform: none;
	transition: none;
}

/* ---- Async form state ----------------------------------------------- */
.theme-btn-loading {
	opacity: 0.6;
	pointer-events: none;
	cursor: wait;
}

/* ---- Accessibility helpers ------------------------------------------ */
.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;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: var(--color-surface);
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: var(--color-charcoal);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}
