@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&family=Tenor+Sans&display=swap');

body {
    font-family: "Josefin Sans", sans-serif;
    display: block;
    margin: 2rem;
    background-color: black;
    color: white;
    /* text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px  1px 0 #000, 1px  1px 0 #000; */

    background-image: url('../images/corsucant___star_wars__planet_only__by_josemikhail_d9tn0ob.jpg');
    background-size: cover;
    background-position: center;
}

.header, .sub-header div, footer, .hero-description {
    font-family: "Josefin Sans", sans-serif;
    font-size: 2rem;
    border: 2px solid black;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    background-color: #14213D;
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px  1px 0 #000, 1px  1px 0 #000;

}

.sub-header {
    display: flex;
    justify-content: space-around;
    font-weight: bold;
}

.sub-header div {
    width: 100%;
    font-size: 2.5rem;
}

a {
    text-decoration: none;
    color: white;
}

.hero, .filter {
    background-color: #14213D;
    color: white;
    padding: 1em;
    width: auto;
    text-align: center;
    position: relative;
}

.filter h2, #group-title, .archive-search h2 {
    font-size: 2.25rem;
}

#searchForm {
    margin: 1rem;
}

#searchForm input, #searchForm button {
    font-size: 1.75rem;
}

.sorting button {
    font-size: 1.75rem;
    margin: 1rem;
}

.group-card h2, .group-card h3 {
    font-size: 1.75rem;
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-size: 3.5rem;
    font-weight: bold;
}

.group-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    list-style-type: none;
    padding: 0;
    justify-items: center;
    color: black;
}

.archive-grid ul li, .archive-grid ul li h3 a {
    list-style-type: none;
    display: block;
    background-color: #e5e5e5;
    color: #000;
}

.group-card a h2 {
    color: black;
}

.group-card {
    color: #000;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    width: 300px;
    text-align: center;
    text-decoration: none;
    font-size: 1.25rem;
}

.group-card h3 {
    margin-top: 0;
}

.group-card p {
    margin-bottom: 0;
}

main {
    font-family: "Tenor Sans", sans-serif;
}

#searchInput:focus {
    border: 10px solid white;
}

/* This is for the page links growth */
@keyframes enlargeText {
    0% {
        font-size: 1em;
    }
    100% {
        font-size: 2rem;
    }
}

@keyframes spinOnce {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* This is for the sort button spinning */
#sortByName.spin {
    animation: spinOnce 1s linear;
}

/* Apply animation to search links */
.search-link {
    animation: enlargeText 0.3s ease forwards;
}

/* Add hover effect */
.search-link:hover {
    animation: none;
    font-size: 1.2em;
}

@media (max-width: 767px) {
    .group-list {
        grid-template-columns: 1fr;
    }
}