/*
 * KeepSmilin' Screenshot Slider Styles
 * Updated version with mobile improvements
 */

/* Slider Container */
.screenshot-slider-container {
    position: relative;
    width: 100%;
    margin: var(--spacing-xl) 0 var(--spacing-lg); /* Reduced bottom margin */
}

/* Desktop Slider */
.desktop-slider {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.desktop-slider .screenshot {
    flex: 0 0 auto;
    max-width: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    perspective: 1000px;
}

.desktop-slider .screenshot:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-device);
    z-index: 1;
}

.desktop-slider .screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.desktop-slider .screenshot:hover .screenshot-img {
    transform: rotateY(3deg);
}

/* Mobile Slider */
.mobile-slider {
    display: none;
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Removed border-radius and box-shadow to blend with background */
}

.mobile-slider .slides {
    display: flex;
    transition: transform 0.4s ease;
    height: auto;
}

.mobile-slider .slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm) 0; /* Reduced padding and removed horizontal padding */
}

.mobile-slider .screenshot-img {
    max-width: 90%; /* Increased from previous to use more screen width */
    max-height: 500px; /* Increased from 450px for better visibility */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-subtle); /* Reduced shadow for less card-like appearance */
}

/* Navigation Dots */
.screenshot-nav {
    display: none;
    justify-content: center;
    gap: var(--spacing-xs); /* Reduced gap between dots */
    margin-top: var(--spacing-md); /* Reduced top margin */
    padding-bottom: var(--spacing-md); /* Reduced bottom padding */
    position: relative;
    z-index: 5;
}

.nav-dot {
    width: 10px; /* Reduced from 14px */
    height: 10px; /* Reduced from 14px */
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.15); /* Made slightly more subtle */
    transition: all 0.2s ease;
    cursor: pointer;
    margin: 0 var(--spacing-xxs); /* Reduced horizontal margin */
}

.nav-dot.active {
    background-color: var(--accent1);
    transform: scale(1.2);
}

/* Navigation Arrows */
.slider-arrows {
    display: none;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 var(--spacing-sm);
    pointer-events: none;
}

.slider-arrow {
    width: 36px; /* Reduced from 40px */
    height: 36px; /* Reduced from 40px */
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-subtle); /* Reduced shadow */
    transition: all 0.2s ease;
    pointer-events: auto;
}

.slider-arrow:hover {
    background-color: var(--white);
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

.slider-arrow svg {
    width: 18px; /* Reduced from 20px */
    height: 18px; /* Reduced from 20px */
    fill: var(--text);
}

/* Swipe Indicator - subtle hint for mobile users */
.swipe-indicator {
    display: none;
    text-align: center;
    font-size: var(--font-xs);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .desktop-slider {
        display: none;
    }

    .mobile-slider {
        display: block;
        background-color: transparent;
        width: 100vw; /* Full viewport width */
        margin-left: calc(-50vw + 50%); /* Center align regardless of container padding */
    }

    .screenshot-nav {
        display: flex;
    }

    .slider-arrows {
        display: flex;
    }

    .swipe-indicator {
        display: block;
    }

    /* Adjust spacing for the screenshots section */
    .screenshots {
        padding-bottom: var(--spacing-xl); /* Reduced from xxxl */
    }
}

@media (max-width: 480px) {
    .mobile-slider .screenshot-img {
        max-height: 450px; /* Increased from 350px */
        max-width: 95%; /* Use more screen width on very small devices */
    }

    .slider-arrow {
        width: 32px; /* Further reduced for small screens */
        height: 32px; /* Further reduced for small screens */
    }

    /* Keep dots small on smaller screens for better proportions */
    .nav-dot {
        width: 8px;
        height: 8px;
    }
}
