/* ============================================
   PHOTOSWIPE CUSTOM STYLES
   Clean, Modern, GPU-optimized
   ============================================ */

/* PhotoSwipe Modal */
.pswp {
    z-index: 9999 !important;
}

/* ============================================
   BACKDROP - solid bg, no backdrop-filter
   ============================================ */
.pswp__bg {
    background: rgba(0, 0, 0, 0.93) !important;
}

/* ============================================
   IMAGE STYLES - GPU composited
   ============================================ */
.pswp__img {
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    will-change: transform, opacity;
}

.pswp__container {
    will-change: transform;
}

@keyframes photoSwipeImageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================
   TOP BAR
   ============================================ */
.pswp__top-bar {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 100%) !important;
    padding: 12px 16px !important;
}

/* ============================================
   BUTTONS - BASE (minimal / no background)
   ============================================ */
.pswp__button {
    background: none !important;
    border: none !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    box-shadow: none !important;
    transition: opacity 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    opacity: 0.75;
    will-change: auto;
}

.pswp__button:hover {
    background: none !important;
    box-shadow: none !important;
    opacity: 1;
}

.pswp__button:active {
    background: none !important;
    opacity: 0.6;
}

/* Hide default SVG icons */
.pswp__button svg {
    display: none !important;
}

/* Font Awesome Icons */
.pswp__button::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   CLOSE BUTTON
   ============================================ */
.pswp__button--close {
    background: none !important;
    border: none !important;
}

.pswp__button--close::before {
    content: '\f00d';
    font-size: 20px;
}

.pswp__button--close:hover {
    background: none !important;
    box-shadow: none !important;
    color: #ff6b6b;
}
.pswp__button--close:hover::before {
    color: #ff6b6b;
}

/* ============================================
   ZOOM BUTTON
   ============================================ */
.pswp__button--zoom::before {
    content: '\f00e';
}

.pswp__button--zoom:hover {
    background: none !important;
}

/* ============================================
   NAVIGATION ARROWS
   ============================================ */
.pswp__button--arrow {
    background: none !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    border: none !important;
}

.pswp__button--arrow:hover {
    background: none !important;
}

.pswp__button--arrow--prev::before {
    content: '\f053';
    font-size: 22px;
}

.pswp__button--arrow--next::before {
    content: '\f054';
    font-size: 22px;
}

/* ============================================
   COUNTER
   ============================================ */
.pswp__counter {
    background: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    font-size: 13px !important;
    padding: 6px 10px !important;
    border-radius: 0 !important;
    border: none !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) !important;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.pswp__counter::before {
    content: none;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.pswp__preloader__icn {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
}

/* ============================================
   IMAGE CAPTION
   ============================================ */
.pswp__caption {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    padding: 16px 20px;
}

.pswp__caption__center {
    color: #ffffff;
    font-size: 15px;
    text-align: center;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .pswp__button {
        width: 38px !important;
        height: 38px !important;
    }

    .pswp__button::before {
        font-size: 16px;
    }

    .pswp__button--arrow {
        width: 42px !important;
        height: 42px !important;
    }

    .pswp__button--arrow--prev::before,
    .pswp__button--arrow--next::before {
        font-size: 20px;
    }

    .pswp__button--close {
        width: 38px !important;
        height: 38px !important;
    }

    .pswp__counter {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
}

/* ============================================
   DYNAMIC CAPTION - Custom Styles
   ============================================ */

/* Caption container override */
.pswp__dynamic-caption {
    color: #e8e8e8;
    font-size: 14px;
    line-height: 1.6;
    max-width: 700px;
    width: auto;
}

.pswp__dynamic-caption--below {
    padding: 14px 0 0;
}

.pswp__dynamic-caption--mobile {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    padding: 16px 20px;
    width: 100%;
    max-width: 100%;
}

/* Tag badges inside caption */
.pswp-caption-content {
    text-align: center;
}

.pswp-caption-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
}

.pswp-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.pswp-tag:hover {
    background: rgba(255, 255, 255, 0.22);
}

.pswp-caption-date {
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    margin-top: 4px;
}

.pswp-caption-date i {
    margin-right: 4px;
}

/* Mobile caption adjustments */
@media (max-width: 600px) {
    .pswp-tag {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .pswp-caption-tags {
        gap: 4px;
    }
    
    .pswp-caption-date {
        font-size: 11px;
    }
}
