/**
 * Style dla galerii zdjęć oferty nieruchomości
 */

/* Główny kontener galerii */
.property-gallery {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

/* Kontener głównego zdjęcia */
.main-image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 66.67%; /* Proporcje 3:2 */
    overflow: hidden;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.main-image-container:hover {
    transform: scale(1.01);
}

/* Główne zdjęcie */
.main-property-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.main-property-image:hover {
    transform: scale(1.03);
}

/* Przyciski nawigacyjne */
.image-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1.25rem;
    z-index: 5;
    pointer-events: none;
}

.nav-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    opacity: 0.8;
}

.nav-btn:hover {
    background-color: #fff;
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.4), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn i {
    font-size: 20px;
    color: #0a2342;
}

/* Miniatury zdjęć */
.property-thumbnails {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: #ddd #f5f5f5;
    justify-content: center;
}

.property-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.property-thumbnails::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.property-thumbnails::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.property-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.thumbnail {
    flex: 0 0 auto;
    width: 90px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.thumbnail.active {
    border-color: #0a2342;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3), 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px) scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.thumbnail:hover img {
    transform: scale(1.1);
}

/* Licznik zdjęć */
.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    z-index: 5;
}

/* Efekt ciemnego nakładania podczas przejścia */
.main-property-image.transitioning {
    opacity: 0;
}

/* Responsywność dla mniejszych ekranów */
@media (max-width: 992px) {
    .property-gallery {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .main-image-container {
        padding-bottom: 75%; /* Więcej miejsca na zdjęcie na mniejszych ekranach */
    }
    
    .nav-btn {
        width: 42px;
        height: 42px;
    }
    
    .nav-btn i {
        font-size: 18px;
    }
    
    .thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .property-thumbnails {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .image-navigation {
        padding: 0 0.75rem;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .nav-btn i {
        font-size: 16px;
    }
    
    .thumbnail {
        width: 70px;
        height: 52px;
    }
    
    .property-gallery {
        padding: 0.5rem;
    }
}

/* Lightbox do powiększania zdjęcia */
.property-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.property-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.property-lightbox.active .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
}

.lightbox-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Przycisk pełnego ekranu */
.fullscreen-indicator {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.fullscreen-indicator:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.fullscreen-indicator i {
    font-size: 18px;
    color: #0a2342;
} 
