/* ==========================================================================
   MKS Projects — sequence steps
   Values aligned with Archicon's Horizontal Portfolio Showcase.

   Every step is as tall as the strip (--mks-step-height). Media keep the bottom
   --mks-caption-space free for captions and navigation, so all images share the same
   top and bottom edges. Widths are explicit (media height × aspect from the server):
   an image with height: 100% inside a flex row would otherwise size its step
   on its natural width.
   ========================================================================== */

.qodef-mks-project-content,
.qodef-mks-portfolio {
	--mks-caption-space: 32px;
	--mks-caption-color: #5f5f5f;
}

.qodef-mks-project-content {
	--mks-step-height: 70vh;
}

/* Shared by every step below. */
.qodef-m-item {
	--mks-media-height: calc(var(--mks-step-height) - var(--mks-caption-space));
}

/* One row of steps, as the client will see it on the site.
   No child combinator: in the editor Elementor adds .elementor-section-wrap in between. */
.qodef-mks-project-content .e-con.e-parent,
.qodef-mks-project-content .e-con.e-parent > .e-con-inner {
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	overflow-x: auto;
}

.qodef-mks-project-content .elementor-widget {
	flex: 0 0 auto;
	width: auto;
	max-width: none;
}

/* Captions and buttons
   ========================================================================== */

.qodef-m-item .qodef-e-caption {
	color: var(--mks-caption-color);
	font-family: var(--mks-font-ui, var(--mks-font-family, inherit));
	font-size: 13px;
	line-height: 1.4em;
	margin: 10px 0 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Plain icon buttons: reset Archicon's button styles. */
.qodef-m-item button,
.qodef-mks-lightbox button {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	justify-content: center;
	line-height: 1;
	margin: 0;
	min-height: 0;
	padding: 6px;
	text-transform: none;
}

.qodef-m-item button:hover,
.qodef-mks-lightbox button:hover {
	color: var(--qode-main-color, #000);
}

.qodef-m-item button:focus-visible,
.qodef-mks-lightbox button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Photo and video: one media at full step height
   ========================================================================== */

.qodef-m-item--photo,
.qodef-m-item--video {
	display: flex;
	flex-direction: column;
	height: var(--mks-step-height);
	margin: 0;
	width: calc(var(--mks-media-height) * var(--mks-aspect, 1.5));
}

.qodef-m-item--photo .qodef-e-media,
.qodef-m-item--video .qodef-e-media {
	flex: 0 0 auto;
	height: var(--mks-media-height);
	overflow: hidden;
	position: relative;
}

.qodef-m-item .qodef-e-image,
.qodef-m-item--video .qodef-e-video,
.qodef-m-item--video .qodef-e-iframe {
	border: 0;
	display: block;
	height: 100%;
	max-width: none;
	object-fit: cover;
	width: 100%;
}

/* Photo pair: two photos stacked, each half the media height
   ========================================================================== */

.qodef-m-item--photo-pair {
	--mks-pair-gap: 12px;
	--mks-pair-height: calc((var(--mks-media-height) - var(--mks-pair-gap)) / 2);
	display: flex;
	flex-direction: column;
	gap: var(--mks-pair-gap);
	height: var(--mks-step-height);
	margin: 0;
	width: calc(var(--mks-pair-height) * var(--mks-aspect-max, 1.5));
}

.qodef-m-item--photo-pair.qodef--align-equal {
	width: calc(var(--mks-pair-height) * var(--mks-aspect-min, 1.5));
}

.qodef-m-item--photo-pair .qodef-e-media {
	flex: 0 0 auto;
	height: var(--mks-pair-height);
	max-width: 100%;
	overflow: hidden;
	width: calc(var(--mks-pair-height) * var(--mks-aspect, 1.5));
}

.qodef-m-item--photo-pair.qodef--align-equal .qodef-e-media {
	width: 100%;
}

.qodef-m-item--photo-pair .qodef-e-caption {
	margin-top: -2px;
}

/* Text (Archicon outro text) and quote
   ========================================================================== */

.qodef-m-item--text,
.qodef-m-item--quote {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: var(--mks-step-height);
	margin: 0;
	padding: 24px 42px;
}

.qodef-m-item--quote {
	justify-content: flex-end;
	padding-bottom: var(--mks-caption-space);
}

/* Box widths only on the horizontal layout: below 1024 px every step is full width. */
@media only screen and (min-width: 1025px) {
	.qodef-m-item--text.qodef--width-narrow { width: 290px; }
	.qodef-m-item--text.qodef--width-medium,
	.qodef-m-item--quote.qodef--width-medium { width: 477px; }
	.qodef-m-item--text.qodef--width-wide,
	.qodef-m-item--quote.qodef--width-wide { width: 640px; }
	.qodef-m-item--quote.qodef--width-xwide { width: 60vw; }
}

.qodef-m-item--text.qodef--valign-start { justify-content: flex-start; }
.qodef-m-item--text.qodef--valign-center { justify-content: center; }
.qodef-m-item--text.qodef--valign-end { justify-content: flex-end; }

.qodef-m-item--text .qodef-e-content > * {
	margin: 0;
}

.qodef-m-item--text .qodef-e-content > * + * {
	margin-top: 18px;
}

.qodef-m-item--text .qodef-e-content p {
	color: #555;
	font-size: 18px;
	line-height: 1.5em;
}

/* Opening sentence of a project, written in Elementor as blockquote > h3/h4 > strong: Archicon
   would make it a bold 28 px heading. Here 24 px light, the "contacts" step of the site scale
   (6/11/2026), black on white; the words stay as the studio wrote them. */
.qodef-m-item--text .qodef-e-content blockquote {
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	quotes: none;
}

.qodef-m-item--text .qodef-e-content blockquote::before,
.qodef-m-item--text .qodef-e-content blockquote::after {
	content: none;
}

.qodef-m-item--text .qodef-e-content :is(h1, h2, h3, h4, h5, h6) {
	color: #000;
	font-family: var(--mks-font-family, inherit);
	font-size: var(--mks-text-lg, 24px);
	font-weight: 300;
	letter-spacing: 0;
	line-height: 1.3em;
	text-transform: none;
}

.qodef-m-item--text .qodef-e-content :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
	font-weight: inherit;
}

/* Quote: Archicon's blockquote look is kept (thin line left of the paragraphs, 20px indent);
   only size, spacing and pseudo-elements are ours. */
.qodef-m-item--quote .qodef-e-quote {
	background: none;
	border: 0;
	color: inherit;
	font-size: clamp(24px, 2.2vw, 32px);
	font-weight: 300;
	line-height: 1.25em;
	margin: 0;
	padding: 0;
	quotes: none;
}

.qodef-m-item--quote .qodef-e-quote::before,
.qodef-m-item--quote .qodef-e-quote::after {
	content: none;
	display: none;
}

.qodef-m-item--quote .qodef-e-quote p {
	color: inherit;
	font: inherit;
	margin: 0;
}

.qodef-m-item--quote .qodef-e-quote p + p {
	margin-top: .6em;
}

/* Aligned with the quote text, after Archicon's line and indent (1px + 20px).
   Archicon centres every figcaption (text-align and auto margins): photo captions keep that. */
.qodef-m-item--quote .qodef-e-author {
	font-family: var(--mks-font-ui, var(--mks-font-family, inherit));
	font-size: 13px;
	line-height: 1.4em;
	margin: 28px 0 0;
	padding-left: 21px;
	text-align: left;
	text-transform: uppercase;
}

.qodef-m-item--quote .qodef-e-name {
	display: block;
	font-style: normal;
}

.qodef-m-item--quote .qodef-e-role {
	color: var(--mks-caption-color);
	display: block;
	margin-top: 2px;
}

/* Gallery and drawings: one image at a time
   ========================================================================== */

.qodef-m-item--gallery {
	display: flex;
	flex-direction: column;
	height: var(--mks-step-height);
	margin: 0;
	width: calc(var(--mks-media-height) * var(--mks-aspect, 1.5));
}

.qodef-m-item--gallery .qodef-e-slides {
	cursor: pointer;
	display: grid;
	flex: 0 0 auto;
	height: var(--mks-media-height);
	overflow: hidden;
}

.qodef-m-item--gallery.qodef--variant-drawings .qodef-e-slides {
	cursor: zoom-in;
}

.qodef-m-item--gallery .qodef-e-slide {
	grid-area: 1 / 1;
	margin: 0;
	min-height: 0;
	opacity: 0;
	transition: opacity .6s ease, visibility 0s linear .6s;
	visibility: hidden;
}

.qodef-m-item--gallery .qodef-e-slide.qodef--active {
	opacity: 1;
	transition: opacity .6s ease;
	visibility: visible;
}

.qodef-m-item--gallery .qodef-e-media {
	box-sizing: border-box;
	height: 100%;
}

.qodef-m-item--gallery .qodef-e-image {
	object-fit: contain;
}

/* Drawings: light background, never cropped, a margin around the sheet. */
.qodef-m-item--gallery.qodef--variant-drawings .qodef-e-media {
	background-color: #f4f4f4;
	padding: 24px;
}

.qodef-m-item--gallery .qodef-e-nav {
	align-items: center;
	color: var(--mks-caption-color);
	display: flex;
	flex: 0 0 auto;
	font-size: 13px;
	gap: 4px;
	height: var(--mks-caption-space);
}

.qodef-m-item--gallery .qodef-e-nav .qodef-e-caption {
	flex: 1 1 auto;
	margin: 0;
	min-width: 0;
}

.qodef-m-item--gallery .qodef-e-counter {
	font-family: var(--mks-font-ui, var(--mks-font-family, inherit));
	margin-right: 6px;
	white-space: nowrap;
}

.qodef-m-item--gallery .qodef-e-current {
	color: #000;
}

.qodef-m-item--gallery.qodef--empty {
	align-items: center;
	border: 1px dashed #c4c4c4;
	box-sizing: border-box;
	color: var(--mks-caption-color);
	justify-content: center;
	padding: 24px;
	width: 320px;
}

/* Video embed: poster and play button until the click
   ========================================================================== */

.qodef-m-item--video .qodef-e-embed {
	background-color: #111;
	color: #fff;
	height: 100%;
	padding: 0;
	position: relative;
	width: 100%;
}

.qodef-m-item--video .qodef-e-embed:hover {
	color: #fff;
}

.qodef-m-item--video .qodef-e-embed .qodef-e-image {
	inset: 0;
	position: absolute;
	transition: transform 1s cubic-bezier(.33, .02, 0, .93);
}

.qodef-m-item--video .qodef-e-embed:hover .qodef-e-image {
	transform: scale(1.04);
}

.qodef-m-item--video .qodef-e-play {
	border: 1px solid currentColor;
	border-radius: 50%;
	height: 76px;
	position: relative;
	width: 76px;
}

.qodef-m-item--video .qodef-e-play::after {
	border-bottom: 10px solid transparent;
	border-left: 16px solid currentColor;
	border-top: 10px solid transparent;
	content: "";
	left: 31px;
	position: absolute;
	top: 27px;
}

.qodef-m-item--video .qodef-e-provider {
	bottom: 16px;
	font-family: var(--mks-font-ui, var(--mks-font-family, inherit));
	font-size: 12px;
	left: 18px;
	position: absolute;
	text-transform: uppercase;
}

/* Drawings lightbox (native <dialog>)
   ========================================================================== */

.qodef-mks-lightbox {
	background: #fff;
	border: 0;
	box-sizing: border-box;
	color: #000;
	height: 100vh;
	inset: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	padding: 0;
	width: 100vw;
}

.qodef-mks-lightbox[open] {
	display: flex;
	flex-direction: column;
}

.qodef-mks-lightbox::backdrop {
	background: rgba(255, 255, 255, .6);
}

.qodef-mks-lightbox .qodef-e-stage {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	flex: 1 1 auto;
	justify-content: center;
	min-height: 0;
	overflow: hidden;
	padding: 4vh 4vw 0;
}

.qodef-mks-lightbox .qodef-e-image {
	cursor: zoom-in;
	display: block;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
}

.qodef-mks-lightbox.qodef--zoomed .qodef-e-stage {
	display: block;
	overflow: auto;
}

.qodef-mks-lightbox.qodef--zoomed .qodef-e-image {
	cursor: zoom-out;
	max-height: none;
	max-width: none;
}

.qodef-mks-lightbox .qodef-e-bar {
	align-items: center;
	color: var(--mks-caption-color, #5f5f5f);
	display: flex;
	flex: 0 0 auto;
	font-size: 13px;
	gap: 8px;
	padding: 14px 4vw 22px;
}

.qodef-mks-lightbox .qodef-e-caption {
	flex: 1 1 auto;
	font-family: var(--mks-font-ui, var(--mks-font-family, inherit));
	margin: 0;
}

.qodef-mks-lightbox .qodef-e-counter {
	font-family: var(--mks-font-ui, var(--mks-font-family, inherit));
	margin-right: 8px;
}

.qodef-mks-lightbox.qodef--single .qodef-e-prev,
.qodef-mks-lightbox.qodef--single .qodef-e-next {
	display: none;
}

/* Vertical layout
   ========================================================================== */

@media only screen and (max-width: 1024px) {
	.qodef-mks-project-content .e-con.e-parent,
	.qodef-mks-project-content .e-con.e-parent > .e-con-inner {
		flex-direction: column;
		overflow-x: visible;
	}

	.qodef-m-item--photo,
	.qodef-m-item--video,
	.qodef-m-item--photo-pair,
	.qodef-m-item--gallery,
	.qodef-m-item--text,
	.qodef-m-item--quote {
		height: auto;
		width: 100%;
	}

	.qodef-m-item--photo .qodef-e-media,
	.qodef-m-item--video .qodef-e-media,
	.qodef-m-item--photo-pair .qodef-e-media {
		aspect-ratio: var(--mks-aspect, 1.5);
		height: auto;
		width: 100%;
	}

	.qodef-m-item--gallery .qodef-e-slides {
		aspect-ratio: var(--mks-aspect, 1.5);
		height: auto;
	}

	.qodef-m-item--gallery.qodef--empty {
		min-height: 160px;
	}

	.qodef-m-item .qodef-e-caption {
		white-space: normal;
	}

	.qodef-m-item--gallery .qodef-e-nav {
		height: auto;
		min-height: var(--mks-caption-space);
	}

	.qodef-m-item--text,
	.qodef-m-item--quote {
		padding: 0;
	}
}
