/**
 * Property Gallery Slider Styles
 * @package IntelliRealty
 * @version 1.0.0
 */

/* ============================================
   GALLERY CONTAINER
   ============================================ */
.ir-property-gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
}

/* ============================================
   GALLERY SLIDER
   ============================================ */
.ir-gallery-slider {
    position: relative;
    width: 100%;
    min-height: 650px;
    overflow: hidden;
}

.ir-gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 650px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.ir-gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.ir-gallery-slide img {
    width: 100%;
    height: 100%;
    min-height: 650px;
    object-fit: cover;
    cursor: pointer;
    display: block;
    border-radius: 30px;
}

/* ============================================
   NAVIGATION ARROWS
   ============================================ */
.ir-gallery-arrow {
    position: absolute;
    top: auto;
    bottom: 30px;
    background: transparent;
    backdrop-filter: blur(10px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ir-gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.ir-gallery-prev {
    left: 30px;
}

.ir-gallery-next {
    right: 30px;
}

.ir-gallery-arrow svg {
    display: block;
}

/* ============================================
   NAVIGATION DOTS
   ============================================ */
.ir-gallery-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 11;
    align-items: center;
}

.ir-gallery-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, rgba(224, 224, 224, 0.8) 0%, rgba(246, 245, 250, 0) 100%);
    backdrop-filter: blur(2px);
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.ir-gallery-dot:hover {
    opacity: 0.7;
    transform: scale(1.2);
}

.ir-gallery-dot.active {
    background: white;
    opacity: 1;
    width: 14px;
    height: 14px;
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */
.ir-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.ir-gallery-modal.active {
    display: block;
}

.ir-gallery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.ir-gallery-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10000;
}

.ir-gallery-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.ir-gallery-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.ir-gallery-modal-close:hover {
    transform: scale(1.2);
}

.ir-gallery-modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.ir-gallery-modal-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.ir-gallery-modal-prev {
    left: 20px;
}

.ir-gallery-modal-next {
    right: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .ir-property-gallery-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .ir-gallery-slider,
    .ir-gallery-slide {
        min-height: 300px;
        width: 100%;
    }

    .ir-gallery-slide img {
        min-height: 300px;
        width: 100%;
        border-radius: 30px;
        object-fit: cover;
    }

    /* Modal fixes for mobile */
    .ir-gallery-modal-content {
        max-width: 100vw;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .ir-gallery-modal-content img {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 80vh;
    }

    .ir-gallery-arrow {
        width: 40px;
        height: 40px;
        bottom: 20px;
    }

    .ir-gallery-prev {
        left: 15px;
    }

    .ir-gallery-next {
        right: 15px;
    }

    .ir-gallery-arrow svg {
        width: 20px;
        height: auto;
    }

    .ir-gallery-dots {
        bottom: 20px;
        gap: 8px;
    }

    .ir-gallery-dot {
        width: 10px;
        height: 10px;
    }

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

    .ir-gallery-modal-arrow {
        width: 45px;
        height: 45px;
    }

    .ir-gallery-modal-arrow svg {
        width: 20px;
        height: auto;
    }

    .ir-gallery-modal-prev {
        left: 10px;
    }

    .ir-gallery-modal-next {
        right: 10px;
    }

    .ir-gallery-modal-close {
        top: -40px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .ir-property-gallery-container {
        width: 100% !important;
        max-width: 100vw;
    }

    .ir-gallery-slider,
    .ir-gallery-slide {
        min-height: 250px;
    }

    .ir-gallery-slide img {
        min-height: 250px;
        border-radius: 20px;
    }

    .ir-gallery-arrow {
        width: 36px;
        height: 36px;
        bottom: 15px;
    }

    .ir-gallery-prev {
        left: 10px;
    }

    .ir-gallery-next {
        right: 10px;
    }

    .ir-gallery-dots {
        bottom: 15px;
        gap: 6px;
    }

    .ir-gallery-dot,
    .ir-gallery-dot.active {
        width: 8px;
        height: 8px;
    }

    /* Modal on small phones */
    .ir-gallery-modal-content {
        padding: 0 5px;
    }

    .ir-gallery-modal-content img {
        width: 100%;
        border-radius: 10px;
    }
}
