/* ==========================================================================
   MTI Systems: design tokens, base, header, footer
   Colors are taken from the logo (navy #23405F / blue #3C5A80).
   The same values are set as Elementor Global Colors (see _source/setup).
   ========================================================================== */

/* Fonts (self-hosted, latin + latin-ext for Polish) */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--mti-navy: #23405f;
	--mti-navy-900: #16293e;
	--mti-blue: #3c5a80;
	--mti-accent: #1f6fc5;
	--mti-accent-hover: #185a9f;
	--mti-ink: #1b2533;
	--mti-muted: #5b6778;
	--mti-line: #dde4ee;
	--mti-soft: #f2f5f9;
	--mti-white: #ffffff;

	--mti-font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--mti-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

	--mti-container: 1200px;
	--mti-gutter: clamp(16px, 4vw, 32px);
	--mti-radius: 10px;
	--mti-header-h: 84px;
}

/* ---------- Base ---------- */
body {
	font-family: var(--mti-font-body);
	color: var(--mti-ink);
	background: var(--mti-white);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--mti-font-head);
	color: var(--mti-navy);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}
a { color: var(--mti-accent); }
a:hover, a:focus { color: var(--mti-accent-hover); }
:focus-visible { outline: 3px solid var(--mti-accent); outline-offset: 2px; }

.mti-container {
	width: 100%;
	max-width: calc(var(--mti-container) + 2 * var(--mti-gutter));
	margin-inline: auto;
	padding-inline: var(--mti-gutter);
}

/* Buttons (also usable in Elementor via CSS class) */
.mti-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .7em 1.3em;
	border-radius: var(--mti-radius);
	border: 2px solid transparent;
	font-family: var(--mti-font-head);
	font-weight: 600; font-size: .95rem; line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s, color .2s, border-color .2s;
	white-space: nowrap;
}
/* `a.` prefix: beat Elementor kit link color (.elementor-kit-N a) */
a.mti-btn--primary, a.mti-btn--primary:visited { background: var(--mti-accent); color: var(--mti-white); }
a.mti-btn--primary:hover, a.mti-btn--primary:focus { background: var(--mti-accent-hover); color: var(--mti-white); }
a.mti-btn--ghost, a.mti-btn--ghost:visited { border-color: currentColor; color: var(--mti-white); }
a.mti-btn--ghost:hover, a.mti-btn--ghost:focus { background: var(--mti-white); color: var(--mti-navy); border-color: var(--mti-white); }
body .mti-header a.mti-btn--primary, body .mti-footer a.mti-btn { color: var(--mti-white); }
body .mti-footer a.mti-btn--ghost:hover { color: var(--mti-navy); }

/* ---------- Top bar ---------- */
.mti-topbar { background: var(--mti-navy); color: #c9d5e4; font-size: .85rem; }
.mti-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.mti-topbar__contact { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.mti-topbar a { color: var(--mti-white); text-decoration: none; }
.mti-topbar a:hover { text-decoration: underline; color: var(--mti-white); }

/* ---------- Header ---------- */
.mti-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255,255,255,.97);
	border-bottom: 1px solid var(--mti-line);
	backdrop-filter: saturate(1.4) blur(6px);
}
.admin-bar .mti-header { top: 32px; }
.mti-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--mti-header-h); }
.mti-header__logo { display: block; flex-shrink: 0; }
.mti-header__logo img { display: block; width: auto; height: 46px; }

.mti-nav { display: flex; align-items: center; gap: 1.75rem; }
.mti-nav__menu { display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.mti-nav__menu > li { position: relative; }
.mti-nav__menu a {
	display: block; padding: .6rem .8rem;
	font-family: var(--mti-font-head); font-weight: 600; font-size: .95rem;
	color: var(--mti-navy); text-decoration: none; border-radius: 6px;
}
.mti-nav__menu a:hover, .mti-nav__menu a:focus,
.mti-nav__menu .current-menu-item > a,
.mti-nav__menu .current-menu-ancestor > a { color: var(--mti-accent); }

/* Dropdown */
.mti-nav__menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 260px;
	margin: 0; padding: .5rem; list-style: none;
	background: var(--mti-white); border: 1px solid var(--mti-line); border-radius: var(--mti-radius);
	box-shadow: 0 12px 32px rgba(22,41,62,.12);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.mti-nav__menu li:hover > .sub-menu,
.mti-nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mti-nav__menu .sub-menu a { font-weight: 500; }
.mti-nav__menu .sub-menu a:hover { background: var(--mti-soft); }
.mti-nav__menu .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-.2em) rotate(45deg);
}

/* Language switcher */
.mti-lang { display: flex; gap: .15rem; margin: 0; padding: 0; list-style: none; font-family: var(--mti-font-head); font-size: .85rem; font-weight: 600; }
.mti-lang a { display: block; padding: .3rem .5rem; color: var(--mti-muted); text-decoration: none; text-transform: uppercase; border-radius: 5px; }
.mti-lang .current-lang a { color: var(--mti-white); background: var(--mti-navy); }
.mti-lang a:hover { color: var(--mti-accent); }
.mti-lang .current-lang a:hover { color: var(--mti-white); }

/* Mobile toggle */
.mti-nav-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.mti-nav-toggle__bars, .mti-nav-toggle__bars::before, .mti-nav-toggle__bars::after {
	display: block; width: 24px; height: 2px; margin: auto; background: var(--mti-navy); border-radius: 2px;
	transition: transform .2s, opacity .2s; position: relative;
}
.mti-nav-toggle__bars::before, .mti-nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.mti-nav-toggle__bars::before { top: -7px; }
.mti-nav-toggle__bars::after { top: 7px; }
.mti-nav-toggle[aria-expanded="true"] .mti-nav-toggle__bars { background: transparent; }
.mti-nav-toggle[aria-expanded="true"] .mti-nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.mti-nav-toggle[aria-expanded="true"] .mti-nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
	:root { --mti-header-h: 70px; }
	.mti-header__logo img { height: 38px; }
	.mti-nav-toggle { display: block; }
	.mti-nav {
		position: fixed; inset: var(--mti-header-h) 0 0 0; z-index: 99;
		flex-direction: column; align-items: stretch; gap: 1.25rem;
		padding: 1.25rem var(--mti-gutter) 2rem;
		background: var(--mti-white); overflow-y: auto;
		transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
	}
	.admin-bar .mti-nav { top: calc(var(--mti-header-h) + 46px); }
	.mti-nav.is-open { transform: none; visibility: visible; }
	.mti-nav__menu { flex-direction: column; align-items: stretch; }
	.mti-nav__menu a { padding: .8rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--mti-line); border-radius: 0; }
	.mti-nav__menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; }
	.mti-nav__menu .menu-item-has-children > a::after { display: none; }
	.mti-header__cta { align-self: flex-start; }
	body.mti-nav-open { overflow: hidden; }
}
@media (max-width: 782px) {
	.admin-bar .mti-header { top: 46px; }
}
@media (max-width: 640px) {
	.mti-topbar__tagline { display: none; }
	.mti-topbar__inner { justify-content: center; }
	.mti-topbar__contact { gap: 1rem; flex-wrap: wrap; justify-content: center; }
	.mti-topbar__contact li:nth-child(2) { display: none; }
}

/* ---------- Footer ---------- */
.mti-footer { background: var(--mti-navy-900); color: #b9c6d6; font-size: .95rem; margin-top: 0; }
.mti-footer a { color: var(--mti-white); text-decoration: none; }
.mti-footer a:hover { text-decoration: underline; color: var(--mti-white); }
.mti-footer__grid {
	display: grid; gap: 2.5rem;
	grid-template-columns: 1.3fr 1fr 1fr 1fr;
	padding-block: 3.5rem 2.5rem;
}
.mti-footer__brand img { display: block; width: 200px; height: auto; margin-bottom: 1rem; }
.mti-footer__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--mti-white); margin: 0 0 1rem; }
.mti-footer address { font-style: normal; line-height: 1.8; }
.mti-footer address strong { color: var(--mti-white); }
.mti-footer__list { margin: 0; padding: 0; list-style: none; line-height: 2; }
.mti-footer__support { margin-top: 1.25rem; font-size: .85rem; }
.mti-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.25rem; font-size: .85rem; color: #8b9bb0; }

@media (max-width: 960px) { .mti-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mti-footer__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Content helpers for Elementor ---------- */
.site-main { min-height: 40vh; }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }
