/* =============================================================
   Work Portfolio Plugin — work-portfolio.css  v1.1
   ============================================================= */

/* ── Toolbar ─────────────────────────────────────────────── */
.work-portfolio {
    width: 100%;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #181818;
}

.wp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 20px 0 !important;
    flex-wrap: wrap;
}

.wp-toolbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.wp-divider {
    border: none;
    border-top: 1px solid #181818;
    margin: 0 0 20px 0 !important;
}

/* ── View Toggle (GRID / LIST) ───────────────────────────── */
.wp-view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.wp-view-btn {
    display: flex;
    padding: 6px 10px;
    justify-content: center;
    align-items: center;
    border: 1px solid #181818;
    background: transparent;
    color: #181818;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 6px;
}

.wp-view-btn--active,
.wp-view-btn:hover {
    background: #181818;
    color: #F9F8EE;
}

/* ── Tag Chip (active tag filter in toolbar) ─────────────── */
.wp-tag-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border: 1px solid #181818;
    background: #181818;
    color: #F9F8EE;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.04em;
    border-radius: 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.wp-tag-chip__close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #F9F8EE;
    font-size: 11px;
    line-height: 1;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #F9F8EE;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.wp-tag-chip__close:hover {
    background: #F9F8EE;
    color: #000;
}

/* ── Filter Buttons (categories only) ───────────────────── */
.wp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.wp-filter-btn {
    display: flex;
    padding: 6px 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #181818;
    background: transparent;
    color: #181818;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 6px;
}

.wp-filter-btn--active,
.wp-filter-btn:hover {
    background: #181818;
    color: #F9F8EE;
}

/* ── Filter Dropdown (mobile only) ──────────────────────── */
.wp-filter-select {
    display: none;
    appearance: none;
    -webkit-appearance: none;
    padding: 6px 28px 6px 10px;
    border: 1px solid #181818;
    border-radius: 6px;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23181818' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: #181818;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.04em;
    cursor: pointer;
}

@media (max-width: 480px) {
    .wp-filters {
        display: none;
    }

    .wp-filter-select {
        display: block;
    }
}

/* ── Pills on posts ──────────────────────────────────────── */
.wp-item__pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
}

.wp-item__pills .wp-pill {
    display: inline-flex !important;
    padding: 6px !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    color: #181818 !important;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 11px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: normal !important;
    border: 1px solid #181818 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    background: transparent !important;
    margin: 0 !important;
}

.wp-item__pills .wp-pill:hover {
    background: #181818 !important;
    color: #F9F8EE !important;
}

/* Clickable pills */
.wp-item__pills .wp-pill--cat,
.wp-item__pills .wp-pill--tag {
    cursor: pointer !important;
}

/* ── Title group (client + title) ───────────────────────── */
.wp-item__title-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: 1;
}

.wp-item__client {
    display: block;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1;
    color: #181818;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

/* ── Items Container ─────────────────────────────────────── */
.wp-items {
    width: 100%;
}

/* ── GRID VIEW ───────────────────────────────────────────── */
.wp-items--grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
}

/* Tablet portrait (~768px): 2 columns */
@media (max-width: 768px) {
    .wp-items--grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (~480px): 1 column */
@media (max-width: 480px) {
    .wp-items--grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.wp-item--grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wp-item--grid .wp-item__media-link {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.wp-item--grid .wp-item__media {
    width: 100%;
    height: 100%;
}

.wp-item--grid .wp-item__media img,
.wp-item--grid .wp-item__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.wp-item--grid .wp-item__media-link:hover img,
.wp-item--grid .wp-item__media-link:hover video {
    opacity: 0.88;
}

.wp-item--grid .wp-item__title {
    display: block;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1;
    color: #181818;
    text-decoration: none;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.wp-item--grid .wp-item__summary {
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    color: #181818;
    margin: 0;
    text-transform: uppercase;
}

.wp-item--grid .wp-item__pills {
    gap: 4px;
    margin-top: 4px;
}

/* ── LIST VIEW ───────────────────────────────────────────── */
.wp-items--list {
    display: flex;
    flex-direction: column;
}

/* Desktop + tablet landscape: image | title | summary | pills */

.wp-item--list:first-child {
    padding: 0 !important;
}

.wp-item--list:last-child {
    border-bottom: 0     !important;
}

.wp-item--list {
    display: grid;
    grid-template-columns: 200px 1fr 2fr 2fr;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Tablet portrait: image | title — summary below, pills below */
@media (max-width: 768px) {
    .wp-item--list {
        grid-template-columns: 160px 1fr;
        grid-template-rows: auto auto auto;
        align-items: start;
        gap: 0 16px;
    }

    .wp-item--list .wp-item__media-link {
        grid-column: 1;
        grid-row: 1 / 4;
        width: 160px;
    }

    .wp-item--list .wp-item__title-group {
        grid-column: 2;
        grid-row: 1;
        padding-top: 4px;
    }

    .wp-item--list .wp-item__summary {
        grid-column: 2;
        grid-row: 2;
        padding-top: 8px;
    }

    .wp-item--list .wp-item__pills {
        grid-column: 2;
        grid-row: 3;
        justify-content: flex-start;
        padding-top: 10px;
    }
}

/* Mobile: fully stacked single column */
@media (max-width: 480px) {
    .wp-item--list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px 0;
    }

    .wp-item--list .wp-item__media-link {
        width: 100%;
    }

    .wp-item--list .wp-item__pills {
        justify-content: flex-start;
    }
}

.wp-item--list .wp-item__media-link {
    display: block;
    width: 200px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
}

.wp-item--list .wp-item__media {
    width: 100%;
    height: 100%;
}

.wp-item--list .wp-item__media img,
.wp-item--list .wp-item__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.wp-item--list .wp-item__media-link:hover img,
.wp-item--list .wp-item__media-link:hover video {
    opacity: 0.88;
}

.wp-item--list .wp-item__title {
    display: block;
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    color: #181818;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0;
    padding: 0;
}

.wp-item--list .wp-item__summary {
    font-family: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: #181818;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wp-item--list .wp-item__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

/* ── No media placeholder ────────────────────────────────── */
.wp-no-media {
    width: 100%;
    height: 100%;
    background: #e8e8e6;
}

/* ── Loading state ───────────────────────────────────────── */
.wp-items.is-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.15s ease;
}