.species {
    width: 100%;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.title {
    width: 80%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: left;
    gap: 20px;
    border-bottom: var(--bordercolour) solid 1px;
}

.title-name {
    font-size: 3rem;
    font-weight: 600;
    color: var(--textcolour);
}

.img-flex {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

.title-img {
    width: 40%;
}

.species-flex {
    margin-top: 10px;
    width: 70%;
    display: flex;
    flex-wrap: wrap;
    column-gap: 20px;
    row-gap: 10px;
    justify-content: space-between;
}

@media only screen and (max-width: 992px) {

    .title {
        align-items: center;
    }

    .img-flex {
        justify-content: center;
    }

    .species-flex {
        column-gap: 50px;
    }

}

@media only screen and (max-width: 600px) {

    .title {
        width: 90%;
    }

    .species-flex {
        justify-content: center;
        width: 90%;
    }

    .title-img {
        width: 100%;
    }

}


/* Container */
.genus {
    display: block;
    overflow: hidden;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bordercolour);
    max-height: fit-content;
    width: 45%;
}

/* Button */
.genusbtn {
    width: 100%;
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: var(--textcolour);
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 200ms ease-in-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.genusbtn::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    opacity: 0.7;
    margin-right: 10px;
    line-height: 0;
    top: 1px;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease-in-out;
}

/* When genus is active (open) */
.genus-active .genusbtn::after {
    transform: rotate(90deg);
}

.genus-active .genusbtn {
    color: var(--hovercolour);
}

/* Content wrapper for animation */
.genus-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-5px);
    transition: max-height 1s ease-in-out ,opacity 1s ease-in-out, transform 1s ease-in-out;
    background-color: var(--backgroundcolour);
    margin-top: 0.5rem;
    padding: 0 10px;
}

/* Active state */
.genus-active .genus-content {
    max-height: 2000px; /* or some large value, depending on the content size */
    opacity: 1;
    transform: translateY(0);
}

/* Links inside */
.genus-content a {
    display: block;
    padding: 8px 12px;
    transition: all 200ms ease-in-out;
}

@media only screen and (max-width: 1024px) {
    .genus {
        width: 80%;
    }

    .species-flex {
        justify-content: center;
        width: 90%;
    }

}

@media only screen and (max-width: 768px) {
    .genus {
        width: 100%;
    }

}