/* ---------------------------------------------------------------------------
 * "Plate v1 Header" (Royal Addons header template, post 32417) — sticky + shrink.
 * The template is placed on pages via the Royal "Elementor Template" widget inside
 * a section with the class .pk-site-header; that section is what sticks. The
 * container inside carries .plate-v1-header. assets/js/plate-header.js measures the
 * template's own padding / logo width, then drives --pk-t (0 at the top of the page,
 * 1 once scrolled 140px) so the header shrinks progressively with the scroll.
 * Elementor containers apply padding through --padding-top/--padding-bottom, so
 * those variables are what get overridden here.
 * ------------------------------------------------------------------------- */
.elementor-section.pk-site-header,
.elementor-location-header .plate-v1-header,
body > .elementor.elementor-32417 {
	position: sticky;
	top: 0;
	z-index: 100;
}
/* Home page (post 32272): Royal Addons injects the template itself as a top-level
 * <div class="elementor elementor-32417"> on canvas pages (no .pk-site-header
 * section around it). The .plate-v1-header container's only parent is that div, and
 * a sticky element can't leave its parent's box, so the div is what sticks there. */

.plate-v1-header {
	--pk-t: 0;
	--pk-pad-min: 2;
	transition: box-shadow 0.35s ease;
}

/* Home page (post 32272): the hero was sized for the old fixed header that floated over it.
 * With the sticky header in the document flow, subtract its measured height so the hero
 * still fills exactly one viewport, and drop the top padding that made room for it. */
.pk-site-header ~ .elementor-section .hero-cine,
.elementor-32417 ~ .elementor-32272 .hero-cine {
	min-height: calc(100svh - var(--pk-header-h, 0px));
}
.pk-site-header ~ .elementor-section .hero-cine-content,
.elementor-32417 ~ .elementor-32272 .hero-cine-content {
	min-height: calc(100svh - var(--pk-header-h, 0px));
	padding-top: 40px;
}

/* Progressive state: only once the JS has measured the base values. */
.plate-v1-header.pk-progressive {
	--padding-top: calc((var(--pk-pt-base) - (var(--pk-pt-base) - var(--pk-pad-min)) * var(--pk-t)) * 1px) !important;
	--padding-bottom: calc((var(--pk-pb-base) - (var(--pk-pb-base) - var(--pk-pad-min)) * var(--pk-t)) * 1px) !important;
}
.plate-v1-header.pk-progressive > .e-con-inner {
	transition: padding 0.12s linear;
}
.plate-v1-header.pk-progressive .wpr-logo img {
	width: calc((var(--pk-logo-base) - (var(--pk-logo-base) - var(--pk-logo-min)) * var(--pk-t)) * 1px) !important;
	transition: width 0.12s linear;
}

.plate-v1-header.is-scrolled {
	box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}

/* Hamburger → cross when the mobile menu is open (Royal toggles .wpr-mobile-toggle-open). */
.plate-v1-header .wpr-mobile-toggle-line {
	transition: transform 0.3s ease, opacity 0.2s ease;
}
.plate-v1-header .wpr-mobile-toggle-open .wpr-mobile-toggle-line:nth-child(1) {
	transform: translateY(var(--pk-x-shift, 7px)) rotate(45deg);
}
.plate-v1-header .wpr-mobile-toggle-open .wpr-mobile-toggle-line:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}
.plate-v1-header .wpr-mobile-toggle-open .wpr-mobile-toggle-line:nth-child(3) {
	transform: translateY(calc(var(--pk-x-shift, 7px) * -1)) rotate(-45deg);
}

/* Phones: no shrink at all on scroll — keep the template's padding and logo size. */
@media (max-width: 767px) {
	.plate-v1-header.pk-progressive {
		--padding-top: calc(var(--pk-pt-base) * 1px) !important;
		--padding-bottom: calc(var(--pk-pb-base) * 1px) !important;
	}
	.plate-v1-header.pk-progressive .wpr-logo img {
		width: calc(var(--pk-logo-base) * 1px) !important;
	}
}

/* Mobile dropdown: the nav-menu widget is shrunk to just the hamburger on tablet/phone,
 * so re-anchor the dropdown to the whole header and stretch it edge to edge. */
@media (max-width: 1024px) {
	.plate-v1-header {
		position: relative;
	}
	.plate-v1-header .elementor-widget-wpr-nav-menu,
	.plate-v1-header .wpr-mobile-nav-menu-container {
		position: static;
	}
	.plate-v1-header .wpr-mobile-nav-menu {
		position: absolute !important;
		left: 0 !important;
		right: 0 !important;
		top: 100% !important;
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		z-index: 101;
	}
	.plate-v1-header .wpr-mobile-nav-menu a {
		white-space: nowrap;
	}
}
