/* CSS RESET */
body, html, header, nav, main, footer, img, h1, h2, h3 {
    width: 100%;
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* STYLE RULE FOR ALL IMAGES */
img {
    max-width: 100%;
    display: grid;
    padding: 10px;
}

/* STYLE RULES FOR MOBILE */
body {
    display: grid;
    background-color: #dbcdc3;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto auto auto;
    grid-template-areas:
        "nav"
        "header"
        "main"
        "footer";
}

/* HIDE TAB-DESK CLASS FOR MOBILE */
.tab-desk { display: none; }

header h1 { display: none; }

/* STYLE RULES FOR NAV */
nav {
    grid-area: nav;
    display: grid;
    align-items: center;
    padding-bottom: 10px;
}

.mobile-nav {
    grid-area: nav;
    overflow: hidden;
    position: fixed;
    height: auto;
    background-color: #523a29;
    font-family: 'Cal Sans', sans-serif;
    list-style-type: none;
    color: #F5F5F5;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
.mobile-nav #menu-links {
    display: none;
}

.mobile-nav a {
    color:#F5F5F5;
    display: block;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 15px;
}

.mobile-nav a.menu-icon {
    display: block;
    background: #322318;
    position: absolute;
    left: 0;
    top: 0;
}

.active {
    font-family: "DM Serif Text", sans-serif;
    font-size: 100px;
    text-align: center;
    color: #322318;
}

.active a { font-size: 35px; }

.mobile-nav h1 { font-size: 200px; }

/* STYLE RULES FOR HEADER */
header {
    grid-area: header;
    position: relative;
    padding-top: 100px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header h2 { font-family: "DM Serif Text", sans-serif; }

/* STYLE RULES FOR HERO IMAGE */
.hero {
    grid-area: header;
    position: relative;
    display: block;  
}

/* STYLE RULES FOR MAIN */
main {
    grid-area: main;
    display: grid;
}

#body-p {
    font-family: 'Cal Sans', sans-serif;
    color: #322318;
    line-height: 1.5;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

.region-text {
    font-family: 'Cal Sans', sans-serif;
    color: #322318;
    line-height: 1.5;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

/* STYLE RULES FOR MAIN VIDEO */
#video-container {
    width: 100%;
    height: 250px;
    padding: 10px;
}

#video-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* STYLE RULES FOR MAIN IMAGE GRID */
#image-grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 130px);
    padding: 10px;
}

.page-title h2 {
    font-family: "DM Serif Text", sans-serif;
    color: #322318;
    text-align: center;
    font-size: 30px;
}

#era-year { font-size: 20px; }

/* STYLE RULES FOR QUOTE */
#quote {
    text-align: center;
    color: #322318;
    padding-top: 20px;
    padding-bottom: 20px;
}

#quote h2 {
    font-family: "Cookie", cursive;
    font-style: italic;
    font-size: 30px;
}

#quote h3 {
    font-family: "DM Serif Text", sans-serif;
    font-size: 15px;
    font-style: italic;
    padding-right: 10px;
    text-align: right;
}

/* STYLE RULES FOR FOOTER */
footer {
    grid-area: footer;
    display: block;
    background-color:#523a29;
    text-align: center;
}

footer h2 {
    font-family: "Cookie", cursive;
    font-style: italic;
    letter-spacing: 1px;
    color:#F5F5F5;
    padding-top: 10px;
}

footer .back-to-top {
    display: inline-block;
    color:#F5F5F5;
    padding-top: 20px;
    padding-bottom: 20px;
    transition: color 0.3s ease;
}

#section-title {
    font-family: "DM Serif Text", sans-serif;
    color: #322318;
    text-align: center;
    font-size: 30px;
}

/* STYLE RULES FOR FOREIGN PAGE */
.foreign-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(1, 300px);
    justify-items: center;
    align-items: center;
    padding-top: 10px;
}

.foreign-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

figcaption {
    font-family: 'Cal Sans', sans-serif;
    display: block;
    width: 100%;
    color: #322318;
    text-align: center;
    font-size: 12px;
    padding-bottom: 10px;
    padding-left: 10px;
    padding-right: 10px;
}

#cap-for { width: 100%; }

/* STYLE RULES FOR RESOURCES PAGE */
#wrap-up p {
    font-family: 'Cal Sans', sans-serif;
    color: #322318;
    line-height: 1.5;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

#articles h3 {
    font-family: "DM Serif Text", sans-serif;
    color: #322318;
    text-align: center;
    font-size: 30px;
}

#videos h3 {
    font-family: "DM Serif Text", sans-serif;
    color: #322318;
    text-align: center;
    font-size: 30px;
}

#resources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    justify-items: center;
    align-items: center;
}

#articles ul {
    list-style-type: disc;
    padding-left: 25px;
    padding-right: 10px;
}

#articles ul li a {
    font-family: 'Cal Sans', sans-serif;;
}

#wrap-up {
    padding-bottom: 20px;
}

#resources-grid {
    padding-bottom: 20px;
}

#articles {
    padding-bottom: 20px;
}

#videos {
    padding-bottom: 20px;
}

/* STYLE RULES FOR TABLET */
@media screen and (min-width: 481px), print {
    body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        grid-template-areas: 
            "nav nav"
            "header header"
            "main main"
            "footer footer";
    }

    nav { grid-area: nav; }

    header { grid-area: header; }

    main { grid-area: main; }

    footer { grid-area: footer; }

    .tab-desk {
        display: block;
        grid-area: nav;
        background-color: #523a29;
        font-family: 'Cal Sans', sans-serif;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }

    .tab-desk ul { list-style: none; }
    
    .tab-desk li { float: left; }

    .tab-desk a {
        display: block;
        color:#F5F5F5;
        text-align: center;
        padding: 10px 15px;
        text-decoration: none;
        font-size: 18px;
    }

    .tab-desk a:hover { background-color: #322318; }

    .mobile-nav { display: none; }
    
    header h1 {
        display: block;
        font-family: "DM Serif Text", sans-serif;
        color: #322318;
        text-align: center;
        font-size: 80px;
    }

    #video-container {
        width: 100%;
        height: 400px;
    }

    #image-grid { gap: 150px; }

    #body-p { font-size: 20px; }
    
    #quote h2 { font-size: 40px; }
    
    #quote h3 {
        padding-right: 100px;
        font-size: 20px;
    }

    footer h2 { font-size: 30px;}

    .page-title h2 { font-size: 35px; }

    #era-year { font-size: 25px; }

    figcaption { font-size: 20px;}

    /* STYLE RULES FOR FOREIGN PAGE */
    #section-title {
        font-family: "DM Serif Text", serif;
        font-size: 35px;
        padding: 0 20px;
        margin-bottom: 10px;
    }

    .foreign-grid {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .foreign-img img {
        width: 200px;
        height: auto;
        object-fit: cover;
    }

    #cap-for { width: 200px; }

    /* STYLE RULES FOR RESOURCES PAGE */
    #articles {
        font-size: 25px;
        padding-left: 10px;
    }

    #articles h3, #videos h3 { font-size: 35px; }
}

/* STYLE RULES FOR DESKTOP */
@media screen and (min-width: 769px), print {
    body {
        grid-template-columns: 1fr 3fr 1fr;
        grid-template-areas: 
            "nav nav nav"
            "header header header"
            "main main main"
            "footer footer footer";
    }

    nav { grid-area: nav; }

    header { grid-area: header; }

    main { grid-area: main; }

    footer { grid-area: footer; }

    /* STYLE RULES FOR MODERN PAGE*/
    .modern-images {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        padding-bottom: 50px;
    }

    .modern-images img, .modern-images figure {
        width: 100%;
        height: 250px;
        object-fit: cover;
        display: block;
    }

    /* STYLE RULES FOR SILENT/HOLLYWOOD PAGES */
    .era-images {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        padding-bottom: 50px;
    }

    .era-images img, .era-images figure {
        width: 100%;
        height: 250px;
        object-fit: cover;
        display: block;
    }

    figcaption { font-size: 15px;}

    /* STYLE RULES FOR RESOURCES PAGE */
    #resources-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding-bottom: 0;
    }
}