/* ========================================
   UC Libraries Digital Exhibits
   Clean custom CSS
   ======================================== */


/* ----------------------------------------
   Base typography / links
   ---------------------------------------- */

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

a {
    border-bottom: 0;
    text-decoration: none;
}

a:link {
    color: #e00122;
}

a:visited {
    color: #9f3030;
}

a:hover,
a:focus {
    color: #8a0018;
    text-decoration: underline;
}


/* ----------------------------------------
   Header
   ---------------------------------------- */

header {
    border-width: 0;
}

/* Hide textual site title when banner branding is used */
.site-title {
    display: none !important;
}

.site-title img {
    max-width: 100%;
    height: auto;
}


/* ----------------------------------------
   Page background
   ---------------------------------------- */

.page.site-page-home {
    background-color: #fff8f8 !important;
}


/* ----------------------------------------
   Search
   ---------------------------------------- */

#search-container {
    position: static !important;
    width: 100%;
    margin: 1.5rem 0;
}

#search-container form {
    width: 100%;
}

#search-container input[type="search"],
#search-container input[type="text"] {
    max-width: 100%;
}


/* ----------------------------------------
   Footer
   ---------------------------------------- */

footer {
    margin-top: 48px;
    padding: 10px;

    color: #fff;
    background-color: #e00122;

    border: 1px solid lightgray;
}

footer a,
footer a:visited {
    color: #fff;
    text-decoration: underline;
}

footer a:hover,
footer a:focus {
    color: #fff;
    text-decoration: none;
}


/* ----------------------------------------
   Desktop navigation / sidebar
   ---------------------------------------- */

@media screen and (min-width: 769px) {

    #primary-nav {
        padding-right: 15px;
        border-right: 1px solid #e00122;
    }
}


/* ========================================
   MOBILE
   ======================================== */

@media screen and (max-width: 768px) {

    /*
       Thanks, Roy banner fix.

       The wide banner should scale down instead
       of being cropped/zoomed into a blank area.
    */

    .banner,
    #banner,
    header {
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
    }


    /*
       A 3:1-ish banner at ~400px wide naturally
       wants to be about 130px tall.
    */

    .banner,
    #banner {
        height: clamp(105px, 33vw, 140px) !important;
        min-height: 0 !important;
    }


    /*
       If Thanks, Roy is applying the banner
       background directly to header, this handles it.
    */

    header {
        min-height: clamp(105px, 33vw, 140px) !important;
    }


    /* No desktop sidebar divider on phones */
    #primary-nav {
        padding-right: 0 !important;
        border-right: 0 !important;
    }


    /* Search belongs in normal document flow */
    #search-container {
        position: static !important;

        width: 100% !important;

        margin: 1.25rem 0 !important;
    }


    #search-container form {
        display: flex;
        width: 100%;
    }


    #search-container input[type="search"],
    #search-container input[type="text"] {
        flex: 1 1 auto;

        min-width: 0;
        width: 100%;
    }


    /* Prevent wide content from forcing horizontal scroll */
    img {
        max-width: 100%;
        height: auto;
    }
}
@media screen and (max-width: 768px) {

    /* Hide mobile menu / black "MENU" bar */
    #primary-nav,
    .menu-toggle,
    .mobile-menu,
    .navigation-toggle {
        display: none !important;
    }
}