/*
 * This CSS file contains global styles for all pages.
 * It includes base styles for elements such as padding, margin, and font settings.
 * The file also defines styles for the body, ensuring a consistent background color and layout.
 * Additionally, it contains styles for the header, including its background color, text color, and layout properties.
 */


* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background-color: #eff3ff;
    overflow-x: hidden;
    height: 100dvh;
}





/* HEADER */

header {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    align-content: initial;
    position: fixed;
    z-index: 999;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;

    div {
        display: initial;

        h1 {
            margin: 0;
            font-size: 24px;
            display: inline-block;
            transform: scale(1);
            transition: transform 0.5s ease;

            a {
                color: white;
                text-decoration: none;
                transform: scale(1);
                transition: transform 0.3s ease;
            }

            a:hover {
                color: #f7d02c;
                transform: scale(1.1);
            }
        }

        h1:hover {
            transform: scale(1.1);
        }

        nav {
            display: inline-flex;
            align-items: center;
            gap: 20px;

            a {
                color: white;
                text-decoration: none;
                text-align: center;
                font-size: 16px;
                transition: color 0.3s;
                transform: scale(1);
                transition: transform 0.5s ease
            }

            a:hover {
                color: #f7d02c;
                transform: scale(1.1);
            }
        }

        #searchBar {
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 4px;
            width: 200px;
            transition: width 0.3s ease;
        }
        
        #searchBar:focus {
            width: 70%;
            outline: none;
            border-color: #f7d02c;
        }
    }

    div:first-child {
        text-align: left;
    }
    
    div:nth-child(3) {
        text-align: center;
        flex: 2;
    }
    
    div:last-child {
        text-align: right;
    }
}

@media (max-width: 768px) {
    header {
        text-align: center;
    }

    header>div {
        flex: 1;
    }

    header>div:nth-child(3) {
        flex: 1;
        display: block;
    }

    #searchBar {
        width: 90%;
        margin: 0 auto;
    }

    nav {
        justify-content: center;
        gap: 10px;
    }

    .pages {
        display: none !important;
    }
}





/* SIDENAV */

.sidebar {
    height: 100dvh;
    width: 250px;
    margin-left: -250px;
    z-index: 2;
    position: fixed;
    background: linear-gradient(to left, #444, #222);
    border-right: 5px solid #f7d02c;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 80px;

    /*a {
        margin: 10px;
        padding: 10px;
        color: white;
        text-decoration: none;
        font-size: 20px;
        display: block;
        transition: 0.3s;
        border: 1px solid #ccc;
        border-radius: 8px;
        margin-bottom: 15px;
    }*/

    a {
        margin: 15px;
        padding: 15px 30px;
        font-size: 1.3rem;
        font-weight: bold;
        color: #000000;
        background-color: #ffcb05;
        text-decoration: none;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.3s ease-in-out, background-color 0.3s;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        position: relative;
        display: block;
        margin-bottom: 15px;
    }

    a:hover {
        transform: scale(1.1);
        background-color: #ffd738;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }
    
    a::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100px;
        height: 100px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        transition: transform 0.3s ease-out;
        z-index: -1;
    }
    
    a:hover::after {
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.openbtn {
    font-size: 20px;
    cursor: pointer;
    background-color: transparent;
    color: white;
    padding: 10px 15px;
    border: none;
    display: none;
}

@media (max-width: 768px) {
    .openbtn {
        display: block;
    }

    header {
        align-content: flex-start;
    }

    header>div {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .sidebar {
        display: none;
    }
}





/* CAROUSEL */

.carousel {
    position: relative;
    width: 100vw;
    margin-top: 10px;
    height: 140%;
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    gap: 10px;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex-shrink: 0;
    min-width: calc(60% - 10px);
    height: 350px;
    position: relative;
    overflow: hidden; /* Ensure the zoom effect stays within the item */
    border-radius: 8px;
    transition: transform 0.3s ease; /* Add smooth scaling for the item */
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: transform 1s ease; /* Smooth zoom effect */
}

.carousel-item:hover img {
    transform: scale(1.1); /* Zoom in the image slightly on hover */
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
    z-index: 2;
    padding: 20px;
    border-radius: 8px;
}

.carousel-title {
    margin-top: 10%;
    font-size: 36px; 
    font-weight: bold; 
    margin-bottom: 15px;
}

.carousel-description {
    font-size: 18px; 
    font-weight: 300; 
    line-height: 1.5; 
    max-width: 80%; 
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-100% - 10px));
    }
}

.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    top: -20px;
    position: relative;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transform: scale(1);
    transition: transform 0.3s ease, background-color 0.3s;
}

.carousel-dot:hover {
    transform: scale(1.5);
}

.carousel-dot.active {
    transform: scale(1.2);
    background-color: #f7d02c;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8); 
}






/* SEPARATOR */

.separator {
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 50px;
    margin-right: 50px;
}






/* POKEMON CARD */

.section-card {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-direction: row;
    background-color: #b9b9b9;
    padding-top: 30px;
    padding-bottom: 30px;
    flex-wrap: wrap;

    .card {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        gap: 50px;
        padding: 15px;
        max-width: 600px;
        min-height: 350px;
        background-image: url("https://assets.pokemon.com/static2/_ui/img/chrome/body_gray_bg.png");
        color: white;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        transform: translateX(0);
        opacity: 1;
        transition: transform 0.5s ease, opacity 0.5s ease; /* Smooth swipe and fade transitions */
    
        .card-info {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 20px;
            height: 100%;

            .card-title {
                font-size: 30px;
                font-weight: 400;
                text-align: left;

                .card-subtitle {
                    font-size: 20px;
                    color: #a4acaf;
                    font-weight: 400;
                }
            }

            .card-type {
                display: flex;
                justify-content: flex-start;
                align-items: center;
                gap: 10px;
                
                .type {
                    height: 32px;
                    padding: 10px;
                    background-color: #E2BF65;
                    border-radius: 8px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: black;
                    transform: scale(1);
                    transition: transform 0.5s ease;
                }

                .type:hover {
                    transform: scale(1.2);
                }
            }

            .card-description {
                font-size: 15px;
                font-weight: 400;
                text-align: left;
            }
        }
    
        .card-img {
            display: flex;
            box-shadow: 0 4px 4px 0px #212121;
            background-color: #616161;
            border: 5px solid #fff;
            border-radius: 50%;
            margin: 0 auto;
            width: 120px;
            min-height: 120px;
            overflow: hidden;
            align-items: center;
            justify-content: center;
            transform: scale(1.6);
            transition: transform 0.5s ease;
    
            img {
                width: 100%;
                height: 100%;
                object-fit: contain;
            }
        }

        .card-img:hover {
            transform: scale(2);
        }
    }
    
    .card.swipe-out {
        transform: translateX(-100%);
        opacity: 0;
    }
    
    .card.swipe-in {
        transform: translateX(100%);
        opacity: 0;
    }
    
    .card.active {
        transform: translateX(0);
        opacity: 1;
    }
    
    .card.BeforeFirstActive {
        transform: scale(0);
    }
    
    .card.firstActive {
        transform: scale(1);
    }

    .section-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 450px;
        text-align: center;
        background: linear-gradient(to bottom, #f9e08e, #f7d02c);
        z-index: 5;
        padding: 25px;
        border-radius: 16px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        color: #333;
        transition: transform 0.3s ease;
    }

    .section-info:hover {
        transform: scale(1.05);
    }
    
    .info-title {
        font-size: 22px;
        font-weight: bold;
        margin-bottom: 15px;
        color: #444;
    }
    
    .info-description {
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 20px;
        color: #555;
    }
    
    .info-icon {
        margin-bottom: 20px;
        animation: bounce 2s infinite; /* Attach the bounce animation */
    }
    
    .info-icon img {
        width: 60px;
        height: 60px;
        transition: transform 0.5s ease-out; 
    }
    
    #nextPokemonButton {
        padding: 12px 20px;
        background-color: #333;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    #nextPokemonButton i {
        font-size: 18px;
    }
    
    #nextPokemonButton:hover {
        background-color: #444;
        transform: scale(1.1);
    }
}


/* Battle Section */
.battle-section {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-direction: row;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap-reverse;
}

.battle-section .battle-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 450px;
    text-align: center;
    background: linear-gradient(to bottom, #ff9a9e, #fad0c4);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: #333;
    transition: transform 0.3s ease;
}

.battle-section .battle-info:hover {
    transform: scale(1.05);
}

.battle-section .battle-info .info-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #444;
}

.battle-section .battle-info .info-description {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

.battle-section .battle-info .info-icon {
    margin-bottom: 20px;
    animation: bounce 2s infinite; /* Attach bounce animation */
}

.battle-section .battle-info .info-icon img {
    width: 60px;
    height: 60px;
    transition: transform 0.5s ease-out;
}

.battle-section .battle-info #battleButton {
    padding: 12px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.battle-section .battle-info #battleButton i {
    font-size: 18px;
}

.battle-section .battle-info #battleButton:hover {
    background-color: #444;
    transform: scale(1.1);
}

/* Battle Card */
.battle-section .battle-card {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    max-width: 600px;
    height: 350px;
    background-color: #333;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden; /* Ensures the image does not spill out of the container */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.battle-section .battle-card .battle-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 1s ease; /* Smooth image scaling on hover */
}

.battle-section .battle-card:hover .battle-card-image {
    transform: scale(1.1); /* Slightly zoom the image when hovering over the card */
}

.battle-section .battle-card .battle-card-overlay {
    position: absolute;
    bottom: 20px; /* Shift content towards the bottom */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align items at the bottom of the container */
    align-items: center;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
    color: white;
    padding: 20px;
    pointer-events: none; /* Prevents overlay content from interfering with hover effect */
}

.battle-section .battle-card .battle-card-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.battle-section .battle-card .battle-card-text {
    font-size: 16px;
    line-height: 1.5;
    max-width: 80%;
    bottom: 20px;
}


/* FOOTER */
.site-footer {
    background: linear-gradient(to bottom, #444, #222);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    font-family: "Poppins", sans-serif;
    border-top: 5px solid #f7d02c;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    font-size: 20px;
    color: #f7d02c;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #f7d02c;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.social-icons a {
    color: #fff;
    font-size: 24px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: #f7d02c;
}

.footer-bottom {
    font-size: 14px;
    color: #aaa;
    border-top: 1px solid #555;
    padding-top: 10px;
    margin-top: 10px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    transition: transform 0.3s ease, background 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

.footer-section:hover {
    transform: scale(1.05);
}

.site-footer {
    background: linear-gradient(to bottom, #444, #222);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    font-family: "Poppins", sans-serif;
    border-top: 5px solid #f7d02c;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 5px;
    background: linear-gradient(to right, transparent, #fff, transparent);
    animation: lightRun 2s infinite;
}

@keyframes lightRun {
    0% {
        left: -50%;
    }
    100% {
        left: 100%;
    }
}

.pokeball-container {
    position: absolute;
    bottom: 60px;
    right: 20px;
    z-index: 99;
    animation: float 2s infinite;
}

.pokeball-footer {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.pokeball-footer:hover {
    transform: scale(1.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
      -webkit-user-select: none; /* Safari */
       -khtml-user-select: none; /* Konqueror HTML */
         -moz-user-select: none; /* Old versions of Firefox */
          -ms-user-select: none; /* Internet Explorer/Edge */
              user-select: none; /* Non-prefixed version, currently
                                    supported by Chrome, Edge, Opera and Firefox */
}