/* Header layout — plain CSS file (avoids stale neph.less cache) */

div.ccm-page header {
    background-color: #00213b !important;
}

div.ccm-page header .header-wrap {
    background-color: #00213b !important;
    text-align: center;
    position: relative;
}

/* Side buttons on edges; logo locked to true horizontal center */
div.ccm-page header .header-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 110px;
    width: 100%;
}

div.ccm-page header .header-bar__side {
    display: flex !important;
    align-items: center;
    position: relative;
    z-index: 3;
    flex: 1 1 0;
    min-width: 0;
}

div.ccm-page header .header-bar__side--left {
    justify-content: flex-start;
    padding-left: 30px;
}

div.ccm-page header .header-bar__side--right {
    justify-content: flex-end;
    padding-right: 30px;
}

div.ccm-page header .header-bar__logo {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    /* -50% centers the box; +28px compensates for heavy gold icon on the left of the artwork */
    transform: translate(-50%, -50%) translateX(28px) !important;
    z-index: 1;
    display: flex !important;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 46%;
}

div.ccm-page header .header-bar__logo a,
div.ccm-page header .header-bar__logo .ccm-area,
div.ccm-page header .header-bar__logo .ccm-block-edit,
div.ccm-page header .header-bar__logo .ccm-block-image {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

div.ccm-page header .header-bar__logo img {
    display: block !important;
    margin: 0 auto !important;
    max-height: 100px !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Center top navigation links */
div.ccm-page div.ccm-block-top-navigation-bar nav.navbar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

div.ccm-page div.ccm-block-top-navigation-bar .navbar > .container-fluid {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
}

div.ccm-page div.ccm-block-top-navigation-bar .navbar-collapse,
div.ccm-page div.ccm-block-top-navigation-bar .navbar-expand-lg .navbar-collapse {
    justify-content: center !important;
    flex-grow: 0 !important;
    display: flex !important;
}

div.ccm-page div.ccm-block-top-navigation-bar .navbar-nav {
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: center !important;
}

/* Hide duplicate brand/CTAs from Top Navigation Bar on the public site only */
div.ccm-page:not(.ccm-edit-mode):not(.ccm-presence-bar-active) div.ccm-block-top-navigation-bar .navbar-brand,
div.ccm-page:not(.ccm-edit-mode) div.ccm-block-top-navigation-bar .btn.btn-secondary {
    display: none !important;
}

/*
 * EDIT MODE
 * Absolute logo positioning breaks Concrete area UI — switch to a simple visible layout.
 * Matches: PHP class header--edit-mode, .ccm-edit-mode on page, or html.ccm-edit-mode
 */
div.ccm-page header.header--edit-mode,
div.ccm-page.ccm-edit-mode header,
html.ccm-edit-mode div.ccm-page header,
html.ccm-panel-open div.ccm-page.ccm-edit-mode header {
    background-color: #00213b !important;
    position: relative !important;
    opacity: 1 !important;
}

div.ccm-page header.header--edit-mode .header-bar,
div.ccm-page.ccm-edit-mode header .header-bar,
html.ccm-edit-mode div.ccm-page header .header-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 16px !important;
    min-height: 160px !important;
    padding: 16px 12px !important;
}

div.ccm-page header.header--edit-mode .header-bar__side,
div.ccm-page header.header--edit-mode .header-bar__logo,
div.ccm-page.ccm-edit-mode header .header-bar__side,
div.ccm-page.ccm-edit-mode header .header-bar__logo,
html.ccm-edit-mode div.ccm-page header .header-bar__side,
html.ccm-edit-mode div.ccm-page header .header-bar__logo {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    max-width: none !important;
    flex: 1 1 220px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 90px !important;
    padding: 8px !important;
    background: rgba(255, 255, 255, 0.08);
    z-index: 5 !important;
}

div.ccm-page header.header--edit-mode .ccm-area,
div.ccm-page header.header--edit-mode .ccm-block-edit,
div.ccm-page header.header--edit-mode img,
div.ccm-page header.header--edit-mode .btn,
div.ccm-page.ccm-edit-mode header .ccm-area,
div.ccm-page.ccm-edit-mode header .ccm-block-edit,
div.ccm-page.ccm-edit-mode header img,
div.ccm-page.ccm-edit-mode header .btn,
html.ccm-edit-mode div.ccm-page header .ccm-area,
html.ccm-edit-mode div.ccm-page header img,
html.ccm-edit-mode div.ccm-page header .btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 6 !important;
}

div.ccm-page header.header--edit-mode .btn.btn-secondary,
div.ccm-page.ccm-edit-mode header .btn.btn-secondary,
html.ccm-edit-mode div.ccm-page header .btn.btn-secondary {
    display: inline-block !important;
}

div.ccm-page.ccm-edit-mode div.ccm-block-top-navigation-bar .navbar-brand,
div.ccm-page.ccm-edit-mode div.ccm-block-top-navigation-bar .btn.btn-secondary,
html.ccm-edit-mode div.ccm-page div.ccm-block-top-navigation-bar .navbar-brand,
html.ccm-edit-mode div.ccm-page div.ccm-block-top-navigation-bar .btn.btn-secondary {
    display: inline-block !important;
}

@media (max-width: 767px) {
    div.ccm-page:not(.ccm-edit-mode) header:not(.header--edit-mode) .header-bar__side {
        display: none !important;
    }

    div.ccm-page:not(.ccm-edit-mode) header:not(.header--edit-mode) .header-bar__logo {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        max-width: 100%;
        width: 100%;
        padding: 10px 50px;
    }

    div.ccm-page:not(.ccm-edit-mode) header:not(.header--edit-mode) .header-bar {
        justify-content: center;
        min-height: auto;
    }
}
