@import url('../../Default/Css/Default.css');

/* ############################################################################
   ## 
   ##  TwoCols1
   ##
   ############################################################################ 
    
   | Header                               |
   |______________________________________|
   | SubHeader                            |
   |______________________________________|
   | PageTop                              | (TrailNav, PageFunctions)
   |______________________________________|
   |          |                           |
   | Tertiary | Primary                   |
   |          |                           |
   |          |___________________________|
   |          | Secondary                 |
   |__________|___________________________|
   | PageBottom                           | (PageFunctions)
   |______________________________________|
   | Footer                               |
   |                                      |
   
    <TemplateWrapper>
        <Template>
            <AccessibilityToolbar />
            <Header />
            <SubHeader />
            <PageTop>
                <TrailNav />
                <PageFunctionsTop />
            </PageTop>
            <Content>
                <Page>
                    <PageContent>
                        <Primary />
                        <Secondary />
                    </PageContent>
                </Page>
                <Tertiary />
            </Content>
            <PageBottom>
                <PageFunctionsBottom />
            </PageBottom>
            <Footer />
        </Template>
    </TemplateWrapper>
*/

/* ############################################################################
   ## 
   ##  Custom Design Options
   ##  ADD/CHANGE RULES HERE (colors, styling, etc.)
   ##
   ##  - Note that some rules are overridden by fixed design elements below.
   ##  - Change column and page widths and other options in Variables.css.
   ##
   ######################################################################### */

#Page {
}

    #PageTop {
    }

    #PageContent {
    }
    
        #Primary {
        }

            #Primary #PrimaryContent {
            }

        #Secondary {
        }

            #Secondary #SecondaryContent {
                /* The width+margin-left rules below fill the page area width but if #PrimaryContent is shorter than #Tertiary then #SedcondaryContent overlaps #Tertiary. */
                /*
                box-sizing: border-box;
                width: calc(calc(100% + var(--site-page-tertiary-col-width)) + var(--site-page-col-gutter));
                margin-left: calc(calc(var(--site-page-tertiary-col-width) + var(--site-page-col-gutter)) * -1);
                */
                padding: var(--site-padding-thick);
                background: var(--site-color-ui-lighter);
            }

    #PageBottom {
    }

/*
    Full width template
*/

body.template-full-width #Content {
}

/* ############################################################################
   ## 
   ##  Fixed Design Elements
   ## 
   ##  DON'T CHANGE unless you want to re-test templates in all browsers.
   ## 
   ##  - Modify column widths in Variables.css. 
   ##  - Modify colors and styling in the section above.
   ##  - If you do make changes BE SURE to align all changes across
   ##    OneCol1.css, TwoCols1.css, TwoCols2.css, ThreeCols1.css and templates 
   ##    based on these: they were all tested together as a single collection.
   ##
   ######################################################################### */

#Template {
    /* See notes about --content-area-padding and --content-area-width on DefaultPageLayout.css */
    --content-area-width: var(--site-page-maxwidth-mid); 
    --content-area-padding: var(--site-page-padding-horizontal);
}

#Content {
    position: relative;
    display: flex;
    flex-direction: var(--site-page-col-direction);
    gap: var(--site-page-col-gutter);
    box-sizing: border-box;
    width: 100%;
    max-width: var(--content-area-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-area-padding);
    padding-right: var(--content-area-padding);
}

    #Page {
        position: relative;
        box-sizing: border-box;
        width: calc(100% - var(--site-page-tertiary-col-width));
    }
    
        #PageContent {
            position: relative;
            box-sizing: border-box;
            width: 100%;
        }
        
            #Primary {
            }
            
            #Secondary {
            }

    #Tertiary {
        position: relative;
        box-sizing: border-box;
        margin-top: var(--site-page-tertiary-col-margin-top);
        margin-bottom: var(--site-box-margin-bottom);
        width: var(--site-page-tertiary-col-width);
        order: -1; /* -1  puts it on the left, everything else puts it on the right. */
    }
    
    #PageBottom {
        /* Use the width+margin-left rules below if #PageBottom is inside #PageContent but note it will overlap #Tertiary if #PageContent is shorter than it. */
        /*
        width: calc(calc(100% + var(--site-page-tertiary-col-width)) + var(--site-page-col-gutter));
        margin-left: calc(calc(var(--site-page-tertiary-col-width) + var(--site-page-col-gutter)) * -1);
        */
    }

@media screen and (max-width: 1500px) {
    /* This breakpoint matches --content-area-width width, not --site-breakpoint-large. */

    #Template {
        --content-area-width: 100vw;
        --site-page-padding-horizontal: var(--site-padding);
    }

}

@media screen and (max-width: 1200px) {
    
    #Content {
        display: block;
    }
   
       #Page {
           width: 100%;
       }

    #Secondary #SecondaryContent {
        width: 100%;
    }

    #Tertiary {
        display: none;
        /* But if it was displayed... */
        margin-top: 0;
        width: 100%;
        order: initial;
    }

    #PageBottom {
        width: 100%;
        margin-left: auto;
    }

}

@media screen and (max-width: 600px) {

    #Content {
        --site-page-padding-horizontal: var(--site-padding-thin);
    }

}