/* =========================================================
   PROJECTS PAGE � CLEAN VERSION
========================================================= */

/* ================= HERO ================= */

.wc-projects-hero {
    position: relative;
    height: 420px;
    background: var(--wc-primary, #493628);
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
    overflow: hidden;
}

.wc-projects-hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.wc-projects-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to top, rgba(10,8,5,.92) 0%, rgba(10,8,5,.55) 50%, rgba(10,8,5,.3) 100% );
}

.wc-projects-hero__body {
    position: relative;
    z-index: 2;
    width: 100%;
}

.wc-projects-hero__eyebrow {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--wc-gold);
    margin-bottom: .75rem;
}

.wc-projects-hero__title {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -1px;
}

    .wc-projects-hero__title span {
        color: var(--wc-gold);
    }

/* ================= FILTER ================= */

.wc-projects-filter {
    background: var(--wc-dark, #0a0805);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(196,151,59,.12);
}

.wc-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.wc-filter-tab {
    display: inline-flex;
    align-items: center;
    padding: .45rem 1.15rem;
    border-radius: 30px;
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255,255,255,.55);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    text-decoration: none;
    transition: all .25s;
    white-space: nowrap;
}

    .wc-filter-tab:hover {
        color: var(--wc-gold);
        border-color: rgba(196,151,59,.4);
        background: rgba(196,151,59,.06);
    }

    .wc-filter-tab.active {
        background: var(--wc-gold);
        border-color: var(--wc-gold);
        color: #0a0805;
        font-weight: 700;
    }

/* ================= GRID ================= */

.wc-projects-grid {
    background: var(--wc-dark, #0a0805);
    padding: 3.5rem 0 5rem;
}

/* ================= PROJECT CARD ================= */

.wc-project-card {
    cursor: pointer;
}

.wc-project-card__img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4/3;
    background: #111;
}

.wc-project-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}

.wc-project-card:hover .wc-project-card__img {
    transform: scale(1.07);
}

.wc-project-card__footer {
    padding: .75rem .25rem .25rem;
    text-align: center;
}

.wc-project-card__title {
    font-size: .92rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}

/* ================= GRID IMAGES ================= */

.portfolio-grid-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    box-shadow: 0 0 0 8px #111 inset;
}

@media (max-width:1200px) {
    .portfolio-grid-img {
        height: 360px;
    }
}

@media (max-width:768px) {
    .portfolio-grid-img {
        height: 240px;
    }
}

/* ================= CTA ================= */

.wc-projects-cta {
    background: #000;
    padding: 5rem 0 6rem;
    border-top: 1px solid rgba(196,151,59,.1);
}

.wc-projects-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
}

.wc-projects-cta__label {
    font-size: .72rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
}

.wc-projects-cta__title {
    font-size: clamp(2.2rem, 6vw, 5rem);
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
    margin: 0;
}

.wc-projects-cta__btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.8rem;
    border: 1.5px solid #fff;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .3s;
}

    .wc-projects-cta__btn:hover {
        background: var(--wc-gold);
        border-color: var(--wc-gold);
        color: #0a0805;
    }

/* ================= PORTFOLIO MODAL ================= */

.portfolio-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,.88);
    display: none;
    z-index: 99999;
    box-sizing: border-box;
    overflow: auto; /* allow scrolling if image larger than viewport */
}

    .portfolio-modal.active {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

.portfolio-modal__content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 100vw;
    max-height: 100vh;
    box-sizing: border-box;
}

.portfolio-modal__gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* ensure content stays visible and scrollable if too large */
}

.modal-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#modalImage {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 14px;
    background: #111;
}

/* ================= CLOSE BUTTON ================= */

.portfolio-modal__close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 991.98px) {
    .wc-projects-hero:has(.wc-projects-hero__photo) {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        display: block;
        padding-bottom: 0;
        background: none;
    }

    .wc-projects-hero__photo {
        position: relative;
        inset: auto;
        display: block;
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: contain;
        object-position: center top;
    }

    .wc-projects-hero:has(.wc-projects-hero__photo) .wc-projects-hero__body {
        position: absolute;
        inset: 0;
        width: 100%;
        display: flex;
        align-items: flex-end;
        padding-bottom: 2rem;
        z-index: 2;
    }
}

@media (max-width: 575px) {

    .wc-projects-hero:not(:has(.wc-projects-hero__photo)) {
        height: 300px;
        padding-bottom: 2.5rem;
    }

    .wc-filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .25rem;
    }

    .wc-projects-cta__title {
        letter-spacing: -1px;
    }

    #modalImage {
        max-width: 95vw;
        max-height: 75vh;
    }
}
