/*
Theme Name: Adventure Pending
Theme URI: https://mikekantorski.com
Author: Mike Kantorski
Description: Video-first news and stories for Adventure Pending. Child theme of Twenty Twenty-Five.
Template: twentytwentyfive
Version: 1.25.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: adventure-pending
*/

/* ---------- Small-caps labels (categories, kicker text, nav) ---------- */
.ap-label,
.ap-label a,
.wp-block-post-terms.ap-label a {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--trail);
}

/* Menu: Newsreader, matching the headlines */
.ap-nav .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.2rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.ap-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--trail);
	text-decoration: underline;
	text-underline-offset: 6px;
}

/* ---------- Header (newspaper masthead) ---------- */
.ap-topbar .ap-dateline {
	margin: 0;
	font-family: var(--wp--preset--font-family--courier-prime);
	font-size: 0.95rem;
	color: var(--wp--preset--color--muted);
}
.ap-logo,
.ap-logo a {
	display: block;
	text-align: center;
}
.ap-logo img {
	height: auto;
	max-width: 100%;
	margin: 0 auto;
}
/* Classic double rule under the section bar */
.ap-navbar {
	padding: 0.85rem 0 0.95rem;
	border-top: 1px solid var(--wp--preset--color--stone);
	border-bottom: 4px double var(--wp--preset--color--ink);
}

/* ---------- Trail-dot divider ---------- */
.ap-trail {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--wp--preset--color--ink);
}
.ap-trail::after {
	content: "";
	flex: 1;
	border-top: 2px dashed var(--wp--preset--color--stone);
}

/* ---------- Post cards ---------- */
.ap-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 4px;
}
.ap-card .wp-block-post-title a {
	text-decoration: none;
}
.ap-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--trail);
}

/* One section label per story: show only the first category */
.ap-label.wp-block-post-terms a ~ a,
.ap-label.wp-block-post-terms .wp-block-post-terms__separator {
	display: none;
}

/* "Latest" list: small square thumbnail beside the headline */
.ap-row .ap-thumb {
	flex: 0 0 104px;
	margin: 0;
}
.ap-row .ap-thumb img {
	width: 104px;
	height: 104px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 4px;
}
.ap-row > .wp-block-group {
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------- "My take" box ---------- */
.is-style-my-take {
	background: var(--wp--preset--color--trail-light);
	color: var(--wp--preset--color--ink);
	border-left: 5px solid var(--wp--preset--color--trail);
	padding: 1.4rem 1.6rem;
	border-radius: 0 4px 4px 0;
	margin-top: 2.5rem;
}
.is-style-my-take::before {
	content: "My take";
	display: block;
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--trail);
	margin-bottom: 0.4rem;
}
/* Beat WordPress's "global padding" on groups, which zeroes the sides */
.wp-block-group.is-style-my-take,
.wp-block-group.is-style-my-take.has-global-padding {
	padding: 1.5rem 1.75rem 1.6rem 2rem !important;
}
.is-style-my-take > :first-child {
	margin-top: 0;
}
.is-style-my-take > h2:first-child,
.is-style-my-take > h3:first-child {
	margin-top: 0.3rem;
	margin-bottom: 1rem;
	line-height: 1.15;
}
.is-style-my-take > h2,
.is-style-my-take > h3 {
	color: var(--wp--preset--color--ink);
}
/* When the box starts with a heading, the heading becomes the green label
   (bigger), and the automatic "My take" label is hidden so it isn't doubled. */
.is-style-my-take:has(> h2:first-child, > h3:first-child)::before {
	display: none;
}
.is-style-my-take > h2:first-child,
.is-style-my-take > h3:first-child {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 1.6rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--trail);
	line-height: 1.2;
}
.is-style-my-take a {
	color: var(--wp--preset--color--trail);
}

/* Article parts */
.single .ap-hook,
.wp-block-post-content > p.ap-hook {
	font-size: 1.3rem;
	line-height: 1.6;
}
.ap-source {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
}

/* ---------- Callout boxes (newsletter, shop) ---------- */
.ap-callout {
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: 4px;
}

/* ---------- Video embeds ---------- */
.single .wp-block-embed.is-type-video {
	margin-bottom: 1.5rem;
}

/* ---------- Readability ---------- */
.wp-block-post-content p,
.wp-block-post-content li {
	max-width: 68ch;
}
.ap-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
}
:focus-visible {
	outline: 3px solid var(--wp--preset--color--trail);
	outline-offset: 2px;
}

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.ap-logo img {
		width: 300px !important;
	}
	.ap-topbar .ap-dateline {
		font-size: 0.85rem;
	}
	.ap-navbar {
		justify-content: flex-end !important;
	}
	.ap-nav .wp-block-navigation__responsive-container-open {
		font-family: var(--wp--preset--font-family--newsreader);
	}
}

/* ---------- Newsletter band (slim, newspaper rules) ---------- */
.ap-newsband {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem 2.5rem;
	padding: 1.6rem 0;
	border-top: 4px double var(--wp--preset--color--ink);
	border-bottom: 1px solid var(--wp--preset--color--stone);
}
.ap-newsband__text {
	flex: 1 1 340px;
	min-width: 0;
}
.ap-newsband__text p {
	margin: 0;
}
.ap-newsband__form {
	flex: 0 1 440px;
	min-height: 52px;
	max-width: 100%;
}
.ap-newsband__form iframe {
	max-width: 100%;
	display: block;
}

/* ---------- Homepage hero grid (lead + 2x2) ---------- */
.ap-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 0;
	padding-bottom: 1.25rem;
}
/* Lines meet: the lead's divider, the grid's centre line and the
   middle rule all join up, and every photo starts on the same top line. */
.ap-hero > *,
.ap-hero .wp-block-post-template,
.ap-hero .wp-block-post-template > li > :first-child,
.ap-hero .ap-card > :first-child {
	margin-top: 0 !important;
}
.ap-hero__lead {
	padding-right: 2rem;
	border-right: 1px solid var(--wp--preset--color--stone);
}
.ap-hero__grid {
	display: flex;
	flex-direction: column;
}
.ap-hero__grid .wp-block-post-template {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, calc(50% + 1rem)) minmax(0, 1fr);
	grid-auto-rows: auto;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ap-hero__grid .wp-block-post-template > li {
	margin: 0;
	padding: 0 0 1.25rem;
}
.ap-hero__grid .wp-block-post-template > li:nth-child(odd) {
	padding-left: 2rem;
	padding-right: 2rem;
	border-right: 1px solid var(--wp--preset--color--stone);
}
.ap-hero__grid .wp-block-post-template > li:nth-child(even) {
	padding-left: 2rem;
}
.ap-hero__grid .wp-block-post-template > li:nth-child(-n+2) {
	border-bottom: 1px solid var(--wp--preset--color--stone);
}
.ap-hero__grid .wp-block-post-template > li:nth-child(n+3) {
	padding-top: 1.25rem;
	padding-bottom: 0;
}
.ap-media {
	position: relative;
}
.ap-media .wp-block-post-featured-image {
	margin: 0;
}
.ap-media .wp-block-post-featured-image img {
	border-radius: 6px;
	width: 100%;
	object-fit: cover;
}
/* Section label: a small green kicker under the photo, above the title */
.ap-badge {
	margin: 0.8rem 0 0;
	line-height: 1;
}
.ap-badge a {
	color: var(--wp--preset--color--trail);
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}
.ap-badge a:hover {
	text-decoration: underline;
}
.ap-badge a ~ a,
.ap-badge .wp-block-post-terms__separator {
	display: none;
}
.ap-media + .wp-block-post-title {
	margin-top: 0.4rem !important;
}
.ap-hero__title {
	font-size: clamp(1.8rem, 2.6vw, 2.4rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
}
.ap-grid__title {
	font-size: clamp(1.2rem, 1.6vw, 1.45rem);
	line-height: 1.2;
}
.ap-hero__title a,
.ap-grid__title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.ap-hero__title a:hover,
.ap-grid__title a:hover {
	color: var(--wp--preset--color--trail);
}
.ap-byline {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-size: 0.95rem;
	color: var(--wp--preset--color--muted);
}
.ap-hero__dek p {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}
.ap-hero__dek {
	margin-top: 0.55rem;
	line-height: 1.55;
	color: #3A3833;
}
/* Read time on cards: sit close under the title */
.ap-card .wp-block-post-time-to-read {
	margin-top: 0.4rem;
	line-height: 1.3;
}
@media (max-width: 900px) {
	.ap-hero {
		grid-template-columns: 1fr;
	}
	.ap-hero__grid .wp-block-post-template {
		grid-template-columns: minmax(0, calc(50% - 0.75rem)) minmax(0, 1fr);
	}
	.ap-hero__grid .wp-block-post-template > li:nth-child(odd) {
		padding-left: 0;
		padding-right: 1.5rem;
	}
	.ap-hero__grid .wp-block-post-template > li:nth-child(even) {
		padding-left: 1.5rem;
	}
	.ap-hero__lead {
		padding-right: 0;
		border-right: 0;
		border-bottom: 1px solid var(--wp--preset--color--stone);
		padding-bottom: 1.6rem;
		margin-bottom: 1.6rem;
	}
}
@media (max-width: 520px) {
	.ap-hero__grid .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
	.ap-hero__grid .wp-block-post-template > li:nth-child(odd) {
		padding-right: 0.75rem;
	}
	.ap-hero__grid .wp-block-post-template > li:nth-child(even) {
		padding-left: 0.75rem;
	}
	.ap-grid__title {
		font-size: 1.1rem;
	}
	.ap-badge a {
		font-size: 0.72rem;
	}
}

/* ---------- Homepage strip: video, podcast, referral, gear ---------- */
.ap-strip {
	margin-top: 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--stone);
}
.ap-strip__head {
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.ap-strip__head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.ap-trailmark {
	width: 40px;
	height: auto;
	display: block;
}
.ap-strip__cols {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ap-strip__col {
	padding: 0 1.25rem;
	border-left: 1px solid var(--wp--preset--color--stone);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}
.ap-strip__col:first-child {
	padding-left: 0;
	border-left: 0;
}
.ap-strip__col:last-child {
	padding-right: 0;
}
.ap-strip__label {
	margin: 0;
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--trail);
}
.ap-strip__thumb {
	position: relative;
	display: block;
	border-radius: 4px;
	overflow: hidden;
}
.ap-strip__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.ap-play {
	position: absolute;
	left: 0.5rem;
	bottom: 0.5rem;
	width: 2rem;
	height: 2rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-size: 0.8rem;
	border: 1.5px solid var(--wp--preset--color--ink);
}
.ap-strip__title {
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 600;
	font-size: 1.1rem;
	line-height: 1.25;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.ap-strip__title:hover {
	color: var(--wp--preset--color--trail);
}
.ap-strip__fine {
	margin: 0;
	font-size: 0.9rem;
	color: var(--wp--preset--color--muted);
}
.ap-strip__more {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--wp--preset--color--trail);
}
/* Referral as a trail permit stub: notched corners, perforated edge */
.ap-permit {
	--notch: 9px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	width: 100%;
	padding: 0.85rem 1rem 0.8rem 1.35rem;
	text-align: left;
	cursor: pointer;
	color: var(--wp--preset--color--ink);
	background:
		radial-gradient(circle at 0 0, transparent var(--notch), var(--wp--preset--color--trail-light) calc(var(--notch) + 0.5px)) top left,
		radial-gradient(circle at 100% 0, transparent var(--notch), var(--wp--preset--color--trail-light) calc(var(--notch) + 0.5px)) top right,
		radial-gradient(circle at 0 100%, transparent var(--notch), var(--wp--preset--color--trail-light) calc(var(--notch) + 0.5px)) bottom left,
		radial-gradient(circle at 100% 100%, transparent var(--notch), var(--wp--preset--color--trail-light) calc(var(--notch) + 0.5px)) bottom right;
	background-size: 51% 51%;
	background-repeat: no-repeat;
	border: 0;
	border-radius: 0;
	font: inherit;
}
.ap-permit::before {
	content: "";
	position: absolute;
	top: 10px;
	bottom: 10px;
	left: 0.55rem;
	border-left: 2px dotted var(--wp--preset--color--trail);
}
.ap-permit__top,
.ap-permit__note {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--trail);
}
.ap-permit__top {
	text-transform: uppercase;
	font-weight: 700;
}
.ap-permit__code {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: clamp(1.05rem, 1.5vw, 1.3rem);
	letter-spacing: 0.08em;
	word-break: break-all;
}
.ap-permit:hover .ap-permit__code,
.ap-permit.is-copied .ap-permit__code {
	color: var(--wp--preset--color--trail);
}
.ap-permit:focus-visible {
	outline: 3px solid var(--wp--preset--color--trail);
	outline-offset: 2px;
}
.ap-gear {
	margin: 0;
	font-size: 1rem;
	line-height: 1.35;
}
.ap-gear dt {
	margin-top: 0.35rem;
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.85rem;
}
.ap-gear dt:first-child {
	margin-top: 0;
}
.ap-gear dd {
	margin: 0.15rem 0 0;
	padding-left: 0.9rem;
	position: relative;
}
.ap-gear dd::before {
	content: "●";
	position: absolute;
	left: 0;
	font-size: 0.55rem;
	top: 0.4em;
	color: var(--wp--preset--color--trail);
}
@media (max-width: 1000px) {
	.ap-strip__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 1.5rem;
	}
	.ap-strip__col:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}
}
@media (max-width: 560px) {
	.ap-strip__cols {
		grid-template-columns: 1fr;
	}
	.ap-strip__col {
		padding: 0;
		border-left: 0;
	}
	.ap-strip__col + .ap-strip__col {
		padding-top: 1.25rem;
		border-top: 1px solid var(--wp--preset--color--stone);
	}
}

/* ---------- Watch & listen row (homepage) ---------- */
.ap-watch {
	margin-top: 3rem;
}
.ap-watch__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}
.ap-watch__head::after {
	content: "";
	flex: 1;
	border-top: 2px dashed var(--wp--preset--color--stone);
}
.ap-watch__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
}
.ap-watch__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 2.5rem;
}
.ap-watch__item {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}
.ap-watch__item + .ap-watch__item {
	padding-left: 2.5rem;
	margin-left: -2.5rem;
	border-left: 1px solid var(--wp--preset--color--stone);
}
.ap-watch__thumb {
	position: relative;
	display: block;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 0.35rem;
}
.ap-watch__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.ap-play--lg {
	width: 3rem;
	height: 3rem;
	left: 0.8rem;
	bottom: 0.8rem;
	font-size: 1.1rem;
}
.ap-watch__name {
	margin: 0;
	font-size: clamp(1.25rem, 1.8vw, 1.6rem);
	line-height: 1.2;
}
.ap-watch__name a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.ap-watch__name a:hover {
	color: var(--wp--preset--color--trail);
}

/* ---------- Referral at the end of articles ---------- */
.ap-refbox {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem 2rem;
	margin: 2.5rem 0 0;
	padding: 1.4rem 0;
	border-top: 1px solid var(--wp--preset--color--stone);
	border-bottom: 1px solid var(--wp--preset--color--stone);
}
.ap-refbox__text {
	flex: 1 1 300px;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.ap-refbox__text p {
	margin: 0;
}
.ap-refbox__line {
	font-size: var(--wp--preset--font-size--medium);
}
.ap-refbox__action {
	flex: 0 1 280px;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* ---------- Gear box at the end of Gear / Guides posts ---------- */
.ap-gearbox {
	margin-top: 2.5rem;
	padding: 1.25rem 1.4rem;
	background: var(--wp--preset--color--white);
	border-left: 4px solid var(--wp--preset--color--trail);
	border-radius: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.ap-gearbox__cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem 2rem;
}

/* ---------- Around the camp band above the footer ---------- */
.ap-strip--footer {
	border-top: 4px double var(--wp--preset--color--ink);
	padding-top: 1.25rem;
	margin-top: 0;
}
/* Homepage already has Watch & listen, so the band shows referral + gear only */
.home .ap-strip--footer .ap-strip__col--media {
	display: none;
}
.home .ap-strip--footer .ap-strip__cols {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home .ap-strip--footer .ap-strip__col--media + .ap-strip__col--media + .ap-strip__col {
	padding-left: 0;
	border-left: 0;
}

@media (max-width: 700px) {
	.ap-watch__grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	.ap-watch__item + .ap-watch__item {
		padding-left: 0;
		margin-left: 0;
		border-left: 0;
		padding-top: 2rem;
		border-top: 1px solid var(--wp--preset--color--stone);
	}
	.home .ap-strip--footer .ap-strip__cols {
		grid-template-columns: 1fr;
	}
}

/* ---------- Gentle zoom on image hover ---------- */
.wp-block-post-featured-image,
.ap-watch__thumb,
.ap-strip__thumb {
	overflow: hidden;
	border-radius: 6px;
}
.wp-block-post-featured-image img,
.ap-watch__thumb img,
.ap-strip__thumb img {
	transition: transform 0.45s ease;
	will-change: transform;
}
.wp-block-post-featured-image a:hover img,
.wp-block-post-featured-image a:focus-visible img,
.ap-watch__thumb:hover img,
.ap-watch__thumb:focus-visible img,
.ap-strip__thumb:hover img {
	transform: scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-post-featured-image img,
	.ap-watch__thumb img,
	.ap-strip__thumb img {
		transition: none;
	}
	.wp-block-post-featured-image a:hover img,
	.ap-watch__thumb:hover img,
	.ap-strip__thumb:hover img {
		transform: none;
	}
}

/* ---------- Logo: the trail walks on hover ---------- */
.ap-logo__mark {
	position: relative;
	display: block;
	width: 560px;
	max-width: 100%;
	aspect-ratio: 970 / 93;
	margin: 0 auto;
}
.ap-logo .ap-logo__word {
	position: absolute;
	left: 0;
	top: 0;
	width: 78.454% !important;
	height: 100%;
	max-width: none;
}
.ap-logo__trail {
	position: absolute;
	left: 78.454%;
	top: 0;
	width: 21.546%;
	height: 100%;
}
.ap-tp {
	position: absolute;
	display: block;
	background-color: var(--wp--preset--color--ink);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	transition: background-color 0.3s ease;
}
.ap-logo a:hover .ap-tp,
.ap-logo a:focus-visible .ap-tp {
	background-color: var(--wp--preset--color--trail);
	transition-delay: calc(var(--i) * 60ms);
	animation: ap-hop 0.45s ease-out calc(var(--i) * 60ms) both;
}
.ap-logo a:hover .ap-tp--dot,
.ap-logo a:focus-visible .ap-tp--dot {
	animation-name: ap-hop-dot;
}
@keyframes ap-hop {
	0% { transform: none; }
	40% { transform: translateY(-35%); }
	100% { transform: none; }
}
@keyframes ap-hop-dot {
	0% { transform: none; }
	40% { transform: translateY(-22%) scale(1.25); }
	100% { transform: none; }
}
@media (max-width: 781px) {
	.ap-logo__mark {
		width: 300px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.ap-logo a:hover .ap-tp,
	.ap-logo a:focus-visible .ap-tp {
		animation: none;
	}
}

/* ---------- Dropdown menus ---------- */
.ap-navbar .wp-block-navigation__submenu-container {
	min-width: 15rem !important;
	padding: 0.4rem 0 !important;
	border: 1px solid var(--wp--preset--color--stone) !important;
	background: var(--wp--preset--color--paper) !important;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.ap-navbar .wp-block-navigation__submenu-container a {
	padding: 0.55rem 1.1rem !important;
	font-size: 1.1rem;
}
.ap-navbar .wp-block-navigation__submenu-container a:hover,
.ap-navbar .wp-block-navigation__submenu-container a:focus-visible {
	color: var(--wp--preset--color--trail);
	text-decoration: underline;
}

/* Keep the header (and its dropdowns) above story photos and badges */
header.wp-block-template-part,
.ap-navbar {
	position: relative;
	z-index: 100;
}
.ap-navbar .wp-block-navigation__submenu-container {
	z-index: 101 !important;
}

/* ---------- Gear lists: clean names, vehicles side by side ---------- */
.ap-gear {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.1rem 2.5rem;
	margin: 0.4rem 0 0.9rem;
}
.ap-gear__car {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.ap-gear__tag {
	align-self: flex-start;
	margin: 0 0 0.15rem;
	padding: 0.2rem 0.55rem 0.15rem;
	border-radius: 4px;
	background: var(--wp--preset--color--trail);
	color: var(--wp--preset--color--paper);
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.ap-gear__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.ap-gear__row {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.35rem;
	margin: 0 -0.35rem;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
a.ap-gear__row:hover,
a.ap-gear__row:focus-visible {
	background: rgba(47, 93, 70, 0.08);
}
.ap-gear__thumb {
	width: 56px;
	height: 56px;
	flex-shrink: 0;
	border-radius: 10px;
	overflow: hidden;
	background: #E3E9E4;
	border: 1px solid #D6DDD7;
}
.ap-gear__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ap-gear__text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
	flex: 1;
}
.ap-gear__name {
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 600;
	font-size: 1.02rem;
	line-height: 1.2;
	color: var(--wp--preset--color--ink);
}
.ap-gear__note {
	font-size: 0.85rem;
	line-height: 1.35;
	color: var(--wp--preset--color--muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ap-gear__arrow {
	flex-shrink: 0;
	color: var(--wp--preset--color--trail);
}
/* Small images inside the My Gear page list */
.wp-block-list li img[class*="wp-image-"] {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 10px;
	vertical-align: middle;
	margin-right: 0.6rem;
}

/* ---------- Author box: "From the driver's seat" ---------- */
.ap-author {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 1.25rem 1.5rem;
	margin-top: 2.25rem;
}
.ap-author__photo {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 22%;
	border: 3px solid var(--wp--preset--color--paper);
	box-shadow: 0 0 0 2px var(--wp--preset--color--trail);
}
.ap-author__body p {
	margin: 0;
}
.ap-author__kicker {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--trail);
}
.ap-author__kicker img {
	width: 34px;
	height: auto;
}
.ap-author__name {
	margin-top: 0.2rem !important;
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 600;
	font-size: 1.65rem;
	line-height: 1.15;
}
.ap-author__bio {
	margin-top: 0.5rem !important;
	font-size: 1.1rem;
	line-height: 1.6;
}
/* Links as stops along a dashed trail */
.ap-trailstops {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2rem;
	list-style: none;
	margin: 1.1rem 0 0;
	padding: 0;
}
.ap-trailstops li {
	position: relative;
	padding-top: 1.2rem;
}
/* dashed trail from each stop to the next */
.ap-trailstops li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 20px;
	right: calc(-2rem + 6px);
	border-top: 2px dashed var(--wp--preset--color--ink);
}
.ap-trailstops li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--wp--preset--color--ink);
	box-shadow: 0 0 0 3px var(--wp--preset--color--paper);
}
.ap-trailstops li:last-child::before {
	background: var(--wp--preset--color--trail);
}
.ap-trailstops a {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.ap-trailstops a:hover,
.ap-trailstops a:focus-visible {
	color: var(--wp--preset--color--trail);
	text-decoration: underline;
}
/* Google preferred source: a trail blaze sign */
.ap-gsource {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1.25rem;
	margin-top: 0.5rem;
	padding: 1rem 1.25rem;
	background: var(--wp--preset--color--trail-light);
	border-radius: 4px;
}
.ap-gsource__sign {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 2.1rem 0.7rem 1.1rem;
	background: var(--wp--preset--color--trail);
	color: var(--wp--preset--color--paper);
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
	transition: background-color 0.2s ease, padding 0.2s ease;
}
.ap-gsource__sign:hover,
.ap-gsource__sign:focus-visible {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	padding-right: 2.5rem;
}
.ap-gsource__pin {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
	box-shadow: 0 0 0 3px rgba(243, 240, 232, 0.35);
}
.ap-gsource__note {
	flex: 1 1 220px;
	margin: 0;
	font-size: 0.95rem;
	color: var(--wp--preset--color--muted);
}
@media (max-width: 560px) {
	.ap-author {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 1rem;
	}
	.ap-author__photo {
		width: 64px;
		height: 64px;
	}
	.ap-trailstops {
		gap: 0.75rem 1.4rem;
	}
	.ap-trailstops li:not(:last-child)::after {
		right: calc(-1.4rem + 6px);
	}
}

/* ---------- Around the camp: layout per page ---------- */
/* Posts already end with the referral box, so the band skips it there */
.single .ap-strip--footer .ap-strip__col--permit {
	display: none;
}
.single .ap-strip--footer .ap-strip__cols {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ap-strip--footer .ap-strip__col--permit .ap-strip__more {
	white-space: nowrap;
}
/* Gear in the band: one vehicle under the other */
.ap-strip__col--gear .ap-gear {
	grid-template-columns: 1fr;
	gap: 1.1rem;
}
@media (max-width: 1000px) {
	.single .ap-strip--footer .ap-strip__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.single .ap-strip--footer .ap-strip__col--gear {
		grid-column: 1 / -1;
	}
}
@media (max-width: 560px) {
	.single .ap-strip--footer .ap-strip__cols {
		grid-template-columns: 1fr;
	}
}

/* ---------- End of post: tags + share row ---------- */
.ap-postfoot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	margin-top: 2.5rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--wp--preset--color--stone);
	font-size: 0.95rem;
}
.ap-postfoot__tags {
	margin: 0;
	flex: 1 1 280px;
	line-height: 1.6;
}
.ap-postfoot__tags span,
.ap-share__label {
	font-family: var(--wp--preset--font-family--courier-prime);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-right: 0.35rem;
}
.ap-postfoot__tags a {
	color: var(--wp--preset--color--trail);
}
.ap-share {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.ap-share__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ap-share__btn:hover,
.ap-share__btn:focus-visible,
.ap-share__btn.is-copied {
	background: var(--wp--preset--color--trail);
	border-color: var(--wp--preset--color--trail);
	color: var(--wp--preset--color--paper);
}
.ap-share__copied:not(:empty) {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	white-space: nowrap;
	font-size: 0.8rem;
	color: var(--wp--preset--color--trail);
}
/* Google preferred source: now one quiet line in the author box */
.ap-gsource-line {
	margin-top: 1rem !important;
	font-size: 0.95rem;
}
.ap-gsource-line a {
	color: var(--wp--preset--color--trail);
}

/* Text-message share only makes sense on phones and tablets */
@media (hover: hover) and (pointer: fine) {
	.ap-share__sms {
		display: none;
	}
}

/* Lead image at the top of articles */
.ap-lead-image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}
.ap-lead-image figcaption {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted);
}
