/* Static-site replacements for behaviour the theme did with jQuery. No JS. */

/* Mobile menu: open while the toggle (or anything inside the nav) has focus. */
nav.navigation-responsive:focus-within > ul {
	opacity: 1;
	pointer-events: all;
	visibility: visible;
}
nav.navigation-responsive > ul li ul {
	display: block;
	position: static;
	width: auto;
}

/* The search overlay needed JS; search lives in the home sidebar form instead. */
.filter-bar .filter-bar-search {
	display: none;
}

/* Ecko "full width" blocks assume a 700px column centred in the viewport and
   break out with left:calc(-50vw + 350px); width:100vw. Inside the article card
   (overflow:hidden) that crops the image. Keep them inside the content column. */
.post-body .eckosc_full_width_block {
	left: 0;
	width: 100%;
	margin: 50px 0;
}
.post-contents img {
	max-width: 100%;
	height: auto;
}

/* WP captions carry an inline pixel width; wide tables scroll instead of overflowing. */
.post-contents .wp-caption {
	max-width: 100%;
}
.post-contents table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* WP replaced emoji with <img class="emoji"> (s.w.org SVGs). Keep them text-sized. */
img[src*="/images/core/emoji/"],
img.emoji,
img.wp-smiley,
.post-contents img.emoji {
	display: inline !important;
	width: 1em !important;
	height: 1em !important;
	max-width: none;
	margin: 0 0.07em !important;
	vertical-align: -0.1em;
	border: 0;
	box-shadow: none;
	background: none;
	border-radius: 0;
}

/* Static share links (replaces the theme's JS popups + missing sprite icons). */
.tdc-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	list-style: none;
	margin: 30px 0 0;
	padding: 0;
}
.tdc-share__title {
	font-family: var(--font-header);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	margin-right: 6px;
	text-transform: uppercase;
	color: #6b6f76;
}
.tdc-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: #eef1f4;
	color: #383e4a;
	transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.tdc-share__link:hover,
.tdc-share__link:focus-visible {
	background: #383e4a;
	color: #fff;
}
@media (max-width: 600px) {
	.tdc-share {
		justify-content: center;
	}
	.tdc-share__title {
		flex-basis: 100%;
		text-align: center;
		margin: 0 0 4px;
	}
}

/* Classic WP [gallery] (dl.gallery-item). WP's inline gallery CSS is gone, so lay
   it out as a responsive grid of square, cropped thumbnails linking to originals. */
.post-contents .gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
	margin: 30px 0;
}
.post-contents .gallery br { display: none; }
.post-contents .gallery-item { margin: 0; }
.post-contents .gallery-icon a { display: block; }
.post-contents .gallery-item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 6px;
	margin: 0;
}
.post-contents .gallery-caption { font-size: 0.85em; margin-top: 6px; }
@media (max-width: 500px) {
	.post-contents .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Author box: stack the two bios on small screens. */
@media (max-width: 600px) {
	.post-author-profile .eckosc_column_container .eckosc_column_item {
		float: none;
		width: 100%;
		margin: 0 0 28px;
	}
}

/* Compact author card (replaces the theme's centered multi-bio box). */
.tdc-author {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	margin: 40px 0 0;
	padding: 24px 0 0;
	border-top: 1px solid #e6e9ed;
	text-align: left;
}
.tdc-author__avatar {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 999px;
	object-fit: cover;
	background: #eef1f4;
}
.tdc-author__body {
	min-width: 0;
}
.tdc-author__label {
	margin: 0 0 2px;
	font-family: var(--font-header);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #8a8f98;
}
.tdc-author__name {
	margin: 0;
	font-size: 20px;
	line-height: 1.3;
}
.tdc-author__name a {
	color: #222529;
}
.tdc-author__line {
	margin: 4px 0 12px;
	font-size: 15px;
	line-height: 1.6;
	color: #5c616a;
}
.tdc-author__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.tdc-author__links .tdc-share__link {
	width: 34px;
	height: 34px;
}
.tdc-author__links svg {
	width: 16px;
	height: 16px;
}
@media (max-width: 600px) {
	.tdc-author {
		gap: 14px;
	}
	.tdc-author__avatar {
		width: 52px;
		height: 52px;
	}
}

/* Newsletter band (above footer). */
.tdc-band {
	background: #eef1f4;
	border-top: 1px solid #e2e6ea;
	padding: 28px 0;
}
.tdc-band__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.tdc-band__title {
	margin: 0;
	font-family: var(--font-header);
	font-size: 20px;
	font-weight: 700;
	color: #222529;
}
.tdc-band__line {
	margin: 2px 0 0;
	font-size: 15px;
	color: #5c616a;
}
.tdc-band__form {
	flex: 0 1 440px;
	min-width: 0;
}
.tdc-band__fields {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 5px;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.tdc-band__email {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 10px 16px;
	font: inherit;
	font-size: 15px;
	color: #222529;
	outline: none;
}
.tdc-band__fields:focus-within {
	box-shadow: 0 0 0 2px #383e4a;
}
.tdc-band__btn {
	flex: none;
	border: 0;
	border-radius: 999px;
	background: #383e4a;
	color: #fff;
	padding: 10px 22px;
	font-family: var(--font-header);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease-out;
}
.tdc-band__btn:hover,
.tdc-band__btn:focus-visible {
	background: #222529;
}
.tdc-band__btn:disabled {
	opacity: 0.6;
	cursor: progress;
}
.tdc-band .aa_status {
	margin: 8px 0 0 16px;
	font-size: 14px;
}

/* Footer. */
.tdc-footer {
	background: #1b1d21;
	color: #b9bec6;
	font-size: 15px;
}
.tdc-footer a {
	color: #e6e8eb;
}
.tdc-footer a:hover,
.tdc-footer a:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.tdc-footer__main {
	display: flex;
	justify-content: space-between;
	gap: 40px;
	flex-wrap: wrap;
	padding-block: 48px 40px;
}
.tdc-footer__brand {
	flex: 1 1 260px;
	max-width: 360px;
}
.tdc-footer__logo img {
	height: 30px;
	width: auto;
}
.tdc-footer__brand p {
	margin: 14px 0 0;
	line-height: 1.6;
}
.tdc-footer__groups {
	display: flex;
	gap: 56px;
	flex-wrap: wrap;
}
.tdc-footer__group h2 {
	margin: 0 0 12px;
	font-family: var(--font-header);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8a9099;
}
.tdc-footer__group ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}
.tdc-footer__group a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.tdc-footer__group svg {
	width: 14px;
	height: 14px;
	opacity: 0.75;
}
.tdc-footer__bar {
	border-top: 1px solid #2c2f35;
	font-size: 13px;
	color: #8a9099;
}
.tdc-footer__bar .wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 18px;
	padding-block: 16px;
}
.tdc-footer__bar a {
	color: #b9bec6;
}
@media (max-width: 600px) {
	.tdc-band__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}
	.tdc-band__form {
		flex-basis: auto;
	}
	.tdc-footer__main {
		gap: 28px;
		padding-block: 36px 28px;
	}
	.tdc-footer__groups {
		gap: 32px;
	}
}

/* Imported WP content leaves some empty paragraphs (spacers / dropped images). */
.post-contents p:empty,
.post-contents li:empty {
	display: none;
}

/* Converted Ecko shortcodes (see eckoShortcodes in migrate/import-wp.mjs). */
.post-contents .tdc-toggle {
	margin: 24px 0;
	border: 1px solid #e3e5e8;
	border-radius: 10px;
	padding: 0 20px;
	background: #fafbfc;
}
.post-contents .tdc-toggle > summary {
	cursor: pointer;
	padding: 16px 0;
	font-weight: 600;
	color: #1d2129;
	list-style-position: outside;
}
.post-contents .tdc-toggle[open] > summary {
	border-bottom: 1px solid #e3e5e8;
	margin-bottom: 16px;
}
.post-contents .tdc-alert,
.post-contents .tdc-contrast {
	margin: 28px 0;
	padding: 18px 22px;
	border-radius: 10px;
	border-left: 4px solid #3b82f6;
	background: #eff6ff;
}
.post-contents .tdc-alert--green { border-left-color: #16a34a; background: #f0fdf4; }
.post-contents .tdc-alert--red { border-left-color: #dc2626; background: #fef2f2; }
.post-contents .tdc-alert--yellow,
.post-contents .tdc-alert--orange { border-left-color: #d97706; background: #fffbeb; }
.post-contents .tdc-contrast { border-left-color: #383e4a; background: #f3f4f6; }
.post-contents .tdc-alert > :last-child,
.post-contents .tdc-contrast > :last-child,
.post-contents .tdc-toggle > :last-child { margin-bottom: 16px; }
.post-contents .tdc-alert > :last-child,
.post-contents .tdc-contrast > :last-child { margin-bottom: 0; }
.post-contents a.tdc-button {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 999px;
	background: #383e4a;
	color: #fff !important;
	border: 0 !important;
	font-weight: 600;
	text-decoration: none;
}
.post-contents a.tdc-button:hover { background: #222529; }

.post-contents .eckosc_contrast_block_inner img {
	max-width: 100%;
	height: auto;
}
