#projects {
    padding: 80px 0;
}

.projects-lead {
    font-size: 18px;
    color: var(--color-text-white);
    margin-bottom: 48px;
}

.projects-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
    width: 100%;
}

.projects-list {
    flex: 1 1 65%;
    display: flex;
    flex-direction: column;
}

.project-dialog-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease-in-out;
}

.project-dialog-btn:hover {
    background-color: var(--color-accent-green-transparent);
}

.project-dialog-btn h3 {
    font-size: 24px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-dialog-btn h3::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    -webkit-mask-image: url('../assets/img/projects/arrow_outward.svg');
    mask-image: url('../assets/img/projects/arrow_outward.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: transparent; 
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translate(-5px, 5px);
}

.project-dialog-btn:hover h3::after {
    opacity: 1;
    background-color: var(--color-text-white);
    transform: translate(0, 0);
}

.project-dialog-btn p {
    font-size: 18px;
    color: var(--color-text-white);
    opacity: 0.8;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: flex-end;
}

.project-dialog-btn p span {
    color: var(--color-text-white);
}

.project-dialog-btn p span:not(:last-child)::after {
    content: "|";
    color: var(--color-accent-green) !important;
    margin-left: 12px;
    display: inline-block;
}

.project-preview-wrapper {
    flex: 0 0 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.project-preview-wrapper::before {
    content: "";
    position: absolute;
    top: 20px;
    right: 5px;
    width: 100%;
    height: 100%;
    max-width: 400px;
    border-radius: 30px;
    z-index: 1;
    background: repeating-linear-gradient(
        -45deg,
        var(--color-accent-green),
        var(--color-accent-green) 1px,
        transparent 1px,
        transparent 10px
    );
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.project-preview-wrapper:has(.preview-visible)::before {
    opacity: 1;
    transform: scale(1);
}

.project-preview-wrapper img {
    width: 100%;
    height: auto;
    max-width: 400px;
    border-radius: 30px;
    object-fit: cover;
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

.preview-hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.preview-visible {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 1024px) {
    .project-preview-wrapper {
        display: none;
    }

    .projects-list {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .projects-lead {
        margin-bottom: 32px;
    }

    .project-dialog-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 24px 16px;
    }

    .project-dialog-btn h3 {
        font-size: 20px;
    }

    .project-dialog-btn p {
        justify-content: flex-start;
        gap: 4px 8px;
    }
}

@media (max-width: 500px) {
    .projects-lead {
        font-size: 16px;
    }
}