/*
 * M.A.R.S. Logistics – uzupełnienia do legacy.css (Elementor, ustawienia z Dostosuj, poprawki).
 */

:root {
	--ml-text: #000000;
	--ml-primary: #122165;
	--ml-accent: #34ccff;
	--ml-menu-active-bg: #0a206a;
	--ml-menu-hover-bg: #93c0f9;
	--ml-button-bg: #000000;
	--ml-footer-bg: #171b26;
	--ml-header-height: 120px;
}

/* ---------- Układ ---------- */
.ozy-page-model-full #main > .container,
.ozy-page-model-full #main > .container > #content {
	width: 100%;
	max-width: 100%;
	padding: 0;
}

#content,
input,
select,
textarea {
	color: var(--ml-text);
}

/* Nagłówek przyklejony (na komputerach) – pod nim odstęp równy wysokości nagłówka. */
@media only screen and (min-width: 1281px) {
	body.mars-header-fixed #main {
		padding-top: var(--ml-header-height);
	}
	body:not(.mars-header-fixed) #header {
		position: relative;
	}
	body:not(.mars-header-fixed) #main {
		padding-top: 0;
	}
	body.admin-bar.mars-header-fixed #header {
		top: 32px;
	}
}
#header {
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
}
#top-menu .logo > a > img {
	height: auto;
}
.mars-site-title {
	font-size: 24px;
	font-weight: 800;
	color: #000;
}

/* Flagi języków Polylang w menu. */
body.classic-menu #top-menu ul li.lang-item .pll-switcher-flag {
	--pll-flag-width: 16px;
	aspect-ratio: 16 / 11 !important;
	vertical-align: middle;
}

/* Przyciski – kolor z Dostosuj. */
input[type="button"],
input[type="submit"],
button[type="submit"] {
	background-color: var(--ml-button-bg);
	border-color: var(--ml-button-bg);
}
input[type="button"]:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	background-color: var(--ml-accent);
	border-color: var(--ml-accent);
}

/* Stopka – ikona koperty (font Mono Social Icons). */
#footer .top-social-icons > a.symbol-email > span {
	display: inline-block;
}

/* Nagłówki na telefonach (jak w oryginale). Bez !important – rozmiary ustawione
   w widżetach Elementora (zakładka Styl → Typografia → telefon) mają pierwszeństwo. */
@media only screen and (max-width: 479px) {
	:where(#content, #footer-widget-bar, #footer) h1 {
		font-size: 26px;
		line-height: 32px;
	}
	:where(#content, #footer-widget-bar, #footer) h2 {
		font-size: 22px;
		line-height: 30px;
	}
	:where(#content, #footer-widget-bar, #footer) h3 {
		font-size: 18px;
		line-height: 22px;
	}
	:where(#content, #footer-widget-bar, #footer) h6 {
		font-size: 12px;
		line-height: 20px;
		letter-spacing: normal;
	}
}

/* ---------- Strony bez Elementora (wpisy, 404, wyszukiwanie) ---------- */
.mars-classic-content {
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px 20px 60px;
}
.mars-classic-content .mars-page-title {
	margin-bottom: 20px;
}

/* ---------- Elementor ---------- */
/* Widżety Elementora dziedziczą typografię motywu (Raleway). */
.elementor-widget-text-editor,
.elementor-widget-heading .elementor-heading-title {
	font-family: "Raleway", sans-serif;
}
.elementor-widget-heading .elementor-heading-title {
	line-height: 1.5em;
}
.elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}
/* Tekst w edytorze tekstu: akapity jak w oryginale (bez marginesów, odstęp przez padding). */
.elementor-widget-text-editor p {
	margin: 0;
}
/* Ostatni element w edytorze tekstu bez dolnego marginesu (jak .wpb_text_column w oryginale). */
.elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6, p):last-child {
	margin-bottom: 0;
}
/* Nagłówki w edytorze tekstu przyjmują kolor tekstu ustawiony w widżecie. */
.elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6),
.elementor-widget-mars-icon-title :is(h1, h2, h3, h4, h5, h6),
.elementor-widget-mars-info-box :is(h2, h5) {
	color: inherit;
}

/* CF7 – komunikaty. */
.wpcf7 form .wpcf7-response-output {
	margin: 1em 0 0;
}

/* Przewijanie do sekcji obsługuje skrypt motywu (1600 ms, jak w oryginale) –
   wyłączamy natywne „smooth” z Elementora, które kolidowałoby z animacją. */
html {
	scroll-behavior: auto !important;
}

/* Przycisk „do góry” – jak w oryginale (czarne kółko 32 px, pojawia się po przewinięciu). */
@font-face {
	font-family: "mars-ozythemes";
	src: url("../fonts/ozy/ozythemes.woff") format("woff");
	font-weight: normal;
	font-style: normal;
	font-display: block;
}
#to-top-button {
	display: block;
	opacity: 0;
	position: fixed;
	z-index: 999;
	width: 32px;
	height: 32px;
	right: 12px;
	bottom: -32px;
	border-radius: 16px;
	color: #fff !important;
	background-color: var(--ml-button-bg);
	border: 1px solid var(--ml-button-bg);
	text-decoration: none !important;
}
#to-top-button > span {
	display: inline-block;
	font-size: 14px;
	font-weight: 300;
	line-height: 32px;
	width: 32px;
	text-align: center;
	padding-top: 1px;
	margin-left: -1px;
}
#to-top-button .mars-icon-up:before {
	font-family: "mars-ozythemes";
	content: "\e50e";
	font-style: normal;
	font-weight: normal;
	-webkit-font-smoothing: antialiased;
}
