/* =========================================================================
   PORTFOLIO IMAGE SLIDER + LIGHTBOX — assets/css/portfolio-slider.css
   Used by the Marketing Results cards on portfolio.php to slide through the
   ad-account / store-dashboard screenshots in assets/images/portfolio/
   main-stats/ and assets/images/portfolio/stats/.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. SLIDER SHELL (drops into the existing .pf-card-visual slot)
   ------------------------------------------------------------------------- */
.pf-slider {
    background: linear-gradient(135deg, #f3f5fb 0%, #e7ebf6 100%);
    cursor: zoom-in;
}
/* Featured / "main stats" slider gets a little more room so the dense
   campaign-manager tables stay readable. */
.pf-slider-main { height: 300px; }

/* Full-width "Main Stats" / "All Stats" showcase sliders (portfolio.php) —
   the whole slider IS the section, so give it real room to breathe. */
.pf-slider-featured { height: 520px; }
@media (max-width: 980px) {
    .pf-slider-featured { height: 400px; }
}
@media (max-width: 640px) {
    .pf-slider-featured { height: 280px; }
}

.pf-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.pf-slider-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* object-fit: contain -> the FULL screenshot is always shown, never cropped */
.pf-slider-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    -webkit-user-drag: none;
    user-select: none;
}

/* -------------------------------------------------------------------------
   2. ARROWS
   ------------------------------------------------------------------------- */
.pf-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 23, 0.45);
    color: #fff;
    border: none;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.pf-slider:hover .pf-slider-arrow { opacity: 1; }
.pf-slider-arrow:hover { background: rgba(37, 99, 235, 0.85); }
.pf-slider-arrow:active { transform: translateY(-50%) scale(0.92); }
.pf-slider-prev { left: 12px; }
.pf-slider-next { right: 12px; }
.pf-slider-arrow svg { width: 16px; height: 16px; pointer-events: none; }

@media (max-width: 640px) {
    /* No hover on touch devices — keep arrows visible so they're discoverable */
    .pf-slider-arrow { opacity: 1; width: 30px; height: 30px; }
}

/* -------------------------------------------------------------------------
   3. DOTS
   ------------------------------------------------------------------------- */
.pf-slider-dots {
    position: absolute;
    left: 0; right: 0;
    bottom: 12px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.pf-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(15, 17, 23, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}
.pf-slider-dot.active {
    width: 18px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5), 0 2px 6px rgba(15, 17, 23, 0.25);
}

/* -------------------------------------------------------------------------
   4. "TAP TO ENLARGE" HINT
   ------------------------------------------------------------------------- */
.pf-slider-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 14px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
    background: rgba(15, 17, 23, 0.55);
    padding: 6px 10px;
    border-radius: 100px;
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.pf-slider:hover .pf-slider-zoom-hint,
.pf-slider:focus-within .pf-slider-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}
.pf-slider-zoom-hint svg { width: 12px; height: 12px; flex-shrink: 0; }

@media (max-width: 640px) {
    /* Always show a compact hint on touch since there's no hover state */
    .pf-slider-zoom-hint { opacity: 1; transform: none; padding: 5px 9px; font-size: 10px; }
}

/* Keep the existing top-left chip readable above the slider */
.pf-slider .pf-card-chip { z-index: 7; }

/* -------------------------------------------------------------------------
   5. LIGHTBOX (fullscreen preview, opens on click / tap)
   ------------------------------------------------------------------------- */
.pf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.pf-lightbox.open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}
.pf-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 10, 15, 0.92);
    backdrop-filter: blur(6px);
}
.pf-lightbox-inner {
    position: relative;
    z-index: 2;
    width: min(94vw, 1200px);
    height: min(88vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    background: #fff;
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.pf-lightbox.open .pf-lightbox-img { transform: scale(1); opacity: 1; }

.pf-lightbox-close {
    position: absolute;
    top: -18px; right: -18px;
    z-index: 4;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #0f1117;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}
.pf-lightbox-close:hover { transform: scale(1.08); }

.pf-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.25s ease, transform 0.2s ease;
}
.pf-lightbox-nav:hover { background: rgba(37, 99, 235, 0.85); }
.pf-lightbox-nav:active { transform: translateY(-50%) scale(0.92); }
.pf-lightbox-prev { left: -8px; }
.pf-lightbox-next { right: -8px; }
.pf-lightbox-nav svg { width: 20px; height: 20px; pointer-events: none; }

.pf-lightbox-counter {
    position: absolute;
    left: 50%;
    bottom: -34px;
    transform: translateX(-50%);
    z-index: 4;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 14px;
    border-radius: 100px;
    backdrop-filter: blur(6px);
}

@media (max-width: 640px) {
    .pf-lightbox-inner { width: 92vw; height: 72vh; }
    .pf-lightbox-close { top: 10px; right: 10px; }
    .pf-lightbox-prev { left: 6px; }
    .pf-lightbox-next { right: 6px; }
    .pf-lightbox-nav { width: 40px; height: 40px; }
    .pf-lightbox-counter { bottom: -30px; }
}
