/* ======================================================================================================================================================
Post Cards
====================================================================================================================================================== */

.pcwt-postcards{
	--pcwt-postcard-gap: 24px;
	--pcwt-postcard-radius: 8px;
	--pcwt-postcard-bg: #fff;
	--pcwt-postcard-text: #1a1a1a;
	--pcwt-postcard-muted: #6b7280;
	--pcwt-postcard-title: #1f4d3a;
	--pcwt-postcard-nav: #1f4d3a;
	--pcwt-postcard-focus: #005ea5;
	--pcwt-postcard-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	--pcwt-postcard-nav-size: 44px;
	--pcwt-postcard-nav-outside-gap: 12px;
	position: relative;
	margin: 30px 0;
	clear: both;
}

.pcwt-postcards__shell{
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 12px;
}

.pcwt-postcards__viewport{
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

/* Reset theme list styles (ul.disc / .entry-content-wrapper ul|li) */
.pcwt-postcards ul.pcwt-postcards__track,
.entry-content-wrapper .pcwt-postcards ul.pcwt-postcards__track,
.entry-content-wrapper ul.pcwt-postcards__track{
	list-style: none;
	margin: 0;
	padding: 0;
}

.pcwt-postcards .pcwt-postcards__item,
.entry-content-wrapper .pcwt-postcards .pcwt-postcards__item,
.entry-content-wrapper .pcwt-postcards li.pcwt-postcards__item {
    list-style: none;
    margin: 0;
    padding: 0 0 20px;
}

.pcwt-postcards__track{
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--pcwt-postcard-gap);
	align-items: stretch;
}

.pcwt-postcards--cols-1 .pcwt-postcards__track{ grid-template-columns: 1fr; }
.pcwt-postcards--cols-2 .pcwt-postcards__track{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcwt-postcards--cols-3 .pcwt-postcards__track{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pcwt-postcards--cols-4 .pcwt-postcards__track{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

.pcwt-postcards__item{
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
}

.pcwt-postcard{
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 100%;
	background: var(--pcwt-postcard-bg);
	border-radius: var(--pcwt-postcard-radius);
	box-shadow: var(--pcwt-postcard-shadow);
	overflow: hidden;
	color: var(--pcwt-postcard-text);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pcwt-postcard:has(.pcwt-postcard__link:hover),
.pcwt-postcard:has(.pcwt-postcard__link:focus-visible){
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.pcwt-postcard--no-link{
	cursor: default;
}

.pcwt-postcard__link--static{
	cursor: default;
}

.pcwt-postcard__media{
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #e8ebe9;
	flex: 0 0 auto;
}

.pcwt-postcards--ratio-16-9 .pcwt-postcard__media{ aspect-ratio: 16 / 9; }
.pcwt-postcards--ratio-4-3 .pcwt-postcard__media{ aspect-ratio: 4 / 3; }
.pcwt-postcards--ratio-3-2 .pcwt-postcard__media{ aspect-ratio: 3 / 2; }
.pcwt-postcards--ratio-1-1 .pcwt-postcard__media{ aspect-ratio: 1 / 1; }
.pcwt-postcards--ratio-3-4 .pcwt-postcard__media{ aspect-ratio: 3 / 4; }

/* Let the loaded image size define height (e.g. square 300x300) */
.pcwt-postcards--ratio-natural .pcwt-postcard__media{
	aspect-ratio: auto;
}

.pcwt-postcards--ratio-natural .pcwt-postcard__img,
.pcwt-postcards--ratio-natural .pcwt-postcard__media img{
	width: 100%;
	height: auto;
	object-fit: unset;
}

.pcwt-postcard__media--empty{
	min-height: 140px;
}

/* RSS feeds often have no images yet — don't reserve empty grey media blocks */
.pcwt-postcards--source-rss .pcwt-postcard__media--empty{
	display: none;
}

.pcwt-postcard__img,
.pcwt-postcard__media img{
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.pcwt-postcard__body{
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1.1rem 1.15rem 1.25rem;
	gap: 0.45rem;
	min-height: 0;
}

.pcwt-postcard__category{
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pcwt-postcard-muted);
	font-weight: 600;
	line-height: 1.3;
}

.pcwt-postcard__date-wrap,
.pcwt-postcard__date{
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	color: var(--pcwt-postcard-muted);
	line-height: 1.35;
}

.pcwt-postcards--date-case-uppercase .pcwt-postcard__date-wrap,
.pcwt-postcards--date-case-uppercase .pcwt-postcard__date{
	text-transform: uppercase;
}

.pcwt-postcards--date-case-none .pcwt-postcard__date-wrap,
.pcwt-postcards--date-case-none .pcwt-postcard__date{
	text-transform: none;
	letter-spacing: 0.01em;
}

.pcwt-postcard__meta{
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.pcwt-postcard__date-wrap,
.pcwt-postcard__location{
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	color: var(--pcwt-postcard-muted);
}

.pcwt-postcard__date-text{
	display: inline;
	min-width: 0;
}

.pcwt-postcard__date-prefix,
.pcwt-postcard__date,
time.pcwt-postcard__date{
	display: inline;
}

/* Keep prefix + date on one line when a prefix is set */
.pcwt-postcards--has-date-prefix .pcwt-postcard__date,
.pcwt-postcards--has-date-prefix time.pcwt-postcard__date{
	display: inline;
}

.pcwt-postcard__date-prefix{
	font-style: italic;
	letter-spacing: 0.02em;
	text-transform: none;
}

.pcwt-postcard__meta-icon{
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.1em;
	color: var(--pcwt-postcard-title);
	opacity: 0.85;
}

.pcwt-postcard__meta-svg{
	display: block;
}

.pcwt-postcard__location-text{
	font-size: 0.8rem;
	line-height: 1.35;
	letter-spacing: 0.01em;
	text-transform: none;
	color: var(--pcwt-postcard-muted);
}

.pcwt-postcard__title{
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.35;
	font-weight: 700;
	color: var(--pcwt-postcard-title);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.pcwt-postcard__link{
	color: inherit;
	text-decoration: none;
}

.pcwt-postcard__link:hover,
.pcwt-postcard__link:focus{
	color: inherit;
	text-decoration: none;
}

/* Whole-card hit area via stretched link */
.pcwt-postcard .stretched-link::after{
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: var(--pcwt-postcard-radius);
}

.pcwt-postcard .pcwt-postcard__link:focus{
	outline: none;
}

.pcwt-postcard .pcwt-postcard__link:focus-visible::after{
	outline: 3px solid var(--pcwt-postcard-focus);
	outline-offset: 3px;
}

.pcwt-postcard__excerpt{
	font-size: 0.95rem;
	line-height: 1.55;
	color: #4b5563;
	margin: 0.15rem 0 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.pcwt-postcard__more{
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: auto;
	padding-top: 0.85rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--pcwt-postcard-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pcwt-postcard__more-arrow{
	text-decoration: none;
	line-height: 1;
}

/* Slider / scrollable track */
.pcwt-postcards--layout-slider .pcwt-postcards__viewport,
.pcwt-postcards--mobile-edge-peek .pcwt-postcards__viewport{
	overflow: hidden;
}

.pcwt-postcards--layout-slider .pcwt-postcards__track{
	display: flex;
	grid-template-columns: none;
	align-items: stretch;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	touch-action: pan-x;
	cursor: grab;
}

.pcwt-postcards--layout-slider .pcwt-postcards__track.is-mouse-dragging{
	cursor: grabbing;
	scroll-behavior: auto;
	scroll-snap-type: none;
	user-select: none;
}

.pcwt-postcards--layout-slider .pcwt-postcards__track::-webkit-scrollbar{
	display: none;
}

.pcwt-postcards--layout-slider .pcwt-postcards__item{
	flex: 0 0 calc((100% - (var(--pcwt-postcard-gap) * (var(--pcwt-postcard-cols, 3) - 1))) / var(--pcwt-postcard-cols, 3));
	scroll-snap-align: start;
	align-self: stretch;
	height: auto;
}

.pcwt-postcards--cols-1.pcwt-postcards--layout-slider{ --pcwt-postcard-cols: 1; }
.pcwt-postcards--cols-2.pcwt-postcards--layout-slider{ --pcwt-postcard-cols: 2; }
.pcwt-postcards--cols-3.pcwt-postcards--layout-slider{ --pcwt-postcard-cols: 3; }
.pcwt-postcards--cols-4.pcwt-postcards--layout-slider{ --pcwt-postcard-cols: 4; }

/* Navigation */
.pcwt-postcards__nav{
	flex: 0 0 auto;
	align-self: center;
	width: var(--pcwt-postcard-nav-size);
	height: var(--pcwt-postcard-nav-size);
	border: 0;
	border-radius: 50%;
	background: var(--pcwt-postcard-nav);
	color: #fff;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.pcwt-postcards__nav:hover{
	background: #163828;
}

.pcwt-postcards__nav:focus{
	outline: none;
}

.pcwt-postcards__nav:focus-visible{
	outline: 3px solid var(--pcwt-postcard-focus);
	outline-offset: 2px;
}

.pcwt-postcards__nav:disabled,
.pcwt-postcards__nav[aria-disabled="true"]{
	opacity: 0.35;
	cursor: not-allowed;
}

.pcwt-postcards__nav-icon{
	font-size: 1.6rem;
	font-weight: 400;
	transform: translateY(-1px);
}

/* Outside: cards fill container; arrows sit in page gutters */
.pcwt-postcards--nav-outside .pcwt-postcards__shell{
	gap: 0;
}

.pcwt-postcards--nav-outside .pcwt-postcards__nav{
	position: absolute;
	top: 50%;
	z-index: 3;
	transform: translateY(-50%);
}

.pcwt-postcards--nav-outside .pcwt-postcards__nav--prev{
	left: calc(-1 * (var(--pcwt-postcard-nav-size) + var(--pcwt-postcard-nav-outside-gap)));
}

.pcwt-postcards--nav-outside .pcwt-postcards__nav--next{
	right: calc(-1 * (var(--pcwt-postcard-nav-size) + var(--pcwt-postcard-nav-outside-gap)));
}

/* Desktop / laptop arrows (slider only) */
@media only screen and (min-width: 990px){
	.pcwt-postcards--nav-desktop .pcwt-postcards__nav{
		display: inline-flex;
	}

	/* Avoid clipping arrows that hang into the section gutters */
	.container:has(> .pcwt-postcards--nav-outside),
	.container:has(.pcwt-postcards--nav-outside),
	.entry-content-wrapper:has(.pcwt-postcards--nav-outside){
		overflow: visible;
	}
}

/* Tablet + mobile arrows (edge-peek) */
@media only screen and (max-width: 989px){
	.pcwt-postcards--nav-mobile .pcwt-postcards__nav{
		display: inline-flex;
		--pcwt-postcard-nav-size: 36px;
		width: var(--pcwt-postcard-nav-size);
		height: var(--pcwt-postcard-nav-size);
	}
}

@media (prefers-reduced-motion: reduce){
	.pcwt-postcard,
	.pcwt-postcards__nav,
	.pcwt-postcards--layout-slider .pcwt-postcards__track{
		scroll-behavior: auto;
		transition: none;
	}
}

/* Tablet */
@media only screen and (max-width: 989px){
	.pcwt-postcards--cols-3 .pcwt-postcards__track,
	.pcwt-postcards--cols-4 .pcwt-postcards__track{
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pcwt-postcards--cols-3.pcwt-postcards--layout-slider,
	.pcwt-postcards--cols-4.pcwt-postcards--layout-slider{
		--pcwt-postcard-cols: 2;
	}
}

/* Mobile: stack */
@media only screen and (max-width: 767px){
	.pcwt-postcards--mobile-stack .pcwt-postcards__track{
		display: grid;
		grid-template-columns: 1fr;
		overflow: visible;
		scroll-snap-type: none;
	}

	.pcwt-postcards--mobile-stack .pcwt-postcards__item{
		flex: none;
		width: 100%;
		height: auto;
	}

	.pcwt-postcards--mobile-stack:not(.pcwt-postcards--nav-mobile) .pcwt-postcards__nav{
		display: none !important;
	}

	/* Mobile: edge peek */
	.pcwt-postcards--mobile-edge-peek .pcwt-postcards__viewport{
		overflow: hidden;
		margin-right: -12px;
	}

	.pcwt-postcards--mobile-edge-peek .pcwt-postcards__track{
		display: flex;
		grid-template-columns: none;
		align-items: stretch;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-right: 12px;
		cursor: grab;
	}

	.pcwt-postcards--mobile-edge-peek .pcwt-postcards__track.is-mouse-dragging{
		cursor: grabbing;
		scroll-behavior: auto;
		scroll-snap-type: none;
		user-select: none;
	}

	.pcwt-postcards--mobile-edge-peek .pcwt-postcards__track::-webkit-scrollbar{
		display: none;
	}

	.pcwt-postcards--mobile-edge-peek .pcwt-postcards__item{
		flex: 0 0 82%;
		width: 82%;
		scroll-snap-align: start;
		align-self: stretch;
		height: auto;
	}

	.pcwt-postcards--mobile-edge-peek .pcwt-postcards__shell{
		gap: 8px;
	}
}
