/* =========================================================
   HIGEN SHARED HEADER
   Same structure/content, CODE-Bot family colour treatment only
========================================================= */

:root {
    --higen-primary: #ff6500;
    --higen-primary-dark: #e85b00;
    --higen-primary-soft: #fff3e8;

    --higen-navy: #081d3a;
    --higen-navy-2: #0d2b52;
    --higen-navy-3: #173b67;

    --higen-white: #ffffff;
    --higen-bg: #f7f9fc;
    --higen-text: #1f2937;
    --higen-muted: #667085;
    --higen-line: #e4e9f0;

    --higen-shadow: 0 14px 34px rgba(8, 29, 58, 0.12);
    --higen-radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: "Inter", Arial, sans-serif;
    color: var(--higen-text);
    background: var(--higen-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-container {
    width: min(1180px, 92%);
    margin-inline: auto;
}

/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    min-height: 92px;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid #e8edf3;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 28px rgba(8, 29, 58, 0.08);
}

.header-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

/* =========================================================
   BRAND / LOGO
========================================================= */

.brand-logo {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 170px;
}

.brand-tagline {
    color: var(--higen-navy);
    padding-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.brand-logo-image {
    width: 200px;
    max-height: 200px;
    object-fit: contain;
}

.brand-wordmark {
    color: var(--higen-navy);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.5px;
}

.brand-wordmark>span {
    color: var(--higen-primary);
}

/* =========================================================
   NAVIGATION
========================================================= */

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    font-size: 14px;
    font-weight: 700;
}

.main-nav>a:not(.header-login-btn) {
    position: relative;
    min-width: 96px;
    padding: 14px 19px;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    background: var(--higen-navy);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.2s ease;
}

.main-nav>a:not(.header-login-btn):first-child {
    border-radius: 14px 0 0 14px;
    color: var(--higen-white);
    background: var(--higen-primary);
}

.main-nav>a:not(.header-login-btn):nth-last-child(2) {
    border-right: 0;
    border-radius: 0 14px 14px 0;
}

.main-nav>a:not(.header-login-btn)::after {
    display: none;
}

.main-nav>a:not(.header-login-btn):hover,
.main-nav>a:not(.header-login-btn):focus-visible {
    color: var(--higen-white);
    background: var(--higen-navy-2);
}

.main-nav>a:not(.header-login-btn):first-child:hover,
.main-nav>a:not(.header-login-btn):first-child:focus-visible {
    background: var(--higen-primary-dark);
}

.header-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 47px;
    margin-left: 16px;
    padding: 11px 24px;
    border: 1px solid var(--higen-primary);
    border-radius: 14px;
    color: var(--higen-white);
    background: var(--higen-primary);
    box-shadow: 0 10px 24px rgba(255, 101, 0, 0.22);
    transition: 0.2s ease;
}

.header-login-btn:hover,
.header-login-btn:focus-visible {
    background: #081d3a;
    border-color: var(--higen-primary-dark);
    transform: translateY(-1px);
}

/* =========================================================
   MOBILE BUTTON
========================================================= */

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 11px;
    background: var(--higen-navy);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 999px;
    background: var(--higen-white);
    transition: 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Highlight the current page */
.site-header .main-nav a.active {
    color: #ff6e29;
    font-weight: 700;
    position: relative;
}

/* Saffron underline for the active navigation link */
.site-header .main-nav a.active:not(.header-login-btn)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 3px;
    background-color: #ff6e29;
    border-radius: 3px;
}

/* Active Login button */
.site-header .main-nav a.header-login-btn.active {
    background-color: #ff6e29;
    color: #ffffff;
    border-color: #ff6e29;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1040px) {
    .main-nav>a:not(.header-login-btn) {
        min-width: auto;
        padding-inline: 14px;
    }
}

@media (max-width: 940px) {

    .site-header,
    .header-inner {
        min-height: 74px;
    }

    html {
        scroll-padding-top: 78px;
    }

    .brand-logo-image {
        width: 90px;
        max-height: 68px;
    }

    .brand-wordmark {
        font-size: 27px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 74px;
        left: 4%;
        right: 4%;
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
        background: var(--higen-white);
        border: 1px solid var(--higen-line);
        border-radius: 16px;
        box-shadow: var(--higen-shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav>a:not(.header-login-btn) {
        width: 100%;
        padding: 12px 16px;
        border: 0;
        border-radius: 10px !important;
        color: var(--higen-white);
        background: var(--higen-navy);
    }

    .main-nav>a:not(.header-login-btn):first-child {
        background: var(--higen-primary);
    }

    .header-login-btn {
        width: 100%;
        margin: 0;
        border-radius: 10px;
    }
}

@media (max-width: 520px) {
    .brand-logo {
        min-width: 0;
        gap: 2px;
    }

    .brand-logo-image {
        width: 76px;
        max-height: 58px;
    }

    .brand-wordmark {
        font-size: 24px;
    }
}

/* =========================================
   HIGEN ACTIVE NAVIGATION - FINAL OVERRIDE
========================================= */

/* All standard navigation links start navy */
.site-header .main-nav > a:not(.header-login-btn) {
    color: #ffffff;
    background: #081d3a;
    transition: background 0.2s ease, color 0.2s ease;
}

/* Remove the default Home saffron styling */
.site-header .main-nav > a:not(.header-login-btn):first-child {
    color: #ffffff;
    background: #081d3a;
}

/* Highlight only the link marked active by PHP */
.site-header .main-nav > a.active:not(.header-login-btn) {
    color: #ffffff !important;
    background: #ff6500 !important;
}

/* Standard navigation hover */
.site-header .main-nav > a:not(.header-login-btn):hover {
    color: #ffffff;
    background: #ff6500;
}

/* Active Login button */
.site-header .main-nav > a.header-login-btn.active {
    color: #ffffff !important;
    background: #ff6500 !important;
    border-color: #ff6500 !important;
}

/* Mobile navigation */
@media (max-width: 940px) {
    .site-header .main-nav > a:not(.header-login-btn):first-child {
        color: #ffffff;
        background: #081d3a;
    }

    .site-header .main-nav > a.active:not(.header-login-btn) {
        color: #ffffff !important;
        background: #ff6500 !important;
    }
}
