/**
 * Globalne poprawki responsywności i dostępności.
 * Kolory i treści pozostają edytowalne w Elementorze; ten plik definiuje
 * wyłącznie wspólne reguły zachowania komponentów.
 */

:root {
	--almat-focus: #0b63ce;
	--almat-accent: #f5a623;
	--almat-accent-hover: #ffbd45;
	--almat-accent-ink: #fff;
	--almat-accent-text: #925f00;
	--almat-font-body: Arial, 'Helvetica Neue', sans-serif;
	--almat-font-heading: Georgia, 'Times New Roman', serif;
	--almat-content-gutter: clamp(16px, 3vw, 32px);
}

/* Odkłada koszt renderowania długich sekcji poza pierwszym ekranem. */
@supports (content-visibility: auto) {
	body.home .page-content-home-page > .elementor > .elementor-element:not(:first-child) {
		content-visibility: auto;
		contain-intrinsic-size: auto 900px;
	}
}

html {
	overflow-x: clip;
	scroll-padding-top: 96px;
}

body {
	-webkit-font-smoothing: antialiased;
	font-family: var(--almat-font-body);
	overflow-wrap: break-word;
}

.electiman-header-top,
.electiman_menu .donate-btn-header .dtbtn {
	background-color: var(--almat-accent) !important;
}

.electiman-header-top a,
.electiman_menu .donate-btn-header .dtbtn {
	color: var(--almat-accent-ink) !important;
}

.electiman_menu .donate-btn-header .dtbtn:hover,
.electiman_menu .donate-btn-header .dtbtn:focus-visible {
	background-color: var(--almat-accent-hover) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--almat-font-heading);
}

img,
svg,
video {
	max-width: 100%;
}

/* Nie pozwala sztywnym szerokościom starych kontenerów wyjść poza rodzica. */
.elementor .e-con {
	max-width: 100%;
}

.elementor .e-con.e-child,
.elementor .elementor-widget {
	min-width: 0;
}

.logo,
.mobile_menu_logo > a {
	width: min(320px, 100%);
}

.mobile_menu_logo > a {
	display: block;
	margin-inline: auto;
	aspect-ratio: 320 / 29;
}

.logo img,
.mobile_menu_logo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 320 / 29;
	object-fit: contain;
}

:where(a, button, input, textarea, select, [role='button']):focus-visible {
	outline: 3px solid var(--almat-focus);
	outline-offset: 3px;
}

/*
 * OneTap domyślnie przenosi przełącznik na prawą stronę poniżej 992 px,
 * gdzie koliduje on z czatem i przyciskiem przewijania do góry.
 */
.onetap-container-toggle .onetap-toggle {
	left: 16px !important;
	left: max(16px, env(safe-area-inset-left)) !important;
	right: auto !important;
	bottom: 16px !important;
	bottom: max(16px, env(safe-area-inset-bottom)) !important;
	margin: 0 !important;
}

/* Po schowaniu górnego paska sticky header ma dochodzić do krawędzi ekranu. */
@media (min-width: 992px) {
	body:not(.admin-bar) .trp_nav_area.hbg2 {
		top: 0 !important;
	}

	body.admin-bar .trp_nav_area.hbg2 {
		top: 32px !important;
	}
}

.elementor-tab-title[role='button'],
.bs-faq__question,
.mean-container a.meanmenu-reveal {
	min-height: 44px;
}

.elementor-tab-title[role='button'] {
	display: flex;
	align-items: center;
}

.elementor .elementor-element a.elementor-button {
	background-color: var(--almat-accent) !important;
	color: var(--almat-accent-ink) !important;
}

.elementor .elementor-element a.elementor-button:hover,
.elementor .elementor-element a.elementor-button:focus-visible {
	background-color: var(--almat-accent-hover) !important;
	color: var(--almat-accent-ink) !important;
}

#main-content .witr_counter_number_inn h3,
#main-content .witr_counter_number_inn span,
.elementor .process-grid h3.elementor-heading-title,
.electric-reviews__label {
	color: var(--almat-accent-text) !important;
}

#moove_gdpr_cookie_info_bar .moove-gdpr-button-holder button.mgbutton {
	min-height: 44px !important;
	background-color: var(--almat-accent) !important;
	color: var(--almat-accent-ink) !important;
	font-size: 14px;
	font-weight: 700;
	opacity: 1 !important;
}

#moove_gdpr_cookie_info_bar .moove-gdpr-button-holder button.mgbutton:hover,
#moove_gdpr_cookie_info_bar .moove-gdpr-button-holder button.mgbutton:focus-visible {
	background-color: var(--almat-accent-hover) !important;
}

.hero-lcp h1,
.hero-lcp h2,
.witr_section_title_inner h2 {
	text-wrap: balance;
}

.elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	/* Pozostawia miejsce na dolny baner zgód i jego przycisk „Akceptuj”. */
	.onetap-container-toggle .onetap-toggle {
		bottom: 96px !important;
		bottom: max(96px, calc(80px + env(safe-area-inset-bottom))) !important;
	}

	body.home .hero-lcp {
		background-image: url('../images/hero-electrician-mobile.webp') !important;
	}

	.hero-lcp h1.elementor-heading-title {
		font-size: clamp(2.625rem, 11vw, 3rem);
		line-height: 1.08;
	}

	.hero-lcp .hero-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.hero-lcp .hero-actions > .elementor-element,
	.hero-lcp .hero-actions .elementor-button {
		width: 100%;
	}

	.hero-lcp .hero-actions .elementor-button {
		justify-content: center;
		white-space: normal;
	}

	.elementor-section,
	.e-con.e-parent {
		background-attachment: scroll !important;
	}

	.moove-gdpr-info-bar-container {
		padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
	}
}

@media (max-width: 991px) {
	/* Ukrywa surową listę przed inicjalizacją MeanMenu i rezerwuje finalną wysokość. */
	.mobile-menu {
		min-height: 81px;
	}

	.mobile-menu > nav {
		display: none;
	}
}

@media (max-width: 479px) {
	.mobile_menu_logo.text-center {
		padding-block: 16px;
		padding-inline: var(--almat-content-gutter);
	}

	.top-address p {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 4px 12px;
	}

	.top-address p a {
		margin: 0;
		min-height: 32px;
		display: inline-flex;
		align-items: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
