/* ===== Header ===== */
.header {
	width: 100%;
	height: 100px;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1000;
}

.header.fixed {
	position: fixed;
	background-color: #31344e;
	max-height: 50px;
}

.header.fixed .header__inner {
	padding: 15px 0;
	max-height: 50px;
}

.header.fixed .header__inner .nav {
	padding-top: 15px;
	font-weight: 500 !important;
}

.header.fixed .header__logo {
	margin-top: 0px; /* Reset margin */
	transform: translateY(0px); /* Move much higher */
}

.header.fixed .header__controls {
	margin-top: 0px; /* Reset margin */
	transform: translateY(0px); /* Move much higher */
}

.header__inner {
	height: 100px;
	display: flex;
	justify-content: space-between;
	padding: 35px 0;
	align-items: center;
}

/* ===== Hamburger Menu ===== */
.hamburger {
	display: none;
	flex-direction: column;
	cursor: pointer;
	z-index: 1001;
	width: 30px;
	height: 24px;
	justify-content: space-between;
	position: relative;
}

.hamburger span {
	display: block;
	height: 3px;
	width: 100%;
	background-color: #fff;
	border-radius: 2px;
	transition: all 0.3s ease;
	transform-origin: center;
}

.hamburger.active span:nth-child(1) {
	transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
	opacity: 0;
}

.hamburger.active span:nth-child(3) {
	transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== Navigation ===== */
.nav {
	padding-top: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.299);
	position: static;
	width: auto;
	height: auto;
}

.nav__link {
	margin-left: 70px;
	color: white;
	text-decoration: none;
	transition: color .2s linear;
}

.nav__link:first-child {
	margin-left: 15px;
}

.nav__link:hover {
	color: #fee597;
}

/* ===== Logo ===== */
.header__logo {
	margin-top: 40px; /* Align logo with navigation */
}

.box-image {
	width: 100px;
	height: 35px;
	background-image: url("/static/img/logo/NaUKMA_logo2.svg");
	background-size: 100px 35px;
	background-repeat: no-repeat;
	position: relative;
	z-index: 1000;
}

/* Red line BELOW the logo on hover */
.box-image::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -5px; /* ensures it's BELOW the image */
	width: 0;
	height: 3px;
	background-color: #fee597;
	transition: width 0.3s ease;
}

.box-image:hover::after {
	width: 100%;
}

.link-image {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 100%;
	z-index: 1000;
}

/* ===== Language Switcher ===== */
.language__box {
	margin-right: 10px;
	max-width: 100px;
	border: 1px solid #aaaaaa;
	display: flex;
	justify-content: center;
	border-radius: 30px;
	z-index: 1000;
	position: relative;
}

.language__ref {
	padding: 2px 4px;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 20px;
	background-color: transparent;
	opacity: 0.7;
	margin: 3px;
}

.language__ref:hover {
	opacity: 1;
}

#first_lang_btn {
        background-color: #888888;
        opacity: 1;
}

/* ===== Header Controls ===== */
.header__controls {
	display: flex;
	align-items: center;
	gap: 15px;
	position: relative;
	z-index: 1001;
	margin-top: 40px; /* Align with navigation */
}

/* ===== Media Queries ===== */
@media (max-width: 1280px) {
    .header {
        height: 80px;
        position: fixed;
        background-color: #31344e;
    }

    .header__inner {
        height: 80px;
        padding: 20px 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .header__logo {
        margin-top: 0; /* Reset margin for mobile */
    }

    .header__controls {
        margin-top: 0; /* Reset margin for mobile */
    }

    .hamburger {
        display: flex;
    }

    /* Apply overlay positioning ONLY in mobile */
    .nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #31344e;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav.active {
        display: flex;
        transform: translateX(0);
    }

    .nav__link {
        margin: 0 0 30px 0;
        font-size: 18px;
        padding: 10px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 80%;
        text-align: center;
    }

    .nav__link:first-child {
        margin-left: 0;
        margin-top: 0;
    }

    .language__box {
        margin: 0;
        position: relative;
        z-index: 10000;
    }
}

@media (max-width: 768px) {
    .nav__link {
        font-size: 16px;
        margin-bottom: 25px;
    }
}

@media (max-width: 576px) {
    .nav__link {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .language__ref {
        font-size: 10px;
    }

    .hamburger {
        width: 25px;
        height: 20px;
    }
}