/* Posts carousel (homepage): cards with a peek of the next one + dots.
   Sizes/offsets (--pc-*) are set by Scripts/NewLook/postsCarousel.js; the
   defaults below are what's used until (or if never) the script runs, in
   which case the row is just a plain horizontally scrollable strip. */

.pc {
	--pc-teal: #0e4a5a;
	--pc-body: #3b4448;
	--pc-muted: #56636a;
	--pc-accent: #c8431f;
	--pc-card-width: 280px;
	--pc-gap: 14px;
	--pc-bleed: 0px;
}

/* #main is a flex item next to the sidebar: without this its minimum width is
   that of its widest content, which is now a whole row of cards, so it stops
   shrinking and pushes the sidebar partly off screen */

#main {
	min-width: 0;
}

/* heading row: section title on the left, hint/arrows on the right */

.pc-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 0 0 1.5em 0;
}

#main .pc-head header.major,
#main .pc-head header.major > :last-child {
	margin-bottom: 0;
}

.pc-nav {
	margin-left: auto;
}

.pc-hint {
	display: none;
	align-items: center;
	gap: 4px;
	padding-bottom: 4px;
	color: var(--pc-muted);
	font-size: 0.8125rem;
	font-weight: 500;
}

.pc-arrows {
	display: none;
	gap: 10px;
}

.pc.is-peek.is-scrollable .pc-hint {
	display: inline-flex;
}

.pc.is-paged.is-scrollable .pc-arrows {
	display: flex;
}

button.pc-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1.5px solid #c9d3d6;
	border-radius: 50%;
	box-shadow: none;
	background-color: #fff;
	color: var(--pc-teal) !important;
	line-height: 1;
	transition: opacity 0.2s;
}

button.pc-arrow:hover,
button.pc-arrow:active {
	background-color: #fff;
}

button.pc-arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

/* viewport + track */

.pc-viewport {
	margin: 0 calc(-1 * var(--pc-bleed));
	padding: 4px var(--pc-bleed) 26px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.pc.is-ready .pc-viewport {
	overflow: hidden;
	touch-action: pan-y;
}

.pc.is-ready.is-scrollable .pc-viewport {
	cursor: grab;
}

.pc.is-ready.is-scrollable .pc-viewport:active {
	cursor: grabbing;
}

.pc-track {
	display: flex;
	gap: var(--pc-gap);
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* card */

.pc-card {
	display: flex;
	flex-direction: column;
	flex: 0 0 var(--pc-card-width);
	min-width: 0;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 40, 50, 0.06), 0 10px 28px rgba(15, 40, 50, 0.09);
}

.pc-card-image {
	display: block;
	border: 0;
}

.pc-card-image img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	-webkit-user-drag: none;
	user-select: none;
}

.pc.is-paged .pc-card-image img {
	height: 220px;
}

.pc-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 12px;
	padding: 20px 20px 22px;
}

.pc-card h3 {
	margin: 0;
	color: var(--pc-teal);
	font-size: 1.1875rem;
	line-height: 1.3;
}

.pc.is-paged .pc-card h3 {
	font-size: 1.3125rem;
}

.pc-card p {
	margin: 0;
	color: var(--pc-body);
	font-size: 0.9375rem;
	line-height: 1.55;
}

a.pc-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	min-height: 44px;
	margin-top: auto;
	padding: 0 22px;
	border: 2px solid var(--pc-accent);
	border-radius: 6px;
	background: #fff;
	color: var(--pc-accent);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
}

a.pc-cta:hover {
	border-color: var(--pc-accent);
	background: #fbefeb;
	color: var(--pc-accent) !important;
}

/* dots */

.pc-dots {
	display: none;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
}

.pc.is-scrollable .pc-dots {
	display: flex;
}

.pc-dots button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 44px;
	padding: 0;
	box-shadow: none;
	background-color: transparent;
	line-height: 1;
}

.pc-dots button:hover,
.pc-dots button:active {
	background-color: transparent;
}

.pc-dots span {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 4px;
	background: #c3ccd0;
	transition: all 0.3s;
}

.pc-dots .is-on span {
	width: 24px;
	background: var(--pc-accent);
}

.pc-arrow:focus-visible,
.pc-dots button:focus-visible,
a.pc-cta:focus-visible {
	outline: 3px solid #2f7fd1;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.pc-track,
	.pc-dots span,
	button.pc-arrow {
		transition: none;
	}
}

