@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Tagesschrift&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Tagesschrift", system-ui;
}

html {
    position: relative;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(to right top, white, black, gray, black);
}

/* Navbar */

#logo {
    width: 80px;
    height: auto;
    display: block;
}

header {
    background-color: black;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

nav > a {
    background-color: black;
    text-decoration: none;
    color: white;
    font-family: "Lora", sans-serif;
    text-transform: capitalize;
    padding: 6px 12px;
    transition: color 0.3s ease;
}

nav > a:hover {
    color: rgb(204, 162, 162);
    cursor: pointer;
}

#search-box {
    width: 175px;
    height: 50px;
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
    text-align: center;
    border: none;
    padding: 0 10px;
}

#submit-btn {
    width: 75px;
    height: 50px;
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    border: none;
    cursor: pointer;
    transition: background 0.5s ease;
}

#submit-btn:hover {
    background: linear-gradient(45deg, rgb(152, 252, 255), rgb(255, 232, 21), rgb(193, 255, 255));
}

::placeholder {
    text-align: center;
    font-family: "Lora", serif;
}

/* Main */

main {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 10px;
}

#container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin: 40px auto;
}

.box {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 5%;
}

.box img {
    width: 100%;
    height: 100%;
    border-radius: 5%;
    object-fit: cover;
    transition: transform 1s ease;
}

.box img:hover {
    transform: scale(1.2);
}

p {
    text-align: center;
    color: white;
    word-break: break-word;
}

/* Footer */

footer {
    background-color: black;
    height: 85px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/* Media Queries */

/* Tablet */
@media (max-width: 992px) {
    nav {
        justify-content: center;
        width: 100%;
        margin-top: 10px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    #search-box, #submit-btn {
        height: 40px;
        width: 100px;
    }

    header {
        align-items: center;
    }

    nav {
        justify-content: center;
    }

    #logo {
        width: 60px;
    }
}

/* Wrap search input and button in a container */
.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* Search box */
#search-box {
    height: 45px;
    width: 200px;
    padding: 0 15px;
    border: none;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
    font-family: "Lora", serif;
    font-size: 16px;
}

/* Search button */
#submit-btn {
    height: 45px;
    width: 80px;
    border: none;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
    cursor: pointer;
    background-color: white;
    transition: background 0.3s ease;
}

#submit-btn:hover {
    background: linear-gradient(45deg, rgb(152, 252, 255), rgb(255, 232, 21), rgb(193, 255, 255));
}

#sb{
    display: flex;
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }

    #search-box, #submit-btn {
        border-radius: 25px !important;
        width: 100%;
        max-width: 300px;
    }

    #search-box {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    #submit-btn {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }

    #sb{
        display: inline;
    }
}
