
.wpa-featured-showcase {
    width: 100%;
    background: #083243;
    padding: 80px 6%;
    font-family: 'Barlow', sans-serif;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the layout */
}
.wpa-featured-showcase * { box-sizing: border-box; }

/* Header */
.wpa-featured-kicker { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.15em; color: #8bbc45; margin-bottom: 16px; text-align: center; }
.wpa-featured-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: clamp(42px, 5vw, 76px); line-height: 0.95; text-transform: uppercase; color: #fff; letter-spacing: -1px; margin-bottom: 16px; text-align: center; }
.wpa-featured-title span { color: #f8a722; }

/* Description Under Title */
.wpa-featured-description {
    text-align: center;
    color: #a8b8c7;
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

.wpa-featured-body { 
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08); 
    padding-top: 48px; 
}

/* Empty state */
.wpa-featured-empty { text-align: center; padding: 100px 20px; background: rgba(255,255,255,0.03); border-radius: 12px; max-width: 1200px; margin: 0 auto; }
.wpa-featured-empty p { font-size: 1.1rem; color: #cccccc; margin: 0; font-weight: 500; }

/* Scrollable Container */
.wpa-featured-showcase .wpa-entries-scroll-wrapper {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important; 
    max-height: 730px; /* Sized for exactly 2 rows on desktop */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 10px;
    overscroll-behavior: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    
    scrollbar-width: thin !important;
    scrollbar-color: #8bbc45 #0c2a42 !important;
}

.wpa-featured-showcase .wpa-entries-scroll-wrapper::-webkit-scrollbar { 
    width: 7px !important; 
    display: block !important;
}
.wpa-featured-showcase .wpa-entries-scroll-wrapper::-webkit-scrollbar-track { 
    background: #082638 !important; 
    border-radius: 4px !important; 
}
.wpa-featured-showcase .wpa-entries-scroll-wrapper::-webkit-scrollbar-thumb { 
    background-color: #8bbc45 !important; 
    border-radius: 4px !important; 
    border: 1px solid rgba(255,255,255,0.15) !important;
}

/* Grid Styles - protected against theme overrides */
.wpa-featured-showcase .wpa-entries-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important; 
    width: 100% !important;
    box-sizing: border-box !important;
    touch-action: pan-y !important;
}

/* Card Styles */
.wpa-featured-showcase .wpa-premium-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    background: #0c2a42 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    position: relative !important;
    aspect-ratio: 4/5 !important; 
    box-sizing: border-box !important;
    touch-action: pan-y !important;
}

.wpa-card-image-wrap {
    display: block;
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    touch-action: pan-y !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer;
}

.wpa-card-img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.wpa-premium-card:hover .wpa-card-img {
    transform: scale(1.08); 
}

/* Text Overlay on Thumbnail */
.wpa-card-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(7, 31, 50, 0.95) 0%, rgba(7, 31, 50, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
    pointer-events: none;
}

.wpa-card-title { margin: 0 0 6px 0 !important; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.2; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.wpa-card-author { margin: 0 !important; color: #e0e0e0; font-size: 14px; font-weight: 500; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.wpa-card-author span { color: #8bbc45; font-weight: 600; }

/* Hover Icon Effect */
.wpa-card-hover-fx {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 3;
    background: rgba(248, 167, 34, 0.8);
    border-radius: 50%;
    padding: 14px;
    display: flex;
    pointer-events: none;
}
.wpa-premium-card:hover .wpa-card-hover-fx {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Lightbox Styles */
.wpa-premium-lightbox {
    display: none;
    position: fixed !important;
    z-index: 99999999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow', sans-serif;
}
.wpa-premium-lightbox.is-open {
    display: flex !important;
}
.wpa-lightbox-backdrop{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(7,31,50,0.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
.wpa-lightbox-close{position:absolute;top:25px;right:35px;color:#fff;font-size:40px;font-weight:300;cursor:pointer;line-height:1;z-index:2;transition:transform 0.2s ease,color 0.2s ease;}
.wpa-lightbox-close:hover{transform:scale(1.1);color:#f8a722;}
.wpa-lightbox-content-wrapper{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;max-width:90vw;max-height:95vh;animation:wpaFadeUp 0.4s cubic-bezier(0.16,1,0.3,1) forwards;}
.wpa-lightbox-img-container{position:relative;display:inline-block;line-height:0;}
#wpa-lightbox-img{display:block;max-width:90vw;max-height:75vh;border-radius:4px;box-shadow:0 20px 50px rgba(0,0,0,0.5);object-fit:contain;}
/* line-height must be reset: .wpa-lightbox-img-container sets line-height:0 to
   kill the inline-image gap, and the caption inherits it. With zero line height
   a caption that wraps to two lines paints both lines on the same baseline -
   that is the "names printed on top of each other" bug. */
.wpa-lightbox-caption-bar{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;line-height:1.4;background:rgba(7,31,50,0.7);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:1px solid rgba(255,255,255,0.1);border-radius:0 0 4px 4px;}
/* min-width:0 lets this flex item actually shrink (flex items default to
   min-width:auto, so a long title/name overflowed and printed straight over
   the "Women Photography Awards" label). It ellipsises instead. */
.wpa-lightbox-caption-author{font-size:13px;font-weight:500;color:#fff;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#wpa-lightbox-title{font-weight:700;color:#fff;}
.wpa-lightbox-caption-label{color:#cccccc;font-weight:500;margin:0 4px;}
#wpa-lightbox-author{font-weight:600;user-select:none;-webkit-user-select:none;-ms-user-select:none;}
.wpa-lightbox-caption-brand{font-size:12px;color:#f8a722;text-transform:uppercase;letter-spacing:0.12em;font-weight:700;white-space:nowrap;flex:0 0 auto;}

/* Prev / next gallery navigation */
.wpa-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:3;display:none;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:1px solid rgba(255,255,255,0.18);border-radius:50%;background:rgba(7,31,50,0.55);color:#fff;cursor:pointer;transition:background 0.2s ease,color 0.2s ease,border-color 0.2s ease;-webkit-tap-highlight-color:transparent;}
.wpa-premium-lightbox.is-open.has-nav .wpa-lightbox-nav{display:flex;}
.wpa-lightbox-nav:hover{background:rgba(248,167,34,0.9);border-color:transparent;color:#071f32;}
.wpa-lightbox-nav svg{pointer-events:none;}
.wpa-lightbox-prev{left:24px;}
.wpa-lightbox-next{right:24px;}

@keyframes wpaFadeUp{from{opacity:0;transform:translateY(20px) scale(0.98);}to{opacity:1;transform:translateY(0) scale(1);}}

/* Responsive Breakpoints */
@media (max-width: 1024px) { 
    .wpa-featured-showcase .wpa-entries-grid { 
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important; 
        gap: 14px !important;
    } 
    .wpa-featured-showcase .wpa-entries-scroll-wrapper {
        max-height: 710px !important;
    }
}

@media (max-width: 768px) { 
    .wpa-featured-showcase {
        padding: 50px 4% !important;
    }
    .wpa-featured-description { 
        padding: 0 16px; 
        font-size: 1rem; 
        margin-bottom: 30px;
    }
    .wpa-featured-showcase .wpa-entries-grid { 
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
        gap: 12px !important;
        width: 100% !important;
    }
    .wpa-featured-showcase .wpa-premium-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        aspect-ratio: 4/5 !important;
    }
    /* Scrollable box: 2 columns x 3 rows visible, the rest scroll inside it.
       The fallback calc assumes the showcase padding for this breakpoint; JS
       replaces it with the measured height via --wpa-mobile-box-height.
       overscroll-behavior stays auto so reaching the end of the box hands the
       scroll back to the page instead of trapping it. */
    .wpa-featured-showcase .wpa-entries-scroll-wrapper {
        max-height: var(--wpa-mobile-box-height, calc((92vw - 12px) * 1.875 + 24px)) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 6px !important;
        overscroll-behavior: auto !important;
        -webkit-overflow-scrolling: touch !important;
        /* Reserve the scrollbar track up front. Without it the scrollbar appears
           only once the box is capped, which narrows the columns, which shortens
           the rows - so the measured 3-row height and the rendered one disagree. */
        scrollbar-gutter: stable !important;
    }
    .wpa-card-title {
        font-size: 16px !important;
    }
    .wpa-card-text-overlay {
        padding: 24px 12px 12px !important;
    }
    .wpa-lightbox-caption-bar{padding:10px 14px;gap:10px;}
    .wpa-lightbox-caption-author,.wpa-lightbox-caption-brand{font-size:11px;}

    /* Too little room for both: show the photographer only, drop the entry title */
    .wpa-lightbox-caption-title,
    .wpa-lightbox-caption-label{display:none;}

    /* Swipe is the primary way to move through the gallery on touch, and the
       arrows would sit on top of the photo at this width. */
    .wpa-premium-lightbox.is-open.has-nav .wpa-lightbox-nav{display:none;}
}

@media (max-width: 540px) { 
    .wpa-featured-showcase { 
        padding: 36px 12px !important; 
    } 
    .wpa-featured-title {
        font-size: 34px !important;
        margin-bottom: 12px !important;
    }
    .wpa-featured-description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 22px !important;
    }
    .wpa-featured-body {
        padding-top: 20px !important;
    }
    /* Strictly enforce 2 columns side-by-side on mobile, overriding any theme block styles */
    .wpa-featured-showcase .wpa-entries-grid { 
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
        gap: 8px !important;
        width: 100% !important;
    } 
    .wpa-featured-showcase .wpa-premium-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        aspect-ratio: 4/5 !important;
    }
    /* Scrollable box: 2 columns x 3 rows visible, the rest scroll inside it.
       The fallback calc assumes the showcase padding for this breakpoint; JS
       replaces it with the measured height via --wpa-mobile-box-height.
       overscroll-behavior stays auto so reaching the end of the box hands the
       scroll back to the page instead of trapping it. */
    .wpa-featured-showcase .wpa-entries-scroll-wrapper {
        max-height: var(--wpa-mobile-box-height, calc((100vw - 32px) * 1.875 + 16px)) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 6px !important;
        overscroll-behavior: auto !important;
        -webkit-overflow-scrolling: touch !important;
        /* Reserve the scrollbar track up front. Without it the scrollbar appears
           only once the box is capped, which narrows the columns, which shortens
           the rows - so the measured 3-row height and the rendered one disagree. */
        scrollbar-gutter: stable !important;
    }
    .wpa-card-text-overlay {
        padding: 16px 8px 8px !important;
    }
    .wpa-card-title {
        font-size: 13px !important;
        line-height: 1.15 !important;
        margin-bottom: 2px !important;
    }
    .wpa-card-author {
        font-size: 10.5px !important;
    }
    .wpa-card-hover-fx {
        padding: 6px !important;
    }
    .wpa-card-hover-fx svg {
        width: 16px !important;
        height: 16px !important;
    }
    .wpa-scroll-hint {
        margin-top: 10px;
        font-size: 10.5px;
    }
}

/* Floating Scroll Indicator Hint (Desktop only) */
.wpa-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 700;
    color: #8bbc45;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: wpaScrollBounce 2s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.wpa-scroll-hint-icon {
    font-size: 15px;
    font-weight: 900;
    display: inline-block;
}
@keyframes wpaScrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}
