/* ==================================================================
   css/header-polish.css
   The header bar on every page. Loaded last so it beats style.css.

   The theme hid every link behind a hamburger at all widths and left a
   fixed-position toggler floating over the page. From 820px up the links
   now sit in the bar where you can see them; below that the theme's
   slide-in drawer still does the job.
   ================================================================== */

:root {
    --hdr-red:   #B52017;
    --hdr-red2:  #8E2420;
    --hdr-ink:   #2B2B2B;
    --hdr-muted: #6B6B6B;
    --hdr-line:  #E6E2DC;
}

/* ---------------- the bar itself -------------------------------- */

.header_area .nav_area {
    background: #fff;
    border-bottom: 1px solid var(--hdr-line);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.menu_area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    min-height: 64px;
}

/* the theme centred the logo across the whole bar and padded it 31px */
.logo_container {
    display: flex;
    align-items: center;
    width: auto;
    padding: 8px 0;
    text-align: left;
    flex: 0 0 auto;
}
.logo_container a {
    display: block;
    width: 132px;
    line-height: 0;
}
.logo_container a img { width: 100%; height: auto; }

.main_menu {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    justify-content: flex-end;
}

/* ---------------- the links ------------------------------------- */

.nav_links {
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav_item { list-style: none; }

/* ---------------- 820px and up: links live in the bar ----------- */

@media (min-width: 820px) {

    /* no hamburger, no close cross, no fixed overlay */
    .main_menu .menu_toggler,
    .offset_menu .cross { display: none !important; }

    .main_menu .offset_menu {
        position: static;
        display: block;
        height: auto;
        width: auto;
        padding: 0;
        background: none;
        transform: none !important;
        transition: none;
        z-index: auto;
        text-align: right;
    }
    .menu_wrapper {
        display: block;
        vertical-align: baseline;
    }
    .nav_links {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    .nav_links .nav_item > a {
        display: inline-block;
        padding: 10px 14px;
        font: 600 15px/1.2 'Roboto', sans-serif;
        color: var(--hdr-ink);
        text-decoration: none;
        border-radius: 999px;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        transition: background .15s, color .15s;
    }
    .nav_links .nav_item > a:hover,
    .nav_links .nav_item > a:focus-visible {
        color: var(--hdr-red);
        background: #FAF3F2;
    }
    /* the page you are on */
    .nav_links .nav_item.is_here > a {
        color: var(--hdr-red);
        border-bottom-color: var(--hdr-red);
        border-radius: 4px 4px 0 0;
        background: none;
    }

    /* the name and the log out button, pushed to the far right */
    .nav_account {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: 14px;
        padding-left: 16px;
        border-left: 1px solid var(--hdr-line);
    }
    .nav_whoami {
        font: 400 14px/1.2 'Roboto', sans-serif;
        color: var(--hdr-muted);
        white-space: nowrap;
    }
    .nav_links .nav_account > a.nav_logout {
        padding: 8px 16px;
        font-size: 14px;
        color: #fff;
        background: var(--hdr-red);
        border: 1px solid var(--hdr-red);
        border-radius: 999px;
    }
    .nav_links .nav_account > a.nav_logout:hover {
        color: #fff;
        background: var(--hdr-red2);
        border-color: var(--hdr-red2);
    }
    .nav_links .nav_account.is_here > a.nav_logout { border-radius: 999px; }
}

/* ---------------- below 820px: the drawer ----------------------- */

@media (max-width: 819px) {

    .main_menu .menu_toggler {
        position: static;
        top: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    .main_menu .menu_toggler:hover { background: #FAF3F2; }

    .main_menu .offset_menu {
        padding-left: 60px;
        padding-right: 28px;
    }
    .nav_links .nav_item > a {
        font-size: 24px;
        line-height: 50px;
        color: #D8D8D8;
        text-decoration: none;
    }
    .nav_links .nav_item > a:hover { color: #fff; }
    .nav_links .nav_item.is_here > a {
        color: #fff;
        border-bottom: 2px solid var(--hdr-red);
    }
    .nav_account {
        margin-top: 18px;
        padding-top: 18px;
        border-top: 1px solid rgba(255, 255, 255, .18);
    }
    .nav_whoami {
        display: block;
        font: 400 14px/1.4 'Roboto', sans-serif;
        color: #9A9A9A;
    }
    .nav_links .nav_account > a.nav_logout { font-size: 20px; }

    .logo_container a { width: 112px; }
    .menu_area { min-height: 56px; }
}

/* ==========================================================================
   The decorative garland (images/contact_img.png).

   It is absolutely positioned at top:-70px and stands 346px tall, so it
   reached up out of its own section and sat invisibly on top of the header
   AND the old breadcrumb bar. Being a plain <img> with pointer-events:auto,
   it swallowed every click underneath it, which is why the "Log out" links
   did nothing at all.

   pointer-events:none makes it decorative, as intended. It is also hidden
   until there is genuinely room beside the content, because at ordinary
   desktop widths it simply overlapped the page.
   ========================================================================== */
.contact_image {
  pointer-events: none;
}
@media (max-width: 1399px) {
  .contact_image { display: none; }
}
@media (min-width: 1400px) {
  .contact_image { top: -40px; right: -40px; opacity: .9; }
}
