*, *:after, *:before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

div#Root-Frame{
    max-width: 1000px;
    
}


div#page-header{
    
    border-bottom: 6px solid #aa0000;
}

div#Masthead-Frame{
    margin-bottom: 20px;
}


div#page-header h1.publication-name,
div#page-header h1.section-name
{
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-weight: normal;
    margin: 0px;
    text-align: center;
}

div#page-header h1.section-name{
    font-size: 32pt;
    
}

div#page-header h1.publication-name a{
    text-decoration: none;
    color: black;
}

div#page-header h1.publication-name a:hover{
    text-decoration: underline;
    color: #aa0000;
}

div#content div.sub-section:first-child{
    margin-top: 20px;
}

div.sub-section {
    display: flex; 
    flex-wrap: wrap;
    gap: 20px;
}

/*div.sub-section div.article-frame {
    border: 1px dotted red;
}*/


h2.sub-section-name {
    display:block;
    border-bottom: 1px solid gray;
    flex-basis: 100%;
}

/* ========================== Articles */

div.article a.read-more {
    color:#aa0000;
    font-weight: bold;
    text-decoration: none;
}

div.article a.read-more:hover {
    text-decoration: underline;
}

div.article *.headline a {
    color:#000000;
    font-weight: bold;
    text-decoration: none;
}

div.article img {
    border: 1px solid black;
}


/* Featured Article */

div.sub-section > div.article-frame.featured{
    flex-basis: calc(40% - 20px);
}


div.featured div.article div.preview-content {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    margin-left: 0px;
    
}

div.featured div.article div.preview-content > *{
    margin-top: 0px;
    margin-bottom: 15px;
}

div.featured div.article h1{
    display: block;
    font-size: 20pt;
}

div.featured div.article img{
    order: -1;
    max-width: 100%;
}

/* Note: .page-header is a depreciated class, left here because some pages still use it. */
.page-header-frame,
div.page-header{
    position: relative;
}

.publication-name-placeholder-frame {
    margin-top: 20px;
}

div.sponsor{
    position: absolute;
    right: 0;
    bottom: 0px;
    font-family: sans-serif;
    color: #777;
}


/* recent articles */

div.sub-section > div.article-frame.recent{
    flex-basis: 60%;
}



div.recent div.article img{
    max-width: 200px;
    float:left;
    margin-right: 10px;
    margin-bottom: 10px;
}

div.recent div.article h1{
    font-size: 16pt;
    margin-top: 0px;
}


div.featured > div + div,
div.recent > div + div{
    border-top: 1px solid black;
    padding-top: 20px;
}

div.headlines > div + div{
    border-top: 1px dotted black;
    padding-top: 10px;
    margin-top: 20px;
}

div.recent + div.featured,
div.featured + div.recent {
    border-left: 1px solid black;
    padding-left: 20px;
    
}

div.headlines {
    border-top: 1px solid black;
}

div.headlines div.article img {
    display: none;
}

div.headlines div.article h1.headline{
    font-size: 14pt;
    
}

div.mobile-section-name{
    display: none;
}

@media only screen and (max-width: 800px) {

    /* =======================================
     * Layout changes to content
     * ======================================== */
    
    div.mobile-section-name{
        display: block;
        border-bottom: 6px solid #aa0000;
        margin-bottom: 10px;
    }

    div.mobile-section-name h1.section-name {
        font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
        font-weight: normal;
        margin: 0px;
        text-align: center;
      }
    
    div.recent + div.featured,
    div.featured + div.recent {
        border-left: none;
        padding-left: 0px;
    }

    div.sub-section > div + div {
        border-top: 1px solid black;
        padding-top: 20px;
    }
    
    div.sub-section {
        flex-direction: column;
    }
    
    div.recent div.article img {
        max-width: 100%;
        float: none;
        margin-right: auto;
        margin-bottom: auto;
    }

    /* ====================== Article Layout Changes ====================*/
    
    
    /* Biggest change is to make the article a flex-column layout so that 
    we can use the 'order' css property to make the image the second element 
    after the section-link-frame */
    div.article div.preview-content{
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    div.article div.preview-content > * {
        margin-top: 0px;
        margin-bottom: 0px;
    }

    div.article div.preview-content > p + p {
        margin-top: 0.5rem;
    }

    /* originally had this  h1 + p, problem is this broke on when the img tag
    was between the headline and the paragraph. */
    div.article div.preview-content > p:first-of-type {
        margin-top: 0.7rem;
    }

    div.article div.preview-content > P:last-of-type {
        margin-bottom: 0.5rem;
    }

    div.article > div.section-link-frame{
        order: -2;
    }

    /* first of type so we don't grab other images in the layout*/
    div.article div.preview-content > img:first-of-type{
        order:-1;
        max-width: 100%;
        max-height: 400px;
    }



    /* ======================================================= Article Content Changes ========= */
    div.article h1.headline {
        font-size: 1.5rem;
    }

    /* unfloat article images*/
    h1.headline + img {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    /*  Article Pair */
    div.article-pair{
        display: flex; 
        flex-direction: column;
        justify-content: space-between;
    }

    div.article-pair > div.article {
        flex-basis: 100%;
        flex-grow: 1; 
        
    }
    div.article-pair > div.article > img.landscape-image {
        height: unset;
    }
    
    div.article-pair > div.article + div.article {
        border-top: 3px solid black;
        margin-top: 10px;
        padding-top: 40px;
        border-left: none;
        padding-left: 0px;
    }

    div.social-info ol {
        width: 100%;
        margin-bottom: 0px;
    }
    div.social-info ol br {
        display: none;
    }
    div.social-media-box h1 {
        font-size: 2rem;
    }
}