/**
 * Single page layout pilot — /travels/ (body.qc-layout-pilot).
 *
 * @package Quack\Events
 */

/* --------------------------------------------------------------------------
   Pilot: wide editorial layout for /travels/
   -------------------------------------------------------------------------- */

body.qc-layout-pilot.page-template-page-glass,
body.qc-layout-pilot.page-template-page-glass-php {
	--qc-content-max-wide: 1720px;
	--qc-page-gutter: 3.5rem;
	--qc-section-gap: 3rem;
	--wp--style--global--content-size: 1400px;
	--wp--style--global--wide-size: 1720px;
}

@media (max-width: 767px) {
	body.qc-layout-pilot.page-template-page-glass,
	body.qc-layout-pilot.page-template-page-glass-php {
		--qc-page-gutter: 1.25rem;
		--qc-section-gap: 2rem;
	}
}

body.qc-layout-pilot.page-template-page-glass .container-xxl.qc-glass-container,
body.qc-layout-pilot.page-template-page-glass-php .container-xxl.qc-glass-container {
	max-width: none !important;
	width: 100% !important;
	margin-inline: 0 !important;
	padding-inline: var(--qc-page-gutter) !important;
	border-radius: 0 !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-header-section,
body.qc-layout-pilot.page-template-page-glass-php .qc-header-section {
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem) !important;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body.qc-layout-pilot.page-template-page-glass .qc-header-section .display-4,
body.qc-layout-pilot.page-template-page-glass-php .qc-header-section .display-4 {
	font-size: clamp(2rem, 4vw, 3.25rem);
	line-height: 1.15;
	max-width: none;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content {
	width: 100%;
	max-width: none;
	font-size: 1.0625rem;
	line-height: 1.7;
}

/* Undo 800px Gutenberg constrained column inside the glass card. */
body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--wp--style--global--content-size) !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .is-layout-constrained > .alignwide,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .is-layout-constrained > .alignwide {
	max-width: var(--wp--style--global--wide-size) !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content p,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content p,
body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content li,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content li {
	max-width: none;
}

/* Half-image / half-text sections (wrapped via the_content filter). */
body.qc-layout-pilot .qc-split-section {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2.75rem);
	align-items: center;
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

body.qc-layout-pilot .qc-split-section--reverse .qc-split-section__media {
	order: 2;
}

body.qc-layout-pilot .qc-split-section--reverse .qc-split-section__body {
	order: 1;
}

body.qc-layout-pilot .qc-split-section__media {
	min-width: 0;
}

body.qc-layout-pilot .qc-split-section__media .wp-block-image,
body.qc-layout-pilot .qc-split-section__media figure {
	margin: 0 !important;
	width: 100% !important;
	max-width: none !important;
	height: 100%;
}

body.qc-layout-pilot .qc-split-section__media img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 260px;
	max-height: min(42vh, 420px);
	object-fit: cover;
	border-radius: 10px;
}

body.qc-layout-pilot .qc-split-section__body {
	min-width: 0;
}

body.qc-layout-pilot .qc-split-section__body > .wp-block-heading:first-child,
body.qc-layout-pilot .qc-split-section__body > h2:first-child {
	margin-top: 0;
}

body.qc-layout-pilot .qc-split-section__body h2,
body.qc-layout-pilot .qc-split-section__body .wp-block-heading {
	font-size: clamp(1.2rem, 2vw, 1.65rem);
	margin-top: 1.75rem;
	margin-bottom: 0.75rem;
	letter-spacing: 0.04em;
	line-height: 1.25;
}

body.qc-layout-pilot .qc-split-section__body h2:first-child,
body.qc-layout-pilot .qc-split-section__body .wp-block-heading:first-child {
	margin-top: 0;
}

body.qc-layout-pilot .qc-split-section__body p {
	margin-bottom: 1rem;
}

body.qc-layout-pilot .qc-split-section--text-only {
	grid-template-columns: 1fr;
}

@media (max-width: 991px) {
	body.qc-layout-pilot .qc-split-section,
	body.qc-layout-pilot .qc-split-section--reverse {
		grid-template-columns: 1fr;
	}

	body.qc-layout-pilot .qc-split-section--reverse .qc-split-section__media,
	body.qc-layout-pilot .qc-split-section--reverse .qc-split-section__body {
		order: unset;
	}

	body.qc-layout-pilot .qc-split-section__media img {
		min-height: 200px;
		max-height: 320px;
	}
}

/* Elementor widgets embedded in page content. */
body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .elementor-widget-container,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .elementor-widget-container {
	max-width: 100% !important;
	width: 100% !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .elementor-section,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .elementor-section {
	max-width: 100% !important;
}

/* Gutenberg Columns — image + text side by side (editor layout). */
body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-columns,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-columns {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: clamp(1.5rem, 3vw, 2.75rem) !important;
	margin-bottom: clamp(2rem, 4vw, 3rem) !important;
	width: 100% !important;
	max-width: none !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-columns > .wp-block-column,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-columns > .wp-block-column {
	flex: 1 1 0 !important;
	min-width: 0 !important;
	max-width: none !important;
	width: auto !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-column .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-column .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-column .wp-block-image,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-column .wp-block-image,
body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-column figure,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-column figure {
	margin: 0 !important;
	width: 100% !important;
	max-width: none !important;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-column .wp-block-image img,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-column .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: min(40vh, 380px);
	object-fit: cover;
	border-radius: 10px;
}

body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-column p,
body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-column p {
	max-width: none;
}

@media (max-width: 781px) {
	body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-columns,
	body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-columns {
		flex-wrap: wrap !important;
	}

	body.qc-layout-pilot.page-template-page-glass .qc-glass-page-content .wp-block-columns > .wp-block-column,
	body.qc-layout-pilot.page-template-page-glass-php .qc-glass-page-content .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
		flex-grow: 1 !important;
	}
}

/* --------------------------------------------------------------------------
   Default template pilot (rollout)
   -------------------------------------------------------------------------- */

body.qc-layout-pilot:not([class*="elementor-page-"]):not(.page-template-page-glass):not(.page-template-page-glass-php) .site-main {
	padding-inline: var(--quack-content-gutter, 48px);
	box-sizing: border-box;
}

body.qc-layout-pilot:not(.page-template-page-glass):not(.page-template-page-glass-php) .single-hero__content {
	width: 100%;
	max-width: var(--quack-content-max-width, 1320px);
	margin-inline: auto;
	padding-inline: var(--quack-content-gutter, 48px);
	box-sizing: border-box;
}

@media (max-width: 768px) {
	body.qc-layout-pilot:not([class*="elementor-page-"]):not(.page-template-page-glass):not(.page-template-page-glass-php) .site-main,
	body.qc-layout-pilot:not(.page-template-page-glass):not(.page-template-page-glass-php) .single-hero__content {
		padding-inline: var(--quack-content-gutter, 20px);
	}
}
