// ===================================================================
// header.php stilleri — <body> temel görünümü ve üst menü (navbar)
// ===================================================================
@import "_variables.less";

// ---- Site geneli (<body>) --------------------------------------------
.site-body {
	background-color: @color-background;
	color: @color-on-surface;
	font-family: @font-body;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

// ---- Üst Menü / Navbar --------------------------------------------------
.navbar {
	position: sticky;
	top: 0;
	z-index: 50;
	width: 100%;
	height: 5rem;
	background-color: fade(@color-surface, 90%);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid fade(@color-outline, 20%);
	transition: all 0.3s ease-in-out;
}
.navbar--scrolled {
	box-shadow: 0 1px 3px fade(@color-on-surface, 10%);
}

.navbar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
}

.navbar__brand {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.navbar__logo {
	font-family: @font-display;
	font-size: 24px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: @color-primary;
	@media(max-width: 991px){
		font-size: 17px;
	}
}

.navbar__logo-image {
	display: block;
	width: auto;
	max-width: 220px;
	height: 42px;
	object-fit: contain;
}

.navbar__links {
	display: none;
	align-items: center;
	gap: 2rem;
}
@media (min-width: @screen-md) {
	.navbar__links {
		display: flex;
	}
}

.navbar__link {
	font-family: @font-body;
	font-size: 16px;
	color: @color-on-surface-variant;
	transition: color 0.3s ease;
}
.navbar__link:hover {
	color: @color-primary;
}

.navbar__link--active {
	color: @color-secondary;
	font-weight: 700;
	border-bottom: 2px solid @color-secondary;
	padding-bottom: 0.25rem;
}

.navbar__cta {
	position: relative;
	overflow: hidden;
	background-color: @color-secondary;
	color: @color-on-secondary;
	padding: 0.75rem 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: all 0.3s ease-in-out;
}

.navbar__cta-label {
	position: relative;
	z-index: 10;
}

.navbar__cta-underline {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	width: 0;
	background-color: @color-on-secondary;
	transition: width 0.3s ease-in-out;
}
.navbar__cta:hover .navbar__cta-underline {
	width: 100%;
}

.navbar__toggle,
.mobile-nav {
	display: none;
}

@media (max-width: (@screen-md - 1px)) {
	.mobile-menu-open {
		overflow: hidden;
	}

	.navbar__logo-image {
		max-width: 170px;
		height: 36px;
	}

	.navbar__cta {
		display: none;
	}

	.navbar__toggle {
		position: relative;
		z-index: 2;
		display: flex;
		width: 3rem;
		height: 3rem;
		padding: .8rem .65rem;
		flex-direction: column;
		justify-content: space-between;
		border: 1px solid fade(@color-on-surface, 20%);
		background: transparent;
		color: @color-on-surface;
		cursor: pointer;

		span {
			display: block;
			width: 100%;
			height: 2px;
			background: currentColor;
			transform-origin: center;
			transition: transform .3s ease, opacity .2s ease;
		}

		&:focus-visible {
			outline: 2px solid @color-secondary;
			outline-offset: 3px;
		}
	}

	.mobile-nav {
		position: absolute;
		z-index: 1;
		top: 5rem;
		right: 0;
		left: 0;
		display: block;
		height: calc(100vh - 5rem);
		height: calc(100svh - 5rem);
		overflow-y: auto;
		background: @color-primary;
		color: @color-on-primary;
		opacity: 0;
		pointer-events: none;
		transform: translateY(-1rem);
		transition: opacity .3s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
	}

	.mobile-nav__inner {
		display: flex;
		min-height: calc(100svh - 5rem);
		padding-top: 2.5rem;
		padding-bottom: 2rem;
		flex-direction: column;
	}

	.mobile-nav__eyebrow {
		margin-bottom: 2rem;
		color: @color-secondary;
		font-size: .7rem;
		font-weight: 700;
		letter-spacing: .18em;
		text-transform: uppercase;

		&::before {
			display: inline-block;
			width: 2rem;
			height: 2px;
			margin: 0 .65rem .2rem 0;
			background: currentColor;
			content: "";
		}
	}

	.mobile-nav__links {
		border-top: 1px solid fade(@color-on-primary, 20%);
	}

	.mobile-nav__link {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 1rem 0;
		border-bottom: 1px solid fade(@color-on-primary, 20%);
		color: @color-on-primary;
		font-family: @font-display;
		font-size: clamp(2rem, 10vw, 3.5rem);
		font-weight: 500;
		line-height: 1;
		text-transform: uppercase;

		span {
			color: @color-secondary;
			font-family: @font-body;
			font-size: 1.25rem;
		}

		&.navbar__link--active {
			padding-bottom: 1rem;
			border-bottom-color: @color-secondary;
			color: @color-secondary;
		}
	}

	.mobile-nav__cta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: auto;
		padding: 1.1rem 1.25rem;
		background: @color-secondary;
		color: @color-on-secondary;
		font-size: .75rem;
		font-weight: 700;
		letter-spacing: .1em;
		text-transform: uppercase;
	}

	.navbar--menu-open {
		background: @color-primary;
		border-bottom-color: fade(@color-on-primary, 18%);

		.navbar__logo { color: @color-on-primary; }
		.navbar__toggle {
			border-color: fade(@color-on-primary, 30%);
			color: @color-on-primary;

			span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
			span:nth-child(2) { opacity: 0; }
			span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
		}
		.mobile-nav {
			opacity: 1;
			pointer-events: auto;
			transform: none;
		}
	}
}
