@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-style: none;
    font-family: 'Inter', sans-serif;
}

a:link {
    text-decoration: none;
    color: #767676;
}

a:visited {
    text-decoration: none;
    color: #767676;
}

a:hover {
    text-decoration: none;
    color: #000; 
}

a:active {
    text-decoration: none;
    color: #333333; 
}

body {
    background: linear-gradient(to right,#F34242, #f08181);
    background-image: url(images/lowpoly3.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

nav {
    width: 100%;
    height: 5vh;
    background-color: #fff;
    font-weight: bold;
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 50px;
    position: absolute;
}

nav ul {
    display: flex;
    justify-content: right;
    align-items: center;
    gap: 35px;
    list-style: none;
}

.logo {
    justify-content: left;
    padding-left: 50px;
}

.main_text {
    display: flex;
    justify-content: left;
    align-items: top;
    padding-top: 250px;
    
    font-size: 50px;
    color: #404040;
    height: 100vh;
    padding-left: 50px;
}

.main_text span {
    margin-top: 5px;
    color: #fff;
}

.main_text p {
    margin-top: 5px;
    font-size: 15px;
    line-height: 25px;
    width: 600px;
}

.info {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(#d03c5e, #fff);
}

.info h1 {
    position: absolute;
    display: flex;
    justify-content: center;

    height: 75vh;
    width: 100%;
    font-size: 8vh;
    color: #404040;
    z-index: 1;
}

.dynasty-container {
    z-index: 2;
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;
    
    height: 45vh;
    width: 75vw;
    
    flex-wrap: nowrap;

    .card {
        display: inline-block;
        margin-right: 3px;
    }
}

.dynasty-container::-webkit-scrollbar {
    width: 20px;
    height: 12.5px;
}

.dynasty-container::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px grey;
    border-radius: 10px;
}

.dynasty-container::-webkit-scrollbar-thumb {
    background: #F34242;
    border-radius: 10px;
}

.card {
    width: 300px;
    height: 400px;
    border-radius: 15px;
}

.card h2 {
    display: flex;
    justify-content: center;
    padding-top: 15px;
    color: #fff;
}

.card.han {background-image: url(images/han-dynasty.jpg); background-position: center;}
.card.tang {background-image: url(images/tang-dynasty.jpg); background-position: center;}
.card.song {background-image: url(images/song-dynasty.jpg); background-position: center;}
.card.yuan {background-image: url(images/yuan-dynasty.jpg); background-position: center;}
.card.ming {background-image: url(images/ming-dynasty.jpg); background-position: center;}
.card.qing {background-image: url(images/qing-dynasty.jpg); background-position: center;}
.card.republic {background-image: url(images/republic-period.jpg); background-position: center;}
.card.initial {background-image: url(images/initial-communist.jpg); background-position: center;}
.card.cr {background-image: url(images/cultural-revolution.jpg); background-position: center;}
.card.present {background-image: url(images/present-china.jpg); background-position: center;}

/* MOBILE DESIGN */
@media only screen and (max-width: 600px) {
    .main_text {
        display: flex;
        justify-content: left;
        align-items: top;
        padding-top: 200px;
        
        font-size: 5vw;
        color: #404040;
        height: 100vh;
        padding-left: 50px;
    }
    
    .main_text span {
        margin-top: 5px;
        color: #fff;
    }
    
    .main_text p {
        margin-top: 50px;
        font-size: 15px;
        line-height: 25px;
        width: 400px;
    }

    .logo {
        justify-content: left;
        padding-left: 15px;
    }

    .info h1 {
        position: absolute;
        display: flex;
        justify-content: center;
        padding-left: 50px;
    
        height: 85vh;
        width: 100%;
        font-size: 8vh;
        color: #767676;
        z-index: 1;
    }
}

@media (max-width: 675px) {
    nav ul {
        display: grid;
        justify-content: left;
        position: absolute;
        background: #fff;
        width: 100%;
        top: 0;
        left: 0;
        transform: translateY(-100%); /* document */
        z-index: 50;
        transition: .6s; 
        gap: 10px;
    }

    nav ul li {
        padding-left: 35px;
    }

    nav .navbar-toggler {
        display: grid !important; /* document */
        z-index: 60;
    } 
}

nav .navbar-toggler {
    display: none;
    height: min-content;
    margin: 10px -20px 5px 0;
    cursor: pointer;
    z-index: 60;
}

nav .navbar-toggler .bar { 
    width: 30px;
    height: 4px;
    margin-bottom: 5px;
    background: #404040;
    border-radius: 100px;
    transition: 0.4s;
}

input {
    display: none;
}

/* documentation: checked is a pseudo-class element which references to whether the 
id paired to the input, in this case toggle, is in an on or off state, clicked or not. 
~ nav ul is just a way to reference what we want to change if this state is true */
input:checked ~ nav ul {
    transform: translateY(0);
}

input:checked ~ nav .navbar-toggler {
    margin-top: 35px;
}

/* DYNASTIES */
.list-dynasties {
    display: grid;
    grid-template-columns: repeat(auto-fit, 400px);
    gap: 30px;
    padding-top: 10vh;
    padding-left: 35px;
}

.dynasty {
    width: 400px;
    height: 400px;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 15px;

    background-position: center;
}

.dynasty.han {background-image: url(images/han-dynasty.jpg);}
.dynasty.tang {background-image: url(images/tang-dynasty.jpg);}
.dynasty.song {background-image: url(images/song-dynasty.jpg);}
.dynasty.yuan {background-image: url(images/yuan-dynasty.jpg);}
.dynasty.ming {background-image: url(images/ming-dynasty.jpg);}
.dynasty.qing {background-image: url(images/qing-dynasty.jpg);}
.dynasty.republic {background-image: url(images/republic-period.jpg);}
.dynasty.communist {background-image: url(images/initial-communist.jpg);}
.dynasty.cultrev {background-image: url(images/cultural-revolution.jpg);}
.dynasty.present {background-image: url(images/present-china.jpg);}

.dynasty h3 {
    position: absolute;
    color: #fff;
    font-size: 2rem;
    padding-left: 15px;
    padding-top: 280px;
}

.dynasty p {
    position: absolute;
    color: #fff;
    font-size: 1rem;
    z-index: 100;
}

.button {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #707070;
    background-size: 300px 200px;
    width: 130px;
    height: 50px;
    margin-left: 15px;
    margin-top: 330px;
    border-radius: 25px;
    z-index: 80;
}

@media (max-width: 675px) {
    .list-dynasties {
        display: grid;
        grid-template-rows: min-content;
        place-items: center;
        padding-top: 10vh;
        padding-left: 35px;
    }
}

.index-photo {
    display: none;
}

@media (min-width: 1415px) {
    .index-photo {
        display: flex;
        z-index: 80;
        width: 40vw;
        height: 40vw;
        object-fit: cover;
        overflow: hidden;
        position: absolute;
        left: 55vw;
        top: 10vh;
        border-radius: 300px;
    }
}

/* INDIVIDUAL PAGES */
.main_text_idv {
    display: flex;
    justify-content: left;
    align-items: top;
    padding-top: 125px;
    
    font-size: 50px;
    color: #FADA5E;
    height: 100vh;
    padding-left: 50px;
    overflow-y: scroll;
    overflow-x: hidden;
}

.main_text_idv span {
    margin-top: 5px;
    color: #fff;
    font-size: 25px;
}

.main_text_idv p {
    color: #FFE5B4;
    margin-top: 25px;
    font-size: 15px;
    line-height: 25px;
    width: 700px;
}

p.normal_p {
    margin-top: 10px;
}

.key_notes_item {
    font-size: 15px;
    margin-left: 5px;
    color: #FFE5B4;
}

@media only screen and (max-width: 600px) {
    .main_text_idv {
        font-size: 30px;
    }

    .main_text_idv p {
        width: 400px;
    }
}

/* CONTACT */
.contact_info {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.contact_info_box {
    border-style: solid;
    border-radius: 50px;
    border-color: #fff;
    height: 400px;
    width: 400px;
}

.contact_info h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    text-align: center;
    color: #FFE5B4;
    height: 90%;
}

.button.contact {
    position: absolute;
    margin-top: 250px;
    margin-left: 0;
}

.button.contact p {
    color: #fff;
}