/* Lightbox thumbnail strip — edit this file directly (no npm required). Loaded after style.css. */

.mfp-with-gallery-thumbs .mfp-container {
    padding-bottom: 160px;
    box-sizing: border-box;
}

@media (max-height: 700px) {
    .mfp-with-gallery-thumbs .mfp-container {
        padding-bottom: 130px;
    }
}

.mfp-with-gallery-thumbs .mfp-counter {
    display: none !important;
}

.mfp-with-gallery-thumbs .mfp-content {
    /* max-width: 1100px; */
    width: 46%;
    margin-left: auto;
    margin-right: auto;
    /* Use clamp to ensure the margin doesn't push the image off-screen on small heights */
    margin-top: clamp(20px, 10vh, 120px) !important;
}

.mfp-with-gallery-thumbs .mfp-figure {
    border: 4px solid #fff;
    border-radius: 15px;
    background: #111;
    padding: 15px; /* Smaller padding for mobile */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh; /* Lower min-height for small screens */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

@media (min-width: 768px) {
    .mfp-with-gallery-thumbs .mfp-figure {
        border-radius: 20px;
        padding: 30px;
        min-height: 60vh;
    }
}

.mfp-with-gallery-thumbs .mfp-figure figure {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.mfp-with-gallery-thumbs .mfp-image-holder .mfp-img {
    max-height: 55vh !important;
    width: auto !important;
    max-width: 100%;
    border-radius: 6px;
    padding: 0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mfp-gallery-thumb-strip {
    position: fixed;
    bottom: 20px; /* Closer to bottom on small screens */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 46%;
    /* max-width: 1100px; */
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    background: #111;
    border: 4px solid #fff;
    border-radius: 15px;
    pointer-events: auto;
    box-sizing: border-box;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

@media (min-width: 768px) {
    .mfp-gallery-thumb-strip {
        bottom: 30px;
        gap: 12px;
        padding: 16px 20px;
        border-radius: 20px;
    }
}

.mfp-gallery-thumb-btn {
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    opacity: 0.42;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 0;
}

.mfp-gallery-thumb-btn:hover,
.mfp-gallery-thumb-btn:focus-visible {
    opacity: 0.72;
    outline: none;
}

.mfp-gallery-thumb-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.mfp-gallery-thumb-btn.is-active {
    opacity: 1;
    transform: scale(1.06);
}

.mfp-gallery-thumb-img-wrap {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mfp-gallery-thumb-btn.is-active .mfp-gallery-thumb-img-wrap {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.mfp-gallery-thumb-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 576px) {
    .mfp-gallery-thumb-img-wrap {
        width: 64px;
        height: 64px;
    }

    .mfp-with-gallery-thumbs .mfp-container {
        padding-bottom: 180px;
    }
}

/* Custom Magnific Popup Arrows to match Slick Arrows - Robust Version */
.mfp-with-gallery-thumbs .mfp-arrow {
    position: fixed !important;
    top: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 50px !important;
    height: 50px !important;
    background-color: #12458b !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 2000000 !important;
    opacity: 1 !important;
    display: block !important; /* Use block with absolute child for perfect centering */
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    color: transparent !important;
    line-height: 0 !important;
    font-size: 0 !important;
    overflow: hidden !important;
}

.mfp-with-gallery-thumbs .mfp-arrow:hover,
.mfp-with-gallery-thumbs .mfp-arrow:focus {
    background-color: #12458b !important;
    opacity: 0.9 !important;
    transform: scale(1.1) !important;
}

.mfp-with-gallery-thumbs .mfp-arrow-left {
    left: 25px !important;
}

.mfp-with-gallery-thumbs .mfp-arrow-right {
    right: 25px !important;
}

/* Hard reset for Magnific Popup's default pseudo-elements */
.mfp-with-gallery-thumbs .mfp-arrow:before,
.mfp-with-gallery-thumbs .mfp-arrow:after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    opacity: 1 !important;
}

/* Custom Triangle Arrows centered within the button */
.mfp-with-gallery-thumbs .mfp-arrow-left:before {
    border-top: 10px solid transparent !important;
    border-bottom: 10px solid transparent !important;
    border-right: 15px solid #fff !important;
    margin-left: -3px !important; /* Nudge for optical centering */
}

.mfp-with-gallery-thumbs .mfp-arrow-right:before {
    border-top: 10px solid transparent !important;
    border-bottom: 10px solid transparent !important;
    border-left: 15px solid #fff !important;
    margin-left: 3px !important;
}

/* Hide the second pseudo-element used by mfp */
.mfp-with-gallery-thumbs .mfp-arrow:after {
    display: none !important;
}

/* RTL Support - Swapping directions and positions */
[dir=rtl] .mfp-with-gallery-thumbs .mfp-arrow-left {
    left: auto !important;
    right: 25px !important;
}

[dir=rtl] .mfp-with-gallery-thumbs .mfp-arrow-right {
    right: auto !important;
    left: 25px !important;
}

[dir=rtl] .mfp-with-gallery-thumbs .mfp-arrow-left:before {
    border-right: none !important;
    border-left: 15px solid #fff !important;
    margin-left: 3px !important;
}

[dir=rtl] .mfp-with-gallery-thumbs .mfp-arrow-right:before {
    border-left: none !important;
    border-right: 15px solid #fff !important;
    margin-left: -3px !important;
}

/* Hide arrows on mobile devices to match Slick behavior */
@media (max-width: 768px) {
    .mfp-with-gallery-thumbs .mfp-arrow {
        display: none !important;
    }
    
    .mfp-gallery-thumb-img-wrap {
        width: 48px;
        height: 48px;
    }
}
