/*Preloader*/
#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#preloader.hidden {
    opacity: 0;
}

/*Header*/
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.main-content {
    padding-top: 70px;
}

.universal-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: transparent;
    z-index: 1000;
}

.header-logo img {
    height: 50px;
    display: block;
    transition: transform 0.3s ease;
}

.header-logo img:hover {
    transform: scale(1.05);
}

.navigation {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navigation-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
    text-shadow: 1px 1px 2px #fff0dbde;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 40px;
}

.login-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border: 2px solid;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.login-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#language-select {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    background-color: transparent;
    transition: all 0.3s ease;
}

#language-select:hover {
    transform: scale(1.05);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 30px;
    height: 22px;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    position: fixed;
    right: 15px;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

@media (max-width: 900px) {
    .navigation {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: inherit;
        transform: none;
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    .navigation.active {
        display: flex;
    }

    .navigation-list {
        flex-direction: column;
        gap: 16px;
    }

    .hamburger {
        display: flex;
    }
    
    .navigation {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #ffffff8f;
        transform: translateY(-120%);
        transition: transform 0.3s ease-in-out;
        text-align: center;
        padding: 20px 0;
        z-index: 1000;
        backdrop-filter: blur(15px);
    }

    .navigation.active {
        transform: translateY(0);
    }

    .navigation-list {
        flex-direction: column;
        gap: 20px;
    }

    .menu-toggle {
        display: flex;
    }
}

.theme-light .universal-header {
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}
.theme-light .nav-link { color: #e5e7eb; }
.theme-light .nav-link:hover { color: #ffffff; }
.theme-light .nav-link::after { background-color: #ffffff; }

.theme-light .login-link {
    color: #ffffff;
    border-color: #ffffff;
    background-color: transparent;
    text-shadow: none;
}
.theme-light .login-link:hover {
    background-color: #ffffff;
    color: #1f2937;
    border-color: #ffffff;
}
.theme-light #language-select {
    color: #e5e7eb;
    border-color: rgba(229, 231, 235, 0.5);
}
.theme-light #language-select:hover {
    border-color: #ffffff;
}
.theme-light #language-select option {
    color: #1f2937;
    background-color: #ffffff;
}

.theme-light .menu-toggle {
    color: #ffffff;
}

.theme-dark .universal-header {
    text-shadow: none;
}
.theme-dark .nav-link { color: #181a1e; }
.theme-dark .nav-link:hover { color: #000000; }
.theme-dark .nav-link::after { background-color: #000000; }

.theme-dark .login-link {
    color: #111827;
    border-color: #111827;
    background-color: transparent;
    text-shadow: none;
}
.theme-dark .login-link:hover {
    background-color: #111827;
    color: #ffffff;
    border-color: #111827;
}
.theme-dark #language-select {
    color: #374151;
    border-color: #111827;
}
.theme-dark #language-select:hover {
    border-color: #111827;
}
.theme-dark #language-select option {
    color: #1f2937;
    background-color: #ffffff;
}