/* ============================================
   Portfolio Works – Frontend Styles
   Matches the original design exactly
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ---- Reset / Container ---- */
.pwp-mastwrap *,
.pwp-mastwrap *::before,
.pwp-mastwrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Override any theme link colors inside plugin */
.pwp-mastwrap a,
.pwp-mastwrap a:link,
.pwp-mastwrap a:visited {
    color: inherit;
    text-decoration: none !important;
    border-bottom: none !important;
}

.pwp-mastwrap {
    font-family: 'Raleway', sans-serif;
    background: #f4f4f4;
    width: 100%;
}

.pwp-page-content {
    padding: 0;
}

.pwp-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* ---- Filter Nav ---- */
.pwp-filter-wrap {
    background: #fafafa;
    padding: 28px 20px;
    text-align: center;
    margin-bottom: 0;
}

.pwp-filter {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pwp-filter li {
    display: flex;
    align-items: center;
}

.pwp-filter li + li::before {
    content: '/';
    color: #aaa;
    padding: 0 14px;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.1em;
}

.pwp-filter a,
.pwp-filter a:link,
.pwp-filter a:visited,
.pwp-filter a:hover,
.pwp-filter a:active,
.pwp-filter a:focus {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #aaa !important;
}

.pwp-filter a span {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 5px;
    color: #000000;
    background: transparent;
    transition: color 0.2s, background 0.2s;
}

.pwp-filter a:hover span {
    color: #fff85f !important;
    background: transparent !important;
}

.pwp-filter a.active span {
    color: #000000 !important;
    background: #ffffff !important;
    border-bottom: none !important;
    padding-bottom: 4px;
}

/* ---- Works Grid ---- */
.pwp-works-container {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    background: #e8e8e8;
    gap: 3px;
    padding: 3px;
}

/* ---- Works Item ---- */
.pwp-works-item {
    position: relative;
    width: calc(33.333% - 2px);
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.pwp-works-item .pwp-thumb {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* No-image placeholder */
.pwp-works-item .pwp-no-image {
    display: block;
    width: 100%;
    height: 320px;
    background: #ddd;
}

.pwp-vbox-main {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-decoration: none;
}

.pwp-works-item:hover .pwp-vbox-main {
    opacity: 1;
}

.pwp-works-item:hover .pwp-thumb {
    transform: scale(1.03);
}

.pwp-item-inner {
    text-align: center;
    padding: 20px;
}

.pwp-item-inner h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 10px;
}

.pwp-item-inner p {
    margin: 0;
}

.pwp-tags {
    display: inline-block;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
}

/* Hidden gallery list */
.pwp-gallery-links {
    display: none;
}

/* ---- Filter Animation ---- */
.pwp-works-item {
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.pwp-works-item.pwp-hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .pwp-works-item { width: calc(50% - 2px); }
    .pwp-works-item .pwp-thumb { height: 240px; }
}

@media (max-width: 560px) {
    .pwp-works-item { width: 100%; }
    .pwp-works-item .pwp-thumb { height: 220px; }
    .pwp-filter a { font-size: 10px; letter-spacing: 0.12em; }
    .pwp-filter li + li::before { padding: 0 8px; }
}

/* ============================================
   LIGHTBOX – matches original design
============================================ */
.pwp-lb-overlay {
    position: fixed;
    inset: 0;
    background: #e8e8e8;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.pwp-lb-overlay.pwp-lb-active {
    display: flex;
}

.pwp-lb-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.pwp-lb-content {
    background: #fff;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    max-height: 85vh;
    width: 100%;
}

.pwp-lb-img {
    max-width: 100%;
    max-height: calc(85vh - 40px);
    object-fit: contain;
    display: block;
    animation: pwpSlideIn 0.2s ease;
}

@keyframes pwpSlideIn {
    from { opacity:0; transform:scale(0.97); }
    to   { opacity:1; transform:scale(1); }
}

/* Counter – top left */
.pwp-lb-counter {
    position: absolute;
    top: 16px;
    left: 20px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.05em;
}

/* Close button – top right dark box */
.pwp-lb-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #222;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pwp-lb-close:hover { background: #000; }

/* Prev / Next arrows */
.pwp-lb-prev,
.pwp-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #555;
    font-size: 52px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 10px 14px;
    transition: color 0.2s, transform 0.2s;
}

.pwp-lb-prev { left: 10px; }
.pwp-lb-next { right: 10px; }

.pwp-lb-prev:hover { color: #111; transform: translateY(-50%) translateX(-3px); }
.pwp-lb-next:hover { color: #111; transform: translateY(-50%) translateX(3px); }

.pwp-lb-wrap .pwp-lb-prev { background: transparent !important; }
.pwp-lb-wrap .pwp-lb-next { background: transparent !important; }

.pwp-lb-wrap .pwp-lb-prev:hover { background: transparent !important; }
.pwp-lb-wrap .pwp-lb-next:hover { background: transparent !important; }

@media (max-width: 600px) {
    .pwp-lb-wrap { padding: 50px 40px; }
    .pwp-lb-prev { left: 2px; font-size: 36px; }
    .pwp-lb-next { right: 2px; font-size: 36px; }
    .pwp-lb-content { padding: 10px; }
}
