/**
 * RAMIX Slideshow Styles
 * Contains all styling for property slideshows
 */

/* Main slideshow container */
.property-slideshow {
    position: relative;
    height: 700px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

/* Individual slides */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none; /* Prevent clicks on hidden slides */
}

.slide.active {
    opacity: 1;
    z-index: 1; /* Ensure active slide is above others */
    pointer-events: auto; /* Allow clicks on active slide */
}

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

/* Loading animation for images */
.slide.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #B8860B;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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

/* Navigation buttons */
.slideshow-nav {
    position: absolute;
    top: 50%; /* Position at the middle of the slideshow */
    left: 0;
    width: 100%;
    z-index: 5;
    transform: translateY(-50%); /* Center vertically */
    pointer-events: none; /* Prevents buttons from blocking slide content */
    display: flex;
    justify-content: space-between;
    align-items: center; /* This centers buttons vertically */
    padding: 0 20px;
}

.slideshow-nav button {
    position: relative;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 28px; /* Increased font size for better visibility */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Make buttons clickable */
    opacity: 0.7;
    z-index: 10; /* Ensure buttons are above other elements */
    text-align: center;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 0 10px; /* Add some margin on the sides */
}

.slideshow-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #fff; /* Ensure text is bright white */
}

/* These are no longer needed with the flex layout, but keeping for backup */
.slideshow-nav .prev-slide {
    margin-right: auto;
}

.slideshow-nav .next-slide {
    margin-left: auto;
}

/* Dots navigation */
.slideshow-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11; /* Ensure controls are above slides and overlays */
    display: flex;
    gap: 12px;
    pointer-events: auto; /* Ensure clickable */
}

/* Use slim golden lines instead of dots to match site design */
.slideshow-dot {
    width: 42px;
    height: 4px;
    border-radius: 2px;
    background: rgba(192, 144, 41, 0.35); /* var(--gold) with transparency */
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.slideshow-dot:hover {
    background: rgba(192, 144, 41, 0.6);
    transform: translateY(-1px);
}

.slideshow-dot.active {
    background: linear-gradient(135deg, #93701f, #c09029, #d4aa4f); /* mirrors --gold-gradient */
    box-shadow: 0 5px 15px rgba(192, 144, 41, 0.25);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .property-slideshow {
        height: 450px;
    }
    
    .slideshow-nav {
        padding: 0 10px;
    }
    
    .slideshow-nav button {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 5px; /* Reduce margin on mobile */
    }
}

@media screen and (max-width: 480px) {
    .property-slideshow {
        height: 300px;
    }
    
    .slideshow-controls {
        bottom: 10px;
    }
    
    .slideshow-dot {
        width: 10px;
        height: 10px;
    }
}
