/* Original source content: additive styles; existing palette and local fonts remain intact. */
.po-source-about .po-split,
.po-project-architecture .po-split,
.wp-block-columns.po-project-architecture,
.po-source-plan .po-split,
.po-source-location .po-split {
	align-items: start;
}

.po-source-about .po-copy,
.po-source-project .po-copy,
.po-project-architecture .po-copy-right {
	font-size: 16px;
	line-height: 1.7;
}

.po-about-original.po-about-original,
.po-original-plan.po-original-plan,
.po-original-location.po-original-location,
.po-unit-cover.po-unit-cover,
.po-gallery-image.po-gallery-image {
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.po-about-original img,
.po-source-project .po-project-image img,
.po-unit-cover img,
.po-original-location img {
	width: 100%;
	height: auto;
	max-height: 540px;
	aspect-ratio: auto;
	object-fit: contain;
	background: var(--po-ivory);
}

.po-source-project .po-project-image figcaption {
	position: static;
	margin-top: 0.75rem;
	color: var(--po-muted);
	font-size: 0.75rem;
	text-shadow: none;
}

/* The six original details remain two native three-column rows. */
.wp-block-columns.po-details-grid + .wp-block-columns.po-details-grid {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--po-line);
}

.po-source-stats.po-source-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: start;
	gap: 16px 24px;
	margin-top: 28px;
	padding-block: 20px;
	border-top: 1px solid var(--po-line);
	border-bottom: 1px solid var(--po-line);
}

.po-source-stats > p {
	min-width: 0;
	margin: 0;
	color: var(--po-espresso);
	font-size: 13.5px;
	line-height: 1.65;
}

.po-source-stats strong {
	font-weight: 600;
}

.po-apartment {
	padding-block: var(--po-section-space);
	border-top: 1px solid var(--po-line);
}

.po-apartment .po-container > h2 {
	margin-top: 0;
	margin-bottom: 36px;
}

.wp-block-columns.po-apartment-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: start;
	gap: clamp(32px, 5vw, 72px);
	margin-top: 0;
	margin-bottom: 0;
}

.po-apartment-layout > .wp-block-column {
	min-width: 0;
	margin-top: 0;
}

.po-apartment-copy.po-apartment-copy {
	min-width: 0;
	font-size: 16px;
	line-height: 1.7;
}

.po-apartment-copy.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.po-gallery.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: none;
}

.po-apartment-copy h3 {
	margin-top: 0;
	margin-bottom: 22px;
}

.po-apartment-copy > :last-child {
	margin-bottom: 0;
}

.po-apartment img {
	object-fit: contain;
}

.po-unit-cover a,
.po-gallery-image a,
.po-original-plan a,
.po-original-location a {
	display: block;
}

.po-gallery.po-gallery {
	margin-top: 16px;
}

.po-gallery > .wp-block-columns {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: start;
	gap: 12px;
	margin-top: 0;
	margin-bottom: 12px;
}

.po-gallery > .wp-block-columns:last-child {
	margin-bottom: 0;
}

.po-gallery .wp-block-column {
	min-width: 0;
	margin-top: 0;
}

.po-gallery-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	background: #eee;
}

.po-gallery-image figcaption {
	font-size: 0.6875rem;
	line-height: 1.5;
}

.po-unit-facts.po-unit-facts {
	margin-block: 28px 22px;
	padding-block: 18px;
	border-top: 1px solid var(--po-line);
	border-bottom: 1px solid var(--po-line);
}

.po-unit-facts p {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.7;
}

.po-unit-facts p:last-child {
	margin-bottom: 0;
}

.po-source-price.po-source-price {
	margin-bottom: 8px;
	color: var(--po-espresso);
	font-family: var(--po-serif);
	font-size: clamp(1.3rem, 2vw, 1.65rem);
	line-height: 1.4;
}

.po-source-status.po-source-status {
	color: var(--po-muted);
	font-size: 14px;
	line-height: 1.6;
}

.po-source-note.po-source-note,
.po-unit-review.po-unit-review,
.po-apartment .po-review-note.po-review-note {
	margin-top: 22px;
	padding: 16px 18px;
	border: 1px solid var(--po-line);
	background: #eeebe5;
	color: var(--po-espresso);
	font-size: 13.5px;
	line-height: 1.7;
}

.po-source-note p,
.po-unit-review p,
.po-apartment .po-review-note p {
	font-size: 13.5px;
	line-height: 1.7;
}

.po-source-note > :last-child,
.po-unit-review > :last-child {
	margin-bottom: 0;
}

.po-apartment-copy .wp-block-buttons {
	margin-top: 24px;
}

.po-original-plan img {
	width: 100%;
	height: auto;
	max-height: 700px;
	aspect-ratio: auto;
	object-fit: contain;
	background: var(--po-ivory);
}

.po-source-location .po-copy-right p {
	font-size: 16px;
	line-height: 1.7;
}

.po-footer__contact {
	max-width: 360px;
	color: var(--po-muted);
	font-size: 0.75rem;
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.po-footer__contact p {
	margin: 0 0 8px;
}

/* Native dialog is the only generated UI; every content image retains its file link. */
body.po-lightbox-open {
	overflow: hidden;
}

.po-lightbox {
	width: min(1200px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 16px;
	overflow: auto;
	border: 1px solid var(--po-line);
	border-radius: 0;
	background: var(--po-ivory);
	color: var(--po-charcoal);
	box-shadow: none;
}

.po-lightbox::backdrop {
	background: rgba(38, 35, 31, 0.84);
}

.po-lightbox__controls {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.po-lightbox__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 44px;
	padding: 4px;
	border: 1px solid var(--po-line);
	border-radius: 0;
	background: transparent;
	color: var(--po-espresso);
	font-family: var(--po-sans);
	font-size: 24px;
	line-height: 1;
}

.po-lightbox__button:hover {
	background: #eeebe5;
}

.po-lightbox__button[hidden] {
	display: none;
}

.po-lightbox__close {
	margin-left: auto;
}

.po-lightbox__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 80px;
	background: var(--po-ivory);
}

.po-lightbox__image {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: calc(100vh - 230px);
	max-height: calc(100dvh - 230px);
	object-fit: contain;
}

.po-lightbox__caption,
.po-lightbox__count,
.po-lightbox__file {
	font-size: 13.5px;
	line-height: 1.6;
}

.po-lightbox__caption {
	margin: 12px 0 4px;
	color: var(--po-espresso);
	overflow-wrap: anywhere;
}

.po-lightbox__count {
	margin: 0;
	color: var(--po-muted);
}

.po-lightbox__file {
	display: inline-block;
	margin-top: 8px;
}

@media (max-width: 781px) {
	.wp-block-columns.po-apartment-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.po-source-stats.po-source-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.po-gallery > .wp-block-columns {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}

	.po-about-original img,
	.po-source-project .po-project-image img,
	.po-unit-cover img,
	.po-original-location img {
		max-height: min(540px, 65vh);
	}

	.po-original-plan img {
		max-height: min(700px, 80vh);
	}
}

@media (max-width: 540px) {
	.po-apartment .po-container > h2 {
		margin-bottom: 28px;
	}

	.po-source-stats.po-source-stats {
		gap: 14px;
	}

	.po-gallery > .wp-block-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.po-footer__contact {
		max-width: 100%;
	}

	.po-lightbox {
		width: calc(100vw - 16px);
		max-width: calc(100vw - 16px);
		padding: 12px;
	}
}

/* Haus Obexer: supplied project photographs, kept uncropped. */
.po-reference-picture {
    padding-top: 0;
    padding-bottom: 0;
}
.po-reference-hero img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.po-reference-hero a {
    display: block;
}
.po-reference-description .po-split {
    align-items: start;
}
.po-reference-gallery-section {
    border-top: 1px solid var(--po-line);
}
.po-reference-gallery-section .po-gallery {
    margin-top: 32px;
}
.po-reference-stats.po-source-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.po-reference-gallery .po-gallery-image img {
    aspect-ratio: 3 / 2;
}
@media (max-width: 540px) {
    .po-reference-stats.po-source-stats {
        grid-template-columns: 1fr;
    }
}

/* User-requested presentation: no visible captions beside or beneath images.
   Alt attributes and all gallery controls remain available. */
figcaption,
.wp-caption-text,
.gallery-caption,
.po-image-label,
.po-lightbox__caption {
    display: none !important;
}

/* Editorial migration notes belong in the handover, not the public website. */
.po-review-note,
.po-source-note {
    display: none !important;
}

/* Compact inner-page headers; both language homepages retain their large hero. */
.po-inner-page .po-header__inner {
    min-height: 76px;
    padding-block: 10px;
}
.po-inner-page .po-brand--header img {
    width: 126px;
    max-height: 56px;
}
.po-inner-page .po-page-intro {
    padding-top: clamp(28px, 3vw, 44px);
    padding-bottom: clamp(26px, 2.8vw, 40px);
}
.po-inner-page .entry-content h1,
.po-inner-page .po-page-intro h1 {
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    line-height: 1.18;
    margin-bottom: 16px;
}
.po-inner-page .entry-content h2 {
    font-size: clamp(1.5rem, 2.4vw, 2.15rem);
    line-height: 1.24;
}
.po-inner-page .entry-content h3 {
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
}
.po-inner-page .po-page-intro .po-eyebrow {
    margin-bottom: 12px;
}
.po-inner-page .po-page-intro p:not(.po-eyebrow) {
    font-size: 1rem;
    line-height: 1.6;
}
.po-inner-page .po-page-intro .po-lead:empty {
    display: none;
}
@media (max-width: 960px) {
    .po-inner-page .po-header__inner {
        min-height: 66px;
        padding-block: 8px;
    }
    .po-inner-page .po-brand--header img {
        width: 110px;
        max-height: 48px;
    }
}
@media (max-width: 540px) {
    .po-inner-page .po-page-intro {
        padding-block: 26px 24px;
    }
    .po-inner-page .po-page-intro h1 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
}

/* Supplied silent video replaces the home hero image once playback is ready. */
.po-hero-media .po-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}
.po-hero-media .po-hero-video.is-playing {
    opacity: 1;
}
.po-hero .po-hero-video-toggle {
    position: absolute;
    right: 5%;
    bottom: 24px;
    z-index: 3;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid rgba(255,255,255,.7);
    background: rgba(27,23,19,.55);
    color: #fff;
    font: 12px/1.4 var(--po-sans);
    cursor: pointer;
}
.po-hero-video-toggle[hidden] {
    display: none;
}
@media (prefers-reduced-motion: reduce) {
    .po-hero-media .po-hero-video {
        display: none;
        transition: none;
    }
}

/* Project-page header photograph requested for Green Residence Fornace. */
.po-project-header.po-section {
    padding-top: 28px;
    padding-bottom: 24px;
}
.po-project-header-image img {
    display: block;
    width: 100%;
    height: clamp(180px, 22vw, 280px);
    object-fit: cover;
    object-position: center 45%;
}

.po-inner-page .po-standard-heading h1 { font-size:clamp(1.625rem,3vw,2.65rem); line-height:1.14; }

/* PO compact headings: start */
body.po-site #po-main{--po-heading-hero:clamp(1.75rem,3vw,2.5rem);--po-heading-h1:clamp(1.5rem,2.4vw,1.875rem);--po-heading-h2:clamp(1.25rem,2vw,1.625rem);--po-heading-h3:clamp(1.0625rem,1.25vw,1.125rem);--po-heading-h4:1rem;--po-heading-h5:.875rem;--po-heading-h6:.75rem;}
body.po-site #po-main h1{font-size:var(--po-heading-h1) !important;line-height:1.25;}
body.po-site #po-main h2{font-size:var(--po-heading-h2) !important;line-height:1.25;}
body.po-site #po-main h3{font-size:var(--po-heading-h3) !important;line-height:1.25;}
body.po-site #po-main h4{font-size:var(--po-heading-h4) !important;line-height:1.25;}
body.po-site #po-main h5{font-size:var(--po-heading-h5) !important;line-height:1.25;}
body.po-site #po-main h6{font-size:var(--po-heading-h6) !important;line-height:1.25;}
body.po-site #po-main h1.po-hero-title{font-size:var(--po-heading-hero) !important;max-width:22ch !important;line-height:1.18;}
/* PO compact headings: end */

/* PO home reference mobile order: start */
@media (max-width: 781px) {
    .po-home-reference .wp-block-columns.po-split > .po-copy {
        order: 1;
    }
    .po-home-reference .wp-block-columns.po-split > .po-project-visual {
        order: 2;
    }
}
/* PO home reference mobile order: end */

/* Mobile footer: concise single-line legal navigation; desktop contacts remain. */
.po-footer__copyright-mobile { display: none; }
@media (max-width: 781px) {
    .po-footer__email-row, .po-footer__website-row { display: none; }
    .po-footer__copyright-desktop { display: none; }
    .po-footer__copyright-mobile { display: inline; white-space: nowrap; flex-shrink: 0; }
    .po-footer__bottom { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
    .po-footer__bottom nav { flex-shrink: 0; }
    .po-footer__bottom ul { flex-wrap: nowrap; gap: 10px; white-space: nowrap; }
    .po-footer .po-footer__bottom a { font-size: 11px; }
}
/* Requested clean hero: keep muted video playback without a visible pause button. */
.po-hero-video-toggle { display: none !important; }

/* PO consistent home images: start */
@media (min-width: 782px) {
    .po-source-about .wp-block-columns.po-split,
    .po-home-reference .wp-block-columns.po-split {
        grid-template-columns: 1.35fr 0.85fr;
        gap: clamp(36px, 5.2vw, 80px);
    }
    .po-source-project .wp-block-columns.po-split {
        grid-template-columns: 0.85fr 1.35fr;
        gap: clamp(36px, 5.2vw, 80px);
    }
}
.po-source-about .po-about-original,
.po-source-project .po-project-image,
.po-home-reference .po-about-original {
    width: 100%;
    aspect-ratio: 2000 / 1332;
    overflow: hidden;
}
.po-source-about .po-about-original img,
.po-source-project .po-project-image img,
.po-home-reference .po-about-original img {
    display: block;
    width: 100%;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: 2000 / 1332 !important;
    object-fit: cover;
    object-position: center;
}
/* PO consistent home images: end */

/* Desktop footer: requested vertical navigation. */
@media (min-width: 782px) {
    .po-footer__links { text-align: left; }
    .po-footer__links nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
}
/* Native, keyboard-accessible back-to-top link on every page. */
.po-footer__back-top { display: flex; justify-content: center; padding-bottom: 22px; }
.po-footer a.po-back-to-top {
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--po-line); border-radius: 50%;
    color: var(--po-charcoal); background: transparent;
    font-size: 24px; line-height: 1; text-decoration: none;
}
.po-footer a.po-back-to-top:hover { background: var(--po-espresso); color: #fff; }
.po-footer a.po-back-to-top:focus-visible { outline: 2px solid var(--po-espresso); outline-offset: 4px; }

/* PO property gallery and header video: start */
/* Four existing thumbnails form two full-width rows, aligned with the main photograph. */
.po-apartment .po-gallery {
    width: 100%;
    max-width: 100%;
}
.po-apartment .po-gallery > .wp-block-columns.po-gallery-row {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Same supplied silent video, inside the existing compact project image header. */
.po-project-header-image {
    position: relative;
    overflow: hidden;
}
.po-project-header-image .po-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}
.po-project-header-image .po-hero-video.is-playing {
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .po-project-header-image .po-hero-video {
        display: none;
        transition: none;
    }
}
/* PO property gallery and header video: end */
