/* =========================================
   ONLY JESUS SAVES - NAVIGATION
========================================= */

:root {
    --nav-background: #426ba3;
    --nav-text: #fdffef;
    --nav-hover: #5a7ead;
    --nav-dropdown: #345783;
    --nav-border: #5a7ead;

    --brand-red: #ff0000;
    --brand-outline: #ffffff;
}

/* HEADER */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 5rem;
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    padding: .5rem 1.25rem;
    background: var(--nav-background);
    border-bottom: 1px solid var(--nav-border);
}

/* WEBSITE NAME */

.site-brand {
    flex: 0 0 auto;
    white-space: nowrap;

    color: var(--brand-red);
    font-family: "Vladimir Script", "Times New Roman", cursive;
    font-size: clamp(1.5rem, 2.2vw, 2.4rem);
    font-weight: bold;
    text-decoration: none;

    text-shadow:
        -1px -1px 0 var(--brand-outline),
         1px -1px 0 var(--brand-outline),
        -1px  1px 0 var(--brand-outline),
         1px  1px 0 var(--brand-outline);
}

/* DESKTOP NAVIGATION */

.site-navigation {
    margin-left: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .2rem;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-heading {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: .8rem .65rem;

    background: transparent;
    border: none;
    border-radius: 5px;

    color: var(--nav-text);
    font-family: inherit;
    font-size: .9rem;
    font-weight: bold;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.nav-heading:hover,
.nav-item.is-open > .nav-heading {
    background: var(--nav-hover);
    color: #ffffff;
}

.nav-heading span {
    font-size: .7rem;
}

/* DROPDOWN MENUS */

.dropdown {
    display: none;

    position: absolute;
    top: 100%;
    right: 0;

    min-width: 260px;
    max-height: 70vh;
    overflow-y: auto;

    padding: .5rem 0;
    margin: 0;
    list-style: none;

    background: var(--nav-dropdown);
    border: 1px solid var(--nav-border);
    border-radius: 0 0 7px 7px;
    box-shadow: 0 5px 12px rgba(0,0,0,.25);
}

.nav-item.is-open > .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: .65rem 1rem;

    color: var(--nav-text);
    font-size: .9rem;
    font-weight: normal;
    text-decoration: none;
    line-height: 1.4;
}

.dropdown a:hover,
.dropdown a:focus-visible {
    background: var(--nav-hover);
    color: #ffffff;
}

/* HAMBURGER BUTTON */

.nav-toggle {
    display: none;
    flex: 0 0 auto;

    width: 42px;
    height: 38px;

    padding: 7px;
    border: 1px solid var(--nav-border);
    border-radius: 5px;

    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    margin: 4px 0;

    background: var(--nav-text);
    border-radius: 3px;
}

/* MORE IS HIDDEN ON WIDE SCREENS */

.more-item {
    display: none;
}

/* INTERMEDIATE DESKTOP SCREENS */

@media (min-width: 761px) and (max-width: 1200px) {

    .opinion-item,
    .direct-link {
        display: none;
    }

    .more-item {
        display: block;
    }
}

/* MOBILE NAVIGATION */

@media (max-width: 760px) {

    .site-header {
        min-height: 4.5rem;
        padding: .5rem .75rem;
        gap: .5rem;
    }

    .site-brand {
        font-size: clamp(1.4rem, 5vw, 1.9rem);
    }

    .nav-toggle {
        display: block;
    }

    .site-navigation {
        display: none;

        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        width: 100%;
        max-height: calc(100vh - 4.5rem);
        overflow-y: auto;

        margin: 0;
        padding: .5rem 0;

        background: var(--nav-dropdown);
        border-top: 1px solid var(--nav-border);
    }

    .site-navigation.is-open {
        display: block;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-item,
    .more-item {
        display: block;
        width: 100%;
    }

    .nav-heading {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: .9rem 1.25rem;
        border-radius: 0;
        text-align: left;
    }

    .dropdown {
        position: static;
        width: 100%;
        max-height: none;
        overflow: visible;

        border: none;
        border-radius: 0;
        box-shadow: none;

        background: #29466f;
        padding-left: .75rem;
    }

    .dropdown a {
        padding: .75rem 1.5rem;
    }
}

/* KEYBOARD FOCUS */

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}
/* NESTED OPINION MENU */

.more-opinion > .dropdown {
    top: 0;
    right: 100%;
}

/* MOBILE NESTED MENU */

@media (max-width: 760px) {
    .more-item {
        display: none;
    }

    .more-opinion > .dropdown {
        position: static;
        width: 100%;
    }
}