/**
 * Fejléc menü — sticky nav + 2 gomb + mobil off-canvas
 *
 * Prefix: .mw-header, .mw-menu, .mw-btn, .mw-offcanvas
 */

.mw-header {
	--mw-accent-1:  #f6b93b;
	--mw-accent-2:  #ff7a18;
	--mw-bg:        #080b12;
	--mw-text:      #ffffff;
	--mw-muted:     #a7b0c0;

	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	padding: 20px 32px;
	box-sizing: border-box;
	transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
	font-family: "Poppins", sans-serif;
}

.mw-header.is-sticky {
	padding: 10px 32px;
	background: rgba(8, 11, 18, 0.7);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mw-header__inner {
	max-width: 1140px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

/* ---- Brand / logo ------------------------------------------------------- */

.mw-header__brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--mw-text);
	flex-shrink: 0;
}

.mw-header__logo {
	height: auto;
	width: auto;
	max-height: 48px;
	display: block;
}

.mw-header.is-sticky .mw-header__logo {
	max-height: 40px;
}

.mw-header__brand-text {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.3px;
	color: var(--mw-text);
}

/* ---- Menü (desktop) ---------------------------------------------------- */

.mw-header__nav {
	display: flex;
	flex: 1;
	justify-content: flex-end;
}

.mw-menu {
	display: flex;
	align-items: center;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mw-menu .menu-item {
	position: relative;
}

.mw-menu .menu-item a {
	display: block;
	color: var(--mw-muted);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	padding: 8px 0;
	transition: color 0.2s ease;
	position: relative;
}

.mw-menu .menu-item a::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 2px;
	background: linear-gradient(90deg, var(--mw-accent-1), var(--mw-accent-2));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.mw-menu .menu-item a:hover {
	color: var(--mw-text);
}

.mw-menu .menu-item a:hover::after {
	transform: scaleX(1);
}

/* ---- Gombok ------------------------------------------------------------ */

.mw-header__buttons {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

.mw-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 10px 20px;
	border-radius: 11px;
	font-weight: 700;
	font-size: 14px;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	white-space: nowrap;
}

.mw-btn--primary {
	background: linear-gradient(135deg, var(--mw-accent-1), var(--mw-accent-2));
	color: var(--mw-bg);
	box-shadow: 0 8px 24px rgba(255, 122, 24, 0.28);
}

.mw-btn--primary:hover {
	color: var(--mw-bg);
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(255, 122, 24, 0.45);
}

.mw-btn--ghost {
	background: rgba(255, 122, 24, 0.1);
	border: 1px solid rgba(246, 185, 59, 0.45);
	color: var(--mw-accent-1);
}

.mw-btn--ghost:hover {
	color: var(--mw-accent-1);
	background: rgba(255, 122, 24, 0.18);
	transform: translateY(-2px);
}

.mw-btn__icon {
	flex-shrink: 0;
}

.mw-btn__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--mw-accent-2);
	box-shadow: 0 0 9px var(--mw-accent-2);
	animation: mw-dotpulse 1.6s ease-in-out infinite;
	flex-shrink: 0;
}

@keyframes mw-dotpulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%      { opacity: 0.4; transform: scale(0.7); }
}

/* ---- Hamburger (mobil) ------------------------------------------------- */

.mw-hamburger {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 32px;
	height: 22px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	flex-shrink: 0;
}

.mw-hamburger span {
	display: block;
	width: 100%;
	height: 3px;
	background: var(--mw-text);
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.2s ease;
}

/* ---- Off-canvas (mobil) ----------------------------------------------- */

.mw-offcanvas-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 1000;
}

.mw-offcanvas-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.mw-offcanvas {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(360px, 85vw);
	background: linear-gradient(160deg, rgba(20, 29, 43, 0.98), rgba(16, 23, 34, 0.98));
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1001;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	font-family: "Poppins", sans-serif;
}

.mw-offcanvas.is-open {
	transform: translateX(0);
	box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.mw-offcanvas__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
}

.mw-offcanvas__head .mw-header__logo {
	max-height: 38px;
}

.mw-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: var(--mw-text);
	cursor: pointer;
	transition: background 0.2s ease;
	flex-shrink: 0;
}

.mw-close:hover {
	background: rgba(255, 255, 255, 0.12);
}

.mw-offcanvas__nav {
	flex: 1;
	overflow-y: auto;
	padding: 12px 0;
	-webkit-overflow-scrolling: touch;
}

.mw-offcanvas__nav .mw-menu--vertical {
	flex-direction: column;
	gap: 0;
}

.mw-menu--vertical .menu-item {
	width: 100%;
}

.mw-menu--vertical .menu-item a {
	display: block;
	padding: 16px 24px;
	font-size: 17px;
	font-weight: 600;
	color: var(--mw-text);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	transition: background 0.15s ease, color 0.15s ease;
}

.mw-menu--vertical .menu-item a:hover {
	background: rgba(255, 122, 24, 0.08);
	color: var(--mw-accent-1);
}

.mw-menu--vertical .menu-item a::after {
	display: none;
}

.mw-offcanvas__buttons {
	padding: 20px 24px 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
}

.mw-offcanvas__buttons .mw-header__buttons {
	display: contents;
}

.mw-offcanvas__buttons .mw-btn {
	width: 100%;
	justify-content: center;
	padding: 14px 20px;
	font-size: 15px;
}

/* Body scroll lock amikor az off-canvas nyitva van */
body.mw-offcanvas-open {
	overflow: hidden;
}

/* ---- Sticky offset: body padding hogy ne lógjon alá a tartalom -------- */
/* A JS hozzáadja a body-hoz ezt az osztályt, ha van fejléc az oldalon.   */
body.mw-header-active {
	padding-top: 88px;
	box-sizing: border-box;
}

/* ---- Üres állapot (admin) --------------------------------------------- */

.mw-empty {
	max-width: 1280px;
	margin: 24px auto;
	padding: 24px 32px;
	background: #fff7e6;
	border: 1px solid #ffb84d;
	border-radius: 12px;
	color: #7a4b00;
	font-size: 14px;
}

/* ---- Reszponzivitás: 900px alatt mobil layout ------------------------- */

@media (max-width: 900px) {
	.mw-header__nav,
	.mw-header__buttons {
		display: none;
	}

	.mw-hamburger {
		display: flex;
	}

	body.mw-header-active {
		padding-top: 76px;
	}

	.mw-header {
		padding: 14px 20px;
	}

	.mw-header.is-sticky {
		padding: 10px 20px;
	}
}

/* ---- Kisebb mobil ----------------------------------------------------- */

@media (max-width: 480px) {
	.mw-header__brand-text {
		font-size: 17px;
	}
	.mw-header__logo {
		max-height: 38px;
	}
}

/* ---- Reduced motion ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.mw-header,
	.mw-header.is-sticky,
	.mw-btn,
	.mw-btn__dot,
	.mw-offcanvas,
	.mw-offcanvas-overlay,
	.mw-hamburger span,
	.mw-menu .menu-item a,
	.mw-menu .menu-item a::after {
		transition: none;
		animation: none;
	}
	.mw-btn__dot {
		animation: none;
	}
}
