/* ============================================================
   Project Card
   ============================================================ */
.pgw-card {
    display: block;
    position: relative;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
}

a.pgw-card-link {
    cursor: pointer;
}

.pgw-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--pgw-aspect, 4/3);
}

.pgw-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.pgw-card.pgw-hover-zoom:hover .pgw-image {
    transform: scale(1.06);
}

.pgw-card.pgw-hover-dim .pgw-image {
    opacity: 0.9;
}

.pgw-card.pgw-hover-dim:hover .pgw-image {
    opacity: 0.65;
}

.pgw-card.pgw-image-darken .pgw-image {
    filter: brightness(0.82) saturate(1.1);
}

.pgw-content {
    padding: 16px 4px 8px;
}

/* ── Overlay mode: text on top of the image, gradient band ── */
.pgw-content-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 28px 22px;
    background: linear-gradient(
        to top,
        var(--pgw-band-color, rgba(10, 10, 10, 0.88)) 0%,
        var(--pgw-band-mid, rgba(10, 10, 10, 0.55)) var(--pgw-band-mid-pos, 55%),
        var(--pgw-band-top, transparent) 100%
    );
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pgw-content-overlay .pgw-title,
.pgw-content-overlay .pgw-meta {
    color: #ffffff;
}

/* ── Pill row: Tag Label + Status Badge ── */
.pgw-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.pgw-overline {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* padding, border, radius, background are set by the widget's Style controls */
}

.pgw-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
    /* padding, border, radius, background are set by the widget's Style controls */
}

.pgw-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.25;
}

.pgw-meta {
    font-size: 14px;
}

/* ── Hover Mark (circular icon, centered on the image) ── */
.pgw-mark {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 22px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.pgw-card:hover .pgw-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.pgw-arrow {
    position: absolute;
    bottom: 14px;
    right: 4px;
    font-size: 16px;
    pointer-events: none;
}

/* Hidden by the filter script */
.pgw-card.pgw-hidden,
.elementor-widget-project_card.pgw-hidden {
    display: none !important;
}

/* ============================================================
   Project Filter
   ============================================================ */
.pgw-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.pgw-filter-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
}

.pgw-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pgw-filter-count {
    font-size: 13px;
    opacity: 0.7;
    margin-left: auto;
	color: #fff;
}

.pgw-filter-btn {
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    /* border, radius, padding, font are set by the widget's Style controls */
}

.pgw-filter-noresults {
    display: none;
    padding: 40px 0;
    text-align: center;
    opacity: 0.7;
}

.pgw-filter-noresults.pgw-visible {
    display: block;
}

/* ============================================================
   Lightbox overlay (Card Link = Lightbox mode)
   ============================================================ */
.pgw-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

.pgw-lightbox-overlay.pgw-lightbox-open {
    display: flex;
}

body.pgw-lightbox-locked {
    overflow: hidden;
}

.pgw-lightbox-box {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.pgw-lightbox-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.pgw-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #43695B;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    padding: 0;
    transition: background 0.2s ease;
}

.pgw-lightbox-close:hover {
    background: #365547;
}

@media (max-width: 767px) {
    .pgw-lightbox-overlay { padding: 0; }
    .pgw-lightbox-box     { max-width: 100%; border-radius: 0; }
    .pgw-lightbox-close   { top: 10px; right: 10px; }
}

/* ============================================================
   Gallery Lightbox (Card Link = Gallery mode)
   ============================================================ */
.pgw-gallery-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

.pgw-gallery-overlay.pgw-gallery-open {
    display: flex;
}

.pgw-gallery-box {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgw-gallery-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}

.pgw-gallery-close,
.pgw-gallery-prev,
.pgw-gallery-next {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #43695B;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    padding: 0;
    transition: background 0.2s ease;
}

.pgw-gallery-close:hover,
.pgw-gallery-prev:hover,
.pgw-gallery-next:hover {
    background: #365547;
}

.pgw-gallery-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
}

.pgw-gallery-prev,
.pgw-gallery-next {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 24px;
}

.pgw-gallery-prev { left: 12px; }
.pgw-gallery-next { right: 12px; }

.pgw-gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 999px;
}

@media (max-width: 767px) {
    .pgw-gallery-overlay { padding: 16px; }
    .pgw-gallery-prev,
    .pgw-gallery-next    { width: 36px; height: 36px; font-size: 20px; }
}
