﻿.sb-gallery-rotator {
    border: 0;
    overflow: hidden;
}

.sb-g-img {
    max-height: 600px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .sb-g-img:hover {
        transform: scale(1.02);
    }

.sb-g-caption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6));
    color: #fff;
    padding: 1rem;
    border-radius: .5rem;
    max-height: 6.5em;
    overflow: auto;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sb-g-counter-left {
    position: absolute;
    left: 12px;
    top: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.35rem;
    color: #fff;
}

.sb-g-counter-right {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.35rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sb-g-timer {
    min-width: 3ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Previous and Next buttons - Hidden by default, show on hover */
.sb-g-prev,
.sb-g-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0.75rem;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 0.35rem;
    color: #000;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sb-gallery-rotator:hover .sb-g-prev,
.sb-gallery-rotator:hover .sb-g-next {
    opacity: 1;
}

.sb-g-prev:hover,
.sb-g-next:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.sb-g-prev {
    left: 12px;
}

.sb-g-next {
    right: 12px;
}

.sb-g-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    scroll-behavior: smooth;
    /* Hide scrollbar completely */
    scrollbar-width: none;
}

    /* Hide scrollbar for Chrome/Safari */
    .sb-g-strip::-webkit-scrollbar {
        display: none;
    }

.sb-g-thumb {
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 0.35rem;
    outline: none;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .sb-g-thumb img {
        display: block;
        height: 70px;
        width: 100px;
        object-fit: cover;
        border-radius: 0.35rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        border: 2px solid transparent;
    }

    .sb-g-thumb:hover img {
        transform: scale(1.08);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .sb-g-thumb.active img {
        border: 3px solid #198754;
        box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
    }

    .sb-g-thumb:focus-visible img {
        outline: 2px solid #0d6efd;
    }

.sb-g-main {
    background: #000;
    min-height: 200px;
    position: relative;
}

/* Thumbnail Strip Container */
.sb-g-strip-container {
    position: relative;
}

/* Thumbnail Navigation Buttons */
.sb-g-thumb-nav {
    position: absolute;
    top: 90.5%;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0.5rem;
    font-size: 1.2rem;
    background: #ff0000;
    border: 1px #fff solid;
    width:40px;
    height:40px;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

    .sb-g-thumb-nav:hover:not(:disabled) {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.1);
    }

    .sb-g-thumb-nav:disabled {
        cursor: not-allowed;
        opacity: 0.3;
    }

.sb-g-thumb-prev {
    left: 0.5rem;
}

.sb-g-thumb-next {
    right: 0.5rem;
}

/* Modal for enlarged image */
.sb-g-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

    .sb-g-modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.sb-g-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sb-g-modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.sb-g-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

    .sb-g-modal-close:hover {
        background: rgba(255, 255, 255, 0.4);
        transform: scale(1.1);
    }

/* Modal Navigation Buttons */
.sb-g-modal-prev,
.sb-g-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    padding: 1rem;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .sb-g-modal-prev:hover,
    .sb-g-modal-next:hover {
        background: rgba(255, 255, 255, 0.4);
        transform: translateY(-50%) scale(1.1);
    }

.sb-g-modal-prev {
    left: 30px;
}

.sb-g-modal-next {
    right: 30px;
}

/* Modal Counter */
.sb-g-modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sb-g-img {
        max-height: 400px;
    }

    .sb-g-main {
        min-height: 300px;
    }

    .sb-g-prev,
    .sb-g-next {
        padding: 0.5rem;
        font-size: 1.2rem;
        opacity: 0.6;
    }

    .sb-gallery-rotator:hover .sb-g-prev,
    .sb-gallery-rotator:hover .sb-g-next {
        opacity: 0.8;
    }

    .sb-g-caption {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .sb-g-counter-left {
        left: 8px;
        top: 8px;
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .sb-g-counter-right {
        right: 8px;
        top: 8px;
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .sb-g-timer {
        font-size: 0.8rem;
    }

    .sb-g-strip {
        padding: 0.5rem;
        gap: 0.4rem;
    }

    .sb-g-thumb img {
        height: 60px;
        width: 85px;
    }

    .sb-g-thumb-nav {
        padding: 0.4rem;
        font-size: 1rem;
        width:35px;
        height:35px;
    }

    .sb-g-modal-prev,
    .sb-g-modal-next {
        padding: 0.75rem;
        font-size: 1.5rem;
    }

    .sb-g-modal-prev {
        left: 15px;
    }

    .sb-g-modal-next {
        right: 15px;
    }

    .sb-g-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .sb-g-modal-counter {
        bottom: 20px;
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .sb-g-img {
        max-height: 300px;
    }

    .sb-g-main {
        min-height: 250px;
    }

    .sb-g-prev,
    .sb-g-next {
        padding: 0.4rem;
        font-size: 1rem;
    }

    .sb-g-caption {
        bottom: 6px;
        left: 6px;
        right: 6px;
        padding: 0.5rem;
        font-size: 0.8rem;
        max-height: 4em;
    }

    .sb-g-counter-left {
        left: 6px;
        top: 6px;
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }

    .sb-g-counter-right {
        right: 6px;
        top: 6px;
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }

    .sb-g-thumb img {
        height: 50px;
        width: 70px;
    }

    .sb-g-strip {
        padding: 0.4rem;
        gap: 0.3rem;
    }

    .sb-g-thumb-nav {
        padding: 0.3rem;
        font-size: 0.9rem;
        width:30px;
        height:30px;
    }

    .sb-g-modal-prev,
    .sb-g-modal-next {
        padding: 0.5rem;
        font-size: 1.2rem;
    }

    .sb-g-modal-prev {
        left: 10px;
    }

    .sb-g-modal-next {
        right: 10px;
    }

    .sb-g-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .sb-g-modal-counter {
        bottom: 15px;
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}
