.projects {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-margin-top: 70px;
}

.projects-content-wrapper {
    max-width: 1440px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 35px 70px 35px 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.projects h4 {
    font-size: var(--small-headline);
    font-weight: var(--middle-font-weight);
    margin: 0;
    margin-bottom: 16px;
    margin-top: 16px;
}

.projects h3 {
    font-size: var(--big-headline);
    font-weight: var(--heavy-font-weight);
    margin: 0;
}

.projects-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    gap: 60px;
}

.projects-top {
    display: flex;
    justify-content: space-between;
    height: 50%;
    gap: 80px;
}

.projects-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 560px;
}

.projects-underline {
    width: 240px;
    height: 20px;
    animation: draw-left-right 5s ease infinite;
}

.projects-text {
    font-size: var(--small-text);
    margin: 0;
    margin-top: 40px;
}

.join-project {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 560px;
}

.join {
    position: relative;
}

.join-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.join-img-wrapper:hover .project-details-btn {
    opacity: 1;
}

.join-img-wrapper:hover .join-img {
    transform: scale(1.1);
}

.join-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    border-radius: 0 0 16px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.join-img-wrapper:hover::after {
    opacity: 1;
}

.join-img {
    width: 100%;
    max-width: 560px;
    height: auto;
    aspect-ratio: 560 / 360;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.join-badge-img {
    position: absolute;
    bottom: 10%;
    left: 0;
    pointer-events: none;
    width: 28%;
    height: auto;
    z-index: 2;
}

.projects-bottom {
    display: flex;
    justify-content: space-between;
    height: 50%;
    gap: 80px;
}

.sharky-project {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 560px;
}

.sharky {
    position: relative;
}

.sharky-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.sharky-img-wrapper:hover .project-details-btn {
    opacity: 1;
}

.sharky-img-wrapper:hover .sharky-img {
    transform: scale(1.1);
}

.sharky-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    border-radius: 0 0 16px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.sharky-img-wrapper:hover::after {
    opacity: 1;
}

.sharky-img {
    width: 100%;
    max-width: 560px;
    height: auto;
    aspect-ratio: 560 / 360;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.dabubble-project {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 560px;
}

.dabubble {
    position: relative;
}

.dabubble-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.dabubble-img-wrapper:hover .project-details-btn {
    opacity: 1;
}

.dabubble-img-wrapper:hover .dabubble-img {
    transform: scale(1.1);
}

.dabubble-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    border-radius: 0 0 16px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.dabubble-img-wrapper:hover::after {
    opacity: 1;
}

.dabubble-img {
    width: 100%;
    max-width: 560px;
    height: auto;
    aspect-ratio: 560 / 360;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.project-details-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 170px;
    height: 40px;
    border: 1px solid white;
    border-radius: 20px;
    background: none;
    color: var(--primary-color);
    font-size: var(--small-text);
    box-shadow: 4px 4px 0 0;
    z-index: 2;
}

.project-details-btn:hover {
    cursor: pointer;
    background-color: var(--main-color-three);
    box-shadow: 0 0 0 0;
    transform: translate(4px, 4px);
}

.project-details-btn-mobile {
    display: none;
}

/* Mobile */
@media (max-width: 950px) {
    .projects-top {
        flex-direction: column;
        align-items: center;
    }

    .projects-intro {
        max-width: 560px;
        width: 100%;
    }

    .projects-bottom {
        flex-direction: column;
        align-items: center;
    }

    .project-details-btn {
        display: none;
    }

    .join-img-wrapper,
    .sharky-img-wrapper,
    .pokedex-img-wrapper {
        transform: none;
        pointer-events: none;
    }

    .join-img-wrapper::after,
    .sharky-img-wrapper::after,
    .pokedex-img-wrapper::after {
        display: none;
    }

    .join-img {
        animation: none;
    }

    .project-details-btn-box {
        display: flex;
        justify-content: flex-end;
    }

    .project-details-btn-box a {
        text-decoration: none;
    }

    .project-details-btn-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        transition: opacity 0.3s ease;
        width: 170px;
        height: 40px;
        border: 1px solid black;
        border-radius: 20px;
        background: none;
        color: var(--secondary-color);
        font-size: var(--small-text);
        box-shadow: 4px 4px 0 0;
    }

    .project-details-btn-mobile:hover {
        cursor: pointer;
        background-color: var(--main-color-three);
        box-shadow: 0 0 0 0;
        transform: translate(4px, 4px);
    }
}

@media (max-width: 680px) {
    .projects-content-wrapper {
        padding: 15px 35px 15px 35px;
    }
}

@media (max-width: 405px) {
    .projects-content-wrapper {
        padding: 15px 15px 15px 15px;
    }
}