﻿/***********************************************************************/
/******************************* %header% ******************************/
/***********************************************************************/

/*#region Header*/

header {
    background-color: var(--background);
    padding-top: 2rem 0;
    color: var(--color);
    position: relative;
    z-index: 2; /* Prevents footer from appearing on top of header, while keeping footer interactable*/
}

header .container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

header .container > * {
    align-self: center;
}

/* Logo, Title & Icons*/

header .logo-bar {
    padding: 1rem 0;
}

header img {
    height: 100px;
    width: 100px;
    margin-right: 1.25rem;
}

header .title {
    font-family: var(--serif);
    display: inline-block;
    margin-right: 5rem;
}

header .title .line1 {
    display: block;
    font-size: 2rem;
    font-family: var(--display);
}

header .title .line2 {
    display: block;
    font-size: 1.3rem;
    font-family: var(--display);
}

header #Icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

header #Icons > * {
    font-size: 1.5rem;
}

header #Icons button {
    padding: 0;
}

.logo-bar .county-status {
    text-align: right;
}

header .ch95-icon {
    width: 36px;
    height: 34px;
    background-image: url("/_Media/Global/Logos/Channel95/Medium/Channel95LogoL8.png");
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
}

@media (prefers-color-scheme: dark) {
    header .ch95-icon {
        background-image: url("/_Media/Global/Logos/Channel95/Medium/Channel95LogoL5.png");
    }
}

header .threeoneone-icon:hover {
    text-decoration: none;
}

header #CountyAlert {
    position: relative;
    top: 1.5rem;
}

header #CountyAlertPopup {
    position: absolute;
    right: -2.5rem;
    top: 100%;
    width: 300px;
    background-color: #F4F4F4;
    z-index: 1;
    font-size: 1rem;
}

header #CountyAlertPopup:not(.open) {
    display: none;
}

header #CountyAlertPopup .category {
    color: black;
}

@media (prefers-color-scheme: dark) {
    header #CountyAlertPopup {
        background-color: var(--backgroundL6);
    }

    header #CountyAlertPopup .category {
        color: white;
    }
}

/*#endregion*/

/*#region Header (0 to 899px)*/

@media screen and (max-width: 899px) {
    .employee-information-icon {
        display: none;
    }

    header #Icons {
        flex-direction: column;
        gap: 0;
    }

    header #Icons .facebook-icon,
    header #Icons .twitter-icon,
    header #Icons .youtube-icon,
    header #Icons .flickr-icon,
    header #Icons .signup-icon,
    header #Icons .rss-icon,
    header #Icons .ch95-icon,
    header #Icons .projects-icon,
    header #Icons .threeoneone-icon,
    header #Icons .vacancies-icon,
    .logo-bar .county-status {
        display: none;
    }

    header #CountyAlert {
        top: 0;
    }

    header #CountyAlertPopup {
        z-index: 0;
        top: 2.5rem;
        right: -1rem;
    }

    header #CountyAlertIcon {
        display: none;
    }
}

/*#endregion*/

/*#region Header (0 to 599px)*/

@media screen and (max-width: 599px) {
    header img {
        height: 75px;
        width: 75px;
        margin-right: 1rem;
    }

    header .title .line1 {
        font-size: 1.5rem;
    }

    header .title .line2 {
        font-size: 1rem;
    }
}

/*#endregion*/

/***********************************************************************/
/***************************** %navigation% ****************************/
/***********************************************************************/

/*#region Navigation*/

nav {
    display: grid;
}

header .navigation-bar {
    border-top: 1px solid var(--tertiary);
    background-color: var(--background);
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

nav .level1 {
    font-size: 1.3rem;
    font-family: var(--serif);
    letter-spacing: 0.1rem;
}

nav .level2 {
    font-size: 1rem;
    font-family: var(--sansserif);
}

nav .level2 > li:not(:first-of-type) {
    margin-top: 1rem;
}

nav .level3 {
    font-size: 0.9rem;
    padding-left: 1rem;
}

nav #ResponsiveIcons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-evenly;
}

nav #ResponsiveIcons > * {
    font-size: 1.3rem;
}

header nav .county-status {
    padding: 1rem;
    border-top: 1px solid var(--tertiary);
    font-size: 0.8rem;
    background-color: var(--background);
}

@media (prefers-color-scheme: light) {
    header nav .county-status {
        color: #BBBBBB;
    }

    nav #ResponsiveIcons .ch95-icon {
        background-image: url("/_Media/Global/Logos/Channel95/Medium/Channel95LogoWhite.png");
    }
}

/*#endregion*/

/*#region Navigation (900px to ∞)*/

@media screen and (min-width: 900px) {
    nav {
        grid-template-columns: auto;
    }

    nav .level1 {
        grid-column-start: 1;
    }

    .mobile-nav-open,
    .mobile-nav-close,
    .mobile-nav-back {
        display: none;
    }

    header nav .county-status {
        display: none;
    }

    /*Main navigation bar*/
    nav {
        width: 100%;
        position: relative;
    }

    nav > ul {
        display: flex;
    }

    nav > ul > li {
        flex: 1;
        text-align: center;
        padding-inline: 0;
        transition: all ease-in-out 1s;
        border-bottom: 3px solid transparent;
    }

    nav > ul > li > a, 
    nav > ul > li > button {
        padding-block: 1rem;
        display: block;
        line-height: normal;
        font-size: 1.2rem;
    }

    nav > ul > li.open {
        background-color: var(--background-hover);
        border-bottom-color: var(--tertiary);
    }

    /*Second level*/
    nav > ul > li > ul {
        display: none;
        -webkit-column-count: 3;
        -moz-column-count: 3;
        column-count: 3;
        z-index: 2;
        text-align: left;
        background-color: var(--background);
        padding: 2rem;
    }

    nav > ul > li.open > ul {
        position: absolute;
        display: block;
        top: 100%;
        left: 0;
        width: 100%;
    }
}

/*#endregion*/

/*#region Navigation (0 to 899px)*/

@media screen and (max-width: 899px) {
    nav {
        grid-template-rows: 0fr auto 0fr;
    }

    header nav .county-status {
        grid-row-start: 3;
    }

    .mobile-nav-close {
        grid-row-start: 1;
    }

    nav .level1 {
        grid-row-start: 2;
    }

    .mobile-nav-close {
        font-size: 2rem;
        text-align: right;
        margin-right: 1rem;
    }

    .mobile-nav-back {
        position: absolute;
        right: 2rem;
        top: 1rem;
        font-size: 2rem;
    }

    /*Main navigation bar*/
    nav,
    nav > ul > li > ul {
        position: fixed;
        right: 0;
        top: 0;
        width: 300px;
        height: 100%;
        background-color: var(--background);
        text-align: left;
    }

    nav > ul,
    nav > ul > li > ul {
        overflow-y: scroll;
        padding: 1rem;
    }

    nav:not(.open),
    nav > ul > li:not(.open) > ul {
        display: none;
    }

    nav > ul > li {
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }

    nav > ul > li > ul > li:first-of-type {
        margin-top: 3rem;
    }
}

/*#endregion*/

/*#region Navigation (0 to 400px)*/

@media screen and (max-width: 400px) {
    /*Main navigation bar*/
    nav,
    nav > ul > li > ul {
        width: 100%;
        transition: right 1s ease-in-out;
    }

    nav:not(.open),
    nav > ul > li:not(.open) > ul {
        right: -100vw;
    }
}

/*#endregion*/
