/* Banner Advertisement Styles */

.banner-container {
    position: fixed;
    top: 120px;
    width: 160px;
    height: 70vh; /* Increased vertical height to 70% of viewport height */
    z-index: 1000;
    pointer-events: none; /* Allow clicks to pass through container */
    overflow-y: auto; /* Allow scrolling if banners exceed container height */
}

.banner-container.left {
    left: 10px;
}

.banner-container.right {
    right: 10px;
}

.banner-ad {
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    pointer-events: auto; /* Re-enable clicks for banner */
    opacity: 0;
    transform: scale(0.9);
    animation: bannerFadeIn 0.5s ease forwards;
}

.banner-ad:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.banner-ad img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.banner-ad:hover img {
    transform: scale(1.1);
}

.banner-ad a {
    display: block;
    text-decoration: none;
}

/* Animation for banner appearance */
@keyframes bannerFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotation animation */
.banner-rotating {
    animation: bannerRotateOut 0.3s ease forwards;
}

@keyframes bannerRotateOut {
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
}

/* Responsive design */
@media (max-width: 1400px) {
    .banner-container {
        width: 140px;
    }
    
    .banner-container.left {
        left: 5px;
    }
    
    .banner-container.right {
        right: 5px;
    }
}

@media (max-width: 1200px) {
    .banner-container {
        width: 120px;
    }
}

@media (max-width: 992px) {
    .banner-container {
        display: none; /* Hide banners on tablets and mobile */
    }
}

/* Special styling for different banner sizes */
.banner-ad.large {
    width: 160px;
    height: 200px;
}

.banner-ad.medium {
    width: 160px;
    height: 150px;
}

.banner-ad.small {
    width: 160px;
    height: 100px;
}

.banner-ad.large img,
.banner-ad.medium img,
.banner-ad.small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading state */
.banner-ad.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;
    }
}

/* Close button for banners (optional) */
.banner-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.banner-ad:hover .banner-close {
    display: flex;
}

.banner-close:hover {
    background: rgba(255, 0, 0, 0.8);
}