/* Compact premium header system shared by directory and ground-detail pages. */
:root {
    --cgh-navy: #07111f;
    --cgh-slate: #475569;
    --cgh-muted: #64748b;
    --cgh-line: #e2e8f0;
    --cgh-soft: #f1f5f9;
    --cgh-blue: #2563eb;
    --cgh-green: #22c55e;
    --cgh-green-dark: #15803d;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.cg-has-main-header {
    padding-top: 88px !important;
}

body.cg-has-detail-header {
    padding-top: 0 !important;
}

.cg2-header-root,
.cg3-header-root {
    font-family: var(--cg-font-sans);
    border-bottom: 1px solid rgba(148, 163, 184, .22);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 4px 18px rgba(15, 23, 42, .045);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    transition: box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.cg2-header-root.cg-header-scrolled,
.cg3-header-root.cg-header-scrolled {
    border-bottom-color: rgba(148, 163, 184, .34);
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .11);
}

.cg2-header-inner,
.cg3-header-inner {
    width: min(calc(100% - 40px), var(--cg-shell-max));
    max-width: none;
    min-height: 88px;
    margin: 0 auto;
    padding: 7px 0;
    gap: 24px;
}

.cg-brand-lockup {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.cg2-logo-img,
.cg3-brand-icon {
    width: 72px;
    height: 72px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 7px 10px rgba(15, 23, 42, .12));
    transition: transform .2s ease;
}

.cg-brand-lockup:hover .cg2-logo-img,
.cg-brand-lockup:hover .cg3-brand-icon {
    transform: translateY(-1px) rotate(-1deg);
}

.cg2-nav-list {
    gap: 3px;
    font-size: 14px;
}

.cg2-nav-list a {
    min-height: 42px;
    gap: 7px;
    padding: 0 10px;
    border-radius: 11px;
    color: #1e293b;
    font-weight: 600;
    transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cg2-nav-list a::after {
    display: none;
}

.cg2-nav-list a i {
    color: var(--cgh-muted);
    font-size: 14px;
    transition: color .18s ease;
}

.cg2-nav-list a:hover,
.cg2-nav-list a[aria-current="page"] {
    background: #eff6ff;
    color: #1d4ed8;
}

.cg2-nav-list a:hover i,
.cg2-nav-list a[aria-current="page"] i {
    color: #3b82f6;
}

.cg2-nav-list .cg2-nav-cta {
    min-height: 44px;
    padding: 0 15px !important;
    border: 1px solid transparent;
    box-shadow: none;
}

.cg2-nav-list .cg2-nav-secondary {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8 !important;
}

.cg2-nav-list .cg2-nav-secondary i {
    color: #2563eb;
}

.cg2-nav-list .cg2-nav-secondary:hover {
    border-color: #93c5fd;
    background: #dbeafe;
    transform: translateY(-1px);
}

.cg2-nav-list .cg2-nav-primary {
    border-color: #22c55e;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff !important;
    box-shadow: 0 9px 20px rgba(34, 197, 94, .24);
}

.cg2-nav-list .cg2-nav-primary i {
    color: #dcfce7;
}

.cg2-nav-list .cg2-nav-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 12px 24px rgba(34, 197, 94, .3);
    transform: translateY(-1px);
}

.cg2-toggle,
.cg3-nav-toggle {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 1px solid var(--cgh-line);
    border-radius: 12px;
    background: #fff;
    color: var(--cgh-navy);
    box-shadow: 0 5px 14px rgba(15, 23, 42, .07);
}

.cg2-toggle:hover,
.cg3-nav-toggle:hover {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.cg2-toggle-bar {
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--cgh-navy);
}

.cg2-nav-mobile {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    max-height: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 18px;
    background: rgba(255, 255, 255, .99);
    box-shadow: 0 22px 48px rgba(15, 23, 42, .18);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: max-height .28s ease, opacity .2s ease, transform .2s ease, border-color .2s ease;
}

.cg2-nav-mobile.cg2-open {
    max-height: min(620px, calc(100vh - 96px));
    overflow-y: auto;
    border-color: var(--cgh-line);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cg2-nav-mobile-list {
    gap: 4px;
    padding: 12px;
    font-size: 15px;
}

.cg2-nav-mobile-list a {
    min-height: 46px;
    gap: 11px;
    padding: 0 12px;
    border-radius: 11px;
    color: #1e293b;
    font-weight: 600;
}

.cg2-nav-mobile-list a i {
    width: 20px;
    color: var(--cgh-muted);
}

.cg2-nav-mobile-list a:hover,
.cg2-nav-mobile-list a[aria-current="page"] {
    background: #eff6ff;
    color: #1d4ed8;
}

.cg2-nav-mobile-list .cg2-nav-secondary {
    margin-top: 6px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.cg2-nav-mobile-list .cg2-nav-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 8px 18px rgba(34, 197, 94, .2);
}

.cg2-nav-mobile-list .cg2-nav-primary i {
    color: #dcfce7;
}

.cg2-header-root a:focus-visible,
.cg2-header-root button:focus-visible,
.cg3-header-root a:focus-visible,
.cg3-header-root button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 3px;
}

/* Ground-detail header */
.cg3-header-root {
    position: sticky;
    top: 0;
    z-index: 999;
}

.cg3-header-inner {
    min-height: 80px;
}

.cg3-header-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.cg3-header-brand .cg-brand-lockup {
    flex: 0 0 auto;
}

.cg3-brand-icon {
    width: 60px;
    height: 60px;
}

.cg3-ground-name {
    min-width: 0;
    max-width: 260px;
    overflow: hidden;
    padding: 7px 10px;
    border-left: 1px solid var(--cgh-line);
    color: var(--cgh-slate);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cg3-nav-links {
    gap: 2px;
    font-size: 13px;
}

.cg3-nav-links a {
    min-height: 40px;
    gap: 7px;
    padding: 0 9px;
    border-radius: 10px;
    color: var(--cgh-slate);
    font-weight: 600;
}

.cg3-nav-links a::after {
    display: none;
}

.cg3-nav-links a:hover,
.cg3-nav-links a.cg3-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.cg3-nav-links a[href="#ground-booking"] {
    margin-left: 4px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 8px 18px rgba(34, 197, 94, .2);
}

.cg3-nav-links a[href="#ground-booking"] i {
    color: #dcfce7;
}

@media (max-width: 1180px) {
    .cg2-header-inner,
    .cg3-header-inner {
        width: min(calc(100% - 40px), var(--cg-shell-max));
        gap: 14px;
    }

    .cg2-nav-list a {
        padding-right: 8px;
        padding-left: 8px;
    }

    .cg2-nav-list .cg2-nav-cta {
        padding-right: 11px !important;
        padding-left: 11px !important;
    }

    .cg3-ground-name {
        max-width: 190px;
    }
}

@media (max-width: 980px) {
    body.cg-has-main-header {
        padding-top: 76px !important;
    }

    .cg2-header-inner,
    .cg3-header-inner {
        min-height: 76px;
    }

    .cg2-logo-img {
        width: 60px;
        height: 60px;
    }

    .cg2-nav-desktop {
        display: none;
    }

    .cg2-toggle,
    .cg3-nav-toggle {
        display: inline-flex;
    }

    .cg3-nav-links {
        position: absolute;
        top: calc(100% + 8px);
        right: 14px;
        left: 14px;
        max-height: 0;
        overflow: hidden;
        align-items: stretch;
        gap: 4px;
        padding: 0 12px;
        border: 1px solid transparent;
        border-radius: 18px;
        background: rgba(255, 255, 255, .99);
        box-shadow: 0 22px 48px rgba(15, 23, 42, .18);
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: max-height .28s ease, padding .28s ease, opacity .2s ease, transform .2s ease, border-color .2s ease;
    }

    .cg3-nav-links.cg3-open {
        max-height: min(560px, calc(100vh - 92px));
        overflow-y: auto;
        padding-top: 12px;
        padding-bottom: 12px;
        border-color: var(--cgh-line);
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .cg3-nav-links a {
        width: 100%;
        min-height: 44px;
        padding: 0 12px;
    }

    .cg3-nav-links a[href="#ground-booking"] {
        margin: 4px 0 0;
    }
}

@media (max-width: 560px) {
    .cg2-header-inner,
    .cg3-header-inner {
        width: min(calc(100% - 32px), var(--cg-shell-max));
    }

    .cg-brand-lockup {
        gap: 8px;
    }

    .cg2-logo-img {
        width: 56px;
        height: 56px;
    }

    .cg3-brand-icon {
        width: 54px;
        height: 54px;
    }

    .cg3-ground-name {
        max-width: min(44vw, 180px);
        padding-right: 0;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .cg2-header-inner,
    .cg3-header-inner {
        width: min(calc(100% - 32px), var(--cg-shell-max));
    }

    .cg2-logo-img {
        width: 52px;
        height: 52px;
    }

    .cg2-toggle,
    .cg3-nav-toggle {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cg2-header-root *,
    .cg3-header-root * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
