/* Reset CSS */

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}







/* Custom CSS */

.container {
    max-width: 1248px;
    margin: auto; 
}

h1 {
    font-family: "newsreader", serif;
    font-size: 2.3rem;
    border-bottom: #C83939 2px solid;
    margin-bottom: 20px;
}

body {
    font-family: "Inter", sans-serif;
    box-sizing: border-box;
    line-height: 1.6;
    background-color: #fffefb;
}

main {
    padding: 15px;
}

/* header */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

/* hamburger menu */
.hamburger-menu-btn {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    display: block;
}

/* logo */
.logo {
    font-size: 1.5rem;
    font-weight: 500;
    font-family: "Newsreader", serif;
    text-decoration: none;
    margin: auto;
    color: inherit;
}

/* mobile search */
.search-btn {
    font-size: 1.5rem;
    background: none; 
    border: none;
    cursor: pointer;
    display: block;
}

/* nav desktop */
.nav-desktop {
    display: none; /* hide on mobile */
    align-items: center;
    gap: 20px;
}

/* search box desktop */
.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #C83939;
    border-radius: 15px;
    padding: 5px 15px;
}

.search-box input {
    border: none;
    outline: none;
    /* background: none; */
    font-size: 14px;
    color: #C83939;
}

.search-box i {
    color: #C83939;
    cursor: pointer;
}

/* caught list button desktop */
.nav-caught {
    border: 1px solid #C83939;
    border-radius: 15px;
    padding: 10px 20px;
    text-decoration: none;
    color: #C83939;
    transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}

.nav-caught:hover {
    background-color: #C83939;
    color: #fff;
    border-color: #fff;
}

.nav-caught:active {
    background-color: #a11515; 
    color: #fff;
    transform: scale(0.95); /* press effect */
}


/* main paragraph - click on the pokeball to... */

#main-p {
    margin-top: 30px;
    margin-bottom: 30px;
    font-size: 1.1rem;
    /* max-width: 283px; */
}

/* sort by */

.sort-by {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 50px; 
}

#sort-btn {
    background: none; 
    border: none;
    cursor: pointer;
}

.sort-list {
    background-color: #C83939;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    margin-left: 10px;
}

.fa-angle-down {
    margin-left: 5px;
}

/* dropdown menu -- appears with js only */
/* .dropdown {
    position: absolute;
    top: 40px;
    left: 0;
    width: 200px;
    background: white;
    border: 2px solid #C83939;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
} */
  
/* Hide dropdown by default */
.hidden {
    display: none;
}

/* Dropdown Items */
/* .dropdown-item {
    padding: 10px;
    font-size: 14px;
    color: black;
    text-align: center;
    cursor: pointer;
}
  
  .dropdown-item:hover {
    background: rgba(200, 57, 57, 0.1);
} */
  
  /* Line Break */
  /* hr {
    border: none;
    height: 1px;
    background: #C83939;
    margin: 5px 0;
} */


/* load more button */

.load-more {
    display: flex;
    justify-content: center;
    padding: 50px;
}

#load-more {
    color: #C83939;
    border-radius: 15px;
    padding: 10px 40px;
    border: 2px solid #C83939;
    cursor: pointer;
    margin: 20px auto;
    background-color: #fff;
    font-size: 20px;
    font-weight: 600;
    transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}

#load-more:hover {
    background-color: #C83939;
    color: #fff;
    border-color: #fff;
}

#load-more:active {
    background-color: #a11515; 
    color: #fff;
    transform: scale(0.95); /* press effect */
}

/* pokemon gallery */

#pokemon-gallery {
    /* margin-top: 80px; */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(283px, 1fr));
    gap: 40px 20px;
}

/* cards */

.pokemon-card {
    background-color: #fafaf5;
    border: #e6e6e6 2px solid;
    border-radius: 24px;
    text-transform: capitalize;
    margin: auto;
    /* width: 70%; */
    width: 283px;
    height: 329px;
    transition: border-color 0.8s ease-in-out;
}

.pokemon-card:hover {
    border-color: #C83939;
}

.pokemon-img {
    width: 70%;
    max-height: 200px;
    padding: 20px;
    filter: grayscale(100%);
    transition: filter 0.8s ease-in-out;
}

.pokemon-card:hover .pokemon-img {
    filter: grayscale(70%);
}

/* JS: remove greyscale when hover over pokemon if it's already caught */
.pokemon-img.no-greyscale {
    filter: grayscale(0%) !important;
}

/* when released - full greyscale is applied */
.pokemon-img.greyscale {
    filter: grayscale(100%);
}

/* when hovering over the pokeball to release add greyscale 70% */
.pokemon-img.greyscale-70 {
    filter: grayscale(70%) !important;
}

.pokeball-img {
    width: 50px;
    margin: auto;
    display: block;
    cursor: pointer;
    position: absolute; /* setting position absolute permits that i position the pokeball where i want in the card */
    top: 15px;
    right: 10px;
    transition: transform 0.3s ease-in-out;
}

.pokeball-img:hover {
    transform: scale(1.2);
}

.pokemon-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 5px;
    text-align: left;
    margin-left: 20px;
}

.pokemon-card-top {
    background-color: #efefef;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60%;
    position: relative;
}

.pokemon-card-bottom {
    padding-top: 20px;
}

.pokemon-details {
    border: none;
    background-color: transparent;
    font-size: 1rem;
    color: #6d6d6d;
    margin-left: 20px;
    margin-bottom: 30px;
}

footer {
    font-family: "Newsreader", serif;
    border-top: #C83939 2px solid;
    padding-top: 40px;
}

footer div a {
    text-decoration: none;
    color: inherit;
}

.footer-company {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    margin: auto;
    padding-bottom: 50px;
}

.footer-company h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-divider {
    border-top: #C83939 2px solid;
    padding-top: 40px;
}

.footer-social {
    display: flex;
    justify-content: center;
    padding-bottom: 40px;
    gap: 30px;
}

.social-icon {
    font-size: 2rem;
    color: #C83939;
    transition: color 0.5s;
}

.social-icon:hover {
    color: #a11515;
}

.copyright {
    font-family: "Inter", sans-serif;
    text-align: center;
    margin: 10px 0;
}

/* pokemon overlay */

.overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-content {
    position: relative;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    max-width: 70%;
    border: #C83939 2px solid;
}

.hidden {
    display: none;
}

.close {
    position: absolute;
    top: 15px;
    right: 30px;
    font-size: 2rem;
    font-weight: bold;
    color: #C83939;
    cursor: pointer;
}

.overlay-flex {
    display: flex;
    flex-direction: row;
    gap: 50px;
}

.overlay-left-col,
.overlay-right-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.overlay-left-col {
    flex: 0 0 40%;
}

#overlay-img {
    height: 400px;
    max-width: 100%;
}

#overlay-name {
    color: #C83939; 
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

#overlay-info {
    font-size: 1rem;
    line-height: 1.6;
}

#overlay-info strong {
    color: #C83939;
}

  




/* media query for tablet and desktop */

@media screen and (min-width: 768px) {
    
    .hamburger-menu-btn, .search-btn {
        display: none; /* Hide mobile buttons */
    }

    .logo {
        margin-left: 0; 
    }

    .nav-items {
        color: #C83939;
    }

    /* .nav-items:hover {
        color: #C83939;
    } */

    .nav-box {
        border: #C83939 1px solid;
        border-radius: 15px;
    }

    .nav-caught {
        padding: 10px 20px;
    }

    .nav-desktop {
        display: flex; 
    }

    header .newsreader {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 3rem;
        border-bottom: #C83939 7px solid;
        margin-bottom: 30px;
    }

    #main-p {
        font-size: 20px;
        margin-bottom: 60px;;
    }

    .sort-container {
        position: relative; /* it is a reference for absolute positioning */
    }

    .sort-by {
        position: absolute;
        top: -82px; 
        right: 0;
        margin-bottom: 0; 
    }

    /* .sort-list {
        border: #C83939 1px solid;
        background-color: transparent;
        color: #C83939;
    } */


    footer {
        border-top: #C83939 5px solid;
    }
    
    .footer-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding-bottom: 40px;
        max-width: 90%;
    }

    .footer-company {
        text-align: left;
        align-items: flex-start;
        width: 60%;
        padding-top: 40px;
    }

    .second-liner-footer {
        display: block;
        width: 5px;
        height: 240px;
        bottom: -100px;
        background-color: #C83939;
        position: absolute;
        left: 55.5%;
        transform: translate(-50%,-50%);
    }

    div.footer-social {
        gap: 30px;
        width: 30%;
    }
    .social-icon {
        font-size: 3rem;
    }


}

