/* Banner Grid Layout Styles */

.banner-grid-container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.banner-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(3, 200px);
    gap: 20px;
    margin-bottom: 40px;
}

.banner-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.banner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.banner-item:hover img {
    transform: scale(1.05);
}

.banner-large {
    grid-column: 1;
    grid-row: 1 / 4;
}

.banner-top-right {
    grid-column: 2;
    grid-row: 1;
}

.banner-middle-right {
    grid-column: 2;
    grid-row: 2;
}

.banner-bottom-right {
    grid-column: 2;
    grid-row: 3;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.banner-item:hover .banner-overlay {
    opacity: 1;
}

.banner-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.banner-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Hero Banner Slider */
.hero-banner-section {
    width: 100%;
    margin-bottom: 40px;
}

.hero-banner-slider {
    position: relative;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
}

.hero-banner-slider .swiper-slide {
    position: relative;
}

.hero-banner-slider .swiper-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 40px;
    color: white;
}

.hero-banner-content h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.hero-banner-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Top Banners (Horizontal Row) */
.top-banners-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.top-banner-item {
    position: relative;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.top-banner-item:hover {
    transform: translateY(-3px);
}

.top-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar Banners */
.sidebar-banner {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .banner-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(2, 250px);
    }

    .banner-large {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .banner-top-right {
        grid-column: 1;
        grid-row: 2;
    }

    .banner-middle-right {
        grid-column: 2;
        grid-row: 2;
    }

    .banner-bottom-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .banner-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .banner-large,
    .banner-top-right,
    .banner-middle-right,
    .banner-bottom-right {
        grid-column: 1;
        grid-row: auto;
        height: 200px;
    }

    .hero-banner-slider {
        height: 300px;
    }

    .hero-banner-slider .swiper-slide img {
        height: 300px;
    }

    .hero-banner-content h2 {
        font-size: 1.5rem;
    }

    .hero-banner-content p {
        font-size: 1rem;
    }

    .top-banners-section {
        grid-template-columns: 1fr;
    }

    /* Show mobile images on mobile devices */
    .banner-item img.desktop-image {
        display: none;
    }

    .banner-item img.mobile-image {
        display: block;
    }
}

@media (min-width: 769px) {
    .banner-item img.mobile-image {
        display: none;
    }

    .banner-item img.desktop-image {
        display: block;
    }
}

/* Loading Animation */
.banner-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    min-height: 200px;
}

.banner-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Badge for new/hot banners */
.banner-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.banner-badge.hot {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.banner-badge.new {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Click counter overlay (for admin preview) */
.banner-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    z-index: 10;
    display: none;
}

.banner-item:hover .banner-stats {
    display: block;
}