/* assets/css/ad-detail.css - Stilovi za prikaz oglasa */

/* Glavni container za slike */
.image-display-container {
    position: relative;
    transition: all 0.3s ease;
}

.image-blur-background {
    transition: background-image 0.5s ease-in-out;
}

.main-image-display {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-image-display:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 50px rgba(0,0,0,0.3) !important;
}

/* Navigacione strelice */
.image-nav-btn {
    transition: all 0.3s ease;
    opacity: 0.7;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-nav-btn:hover {
    opacity: 1;
    background: white !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateY(-50%) scale(1.1);
}

/* Thumbnail galerija */
.thumbnail-wrapper {
    transition: all 0.3s ease;
}

.thumbnail-wrapper:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 110, 253, 0.5) !important;
}

.thumbnail-wrapper.active {
    border-color: #0d6efd !important;
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
}

.thumbnail-image {
    transition: transform 0.3s ease;
}

.thumbnail-wrapper:hover .thumbnail-image {
    transform: scale(1.1);
}

.thumbnail-active-indicator {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: pulse-indicator 2s infinite;
}

@keyframes pulse-indicator {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Popup modal za slike */
.image-popup-modal .modal-dialog {
    max-width: 90vw;
    max-height: 90vh;
}

.image-popup-modal .modal-content {
    background: rgba(0, 0, 0, 0.9);
    border: none;
    border-radius: 0;
}

.image-popup-modal .modal-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.image-popup-modal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.popup-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.popup-nav-prev {
    left: 20px;
}

.popup-nav-next {
    right: 20px;
}

.popup-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.image-counter {
    position: absolute;
    bottom: 35px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    z-index: 10;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .image-display-container {
        height: 350px !important;
    }
    
    .image-nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    
    .thumbnail-wrapper {
        width: 60px !important;
        height: 60px !important;
    }
    
    .popup-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .popup-close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Dodajte ove stilove na početak fajla */

/* Naslov oglasa */
.ad-title-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 5px solid #0d6efd;
}

/* Swipe container za mobile */
.swipe-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Efekat za swipe */
.images-wrapper {
    will-change: transform;
}

.image-slide {
    will-change: transform, opacity;
}

/* Indikatori slika */
.image-indicator {
    transition: all 0.3s ease;
}

.image-indicator.active {
    background: white !important;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Popup fullscreen */
.image-popup-modal.fullscreen-popup .modal-dialog {
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    width: 100vw;
    height: 100vh;
}

.image-popup-modal.fullscreen-popup .modal-content {
    height: 100vh;
    border-radius: 0;
    background: #000;
}

.image-popup-modal.fullscreen-popup .modal-body {
    height: 100vh;
    min-height: 100vh;
    padding: 0;
}

.image-popup-modal.fullscreen-popup .popup-main-image {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

/* Swipe efekti u popup-u */
.popup-images-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-image-slide {
    flex: 0 0 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation classes */
.slide-left {
    animation: slideLeft 0.4s ease;
}

.slide-right {
    animation: slideRight 0.4s ease;
}

@keyframes slideLeft {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideRight {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mobile optimizacija */
@media (max-width: 768px) {
    .ad-title-header h1 {
        font-size: 1.8rem !important;
    }
    
    .image-display-container {
        height: 350px !important;
    }
    
    .swipe-container {
        -webkit-overflow-scrolling: touch;
    }
    
    .image-nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
        opacity: 0.8;
    }
    
    /* Bolji swipe feedback */
    .images-wrapper.swiping {
        transition: none !important;
    }
    
    /* Popup za mobile */
    .image-popup-modal.fullscreen-popup .popup-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        opacity: 0.8;
    }
    
    .image-popup-modal.fullscreen-popup .popup-close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: 10px;
        right: 10px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .image-display-container {
        height: 400px !important;
    }
}

/* Progress bar za swipe */
.swipe-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
    z-index: 40;
}

.swipe-progress-bar {
    height: 100%;
    background: #0d6efd;
    width: 0%;
    transition: width 0.1s linear;
}

