/* Salient Period Card — no bundled font: text inherits the site font.
   A per-part "font from site" (H1-H6 / P) is applied by pdc.js. */

/* The wrapper is the container the layout reacts to (the column the card sits in). */
.pdc-wrap {
	container-type: inline-size;
	width: 100%;
}

.pdc-wrap *,
.pdc-wrap *::before,
.pdc-wrap *::after {
	box-sizing: border-box;
}

.pdc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	padding: var(--pdc-pad, 20px);
	background: var(--pdc-card-bg, #fff);
	border: 1px solid var(--pdc-card-border, #e6e6e6);
	border-radius: var(--pdc-radius, 28px);
	font-family: inherit;
	color: #111;
	text-align: start;
}

.pdc-card[dir="rtl"] {
	direction: rtl;
}

.pdc-card[dir="ltr"] {
	direction: ltr;
}

.pdc-card a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	border: 0;
}

/* Reset theme margins on every text part */
.pdc-card .pdc-badge,
.pdc-card .pdc-title,
.pdc-card .pdc-summary,
.pdc-card .pdc-tab-label {
	margin: 0;
	padding: 0;
	letter-spacing: normal;
	text-transform: none;
}

/* ------------------------------------------------------------------
 * Top: image (right) + text (left) on desktop
 * ------------------------------------------------------------------ */
.pdc-top {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.pdc-media {
	position: relative;
	z-index: 2;
	flex: none;
	width: var(--pdc-img-w, 260px);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Square frame (or a custom height when one is set). The image never stretches.
   The frame is a <div>: it does the rounding + clipping, the button on top only catches the click. */
.pdc-card .pdc-zoom {
	position: relative;
	display: block;
	width: 100%;
	height: var(--pdc-img-h, auto);
	aspect-ratio: var(--pdc-ar, 1 / 1);
	margin: 0;
	padding: 0;
	background: var(--pdc-img-bg, #f1f1f1);
	border: 0;
	border-radius: var(--pdc-img-radius, 22px) !important;
	box-shadow: none;
	overflow: hidden;
	/* keeps the rounded corners clipping the image on iOS Safari too */
	isolation: isolate;
	-webkit-mask-image: -webkit-radial-gradient(white, black);
}

.pdc-card button.pdc-zoom-btn {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	opacity: 1;
	cursor: zoom-in;
	-webkit-tap-highlight-color: transparent;
}

.pdc-card button.pdc-zoom-btn:focus-visible {
	outline: 2px solid var(--pdc-accent, #111);
	outline-offset: -3px;
}

.pdc-card .pdc-zoom img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0;
	border: 0;
	border-radius: inherit;
	box-shadow: none;
	object-fit: var(--pdc-fit, cover);
	object-position: center;
	transition: transform 0.4s ease;
}

.pdc-card .pdc-zoom:not(.is-static):hover img {
	transform: scale(1.04);
}

/* small magnifier hint on the main image */
.pdc-zoom-ico {
	position: absolute;
	inset-block-end: 10px;
	inset-inline-start: 10px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	border-radius: 50%;
	pointer-events: none;
}

.pdc-zoom-ico svg {
	width: 15px;
	height: 15px;
}

/* gallery thumbnails under the main image */
.pdc-thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.pdc-card .pdc-thumbs .pdc-zoom {
	height: auto;
	aspect-ratio: 1 / 1;
	border-radius: calc(var(--pdc-img-radius, 22px) * 0.5) !important;
}

.pdc-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pdc-card .pdc-badge {
	align-self: flex-start;
	padding: 5px 14px;
	font-size: 13px;
	line-height: 1.4;
	color: #444;
	background: var(--pdc-badge-bg, #f3f3f3);
	border-radius: 999px;
}

.pdc-head {
	display: flex;
	flex-direction: column;
	gap: var(--pdc-title-gap, 2px);
}

.pdc-card .pdc-title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	color: #111;
}

.pdc-card .pdc-summary {
	font-size: 14px;
	line-height: 1.8;
	color: #555;
}

.pdc-card .pdc-summary[data-pdc-clamp] {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--pdc-lines, 4);
	line-clamp: var(--pdc-lines, 4);
	overflow: hidden;
}

.pdc-card .pdc-summary[data-pdc-clamp].is-open {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: unset;
}

/* when the text is cut, the toggle takes over from the "read more" label */
.pdc-card.has-toggle .pdc-more {
	display: none;
}

.pdc-card .pdc-more {
	margin: 0;
	padding: 0;
	font-weight: 700;
	color: #111;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

/* Whole card is clickable through the title link */
.pdc-card .pdc-card-link {
	color: inherit;
}

.pdc-card .pdc-card-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: var(--pdc-radius, 28px);
	cursor: pointer;
}

.pdc-card .pdc-card-link:focus-visible {
	outline: none;
}

.pdc-card .pdc-card-link:focus-visible::after {
	outline: 2px solid var(--pdc-accent, #111);
	outline-offset: -2px;
}

/* ------------------------------------------------------------------
 * "More description": a plain toggle that continues the summary above it
 * ------------------------------------------------------------------ */
.pdc-tab {
	position: relative;
	z-index: 2;
	align-self: stretch;
	margin-top: 2px;
}

.pdc-card button.pdc-tab-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: auto;
	min-height: 32px;
	margin: 0 !important;
	padding: 4px 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-align: start;
	cursor: pointer;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

.pdc-card button.pdc-tab-btn:focus-visible {
	outline: 2px solid var(--pdc-accent, #111);
	outline-offset: 3px;
	border-radius: 6px;
}

.pdc-card .pdc-tab-label {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	color: #111;
}

/* + / − drawn in CSS so the colors are configurable */
.pdc-toggle {
	position: relative;
	flex: none;
	width: 22px;
	height: 22px;
	background: var(--pdc-plus-bg, #fff);
	border: 1px solid var(--pdc-plus-border, #d6d6d6);
	border-radius: 50%;
}

.pdc-toggle::before,
.pdc-toggle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 2px;
	margin: -1px 0 0 -5px;
	background: var(--pdc-plus, #111);
	border-radius: 2px;
	transition: transform var(--pdc-anim, 450ms) cubic-bezier(0.4, 0, 0.2, 1);
}

.pdc-toggle::after {
	transform: rotate(90deg);
}

.pdc-tab.is-open .pdc-toggle::after {
	transform: rotate(0deg);
}

.pdc-tab.is-open .pdc-toggle::before {
	transform: rotate(180deg);
}

/* the toggle only exists when the text is long enough to be cut */
.pdc-tab[hidden] {
	display: none;
}

/* ------------------------------------------------------------------
 * Narrow container (mobile): text + "more description" first, images UNDER them
 * ------------------------------------------------------------------ */
@container (max-width: 560px) {
	.pdc-card {
		gap: 14px;
		padding: var(--pdc-pad, 14px);
		border-radius: var(--pdc-radius, 24px);
	}

	.pdc-top {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.pdc-text {
		order: 1;
	}

	.pdc-media {
		order: 2;
		width: var(--pdc-img-w-m, 100%);
		max-width: 100%;
	}

	.pdc-card .pdc-zoom {
		height: var(--pdc-img-h-m, auto);
		aspect-ratio: var(--pdc-ar-m, 1 / 1);
	}

	.pdc-card .pdc-thumbs .pdc-zoom {
		height: auto;
		aspect-ratio: 1 / 1;
	}

	.pdc-card .pdc-card-link::after {
		border-radius: var(--pdc-radius, 24px);
	}

	.pdc-card .pdc-badge {
		padding: 4px 12px;
		font-size: 12px;
	}

	.pdc-card .pdc-title {
		font-size: 20px;
	}

	.pdc-card .pdc-summary {
		font-size: 13px;
	}

	.pdc-card .pdc-tab-label {
		font-size: 13px;
	}
}

/* ------------------------------------------------------------------
 * Lightbox (image viewer / gallery)
 * ------------------------------------------------------------------ */
.pdc-lb {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(12, 12, 12, 0.92);
	font-family: inherit;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.pdc-lb[hidden] {
	display: none;
}

.pdc-lb.is-on {
	opacity: 1;
}

.pdc-lb-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 56px 16px;
	touch-action: pan-y;
}

.pdc-lb-img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	user-select: none;
	-webkit-user-drag: none;
}

.pdc-lb button.pdc-lb-btn {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.pdc-lb button.pdc-lb-btn:hover {
	background: rgba(255, 255, 255, 0.28);
}

.pdc-lb button.pdc-lb-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.pdc-lb-btn svg {
	width: 20px;
	height: 20px;
}

.pdc-lb-close {
	top: 12px;
	inset-inline-end: 12px;
}

.pdc-lb-prev,
.pdc-lb-next {
	top: 50%;
	margin-top: -22px;
}

.pdc-lb-prev {
	inset-inline-start: 12px;
}

.pdc-lb-next {
	inset-inline-end: 12px;
}

/* arrows point toward the edge they sit on (base icon points left) */
.pdc-lb[dir="rtl"] .pdc-lb-prev svg,
.pdc-lb:not([dir="rtl"]) .pdc-lb-next svg {
	transform: scaleX(-1);
}

.pdc-lb-count {
	direction: ltr;
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	padding: 4px 12px;
	font-size: 13px;
	line-height: 1.4;
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 999px;
}

.pdc-lb.is-single .pdc-lb-prev,
.pdc-lb.is-single .pdc-lb-next,
.pdc-lb.is-single .pdc-lb-count {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.pdc-lb,
	.pdc-card .pdc-zoom img,
	.pdc-toggle::before,
	.pdc-toggle::after {
		transition: none;
	}
}
