/**
 * Portfolio Showcase â€” Salient child theme element.
 * A grid of project cards: brown card shell, tall toggling gallery on top,
 * white testimonial panel below with a compact taxonomy spec strip.
 */

.portfolio-showcase {
    --ps-accent: var(--nectar-accent-color, #726658);
    --ps-card-bg: var(--nectar-accent-color, #726658);
    --ps-panel-bg: #ffffff;
    --ps-ink: #2b2620;
    --ps-muted: rgba(43, 38, 32, 0.55);
    --ps-hairline: rgba(43, 38, 32, 0.1);
    --ps-radius: var(--border-radius-value, 20px);
    --ps-radius-inner: calc(var(--border-radius-value, 15px) / 1.5);
    --ps-media-ratio: 4 / 5;
    --ps-cols: 3;
    --ps-gap: 35px 20px;
    --ps-pad: 15px;
    --ps-speed: 0.6s;
    --ps-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    display: block;
    width: 100%;
}
.portfolio-showcase__filters:before {
    content: 'Filter by Job Type';
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    font-family: 'Blisa';
    font-size: 2rem;
    line-height: 1;
}
.portfolio-showcase *,
.portfolio-showcase *::before,
.portfolio-showcase *::after {
    box-sizing: border-box;
}

/* ---- Track: grid vs carousel ---- */
.portfolio-showcase--grid .portfolio-showcase__track {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: var( --ps-gap);
}

/* Carousel mode is rendered as a native Salient nectar-carousel (see PHP): the
   theme's own Flickity init, cell width (style.css --carousel-width rule) and
   drag behaviour drive it, matching the flooring-options carousel exactly. We
   only keep overflow visible so neighbouring cells peek, and let each card fill
   its Flickity cell. */
.portfolio-showcase--carousel {
    overflow: visible;
}

.portfolio-showcase--carousel .cell {
    display: flex;
}

.portfolio-showcase--carousel .cell .portfolio-showcase__card {
    width: 100%;
}

.portfolio-showcase__taxonomy:first-child {padding-top: 0;}
.portfolio-showcase__taxonomy:last-child {padding-bottom: 0;}
.portfolio-showcase__cta .nectar-cta {width: 100%;text-align: center;}
.portfolio-showcase__cta .nectar-cta span.link_wrap {width: 100%;text-align: center;display: flex;justify-content: center;}

/* ---- Card header (flooring identity) — sits at the top of the content panel ---- */
.portfolio-showcase__header {
    order: 0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    padding-bottom: 20px;
    /* margin-bottom: 1rem; */
    /* border-bottom: 1px solid var(--ps-hairline); */
}

.portfolio-showcase__texture {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: var(--ps-radius-inner);
    overflow: hidden;
    background: var(--faded-bg, #7266581f);
    box-shadow: 0 0 0 1px var(--ps-hairline) inset;
}

.portfolio-showcase__texture img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    margin: 0;
}

.portfolio-showcase__heading {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.portfolio-showcase__flooring-name {
    font-family: 'Sonder Slab Rough', Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--nectar-extra-color-4, var(--ps-ink));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-showcase__job-title {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--ps-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Card shell ---- */
.portfolio-showcase__card {
    display: flex;
    gap: 0;
    padding: 0;
    border-radius: var(--ps-radius);
    background: var(--nectar-extra-color-1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: auto;
    flex-direction: column;
    overflow: hidden;
    border: 1.5px solid #72665800;
}

.portfolio-showcase__card:hover {
}

/* ---- Media / gallery panel ---- */
.portfolio-showcase__media-panel {
    position: relative;
    border-radius: var(--ps-radius-inner);
    overflow: hidden;
    flex: 2;
    padding-bottom: 120%;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

.portfolio-showcase__gallery {
    position: absolute;
    inset: 0;
    background: #111;
    overflow: hidden;
}

.portfolio-showcase__slides {
    position: absolute;
    inset: 0;
}

/* Slides are stacked; JS slides them in/out with translateX (looping). Only the
   resting slide and the ones taking part in a move are visible. */
.portfolio-showcase__slide {
    position: absolute;
    inset: 0;
    visibility: hidden;
    transition: transform var(--ps-speed) var(--ps-ease);
}

.portfolio-showcase__slide.is-active,
.portfolio-showcase__slide.is-leaving,
.portfolio-showcase__slide.is-peek {
    visibility: visible;
}

.portfolio-showcase__slide.is-active {
    z-index: 1;
}

/* Drag / swipe (JS adds .is-swipeable when a card has more than one slide).
   pan-y keeps vertical page scrolling native on touch screens. */
.portfolio-showcase__gallery.is-swipeable {
    cursor: grab;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.portfolio-showcase__gallery.is-dragging {
    cursor: grabbing;
}

.portfolio-showcase__gallery.is-dragging .portfolio-showcase__slide {
    transition: none;
}

.portfolio-showcase__gallery.is-swipeable .portfolio-showcase__image {
    -webkit-user-drag: none;
    pointer-events: none;
}

.portfolio-showcase__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 1.2s ease;
}

/* Slow, subtle zoom on hover for a premium feel. */
.portfolio-showcase__card:hover .portfolio-showcase__slide.is-active .portfolio-showcase__image {
    transform: scale(1.05);
}

/* Optional project-title overlay on a soft gradient. */
.portfolio-showcase__media-overlay {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: clamp(1rem, 2vw, 1.5rem);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.portfolio-showcase__project-title {
    color: #fff;
    font-family: 'Sonder Slab Rough', inherit;
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

/* Arrows */
body .row .portfolio-showcase__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 10px !important;
    backdrop-filter: blur(15px) brightness(0.8) contrast(1.2);
    background: #5b514652;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.portfolio-showcase__card:hover .portfolio-showcase__arrow,
.portfolio-showcase__arrow:focus-visible {
    opacity: 1;
}

.portfolio-showcase__arrow:hover {
    background: rgba(0, 0, 0, 0.55);
}

.portfolio-showcase__arrow--prev { left: 12px; }
.portfolio-showcase__arrow--next { right: 12px; }

/* Dots */
.portfolio-showcase__dots {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 20px;
    z-index: 3;
    display: flex;
    gap: 6px;
    width: 100%;
    text-align: center;
    align-items: center;
    justify-content: center;
    align-content: center;
}

.portfolio-showcase__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.portfolio-showcase__dot:hover { background: rgba(255, 255, 255, 0.85); }

.portfolio-showcase__dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

/* ---- Quote panel ---- */
.portfolio-showcase__quote-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 2.5;
    padding: 22px;
    padding-top: 20px;
    border-radius: var(--ps-radius-inner);
    background: var(--ps-panel-bg);
    color: var(--ps-ink);
    height: auto;
    justify-content: flex-start;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    position: relative;
}

.portfolio-showcase__quote {
    position: relative;
    margin: 0;
    padding: 15px 0 15px 0;
    border: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 400;
    order: 2;
}

/* Decorative opening quotation mark in the brand heading face. */
.portfolio-showcase__quote::before {
    content: '\201C';
    position: absolute;
    top: 0.35em;
    left: -0.02em;
    font-family: 'Sonder Slab Rough', Georgia, serif;
    font-size: 3.2rem;
    line-height: 0;
    color: var(--ps-accent);
    opacity: 0.16;
    pointer-events: none;
}

/* ---- Taxonomy spec sheet (key / value rows) ---- */
.portfolio-showcase__taxonomies {
    list-style: none;
    margin: 0px;
    padding: 0;
    display: flex;
    flex-direction: column;
    order: 1;
}

.portfolio-showcase__taxonomy {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--field-border-color);
    min-width: 0;
}

.portfolio-showcase__taxonomy:first-child {
    border-top: 0;
}

.portfolio-showcase__taxonomy-label {
    flex: 0 0 auto;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--ps-muted);
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.portfolio-showcase__taxonomy-terms {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.15rem 0.4rem;
    min-width: 0;
    text-align: right;
}

/* Values are plain text now, not pills. */
.portfolio-showcase__chip {
    color: var(--ps-ink);
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 500;
}

.portfolio-showcase__taxonomy-terms .portfolio-showcase__chip:not(:last-child)::after {
    content: ',';
    color: var(--ps-muted);
    font-weight: 400;
}

/* Narrow cards: stack the value beneath its label. */
@media screen and (max-width: 380px) {
    .portfolio-showcase__taxonomy {
        flex-direction: column;
        gap: 0.2rem;
    }
    .portfolio-showcase__taxonomy-terms {
        justify-content: flex-start;
        text-align: left;
    }
}

/* ---- Author / customer ---- */
.portfolio-showcase__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    order: 10;
}

.portfolio-showcase__avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--faded-bg, #7266581f);
}

.portfolio-showcase__avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    margin: 0;
}

.portfolio-showcase__author-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.portfolio-showcase__author-name {
    font-family: 'Sonder Slab Rough';
    font-size: 0.8rem;
    color: var(--nectar-extra-color-4);
    letter-spacing: -0.01em;
}

.portfolio-showcase__author-location {
    font-size: 0.75rem;
    color: var(--ps-muted);
    line-height: 1.4;
}

/* ---- Video slide ---- */
.portfolio-showcase__video {
    background: #000;
}

.portfolio-showcase__card:hover .portfolio-showcase__slide--video .portfolio-showcase__image {
    transform: none;
}

/* ---- Call to action (native Salient .nectar-cta) ---- */
.portfolio-showcase__cta {
    order: 11;
    margin-top: 1.25rem;
}

.portfolio-showcase__cta .nectar-cta {
    line-height: 1;
}

/* ---- Responsive ---- */


@media screen and (max-width: 1300px) {
    .portfolio-showcase--grid .portfolio-showcase__track {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: var( --ps-gap);
    }
}


@media screen and (max-width: 1150px) {
    .portfolio-showcase {
        --ps-gap: 20px 15px;
    }
    .portfolio-showcase__filters {
        gap: 10px !important;
    }

    body .portfolio-showcase__filter-select {
        font-size: 14.5px !important;
        line-height: 1.3 !important;
        padding: 18px 20px !important;
    }
    body .portfolio-showcase__filters {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }
    .portfolio-showcase__filters:before {
        margin-bottom: 5px;
    }
    
}

@media screen and (max-width: 999px) {
    .portfolio-showcase--grid .portfolio-showcase__track {
        grid-template-columns: 1fr 1fr;
    }
}


@media screen and (max-width: 690px) {
    .portfolio-showcase--grid .portfolio-showcase__track {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .portfolio-showcase__card {
        flex-direction: column;
    }
    body .portfolio-showcase__filters {
        display: grid;
        grid-template-columns: 1fr;
    }
    body .row .portfolio-showcase__load-more, .portfolio-showcase__load-more {
    width: 100%;
}

    .portfolio-showcase__media-panel {
    padding-bottom: 100vw;
    max-height: 200px;
}

.portfolio-showcase__more {
    margin-top: 35px;
}
}

/* ---- Filters ---- */
.portfolio-showcase__filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ps-gap);
    margin-bottom: 35px;
    padding-top: 5px;
}

.portfolio-showcase__filter {
    position: relative;
    display: block;
    min-width: 0;
    flex: 1;
}

.portfolio-showcase__filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    max-width: 100%;
    padding: 20px 22px !important;
    padding-right: 60px !important;
    border: 1px solid var(--ps-hairline) !important;
    border-radius: calc(var(
    --border-radius-value) / 1.5);
    background-color: var(
    --ps-panel-bg);
    color: var(
    --nectar-extra-color-4);
    font-size: 15px !important;
    line-height: 1.1 !important;
    cursor: pointer;
    /* Chevron */
    background-image: url(
    "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23726658' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.45em center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body .portfolio-showcase__filter-select {
    padding: 18px 20px !important;
    font-size: 14.5px !important;
    padding-right: 70px !important;
}

.portfolio-showcase__filter-select:hover {
    border-color: var(--ps-accent);
}

.portfolio-showcase__filter-select:focus-visible {
    outline: none;
    border-color: var(--ps-accent);
    box-shadow: 0 0 0 3px var(--faded-bg, #7266581f);
}

/* ---- AJAX loading + enter transitions ---- */
.portfolio-showcase__track {
    transition: opacity 0.3s ease;
}

.portfolio-showcase.is-loading .portfolio-showcase__track {
    opacity: 0.3;
    pointer-events: none;
}

.portfolio-showcase.is-loading .portfolio-showcase__filters {
    opacity: 0.6;
    pointer-events: none;
}

.portfolio-showcase__card.is-entering {
    opacity: 0;
    transform: translateY(14px);
}

.portfolio-showcase__card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.5s ease;
}

.portfolio-showcase__empty {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--nectar-accent-color);
    font-size: 1.5rem;
    line-height: 1.3;
}

/* ---- Load more ---- */
.portfolio-showcase__more {
    display: flex;
    justify-content: center;
    margin-top: 45px;
}

body .row .portfolio-showcase__load-more,
.portfolio-showcase__load-more {
    display: inline-flex;
    gap: 0.5rem;
    padding: var(--button-padding);
    border: none !important;
    border-radius: 999px;
    background: var(--nectar-extra-color-4);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
    justify-content: center;
}

.portfolio-showcase__load-more:hover {
    background: var(--ps-accent);
    color: #fff;
}

.portfolio-showcase__load-more.is-loading {
    opacity: 0.6;
    cursor: default;
}

.portfolio-showcase__load-more.is-loading .portfolio-showcase__load-more-label::after {
    content: '…';
}

/* ---- Numbered pagination ---- */
.portfolio-showcase__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: clamp(1.5rem, 2.5vw, 2.5rem);
}

body .row .portfolio-showcase__page,
.portfolio-showcase__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.6em;
    border: 1px solid var(--ps-hairline);
    border-radius: 10px;
    background: var(--ps-panel-bg);
    color: var(--ps-ink);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.portfolio-showcase__page:hover {
    border-color: var(--ps-accent);
}

.portfolio-showcase__page.is-active {
    background: var(--ps-accent);
    border-color: var(--ps-accent);
    color: #fff;
    cursor: default;
}


/* 479 */

@media screen and (max-width: 479px) {
    .portfolio-showcase__quote-panel {
        padding: 20px;
    }

    .portfolio-showcase__texture {
        border-radius: 7.5px;
    }
body .portfolio-showcase__filter-select {
    padding: 16px 18px !important;
    font-size: 14px !important;
}
    
    .portfolio-showcase__media-panel {
        min-height: 395px;
    }

    body .row .portfolio-showcase__load-more, .portfolio-showcase__load-more {
        width: 100%;
        text-align: center;
    }
    .portfolio-showcase__more {
        margin-top:35px;
    }
}


@media (prefers-reduced-motion: reduce) {
    .portfolio-showcase__slide,
    .portfolio-showcase__image,
    .portfolio-showcase__card,
    .portfolio-showcase__track {
        transition: none;
    }

    .portfolio-showcase__card.is-entering {
        transform: none;
    }

    .portfolio-showcase__card:hover {
        transform: none;
    }

    .portfolio-showcase__card:hover .portfolio-showcase__slide.is-active .portfolio-showcase__image {
        transform: none;
    }
}
