/* Home / work filter modal: one project image at a time, 2s rotation, white flash between slides (see module.js Be/we). */
[data-filterModal-img-container] {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgb(245 245 245);
}

[data-filterModal-img-container] > div {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

[data-filterModal-img-container] > div img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-filterModal-img-container].featured-flash::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background: #fff;
    animation: featuredWorksFlash 400ms ease-out forwards;
}

@keyframes featuredWorksFlash {
    0% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Home “latest projects” left stack: compiled CSS has no Tailwind line-clamp — use real ellipsis rules. */
[data-behavior="projectCard"] a.project-card-text--truncate {
    display: block;
    min-width: 0;
    max-width: 100%;
}

.project-card-short-desc--one-line {
    display: block;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Latest projects: stacked 4-col column — shorter media + tighter gap so total height matches 8-col card */
ul.home-featured-left-stack {
    row-gap: 0.5rem;
}

@media (min-width: 768px) {
    ul.home-featured-left-stack {
        row-gap: 0.75rem;
    }
}

/* Left stack: standard ratio on small screens; shorter frames only beside 8-col from md up */
@media (max-width: 799px) {
    ul.home-featured-left-stack [data-behavior="projectCard"] picture {
        aspect-ratio: 3 / 2 !important;
    }
}

@media (min-width: 800px) {
    ul.home-featured-left-stack [data-behavior="projectCard"] picture {
        aspect-ratio: 5 / 3 !important;
    }
}

/* Latest projects: do not set max-width here — parent .container controls page gutters */
.home-latest-projects > li.home-latest-projects__col {
    min-width: 0;
}

@media (max-width: 799px) {
    .home-latest-projects {
        flex-direction: column;
    }

    .home-latest-projects > li.home-latest-projects__col {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
}

.home-latest-projects [data-behavior="projectCard"],
.home-latest-projects [data-behavior="projectCard"] picture,
.home-latest-projects [data-behavior="projectCard"] img {
    max-width: 100%;
}

.home-latest-projects [data-behavior="projectCard"] > a[href] {
    box-sizing: border-box;
    max-width: 100%;
}
