/* Banner Layout Styles for MU Online Advertising Website */

/* Base banner styles */
.banner-container {
    width: 100%;
    padding: 0 15px;
}

.banner-section {
    margin-bottom: 20px;
}

/* Banner slot styles */
.banner-slot {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner-slot:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.banner-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: linear-gradient(45deg, #f8f9fa 0%, #e9ecef 100%);
    transition: transform 0.3s ease;
}

.banner-slot:hover img {
    transform: scale(1.02);
}

/* Placeholder styles */
.banner-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6 !important;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.banner-placeholder:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3 !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.2);
}

.banner-placeholder .btn {
    transition: all 0.3s ease;
}

.banner-placeholder:hover .btn {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

/* Sidebar banners */
.left-banners, .right-banners {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.left-banners .banner-slot,
.right-banners .banner-slot {
    aspect-ratio: 210/400;
    height: 280px;
    margin-bottom: 20px;
}

/* Center large banners */
.center-large-banners .banner-slot {
    aspect-ratio: 780/280;
    height: 200px;
    margin-bottom: 20px;
}

/* Center small banners */
.center-small-banners .banner-slot {
    aspect-ratio: 780/110;
    height: 80px;
}

.center-small-banners .row {
    margin-bottom: 12px;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-slot {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive design */
@media (max-width: 1399.98px) {
    .left-banners .banner-slot,
    .right-banners .banner-slot {
        height: 240px;
    }
}

@media (max-width: 1199.98px) {
    .col-xl-2 {
        display: none !important;
    }
    
    .col-xl-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .center-large-banners .banner-slot {
        height: 180px;
    }
    
    .center-small-banners .banner-slot {
        height: 70px;
    }
}

@media (max-width: 991.98px) {
    .center-large-banners .banner-slot {
        height: 150px;
    }
    
    .center-small-banners .banner-slot {
        height: 60px;
    }
    
    .banner-placeholder .btn {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 767.98px) {
    .center-small-banners .col-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .center-small-banners .banner-slot {
        height: 50px;
    }
    
    .center-large-banners .banner-slot {
        height: 120px;
    }
    
    .banner-placeholder {
        font-size: 12px;
    }
    
    .banner-placeholder .btn {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .banner-placeholder i {
        font-size: 14px !important;
    }
}

@media (max-width: 575.98px) {
    .center-small-banners .col-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .center-small-banners .banner-slot {
        height: 70px;
    }
    
    .center-large-banners .banner-slot {
        height: 100px;
    }
}

/* Loading states */
.banner-loading {
    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;
    }
}

/* Custom scrollbar for sticky sidebars */
.left-banners::-webkit-scrollbar,
.right-banners::-webkit-scrollbar {
    width: 6px;
}

.left-banners::-webkit-scrollbar-track,
.right-banners::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.left-banners::-webkit-scrollbar-thumb,
.right-banners::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.left-banners::-webkit-scrollbar-thumb:hover,
.right-banners::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Hover effects for better UX */
.banner-slot {
    cursor: pointer;
}

.banner-slot a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* High quality image rendering */
.banner-slot img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Banner position indicators */
.banner-type-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}

/* Print styles */
@media print {
    .banner-placeholder {
        display: none !important;
    }
    
    .banner-slot:hover {
        transform: none;
        box-shadow: none;
    }
}
