/* ================================================
   WORKS ARCHIVE — works.css
   Loaded by archive-work.php
   ================================================ */

/* Category section */
.work-cat-section {
    margin-bottom: 3.5rem;
}

.work-cat-title {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
}

.work-cat-title a {
    text-decoration: none;
    color: inherit;
}

.work-cat-title a:hover {
    text-decoration: underline;
}

/* Thumbnail row — clipped to one row height by default */
.work-thumbs-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.work-thumb-item {
    flex: 0 0 auto;
    line-height: 0; /* removes gap under inline images */
}

.work-thumb-item a {
    display: block;
}

/* Image sizing: fixed height, auto width on wide screens */
.work-thumb-img {
    height: 300px;
    width: auto;
    display: block;
}

/* View more */
.view-more-wrap {
    margin-top: 0.6rem;
}

.view-more-link,
.view-fewer-link {
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.view-more-link:hover,
.view-fewer-link:hover {
    color: #000;
    text-decoration: underline;
}

/* Medium — reduce thumbnail height to avoid very-wide images overflowing */
@media (min-width: 601px) and (max-width: 768px) {
    .work-thumbs-wrap {
        max-height: 200px;
    }

    .work-thumb-img {
        height: 200px;
    }
}

/* Mobile — stacked images, first 3 visible by default; sticky navbar */
@media (max-width: 600px) {
    .navbar-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background-color: var(--color-background) !important;
    }

    .work-thumbs-wrap {
        flex-direction: column;
        max-height: none;
        overflow: visible;
    }

    .work-thumb-item {
        width: 100%;
    }

    .work-thumb-img {
        height: auto;
        width: 100%;
    }

    /* Hide thumbnails beyond the first 3 until "view more" is clicked */
    .work-thumbs-wrap:not(.mobile-expanded) .work-thumb-item:nth-child(n+4) {
        display: none;
    }
}
