/* Modern Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    aspect-ratio: 16/9; /* Default aspect ratio */
    background-color: #000; /* Dark background */
}

.slide {
    min-width: 100%;
    position: relative;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(0.95);
    display: none;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    display: block;
}

/* Default: all images shown in full without cropping */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Default to contain to show full image */
    display: block;
}

/* Display mode toggle styles */
.display-mode-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.display-mode-toggle:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.display-mode-toggle i {
    margin-right: 5px;
    font-size: 14px;
}

/* Fill mode - when user prefers images to fill the container */
.slider-container.fill-mode .slide img {
    object-fit: cover; /* Fill the container, may crop */
}

/* Modern Arrow Navigation - Smaller arrows without white background */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px; /* Smaller size */
    height: 32px; /* Smaller size */
    background-color: transparent; /* Remove white background */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent on hover */
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slider-arrow i {
    font-size: 16px; /* Smaller icon */
    color: white; /* White color to be visible on dark backgrounds */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Add shadow for better visibility */
}

/* Modern Dots Navigation */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.slider-dot.active {
    background-color: white;
    width: 12px;
    height: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Responsive Adjustments with optimized aspect ratios */
@media (min-width: 768px) {
    .slider-wrapper {
        aspect-ratio: 16/9; /* Standard widescreen for tablets */
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
    }

    .slider-arrow i {
        font-size: 18px;
    }
}

@media (min-width: 1024px) {
    .slider-wrapper {
        aspect-ratio: 16/8; /* Wide aspect ratio for desktop */
    }

    .slider-arrow {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .slider-wrapper {
        aspect-ratio: 1/1; /* Square aspect ratio for mobile */
    }

    .slider-arrow {
        width: 28px;
        height: 28px;
        top: calc(50% - 15px); /* Adjust for mobile */
    }

    .slider-dot {
        width: 8px;
        height: 8px;
    }

    .slider-dot.active {
        width: 10px;
        height: 10px;
    }

    .display-mode-toggle {
        top: 5px;
        right: 5px;
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* Enhanced animations for slide transitions */
@keyframes slideInRight {
    from {
        transform: translateX(20%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(20%) scale(0.9);
        opacity: 0;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(-20%) scale(0.9);
        opacity: 0;
    }
}

.slide.active.slide-in-right {
    animation: slideInRight 0.8s forwards;
}

.slide.active.slide-in-left {
    animation: slideInLeft 0.8s forwards;
}

.slide.slide-out-right {
    animation: slideOutRight 0.8s forwards;
}

.slide.slide-out-left {
    animation: slideOutLeft 0.8s forwards;
}