/* 🎯 BANNER SYSTEM - AUTO-RESIZE & CAROUSEL STYLES */

/* General Banner Container */
.banner-container {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.banner-container:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Banner Images */
.banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

/* Banner Videos */
.banner-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    max-height: 600px;
    object-fit: cover;
}

.banner-video-link {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
}

/* HTML Banners */
.banner-html {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* 🔥 CAROUSEL BANNERS */
.banner-carousel {
    border-radius: 10px;
    overflow: hidden;
}

.banner-carousel .carousel-inner {
    border-radius: 10px;
}

.banner-carousel .carousel-item {
    transition: transform 0.6s ease-in-out;
}

.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next {
    width: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.banner-carousel:hover .carousel-control-prev,
.banner-carousel:hover .carousel-control-next {
    opacity: 1;
}

.banner-carousel .carousel-control-prev-icon,
.banner-carousel .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 10px;
}

.banner-carousel .carousel-indicators {
    margin-bottom: 10px;
}

.banner-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border: none;
    transition: all 0.3s ease;
}

.banner-carousel .carousel-indicators button.active {
    background-color: white;
    transform: scale(1.3);
}

/* 📍 POSITION-SPECIFIC STYLES - ΑΥΣΤΗΡΑ FIXED SIZES! */

/* 🔥 ΣΤΑΝΤΑΡ ΜΕΓΕΘΗ - ΔΕΝ ΑΛΛΑΖΟΥΝ! */

/* Home Top Banner - Full Width Hero (1200x300px standard) */
.banner-position-home_top .banner-image,
.banner-position-home_top .banner-video {
    width: 100% !important;
    height: 300px !important;
    max-height: 300px !important;
    min-height: 300px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Home Middle Banner (1200x250px standard) */
.banner-position-home_middle .banner-image,
.banner-position-home_middle .banner-video {
    width: 100% !important;
    height: 250px !important;
    max-height: 250px !important;
    min-height: 250px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Home Bottom Banner (1200x200px standard) */
.banner-position-home_bottom .banner-image,
.banner-position-home_bottom .banner-video {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Sidebar Banners - Vertical (300px width fixed) */
.banner-position-sidebar_top .banner-container,
.banner-position-sidebar_middle .banner-container,
.banner-position-sidebar_bottom .banner-container {
    width: 300px !important;
    max-width: 300px !important;
}

.banner-position-sidebar_top .banner-image {
    width: 300px !important;
    height: 250px !important;
    max-height: 250px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.banner-position-sidebar_middle .banner-image {
    width: 300px !important;
    height: 600px !important;
    max-height: 600px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.banner-position-sidebar_bottom .banner-image {
    width: 300px !important;
    height: 250px !important;
    max-height: 250px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Classifieds Page Banners */
.banner-position-classifieds_top .banner-image {
    width: 100% !important;
    height: 150px !important;
    max-height: 150px !important;
    min-height: 150px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.banner-position-classifieds_list .banner-image {
    width: 100% !important;
    height: 90px !important;
    max-height: 90px !important;
    min-height: 90px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.banner-position-classifieds_bottom .banner-image {
    width: 100% !important;
    height: 150px !important;
    max-height: 150px !important;
    min-height: 150px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Ad Detail Banners */
.banner-position-ad_detail_top .banner-image,
.banner-position-ad_detail_bottom .banner-image {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Footer Banner (1200x120px standard) */
.banner-position-footer .banner-image {
    width: 100% !important;
    height: 120px !important;
    max-height: 120px !important;
    min-height: 120px !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Popup Banner (800x600px max) */
.banner-position-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 800px !important;
    max-width: 90vw !important;
    height: auto !important;
}

.banner-position-popup .banner-image {
    width: 100% !important;
    height: 600px !important;
    max-height: 600px !important;
    object-fit: contain !important; /* Contain for popup to show full image */
    object-position: center !important;
}

/* Popup Overlay */
.banner-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
}

.banner-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.banner-popup-close:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

/* 📱 RESPONSIVE DESIGN - ΑΥΣΤΗΡΑ ΜΕΓΕΘΗ ΑΝΑ DEVICE! */

@media (max-width: 1200px) {
    /* Tablet - Λίγο μικρότερα */
    .banner-position-home_top .banner-image,
    .banner-position-home_top .banner-video {
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }
    
    .banner-position-home_middle .banner-image,
    .banner-position-home_middle .banner-video {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }
}

@media (max-width: 768px) {
    .banner-container {
        margin: 15px 0;
    }
    
    /* Mobile - Ακόμα πιο μικρά */
    .banner-position-home_top .banner-image,
    .banner-position-home_top .banner-video {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    
    .banner-position-home_middle .banner-image,
    .banner-position-home_middle .banner-video {
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
    }
    
    .banner-position-home_bottom .banner-image,
    .banner-position-home_bottom .banner-video {
        height: 120px !important;
        min-height: 120px !important;
        max-height: 120px !important;
    }
    
    /* Sidebar becomes full width on mobile */
    .banner-position-sidebar_top .banner-container,
    .banner-position-sidebar_middle .banner-container,
    .banner-position-sidebar_bottom .banner-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .banner-position-sidebar_top .banner-image,
    .banner-position-sidebar_middle .banner-image,
    .banner-position-sidebar_bottom .banner-image {
        width: 100% !important;
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
    }
    
    .banner-carousel .carousel-control-prev,
    .banner-carousel .carousel-control-next {
        width: 40px;
    }
    
    /* Hide popups on mobile */
    .banner-popup-overlay,
    .banner-position-popup {
        display: none !important;
    }
}

@media (max-width: 576px) {
    /* Extra Small - Minimum sizes */
    .banner-position-home_top .banner-image,
    .banner-position-home_top .banner-video {
        height: 120px !important;
        min-height: 120px !important;
        max-height: 120px !important;
    }
    
    .banner-position-home_middle .banner-image,
    .banner-position-home_middle .banner-video {
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
    }
    
    .banner-position-classifieds_list .banner-image {
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
    }
    
    .banner-position-footer .banner-image {
        height: 80px !important;
        min-height: 80px !important;
        max-height: 80px !important;
    }
    
    .banner-carousel .carousel-indicators {
        display: none;
    }
}

/* 🎨 ANIMATION EFFECTS */
.banner-container.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-image:hover {
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

/* 🔥 LOADING STATE */
.banner-container.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
