/* Apartment Gallery Slider Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile Styles */
.apt_slider_card {
    position: relative;
    width: 90vw;
    max-width: 359px;
    height: 407px;
    left: 8px;
    top: 0;
    margin: 0 auto;
}

.apt_slider_title {
    font-family: 'UNCAGE', Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;
    color: #151515;
    margin-bottom: 15px;
}

.apt_slider_main_image {
    position: absolute;
    width: calc(100% - 16px);
    height: 55%;
    left: 0;
    top: 74px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease;
}

/* Slide animation classes */
.apt_slider_fade {
    animation: sliderFade 0.5s ease-in-out;
}

@keyframes sliderFade {
    0% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

.apt_slider_left_gradient {
    position: absolute;
    width: 8.7%;
    height: 55%;
    left: 0;
    top: 74px;
    background: linear-gradient(90deg, rgba(29, 29, 29, 0.5) 0%, rgba(131, 128, 128, 0) 100%);
    transform: matrix(-1, 0, 0, 1, 0, 0);
    z-index: 2;
}

.apt_slider_right_gradient {
    position: absolute;
    width: 8.7%;
    height: 55%;
    right: 0;
    top: 74px;
    background: linear-gradient(270deg, rgba(29, 29, 29, 0.5) 0%, rgba(131, 128, 128, 0) 100%);
    z-index: 2;
}

.apt_slider_thumbs {
    display: flex;
    position: absolute;
    top: 303px;
    left: 0;
    gap: 3.3%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
    width: 100%;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.apt_slider_thumbs::-webkit-scrollbar {
    display: none;
}

.apt_slider_thumb {
    position: relative;
    width: 48%;
    height: 25.5%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, border 0.3s ease;
    flex-shrink: 0;
}

.apt_slider_thumb:first-child {
    width: 48.5%;
    border: 1px solid #D5D1D1;
}

.apt_slider_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Styles for Arrows */
.apt_slider_prev {
    position: absolute;
    width: 14px;
    height: 14px;
    left: 14px;
    top: 185px;
    z-index: 10;
    cursor: pointer;
    border: none;
    background: none;
    transition: transform 0.3s ease;
}

.apt_slider_next {
    position: absolute;
    width: 14px;
    height: 14px;
    right: 14px;
    top: 185px;
    z-index: 10;
    cursor: pointer;
    border: none;
    background: none;
    transition: transform 0.3s ease;
}

/* Arrow hover effects */
.apt_slider_prev:hover, .apt_slider_next:hover {
    transform: scale(1.15);
}

/* Arrow SVG Styling */
.apt_slider_prev svg, .apt_slider_next svg {
    width: 14px;
    height: 14px;
}

.apt_slider_thumb.active {
    border: 2px solid #5D3DB5 !important;
    transform: scale(1.02);
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1199px) {
    .apt_slider_card {
        width: 80vw;
        max-width: 800px;
        height: 50vh;
        min-height: 500px;
    }
    
    .apt_slider_title {
        font-size: 36px;
        line-height: 42px;
        margin-bottom: 20px;
    }
    
    .apt_slider_main_image {
        width: calc(100% - 20px);
        height: 60%;
    }
    
    .apt_slider_left_gradient {
        width: 6%;
        height: 60%;
    }
    
    .apt_slider_right_gradient {
        width: 6%;
        height: 60%;
    }
    
    .apt_slider_thumbs {
        top: 75%;
        gap: 2%;
    }
    
    .apt_slider_thumb {
        width: 23%;
        height: 20%;
    }
    
    .apt_slider_thumb:first-child {
        width: 23.5%;
    }
    
    .apt_slider_prev, .apt_slider_next {
        width: 24px;
        height: 24px;
        top: 30%;
    }
    
    .apt_slider_prev svg, .apt_slider_next svg {
        width: 24px;
        height: 24px;
    }
}

/* Desktop Styles */
@media (min-width: 1200px) {
    .apt_slider_card {
        position: relative;
        width: 85vw;
        max-width: 1700px;
        height: 60vh;
        min-height: 797px;
        left: 0;
        margin: 0 auto;
        top: 0;
    }
    
    .apt_slider_title {
        font-family: 'UNCAGE', Arial, sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: clamp(40px, 3.2vw, 54px);
        line-height: clamp(46px, 3.5vw, 59px);
        color: #151515;
        margin-bottom: 30px;
    }
    
    .apt_slider_main_image {
        position: absolute;
        width: 66.3%;
        height: 88%;
        left: 0;
        top: 95px;
        background-position: center;
        background-size: cover;
    }
    
    .apt_slider_left_gradient {
        position: absolute;
        width: 5.8%;
        height: 88%;
        left: 0;
        top: 95px;
        background: linear-gradient(270deg, #1D1D1D -51.6%, rgba(131, 128, 128, 0) 100%);
        transform: matrix(-1, 0, 0, 1, 0, 0);
        z-index: 2;
    }
    
    .apt_slider_right_gradient {
        position: absolute;
        width: 5.8%;
        height: 88%;
        left: 60.5%;
        top: 95px;
        background: linear-gradient(270deg, #1D1D1D -51.6%, rgba(131, 128, 128, 0) 100%);
        z-index: 2;
    }
    
    .apt_slider_thumbs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(12vh, 165px);
        gap: 0.8vw;
        position: absolute;
        top: 95px;
        left: 67.5%;
        width: 31.4%;
        max-height: 88%;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .apt_slider_thumb {
        width: 100%;
        height: 100%;
        border: none;
    }
    
    .apt_slider_thumb:first-child {
        width: 100%;
        border: none;
    }
    
    .apt_slider_thumb.active {
        border: 2px solid #5D3DB5 !important;
        transform: scale(1.02);
    }
    
    .apt_slider_prev {
        position: absolute;
        width: clamp(30px, 2.6vw, 44px);
        height: clamp(30px, 2.6vw, 44px);
        left: 14px;
        top: 56.5%;
        z-index: 10;
        cursor: pointer;
        border: none;
        background: none;
    }
    
    .apt_slider_next {
        position: absolute;
        width: clamp(30px, 2.6vw, 44px);
        height: clamp(30px, 2.6vw, 44px);
        left: 61.8%;
        top: 56.5%;
        z-index: 10;
        cursor: pointer;
        border: none;
        background: none;
    }
    
    .apt_slider_prev svg, .apt_slider_next svg {
        width: clamp(30px, 2.6vw, 44px);
        height: clamp(30px, 2.6vw, 44px);
    }
}