/* Header */

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: #fbfbfc;
    background-image: url('/images/common/marble-bg.jpg');
    background-size: cover;
    background-position: center top;
    color: #0f172a;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header-inner {
    position: relative;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    text-decoration: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.logo:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.logo .site-logo {
    height: 78px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border: 2px solid var(--blue);
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 800;
}

.logo-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

/* Desktop Navigation */

.main-navigation {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(22px, 2.8vw, 38px);
    white-space: nowrap;
}

.main-navigation a {
    position: relative;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    white-space: nowrap;
    text-decoration: none;
    padding: 6px 4px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.main-navigation a:hover {
    color: var(--blue);
    transform: translateY(-1px);
}

.main-navigation a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2.5px;
    border-radius: 2px;
    background: var(--blue);
    transition: width 0.25s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Desktop Language Switcher */

.language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-left: auto;
    margin-right: 0;
    flex: 0 0 auto;
}

/* Language Pill */

.lang-switcher-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 3px;
    gap: 2px;
}

.lang-switcher-pill .lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 34px;
    padding: 5px 11px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: #64748b;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}

.lang-switcher-pill .lang-btn:hover {
    color: #0f172a;
}

/* Active Language */

.lang-switcher-pill .lang-btn.active,
.lang-switcher-pill .lang-btn[aria-pressed="true"] {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(47, 128, 237, 0.35);
}

.lang-switcher-pill .lang-btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

/* Desktop Management Login */

.header-inner > .management-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 10px 20px;
    border: 1.5px solid var(--blue);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    color: var(--blue);
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.header-inner > .management-login:hover {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(47, 128, 237, 0.3);
    transform: translateY(-1px);
}

/* Remove Desktop Start a Project Button */

.header-cta {
    display: none !important;
}

/* Mobile Elements Hidden on Desktop */

.menu-toggle,
.mobile-navigation,
.mobile-language-switcher {
    display: none;
}

/* Menu Toggle */

.menu-toggle {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0f172a;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

/* Keyboard Accessibility */

.main-navigation a:focus-visible,
.mobile-navigation a:focus-visible,
.header-inner > .management-login:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 5px;
}

/* Tablet and Mobile Navigation */

@media (max-width: 1180px) {

    .main-navigation,
    .site-header .language-switcher,
    .header-inner > .management-login {
        display: none;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .mobile-navigation {
        position: fixed;
        inset: 0;
        z-index: -1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 22px;
        padding: 100px 40px;
        overflow-y: auto;
        background: var(--black);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.35s ease,
            visibility 0.35s ease;
    }

    .mobile-navigation.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-navigation a {
        color: var(--white);
        font-size: 30px;
        font-weight: 700;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .mobile-navigation a:hover {
        color: var(--blue);
    }

    .mobile-navigation .mobile-cta {
        color: var(--blue);
        font-size: 15px;
    }

    /* Mobile Management Login */

    .mobile-navigation .management-login {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 11px 16px;
        border: 1px solid var(--blue);
        border-radius: 4px;
        background: transparent;
        color: var(--white);
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
        transition:
            background-color 0.3s ease,
            color 0.3s ease;
    }

    .mobile-navigation .management-login:hover {
        background: var(--blue);
        color: var(--white);
    }

    /* Prevent underline on Management Login */

    .mobile-navigation .management-login::after {
        display: none;
    }

    /* Mobile Language Switcher */

    .mobile-language-switcher {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        margin-top: 10px;
        padding: 4px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 30px;
    }

    .mobile-language-switcher .lang-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 36px;
        padding: 6px 12px;
        border: 0;
        border-radius: 20px;
        background: transparent;
        color: rgba(255, 255, 255, 0.6);
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        transition:
            background 0.3s ease,
            color 0.3s ease;
    }

    .mobile-language-switcher .lang-btn:hover {
        color: var(--white);
    }

    .mobile-language-switcher .lang-btn.active,
    .mobile-language-switcher .lang-btn[aria-pressed="true"] {
        background: #2F80ED;
        color: #ffffff;
    }

    .mobile-language-switcher .lang-btn:focus-visible {
        outline: 2px solid #2F80ED;
        outline-offset: 3px;
    }
}

/* Smaller Tablets */

@media (max-width: 1050px) {

    .logo .site-logo {
        height: 70px;
        max-width: 190px;
    }
}

/* Mobile */

@media (max-width: 600px) {

    .header-inner {
        height: 80px;
        gap: 12px;
    }

    .logo .site-logo {
        height: 62px;
        max-width: 160px;
    }

    .mobile-navigation {
        gap: 20px;
        padding: 90px 28px 40px;
    }

    .mobile-navigation a {
        font-size: clamp(23px, 6vw, 30px);
    }

    .mobile-navigation .management-login {
        font-size: 15px;
        padding: 10px 14px;
    }

    .lang-switcher-pill {
        padding: 3px;
        gap: 2px;
    }

    .lang-switcher-pill .lang-btn {
        min-width: 40px;
        min-height: 34px;
        padding: 5px 9px;
        font-size: 11px;
    }
}

/* Small Phones */

@media (max-width: 400px) {

    .header-inner {
        height: 74px;
    }

    .logo .site-logo {
        height: 54px;
        max-width: 140px;
    }

    .mobile-navigation {
        padding-left: 22px;
        padding-right: 22px;
    }
}

/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {

    .main-navigation a,
    .main-navigation a::after,
    .header-inner > .management-login,
    .lang-switcher-pill .lang-btn,
    .mobile-navigation,
    .mobile-navigation a,
    .menu-toggle span,
    .mobile-language-switcher .lang-btn {
        transition: none !important;
    }
}