﻿/* =========================================
   Header / Navigation – Blazor + Burger Layout
   ========================================= */

/* ---------- Base ---------- */
.tes-header {
    display: block;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: monospace, sans-serif;
}

.tes-header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    box-sizing: border-box;
}

/* ---------- Logo ---------- */
.tes-header-logo {
    display: inline-block;
    line-height: 0;
}

.tes-header-logo-img {
    max-width: 300px;
    height: auto;
    display: block;
    transition: filter 0.2s ease;
}

.tes-header-logo:hover .tes-header-logo-img {
    filter: brightness(0.85);
}

/* ---------- Menu wrapper (desktop) ---------- */
.tes-header-menu {
    display: flex;
    align-items: center;
}

/* Hide hamburger on desktop */
.hamburger {
    display: none;
}

/* ---------- Desktop navigation ---------- */
.layout-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.layout-nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

    .layout-nav-link:hover,
    .layout-nav-link.active {
        color: #FF0033; /* brand red */
    }

/* ---------- Language dropdown (polished) ---------- */
.language-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
    line-height: 1;
}

    .lang-btn:hover {
        color: #FF0033;
    }

/* Arrow – rotates when dropdown opens */
.arrow {
    display: inline-block;
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.language-dropdown.open .arrow {
    transform: rotate(180deg);
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    padding: 0.25rem 0;
    min-width: 130px;
    z-index: 200;
}

.language-dropdown.open .lang-menu {
    display: block;
}

.lang-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.65rem 1.25rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: #222;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

    .lang-menu button:hover {
        color: #FF0033;
    }

/* =========================================
   MOBILE (max-width: 767px)
   ========================================= */
@media (max-width: 767px) {
    .tes-header {
        position: static; /* change to sticky if you want it to stay on screen */
        /* For sticky, use: position: sticky; top: 0; */
    }

    .tes-header-inner {
        position: relative;
        padding: 0.5rem 1rem;
    }

    .tes-header-logo-img {
        max-width: 200px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-left: auto;
        z-index: 101;
        position: relative;
    }

        .hamburger span {
            display: block;
            height: 2px;
            width: 100%;
            background-color: #FF0033;
            border-radius: 2px;
            transition: transform 0.3s ease, opacity 0.2s ease;
        }

    /* Animate into X when menu is open */
    .layout-nav.mobile-open ~ .hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .layout-nav.mobile-open ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .layout-nav.mobile-open ~ .hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Mobile menu dropdown */
    .layout-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 100;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

        .layout-nav.mobile-open {
            display: flex;
        }

    .layout-nav-link {
        display: block;
        padding: 0.75rem 1.5rem;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        color: #222;
    }

        .layout-nav-link:last-child {
            border-bottom: none;
        }

    /* Language dropdown in mobile menu */
    .language-dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0.75rem 1.5rem;
    }

    .lang-btn {
        justify-content: center;
    }

    .language-dropdown .lang-menu {
        position: static;
        display: none;
        box-shadow: none;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }

    .language-dropdown.open .lang-menu {
        display: block;
    }

    .lang-menu button {
        text-align: center;
        padding: 0.5rem;
    }
}
