/* --- Work Section General --- */
.workItemWrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    /* Added gap for spacing between items */
}

.workItemWrap a {
    transition: transform 0.2s ease;
    will-change: transform;
}

.workItemWrap a:hover {
    transform: scale(1.02);
}

/* --- Individual Project Item --- */
.workItems {
    width: min(600px, 100%);
    /* Simplified width property */
    color: var(--color1);
    margin: 0 auto;
    /* Centered item now that gap is used */
    box-sizing: border-box;
    height: 100%;
    padding: 10px;
    background-color: var(--card-hover);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    transition: transform 0.2s ease;
    display: grid;
    will-change: transform;
    grid-template-rows: min-content min-content 1fr min-content;
}


.workItems img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 5px;
}

.workItems h2 {
    margin: 10px 5px;
    transition: 0.5s;
}

.workItems p {
    font-size: 1em;
    font-weight: 400;
    margin: 0 5px;
    transition: 0.5s;
}

@media screen and (max-width: 800px) {
    .workItems p {
        font-weight: 300;
    }

    .workItems h2 {
        font-weight: 500;
    }

}

/* --- Project Button --- */
.btnWork {
    border: 2px solid var(--color1);
    color: var(--color1);
    padding: 10px 20px;
    transition: 0.5s;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 10px 5px;
    width: max-content;
    font-weight: 500;
    text-decoration: none;
    /* Good practice for <a> tags styled as buttons */
}

/* --- Hover Effects --- */
.workItems:hover {}

.workItems:hover .btnWork {
    border-color: var(--accentColor);
    color: var(--accentColor);
}

.btnWork:hover {
    background-color: var(--accentColor);
    color: var(--color4) !important;
    /* Use !important to override the rule above */
    border-color: var(--accentColor);
    /* Ensure border color also changes on direct hover */
}

.projectLayout {
    display: flex;
    flex-direction: column;
    /* mobile first: video on top */
    gap: 30px;
    align-items: stretch;
}

.projectVideo {
    border-radius: 10px;
    object-fit: cover;
    background-color: #000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.projectVideo:fullscreen {
    object-fit: contain;
    /* or fill, depending on what you want */
}

.projectText {
    flex: 1;
    color: var(--color1);
    font-size: 1.1rem;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    /* base padding (will add in media query) */
    max-width: 700px;
}

.projectText h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: left;
    line-height: 1.2;
    color: var(--color1);
}

.projectText p {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 30px;
    line-height: 1.3;
    color: var(--color2);
    /* optional: slightly lighter shade for body */
}

@media screen and (max-width: 800px) {
    .projectText h1 {
        font-size: 2rem;
        /* Slightly smaller heading on mobile */
    }

    .projectText p {
        font-size: 1rem;
        /* Smaller body text on mobile */
        line-height: normal;
    }

}


.projectText .btn {
    align-self: start;
    /* makes the button align left in the column */
    font-weight: 600;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 6px;
}

@media (min-width: 800px) {
    .projectLayout {
        flex-direction: row;
        align-items: flex-start;
        gap: 60px;
    }

    .projectVideo {
        flex: 1;
        max-width: 55%;
    }

    .projectText {
        padding-right: 40px;
    }
}



.video-wide {
    aspect-ratio: 16 / 9;
    /* Standard widescreen */
    max-width: 45%;
    margin: auto;
}

.video-wide-x {
    aspect-ratio: 2 / 1;
    /* Standard widescreen */
    max-width: 45%;
    margin: auto;
}


.video-tall {
    aspect-ratio: 9 / 16;
    /* Standard vertical video (e.g., TikTok, Reels) */
    /* You might want to adjust max-width for tall videos on desktop to prevent them from becoming too wide */
    max-width: 350px;
    /* Example: Limit width of tall videos on larger screens */
    margin: 0 auto;
    /* Center the tall video if it's narrower than its container */
}

@media screen and (max-width: 800px) {
    .video-wide {
        max-width: 100%;
        /* Full width on smaller screens */
    }

    .video-wide-x {
        max-width: 100%;

    }

    .video-tall {
        max-width: 100%;
        /* Full width on smaller screens */
    }
}