/* Owner-approved mobile Hero, Hero identity scale and native navigation only.
 * No saved-content writes, image substitution, focal override or desktop rules.
 */
@media (max-width: 781px) {
	body.home .breganja-home > .home-hero {
		background: var(--wp--preset--color--off-white);
		min-height: 0;
	}

	body.home .breganja-home .home-hero__split {
		gap: 20px;
		min-height: 0;
	}

	body.home .breganja-home .home-hero__panel {
		align-items: flex-start;
		box-sizing: border-box;
		justify-content: flex-end;
		isolation: isolate;
		min-height: 380px;
		overflow: hidden;
		padding: 45px 24px 56px;
		/* Two independent photographs; a shallow paper edge, not transparency
		 * over the adjacent photograph. Safe space keeps focus rings inside. */
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 16C180 16 250 0 440 0C710 0 830 14 1000 10L1000 987C730 987 570 971 360 981C180 992 100 1000 0 994Z'/%3E%3C/svg%3E");
		mask-size: 100% 100%;
		mask-repeat: no-repeat;
	}

	body.home .breganja-home .home-hero__panel .home-hero__media {
		height: 100%;
		inset: 0;
		mask-image: none;
		width: 100%;
	}

	body.home .breganja-home .home-hero__panel::before {
		background: none;
		height: 100%;
		inset: 0;
		mask-image: none;
		width: 100%;
	}

	body.home .breganja-home .home-hero__panel::after {
		background: linear-gradient(90deg, transparent 20%, rgb(0 0 0 / 15%) 48%, rgb(0 0 0 / 60%) 100%);
		height: 100%;
		inset: 0;
		mask-image: none;
		width: 100%;
	}

	/* The existing editor's light/dark choice still wins. A light backing
	 * replaces the dark readability gradient only for explicit dark text. */
	body.home .breganja-home .home-hero__panel[data-breganja-hero-tone="dark"]::after {
		background: linear-gradient(90deg, transparent 20%, rgb(255 255 255 / 20%) 48%, rgb(255 255 255 / 65%) 100%);
	}

	body.home .breganja-home .home-hero__panel .home-hero__content {
		align-items: flex-end;
		box-sizing: border-box;
		max-width: 100%;
		padding: 0;
		text-align: right;
		width: max-content;
	}

	body.home .wp-site-blocks .breganja-home .home-hero__content .home-hero__world {
		font-size: 11px;
		letter-spacing: 0.045em;
		line-height: 1.4;
		margin: 0;
	}

	body.home .wp-site-blocks .breganja-home .home-hero__content .home-hero__title {
		font-size: 38px;
		letter-spacing: -0.035em;
		line-height: 1.14;
		margin: 12px 0 20px;
		max-width: 100%;
	}

	body.home .breganja-home .home-hero__panel .home-hero__link {
		box-sizing: border-box;
		font-size: 11px;
		letter-spacing: 0.025em;
		line-height: 1.35;
		min-height: 48px;
		padding: 14px 20px;
	}

	/* Only the six requested Hero identities, not section/footer logos.
	 * The SPK landing page's existing 145 px identity is the reference.
	 * Natural ratios avoid its old max-height letterboxing. */
	.speleo-page .inner-hero .inner-hero__identity,
	:is(.speleo-school-page, .spk-youth-page, .spk-adult-page, .spk-gym-page) .breganja-pattern__hero .breganja-pattern__identity {
		height: auto;
		max-height: none;
		max-width: 100%;
		width: 145px;
	}

	/* Native WordPress menu, same links/order and keyboard/focus behavior.
	 * A short viewport or enlarged text may scroll; never hide a link. */
	.wp-site-blocks .site-header .wp-block-navigation__responsive-container.is-menu-open {
		padding: 16px 20px 24px;
		overflow-y: auto;
	}

	.wp-site-blocks .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		min-height: 0;
		padding-block: 48px 0;
	}

	.wp-site-blocks .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		gap: 4px;
	}

	.wp-site-blocks .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-submenu {
		gap: 0;
	}

	.wp-site-blocks .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation-submenu {
		gap: 0;
		margin: 0;
		padding: 0 0 0 16px !important;
	}

	.wp-site-blocks .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		font-size: 14px;
		line-height: 1.3;
		min-height: 44px;
		padding: 8px;
	}
}
