#projects-container {
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 4rem;
    scrollbar-width: none;
    margin-bottom: 3rem;
}

@media (max-width: 999px) {
    #projects .cases-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #projects .cases-scroll-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--highlight-color);
        font-size: 2rem;
        line-height: 1;
        transform: translateY(1px) rotate(0deg);
        transform-origin: center;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    #projects .cases-scroll-arrow.point-left {
        transform: translateY(1px) rotate(180deg);
    }

    #projects .cases-scroll-arrow.is-hidden {
        opacity: 0;
    }

    #projects h2 {
        --cases-progress: 0%;
        position: relative;
        border-bottom: none;
        padding-bottom: 0.75rem;
    }

    #projects h2::before {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 3px;
        background: rgba(243, 159, 90, 0.28);
    }

    #projects h2::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: var(--cases-progress);
        height: 3px;
        background: var(--highlight-color);
        transition: width 0.2s linear;
    }
}

.project-card {
    padding: 2rem 0;
    width: 100%;
    flex: 0 0 auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-family: var(--header-font);
    font-size: 2rem;
    margin: 1rem 0;
}

.project-card img {
    width: 100%;
}

.project-description {
    margin: 2rem 0;
}

.project-description p {
    padding: 0;
}

.project-description-content {
    margin: 1.5rem 0;
    animation: fadeIn 0.3s ease-in;
}

.description-section {
    margin-bottom: 1.5rem;
}

.description-section h4 {
    font-family: var(--text-font);
    font-size: 1.1rem;
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.description-section p {
    padding: 0;
    margin: 0;
    line-height: 1.5;
}

.description-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);

}

.description-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--primary-color);
    padding: 2.5rem;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(243, 159, 90, 0.6) transparent;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(243, 159, 90, 0.6);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(243, 159, 90, 0.8);
}

.modal-content h3 {
    margin-top: 0;
    color: var(--highlight-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--highlight-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--accent-color);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.short-description {
    margin: 2rem 0;
}

.full-description {
    display: none;
    color: white;
}

.card-flex {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0;
    margin-top: auto;
}

.read-more {
    background-color: var(--primary-color);
    font-family: var(--text-font);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid var(--highlight-color);
    text-align: left;
}

.tags {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    font-size: 0.8em;

}

@media (min-width: 700px) {

    .btn-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

    
    .project-card {
        max-width: 500px;
    }
    
}

@media (min-width: 1000px) {

    #projects-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8rem;
        overflow: visible;
        scroll-snap-type: none;
        margin: 4rem 0 6rem 0;
    }

    .project-card {
        width: auto;
        max-width: none;
        padding: 0;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

    .tags {
        font-size: medium;
    }

}