/* ── Portfolio Filter Plugin ── */

.pf-portfolio {
    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ── Controls bar ── */
.pf-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 16px;
}

/* ── Dropdown ── */
.pf-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pf-industry-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 9px 36px 9px 14px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    min-width: 200px;
    transition: border-color 0.2s;
}

.pf-industry-select:focus {
    outline: none;
    border-color: #e84040;
}

.pf-dropdown-arrow {
    position: absolute;
    right: 12px;
    pointer-events: none;
    font-size: 11px;
    color: #666;
}

/* ── Service Tabs ── */
.pf-service-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-tab {
    background: transparent;
    border: none;
    padding: 9px 18px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.pf-tab:hover {
    color: #e84040;
}

.pf-tab.active {
    background: #e84040;
    color: #fff;
    font-weight: 600;
}

/* ── Grid ── */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.pf-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.pf-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.pf-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.pf-item.pf-hidden {
    display: none;
}

/* ── No results ── */
.pf-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 15px;
    width: 100%;
}

/* ── Lightbox ── */
.pf-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.pf-lightbox.active {
    display: flex;
}

.pf-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.pf-lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}

#pf-lightbox-img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.pf-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    transition: opacity 0.2s;
}

.pf-lightbox-close:hover { opacity: 0.7; }

.pf-lightbox-prev,
.pf-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    padding: 14px 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    z-index: 2;
}

.pf-lightbox-prev { left: 16px; }
.pf-lightbox-next { right: 16px; }

.pf-lightbox-prev:hover,
.pf-lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .pf-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .pf-industry-select {
        width: 100%;
        min-width: unset;
    }

    .pf-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .pf-lightbox-prev { left: 6px; }
    .pf-lightbox-next { right: 6px; }
}
