/* MOBILE AND BASE LAYOUT */

/* hide some elements from mobile view */
#facebook-post{
    display: none;
}

/* set up fonts */
#content-search button:before, #news-carousel-previous:before, #news-carousel-pause:before, #news-carousel-play:before, #news-carousel-next:before{
    font-family: "Font Awesome 5 Pro";
}
#home-quick-links h2, #home-quick-links a, #home-quick-links a:visited, #home-social-content h2, #home-social-content h3, #news-carousel h3 {
    color: #003c69;
}
#content-search{
    color: white;
}
/* #home-social-content p, #news-carousel p{
    line-height: 1.5;
} */

/* link styles */
#home-quick-links a:focus{
    outline-offset: calc(0.75rem / 2);
}

/* list styles */
#home-quick-links ul{
    list-style-type: none;
    margin: 0;
    padding: 0;
}
#content div#home-quick-links article ul li:before{
    content: "";
}

/* heading styles */
#content section#content-search h2, #content div#home-quick-links h2, #content div#home-social-content h2 {
    border-bottom: none;
    margin: initial;
}

/* component styles */
/* aside/Online services */
#online-services{
    border-top: 5px solid #d9d8bc;
}

/* content search */
#content-search{
    background-color: #00223B;
    padding: 1rem;
    align-items: center;
}
#content-search h2{
    margin-bottom: 0.75rem;
    min-width: 15%;
}
#content-search form{
    place-self: center;
    min-width: 80%;
}
#content-search-input{
    border: 5px solid #013C68;
    font-size: 120%;
    padding: 0.4rem;
    width: 75%;
}
#content-search button{
    /* background: #013c68 url(../images/icon_search_L.PNG) no-repeat 5px center; */
    background: #013c68;
    border: 3px solid #013c68;
    color: #fff;
    cursor: pointer;
    font-size: 120%;
    padding: 0.5rem 0;
    width: 6.7rem;
}
#content-search button:before{
    content: "\f002  ";
    font-weight: 900;
}

/* home quick links */
#home-quick-links article{
    border-top: 5px solid #003c69;
    color: #003c69;
}
#home-quick-links article:nth-child(2){
    border-color: #7AB700;
}
#home-quick-links article:nth-child(3){
    border-color: #DBD7BC;
}
#home-quick-links h2{
    display: inline-block;
}
#home-quick-links .expandable-control:before{
    color: #7AB700;
    font-size: 1.2rem;
    margin: 1rem 0;
}
#home-quick-links li{
    border-bottom: 1px solid #003c69;
    padding: 0.6rem 0;
}
#home-quick-links li:last-of-type {
    border-bottom: none;
}
#home-quick-links h2, #home-social-content h2 {
    padding: 0.75rem 0;
}

/* home social content */
#home-social-content{
    background-color: #E6EBF1;
    display: inline-block;
}
#home-social-content h3 {
    font-size: 140%;
    margin-top: calc(0.75rem * 2);
}
#news-media{
    border-top: 5px solid #003c69;
}

/* news carousel */
#news-carousel {
    display: grid;
    grid-template-areas:
        "news-content"
        "news-controls";
}
#news-stories{
    display: contents;
}
#news-stories article{
    display: table;
    grid-area: news-content;
    max-height: 15rem;
    opacity: 0;
    overflow: auto;
    visibility: hidden;
    transition: opacity 1s, visibility 1s;
}
#news-stories .show{
    opacity: 1;
    visibility: visible;
}
#news-stories img{
    display:none;
}
#news-carousel h3{
    font-size:120%;
}
#news-stories p, #news-stories a {
    font-size: 90%;
}
#news-stories a{
    background-color: #003c69;
    color: #fff;
    display: block;
    /* font-weight: bold; */
    margin-top: 0.75rem;
    padding: 0.5rem 0.7rem;
    text-decoration: none;
    width: max-content;
}
/* #news-carousel article:not(.show) a{
    display:none;
} */
#news-pages-and-controls {
    display: flex;
    grid-area: news-controls;
    justify-content: space-between;
    padding-top: 0.75rem;
}
#news-pages-and-controls > * {
    z-index:1;
}
#news-pages-and-controls a {
    align-items: center;
    display: inline-flex;
    /* font-weight: bold; */
    justify-content: center;
    min-height: 30px;
    min-width: 30px;
    text-decoration: none;
}
#news-controls{
    white-space: nowrap;
}
#news-controls a.hide{
    display: none;
}
#news-pages-and-controls a.show, #news-pages-and-controls a:hover, #news-controls a {
    background-color: #003c69;
    color: #fff;
}
#news-pages a, #news-controls a:hover{
    background-color: #E6EBF1;
    color: #003c69;
}
#news-carousel-previous:before{content: "\f053";}
#news-carousel-pause:before{content: "\f04c"; transform: scale(1.4,1.2);font-weight: 100;}
#news-carousel-play:before{content: "\f04b"; font-size: 1.1rem;}
#news-carousel-next:before{content: "\f054";}

/* PHABLET LAYOUT */
@media (min-width: 43rem){
    #content-search{
        display: flex;
    }
    #content-search h2{
        margin-bottom: 0;
    }
    #home-social-content{
        background-color: unset;
    }
    #news-carousel img {
        display: block;
        margin-bottom: 0.75rem;
    }
}


/* TABLET LAYOUT */
@media (min-width: 55rem){

    /* hide mobile items */
    #home-quick-links .expandable-control{
        display: none;
    }

    /* show some elements that were hidden in the base mobile layout */
    #home-quick-links, #home-social-content{
        display: flex;
        flex-wrap: wrap;
        column-gap: calc(2 * 0.75rem);
    }
    #news-media {
        flex: 1;
    }
    #facebook-post {
        display: block;
    }

    /* lay out some components */
    #content-search h2{
        margin: auto .75rem auto 0;
        width: 17%;
    }

    #home-quick-links{
        justify-content: space-between;
    }
    #home-quick-links article {
        flex: 1;
        min-width: 11rem;
    }
    #home-quick-links a:hover, #home-quick-links a:focus{
        /* display: inherit; */
        outline-offset: calc(0.75rem / 3);
    }
    #home-quick-links ul{
        max-height: 100rem;
        overflow: initial;
        visibility: visible;
    }

    #facebook-post{
        border-top: 5px solid #7AB800;
        min-height: 500px;
        min-width: 340px;
    }
    #facebook-post h2{
        background: transparent url(../images/facebook-icon.png) no-repeat left center;
        padding-left: 40px;
    }

    /* page layout */
    #content{
        grid-template-columns: auto 300px;
        grid-template-rows: min-content min-content;
        grid-template-areas:
            "content-top content-top"
            "content-large content-small";
    }
    #content-top       {grid-area: content-top;}
    #content-large     {grid-area: content-large;}
    #content-small     {grid-area: content-small;}
}


/* DESKTOP LAYOUT */
@media (min-width: 65rem){

    /* news carousel formatting */    
    #news-carousel {
        background: black;
    }
    #news-stories img {
        height: 100%;
        object-fit: cover;
        /* max-width: none; */
    }
    #news-stories .content{
        background: #00223B;
        color: white;
        padding: 0.75rem;
        overflow: auto;
    }
    #news-stories .content::-webkit-scrollbar {
        width: 8px;
    }
    /* #news-stories .content::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
        background: #f1f1f1;
        border-radius: 8px;
    } */
    #news-stories .content::-webkit-scrollbar-thumb {
        /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); */
        /* background: #c1c1c1; */
        background: #D7E8F2;
        border-radius: 8px;
    }
    #news-stories .content::-webkit-scrollbar-thumb:hover {
        /* background: #A8A8A8; */
        background:#fff;
    }
    #news-stories h3 {
        color: white;
        margin: 0;
        line-height: 1.2;
    }
    #news-stories a {
        background-color: #D7E8F2;
        color: #003c69;
    }
    #news-stories a:hover {
        background-color: #fff;
    }
    #news-pages-and-controls {
        padding-top: 0;
    }
    
    /* news carousel layout */
    #news-carousel{
        grid-template-columns: 0.75rem 300px auto;
        grid-template-rows: 0.75rem calc(295px - 30px - (0.75rem*2)) 30px 0.75rem;
        grid-template-areas:
            ". . ."
            ". news-content ."
            ". news-controls ."
            ". . .";
        /* overflow: hidden; */
    }
    #news-stories img {
        grid-column: 1/-1;
        grid-row: 1/-1;
    }
    #news-stories article{
        display: contents;
    }
    #news-stories article .content{
        grid-area: news-content;
    }
    #news-stories article *{
        opacity: 0;
        transition: opacity 1s;
    }
    #news-stories .show *{
        opacity: 1;
        z-index: 1;
    }
}
