/* ========================================
   HERO SLIDESHOW WITH THUMBNAIL NAVIGATION
   Riverside Home Designs
   ======================================== */

/* ========== SLIDESHOW CONTAINER ========== */
.hero-slideshow {
    position: relative;
    width: 100%;
    max-width: calc(100% - 576px);
    margin: 0 auto;
    height: 600px;
    overflow: hidden;
    background-color: #000;
}

/* ========== SLIDES ========== */
.slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    animation: fadeIn 1s ease-in-out;
}

.slide.active {
    display: block;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== NAVIGATION ARROWS ========== */
.slide-prev,
.slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    border: none;
    z-index: 10;
    transition: background-color 0.3s ease;
    user-select: none;
}

.slide-prev:hover,
.slide-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slide-prev {
    left: 20px;
    border-radius: 0 4px 4px 0;
}

.slide-next {
    right: 20px;
    border-radius: 4px 0 0 4px;
}

/* ========== THUMBNAIL NAVIGATION BAR ========== */
.thumbnail-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 8px;
    z-index: 10;
    max-width: 90%;
    overflow-x: auto;
}

.thumbnail-nav::-webkit-scrollbar {
    height: 5px;
}

.thumbnail-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.thumbnail-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.thumbnail-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ========== INDIVIDUAL THUMBNAILS ========== */
.thumbnail {
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover {
    border-color: #fff;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #1464d1;
    border-width: 3px;
    box-shadow: 0 0 10px rgba(20, 100, 209, 0.8);
}

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

/* ========== SLIDE INDICATORS (DOTS) ========== */
.slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 20px;
}

.dot {
    width: 30px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

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

.dot.active {
    background-color: #d32f2f;
    width: 40px;
}

.slide-indicators {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.indicator.active {
    background-color: #1464d1;
    width: 30px;
    border-radius: 6px;
}

/* ========== AUTO-PLAY PAUSE BUTTON ========== */
.slideshow-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.pause-play-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.pause-play-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .hero-slideshow {
        max-width: calc(100% - 200px) !important;
    }
}

@media (max-width: 1024px) {
    .hero-slideshow {
        height: 500px;
    }
    
    .thumbnail {
        width: 70px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .hero-slideshow {
        max-width: 90% !important;
        height: 400px;
    }
    
    .slide-prev,
    .slide-next {
        font-size: 1.5rem;
        padding: 10px 15px;
    }
    
    .slide-prev {
        left: 10px;
    }
    
    .slide-next {
        right: 10px;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .thumbnail-nav {
        bottom: 10px;
        gap: 8px;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .hero-slideshow {
        max-width: 95% !important;
        height: 300px;
    }
    
    .thumbnail {
        width: 50px;
        height: 40px;
    }
    
    .thumbnail-nav {
        gap: 5px;
        padding: 5px 8px;
    }
    
    .slide-prev,
    .slide-next {
        font-size: 1.2rem;
        padding: 8px 12px;
    }
}

/* ========== LOADING STATE ========== */
.slide img.loading {
    filter: blur(5px);
    opacity: 0.5;
}

.slide img.loaded {
    filter: none;
    opacity: 1;
    transition: all 0.5s ease;
}

/* ========== NO-JS FALLBACK ========== */
.no-js .slide:first-child {
    display: block !important;
}

.no-js .thumbnail-nav,
.no-js .slide-indicators,
.no-js .slideshow-controls {
    display: none;
}