/* ==========================================================================
   Slider with Thumbnails - Main Styles
   ========================================================================== */

.st-slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   Main Slider
   ========================================================================== */

.st-main-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: #000000;
    margin-bottom: 20px;
}

.st-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slide */
.st-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.st-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.st-slide.exiting {
    opacity: 0;
    visibility: visible;
    z-index: 1;
}

.st-slide.entering {
    opacity: 0;
    visibility: visible;
    z-index: 2;
    animation: slideIn 0.5s ease-in-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.st-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   Navigation Buttons
   ========================================================================== */

.st-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 20px;
    line-height: 1;
}

.st-nav-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.st-nav-button:active {
    transform: translateY(-50%) scale(0.95);
}

.st-nav-button.st-prev {
    left: 20px;
}

.st-nav-button.st-next {
    right: 20px;
}

.st-nav-button i {
    display: block;
}

/* Hide navigation on very small screens */
@media (max-width: 480px) {
    .st-nav-button {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .st-nav-button.st-prev {
        left: 10px;
    }
    
    .st-nav-button.st-next {
        right: 10px;
    }
}

/* ==========================================================================
   Thumbnails Container
   ========================================================================== */

.st-thumbnails-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar for WebKit browsers */
.st-thumbnails-container::-webkit-scrollbar {
    height: 6px;
}

.st-thumbnails-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.st-thumbnails-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.st-thumbnails-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Thumbnail Items
   ========================================================================== */

.st-thumbnail-item {
    flex: 0 0 calc(25% - 7.5px);
    max-width: calc(25% - 7.5px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.st-thumbnail-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
    border: 3px solid transparent;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.st-thumbnail-item:hover img {
    opacity: 0.9;
    transform: scale(1.05);
}

.st-thumbnail-item.active img {
    opacity: 1;
    border-color: #0073e6;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .st-thumbnail-item {
        flex: 0 0 calc(33.333% - 6.67px);
        max-width: calc(33.333% - 6.67px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .st-main-slider {
        height: 400px;
        margin-bottom: 15px;
    }
    
    .st-thumbnail-item {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }
    
    .st-thumbnail-item img {
        height: 80px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .st-main-slider {
        height: 300px;
        margin-bottom: 10px;
    }
    
    .st-thumbnails-container {
        gap: 8px;
    }
    
    .st-thumbnail-item {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
    }
    
    .st-thumbnail-item img {
        height: 60px;
        border-width: 2px;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.st-slider-container.loading .st-main-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #0073e6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 100;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.st-nav-button:focus {
    outline: 2px solid #0073e6;
    outline-offset: 2px;
}

.st-thumbnail-item:focus {
    outline: 2px solid #0073e6;
    outline-offset: 2px;
}

.st-thumbnail-item:focus img {
    opacity: 0.9;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .st-slide,
    .st-nav-button,
    .st-thumbnail-item img {
        transition: none;
    }
    
    .st-slide.entering {
        animation: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .st-nav-button,
    .st-thumbnails-container {
        display: none;
    }
    
    .st-slide:not(.active) {
        display: none;
    }
    
    .st-slide.active {
        position: static;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    .st-nav-button {
        background-color: #000;
        border: 2px solid #fff;
    }
    
    .st-thumbnail-item.active img {
        border-color: #000;
        border-width: 4px;
    }
}

