@font-face {
    font-family: 'Germania';
    src: url(../assets/fonts/GermaniaOne-Regular.woff2) format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Josefin';
    src: url('../assets/fonts/Josefin.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Hammersmith';
    src: url('../assets/fonts/Hammersmith.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@media (width >= 1024px) {
    #img-and-desc {
        gap: 20px;
    }

    #img-and-desc figure, #description {
        flex: 1;
    }

    #imgs-and-facts {
        justify-content: space-around;
        align-items: stretch;
    }

    .img-fact-group {
        justify-content: space-around;
        align-items: flex-end;
        gap: 10px;
    }

    .img-fact-group figure, .img-fact-group section {
        flex: 1;
    }

    .img-fact-group figure {
        align-self: stretch;
    }

    #fifty-and-subway img {
        width: 75%;
    }

    #fifty-and-subway figcaption {
        box-sizing: border-box;
    }

    #subway-article, #subway-text {
        width: 75%;
    }
}

@media (width < 1024px) and (width >= 550px) {
    .img-fact-group figure, .img-fact-group section {
        flex: 1;
    }

    .img-fact-group section {
        align-self: center;
    }
}

@media (width < 1024px) {
    #img-and-desc {
        flex-direction: column;
        gap: 20px;
    }

    #imgs-and-facts {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .img-fact-group {
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .fun-fact {
        max-width: 500px;
    }

    #timeline-and-photos {
        flex-direction: column;
    }

    #fair-fifty-subway {
        flex-direction: column;
    }

    #subway-article, #subway-text {
        width: 100%;
    }
}

@media (width >= 850px) {
    #timeline-photo-pair figure, #execs-and-97 figure {
        flex: 1;
    }

    #timeline-photo-pair img, #execs-and-97 img {
        height: 100%;
    }
}

@media (width < 850px) {
    #timeline-photo-pair, #execs-and-97 {
        flex-direction: column;
    }
}

@media (width >= 550px) {
    main {
        margin: 0 20px 10px;
    }
}

@media (width < 550px) {
    main {
        margin: 0 10px 10px;
    }

    .img-fact-group {
        flex-direction: column;
        text-align: center;
    }
}

h1 {
    color: #EDB634;
    /* heading border */
    -webkit-text-stroke: 0.5px #4A321B;
    font-family: 'Germania';
    font-size: 2.5em;
    text-align: center;
}

#container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#img-and-desc {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

img {
    width: 100%;
    border-radius: 10px;
}

figcaption {
    font-style: italic;
}

figcaption {
    background-color: #FCD55D;
    color: #2C2440;
    font-family: 'Josefin';
    text-align: center;
    padding: 10px;
    border-radius: 10px;
}

#description {
    background-color: #D5C5B8;
    box-sizing: border-box;
    color: #2C2440;
    font-family: 'Josefin';
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 20px;
}

#description p {
    padding: 20px 20px 0px;
    margin-top: 0;
    margin-bottom: 0;
}

#description #last-desc-p {
    padding-bottom: 20px;
}

#imgs-and-facts {
    display: flex;
    gap: 20px;
}

.img-fact-group {
    display: flex;
    flex: 1;
}

.fun-fact {
    background-color: #D5C5B8;
    color: #2C2440;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    padding: 10px;
    border-radius: 20px;
}

.fun-fact h2 {
    font-family: 'Hammersmith';
    font-size: large;
    text-align: center;
}

.fun-fact p {
    font-family: 'Josefin';
    margin-top: 0;
}

#timeline-and-photos {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    gap: 20px;
}

#timeline, #timeline-photos {
    flex: 1;
}

#timeline {
    background-color: #4A321B;
    box-sizing: border-box;
    border-radius: 20px;
    text-align: center;
}

#timeline h2 {
    color: #EDB634;
    font-family: 'Germania';
}

#timeline p {
    color: #F1F0E7;
    font-family: 'Josefin';
    padding: 0 10px;
}

#timeline-photos {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    gap: 20px;
}

#timeline-photo-pair {
    display: flex;
    gap: 20px;
}

#execs-and-97 {
    display: flex;
    gap: 20px;
}

#fair-fifty-subway {
    display: flex;
    gap: 20px;
}

#worlds-fair, #fifty-and-subway {
    flex: 1;
}

#worlds-fair .caption-and-description {
    width: 100%;
    box-sizing: border-box;
}

#fifty-and-subway {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 20px;
}

.caption-and-description {
    background-color: #FCD55D;
    color: #2C2440;
    font-family: 'Josefin';
    text-align: center;
    padding: 10px;
    border-radius: 10px;
}

.caption-and-description figcaption {
    padding: 0;
    margin-bottom: 10px;
    border-radius: 0;
}

details p:last-child {
    margin-bottom: 0;
}

#subway-text {
    box-sizing: border-box;
}