/* ===== Apple-style Global Header ===== */

/* --- Global Nav Bar --- */
.gn-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 9999;
    height: 44px;
    min-width: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.gn-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- Logo --- */
.gn-logo {
    display: flex;
    align-items: center;
    height: 44px;
    flex-shrink: 0;
}

.gn-logo img {
    height: 40px;
    width: auto;
    display: block;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.gn-logo:hover img {
    opacity: 1;
}

/* --- Nav Links --- */
.gn-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    gap: 0;
    height: 44px;
}

.gn-nav-item {
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
}

.gn-nav-link {
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: -0.01em;
    font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1;
    padding: 0 8px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow-y: hidden;
    overflow-x: clip;
    background: no-repeat;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    transition: color 0.32s cubic-bezier(0.4, 0, 0.6, 1);
    cursor: pointer;
}

.gn-nav-link:hover,
.gn-nav-item.active .gn-nav-link {
    color: rgba(0, 0, 0, 1);
}

/* --- Right Actions --- */
.gn-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    height: 44px;
}

.gn-action-link {
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: -0.01em;
    font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1;
    padding: 0 10px;
    height: 44px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    transition: color 0.32s cubic-bezier(0.4, 0, 0.6, 1);
}

.gn-action-link:hover {
    color: rgba(0, 0, 0, 1);
}

.gn-action-icon {
    flex-shrink: 0;
}

.gn-action-text {
    margin-left: 4px;
}

/* Hide text labels on smaller desktop, show icons only */
@media (max-width: 1068px) {
    .gn-action-phone .gn-action-text,
    .gn-action-email .gn-action-text,
    .gn-action-admin .gn-action-text {
        display: none;
    }
}

/* --- Hamburger Toggle --- */
.gn-hamburger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 10001;
    flex-shrink: 0;
}

.gn-hamburger-bar {
    display: block;
    width: 17px;
    height: 1px;
    background: #333;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.gn-hamburger-bar:nth-child(1) {
    top: 17px;
}

.gn-hamburger-bar:nth-child(2) {
    top: 23px;
}

/* Hamburger → X transform */
.gn-hamburger.open .gn-hamburger-bar:nth-child(1) {
    top: 20px;
    transform: translateX(-50%) rotate(45deg);
}

.gn-hamburger.open .gn-hamburger-bar:nth-child(2) {
    top: 20px;
    transform: translateX(-50%) rotate(-45deg);
}

/* --- Mobile Styles --- */
@media (max-width: 833px) {
    .gn-nav {
        display: none;
    }

    .gn-actions {
        display: none;
    }

    .gn-hamburger {
        display: block;
        order: -1;
    }

    .gn-content {
        justify-content: center;
        position: relative;
    }

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

    .gn-hamburger {
        position: absolute;
        left: 8px;
    }

    /* Mobile menu overlay */
    .gn-mobile-menu {
        display: block;
    }

    .gn-mobile-inner {
        padding: 16px 48px;
    }

    .gn-mobile-link {
        font-size: 17px;
    }

    .gn-mobile-divider {
        margin: 12px 0;
    }
}

@media (min-width: 834px) {
    .gn-mobile-menu {
        display: none !important;
    }
}

/* --- Mobile Menu Panel --- */
.gn-mobile-menu {
    position: fixed;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f7;
    z-index: 9998;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.gn-mobile-menu.open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.gn-mobile-inner {
    padding: 24px 48px 48px;
}

.gn-mobile-link {
    display: block;
    color: rgba(0, 0, 0, 0.88);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-12px);
    transition: color 0.2s ease, opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gn-mobile-menu.open .gn-mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.gn-mobile-link:hover {
    color: #0066cc;
}

.gn-mobile-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 16px 0;
    border: none;
}

.gn-mobile-action {
    display: block;
    color: rgba(0, 0, 0, 0.48);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-12px);
    transition: color 0.2s ease, opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gn-mobile-menu.open .gn-mobile-action {
    opacity: 1;
    transform: translateY(0);
}

.gn-mobile-action:hover {
    color: #000;
}
