/* Start of Body */
*{
    margin: 0px;
    padding: 0px;
}

body {
    font-family: 'Inter', sans-serif;
}

section{
    display: contents;
}

:root{
    --dodger-blue: #1e90ff;
}
/* End of Body */

/* Start of Nav */
.navbar{
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    gap: 50px;
    margin: 0 auto;
    max-width: 1000px;
}

.navbar ul{
    display: flex;
    list-style: none;
    gap: 20px;
}

.navbar a {
    color: black;
    text-decoration: none;
    font-size: 20px;
}

nav img{
    width: 125px;
    height: 50px;
}

.nav-access-box{
    display: flex;
    align-items: center;
    width: 100%;
}

.on-screen-menu{
    margin-left: auto;
}
/* End of Nav */

/* Start of Off Screen Menu */
.off-screen-menu{
    height: 100vh;
    width: 100%;
    max-width: 540px;
    position: fixed;
    top: 0;
    right: -640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 50px;
    transition: right .3 ease-in-out;
    z-index: 1;
    background-color: white;
}

.off-screen-menu ul li a {
    position: relative;
    text-decoration: none;
    color: black;
    padding: 10px;
}

.off-screen-menu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: black;
    transition: width 0.3s ease-in-out;
}

.off-screen-menu ul li a:hover::after {
    width: 100%;
}

.off-screen-menu ul{
    display: flex;
    flex-direction: column;
    gap: 75px;
}

.off-screen-menu ul li a{
    font-size: 20px;
    color: black;
}

.off-screen-menu.active{
    right: 0;
}
/* End of Off Screen Menu */

/* Start of Ham Menu */
.ham-menu{
    height: 40px;
    width: 25px;
    margin-left: auto;
    position: relative;
    display: none;
    z-index: 1;
    margin-right: 5px;
    cursor: pointer;
}

.ham-menu span{
    height: 2px;
    width: 100%;
    background-color: #000000;
    border-radius: 25px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: .3s ease;
}

.ham-menu span:nth-child(1) {
    top: 25%;
}

.ham-menu span:nth-child(3) {
    top: 75%;
}

.ham-menu.active span {
    background-color: black;
}

.ham-menu.active span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2) {
    opacity: 0;
}

.ham-menu.active span:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}
/* End of Ham Menu */

/* Start of Search */
.search-container{
    width: max-content;
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 28px;
    background-color: #f6f6f6;
    margin: 0 auto;
}

.search-input{
    font-size: 20px;
    color: #333333;
    margin-left: 14px;
    outline: none;
    border: none;
    background-color: transparent;
    text-align: left;
}
/* End of Search */

/* Start of Hero */
#hero-img{
    width: 100%;
    grid-area: hero-img;
    grid-column: 1 / 3; 
    object-fit: cover;
}

#hero-text-box{
    grid-area: hero-text-box;
    margin: 40px;
}

#hero-img-box{
    grid-area: hero-img-box;
}

#hero-text-box h1{
    font-size: clamp(20px, 6vw, 50px);
    margin-bottom: 20px;
}

#hero-text-box p{
    font-size: 20px;
}

#hero-text-box button{
    margin-top: 20px;
    font-size: 15px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #64b3f4, #0061ff);
    color: white;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
}
/* End of Hero */

/* Start of Gallery */
#gallery-display{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    align-items: center;
    justify-items: center;
    gap: 20px;
    margin-left: 10px;
    margin-right: 10px;
}

.gallery-link {
    text-decoration: none;
    color: black
}

#gallery-container{
    grid-area: gallery-container;
    max-width: 1000px;
    width: 100%;
}

.gallery-box{
    width: 100%;
}

.gallery-box img{
    width: 100%;
    height: 225px;
    background-color: rgb(227, 227, 227);
    border-radius: 24px;
}

.gallery-types{
    display: flex;
    gap: 5px;
    margin-top: 10px;
    margin-left: 10px;
}

.gallery-text-box{
    display: flex;
    align-items: center;
    margin-left: 10px;
    margin-top: 10px;
    gap: 5px;
}

.gallery-type-box{
    padding: 3px;
    font-size: 12px;
    border-radius: 2px;
    color: white;
}

#gallery-header{
    font-size: clamp(20px, 6vw, 50px);
    margin-top: 30px;
    padding-top: 40px;
    margin-bottom: 40px;
    border-top: 1px solid grey;
    text-align: center;
}

.fire {
    background-color: #F08030;
}
.flying {
    background-color: #A890F0;
}
.psychic {
    background-color: #F85888;
}
.ghost {
    background-color: #705898;
}
.poison {
    background-color: #A040A0;
}
.fighting {
    background-color: #C03028;
}
.steel {
    background-color: #B8B8D0;
}
.water {
    background-color: #6890F0;
}
.dark {
    background-color: #705848;
}
.dragon {
    background-color: #7038F8;
}
.ground {
    background-color: #E0C068;
}
.electric {
    background-color: #F8D030;
}
.bug {
    background-color: #A8B820;
}
.normal {
    background-color: #A8A878;
}
.grass {
    background-color: #78C850;
}
.ice {
    background-color: #98D8D8;
}
.rock {
    background-color: #B8A038;
}
.fairy {
    background-color: #EE99AC;
}
/* End of Gallery */

/* Start of Footer */
footer{
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 25px;
    margin-top: 100px;
}

#footer-contacts{
    display: flex;
    gap: 50px
}

#footer-box{
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1000px;
    flex-wrap: wrap;
    gap: 20px
}

#footer-contacts ul{
    display: flex;
    gap: 25px;
    list-style: none;
}

#footer-contacts a {
    text-decoration: none;
    color: black
}
/* End of Footer */

/* Start of Search Results Page */
#search-results-container{
    min-height: 80dvh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
    "search-results-header search-results-header"
    "left-column-box search-results-desc-box"
    "left-column-box search-results-desc-box";
    grid-template-rows: 100px;
    max-width: 1000px;
    margin: 0 auto;
}

#desc-box{
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    font-size: 25px;
    grid-area: search-results-desc-box;
}

#height-box{
    gap: 5px;
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    background-color: rgb(127, 214, 255);
    border-radius: 12px;
    padding: 20px;
}

#search-results-header{
    font-size: 50px;
    font-weight: bold;
    margin-top: 40px;
    width: 100%;
    grid-area: search-results-header;
    text-align: center;
}

#search-results-display h3{
    font-size: 30px;
    margin-top: 40px;
    margin-bottom: 20px;
}

#search-results-display img{
    height: 100%;
    width: 100%;
}

#search-results-img-box{
    background-color: rgb(237, 237, 237);
    border-radius: 12px;
    grid-area: search-results-img-box;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    margin-top: 50px;
}

#myChart {
    grid-area: chart;
    margin: 0 auto;
    width: 450px !important;
    height: 100% !important;
    margin-top: 10px;
}  

#search-results-display{
    display: contents;
}

.search-results-type-span{
    margin: 10px;
    padding: 5px;
    color: white;
    border-radius: 10px;
}

.attributes{
    margin: 10px;
}

#left-column-box{
    grid-area: left-column-box;
}
/* End of Search Results Page */

/* Start of Terms Page */
.terms-container{
    max-width: 600px;
    margin: 0 auto;
    flex-direction: column;
}

.terms-container h1{
    margin-top: 40px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--dodger-blue);
    padding-bottom: 10px;
}

.terms-container h2{
    margin-bottom: 20px;
    margin-top: 20px;
}

.terms-container p{
    margin-top: 5px;
}

.terms-container strong{
    color: var(--dodger-blue);
}
/* End of Terms Page */

/* Start of About Us Page */
.about-us-container{
    max-width: 600px;
    margin: 0 auto;
    flex-direction: column;
}

.about-us-container h1{
    margin-top: 40px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--dodger-blue);
    padding-bottom: 10px;
}

.about-us-container h2{
    margin-bottom: 20px;
    margin-top: 20px;
}

.about-us-container p{
    margin-top: 5px;
}

.about-us-container strong{
    color: var(--dodger-blue);
}
/* End of About Us Page */

/* Start of Contact Page */
.contact-container{
    display: flex;
    justify-content: center;
}

.contact-box{
    padding: 40px;
    width: 600px;
    height: 100%;
    border-radius: 10px;
}

#contact-form{
    display: flex;
    flex-direction: column;
    margin: 20px;
}

.contact-container h1{
    margin: 20px;
    border-bottom: 2px solid var(--dodger-blue);
    padding-bottom: 10px;
}

.contact-container p{
    margin: 20px;
}

.contact-container input{
    font-size: 20px;
    height: 30px;
}

.contact-container label{
    font-size: 20px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.contact-container textarea{
    height: 100px;
    resize: none;
    font-size: 20px;
}

.inputs{
    outline: none;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: 0.3s ease-in-out;
    padding: 12px;
}

.inputs:focus{
    border-color: rgb(0, 153, 255);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1)
}

.contact-container button{
    padding: 10px;
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    background-color: rgb(0, 153, 255);
    cursor: pointer;
    color: white;
    font-weight: bold;
}
/* End of Contact Page */

/* Start of Pokedex Page */
#pokedex-display{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px; 
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100dvh;
}

.card{
    border: 1px solid #ccc;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    text-align: center;
    background-color: #f9f9f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

#pokedex-display a{
    text-decoration: none;
    color: black;
}

#pokedex-display p{
    padding-bottom: 10px;
}

.type{
    color: white;
    padding: 5px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.type-container{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
/* End of Pokedex Page */

/* Start of Container */
.container{
    min-height: 100dvh;
    display: grid;
    max-width: 1000px;
    margin: 0 auto;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows:  minmax(400px, auto);
    grid-template-areas:
    "hero-img-box hero-img-box hero-text-box hero-text-box"
    "gallery-container gallery-container gallery-container gallery-container";
    margin-top: 100px;
}
/* End of Container */

/* Start of 851px Media Query */
@media (min-width: 851px) {
    .off-screen-menu {
      display: none;
    }
  }
/* End of 851px Media Query */

/* Start of 850px Media Query */
@media (max-width: 850px) {

    .container{
        margin-left: auto;
        margin-right: auto;
        padding-left: 1rem;
        padding-right: 1rem;
        display: flex;
        height: auto;
        gap: 0.5rem;
        margin-top: 1em;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .ham-menu{
        display: block;
    }

    .on-screen-menu{
        display: none;
    }

    .search-container{
        margin: 0 auto;
    }

    #hero-img{
        width: 100%;
        object-fit: cover;
        height: 100%;
    }

    nav img{
        width: 100%;
        height: auto;
        max-width: 15vw;
    }
}
/* End of 850px Media Query */

@media (max-width: 750px){
    #search-results-container{
        min-height: 100dvh;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas: 
        "search-results-header"
        "left-column-box"
        "left-column-box"
        "search-results-desc-box"
        "search-results-desc-box";
        grid-template-rows: 100px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    #desc-box{
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        font-size: 25px;
        justify-content: center;
        align-items: center;
        max-width: 400px;
        margin: 0 auto;
        text-align: center;
    }
}
/* Start of 650px Media Query */
@media (max-width: 650px) {

    .search-container{
        padding: 2vw;
    }
    
    .search-input{
        font-size: 15px;
    }
    
    #footer-box{
        display: flex;
        justify-content: center;
    }

    .footer-links{
        max-width: 400px;
    }

}
/* End of 650px Media Query */

@media (max-width: 640px){

    .off-screen-menu{
        max-width: 640px;
    }

}

@media (max-width: 550px){
    
    .contact-box{
        padding: none;
        margin-top: 0px;
    }

     #search-results-container{
        grid-template-columns: 1fr;
        grid-template-rows: 50px;
        max-width: 600px;
    }
    
    #desc-box{
        font-size: 20px;
    }
    
    #search-results-header{
        font-size: 40px;
    }
    
    #search-results-display h3{
        font-size: 25px;
        margin-top: 40px;
        margin-bottom: 20px;
    }
    
    #search-results-img-box{
        width: 250px;
        height: 250px;
    }
    
    #myChart {
        width: 400px !important;
        height: 100% !important;
    }  

}

@media (max-width: 480px){

    .search-container{
        width: 70%;
        margin-left: 0px;
    }
    
    .navbar{
        flex-wrap: wrap;
        gap: 20px;
    }

    #hero-text-box{
        grid-area: hero-text-box;
        margin: 0px;
        margin-top: 10px;
    }

    .footer-links{
        max-width: 300px;
    }
    
    .footer-links h1{
        font-size: 25px;
    }
    
    .footer-links h2{
        font-size: 20px;
    }

    .contact-box{
        padding: 0px;
        width: 100%;
        margin: 0px;
    }

}

@media (max-width: 410px){
    
    #search-results-img-box{
        width: 150px;
        height: 150px;
    }
    
    #myChart {
        width: 300px !important;
        height: 100% !important;
    }  

    #desc-box{
        max-width: 290px;
    }
    
    #footer-contacts{
        text-align: center;
    }
    
    #footer-contacts ul a{
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        justify-content: center;
        width: 100%;
        padding: 0;
    }
    
}

@media (max-width: 375px){
    
    #footer-contacts ul{ 
        display: flex;
        gap: 40px;
        justify-content: center;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    #footer-box{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

}