/* Advertisement Banner Styling */

/* Top Banner Ads (Search, Property Detail Top) */
.top-banner {
    margin-top: 0;
    padding-bottom: 0;
}

.top-banner .splide__pagination {
    bottom: -20px !important;
}

.top-banner .splide__pagination__page {
    background: hsl(var(--primary)) !important;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.top-banner .splide__pagination__page.is-active {
    opacity: 1;
}

.top-banner-img {
    height: 170px !important;
    overflow: hidden;
    border-radius: 0.5rem;
    position: relative;
}

.top-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.top-banner-img:hover img {
    transform: scale(1.02);
}

.top-banner-img a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

/* Sidebar Banner Ads (Property Detail Sidebar) */
.side-add-banner-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 0.5rem;
    position: relative;
}

.side-add-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.side-add-banner-img:hover img {
    transform: scale(1.02);
}

.side-add-banner-img a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

/* Loader States */
.top-banner-loader,
.side-add-banner-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-banner-loader .skeleton-box,
.side-add-banner-loader .skeleton-box {
    background: linear-gradient(90deg, 
        hsl(var(--muted)) 25%, 
        hsl(var(--muted) / 0.5) 50%, 
        hsl(var(--muted)) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

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

/* Inline Ad Cards (Search Listings) - Matches Property Card Style */
.inline-ad-card {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
    border: 1px solid hsl(var(--border) / 0.5);
    background: hsl(var(--card));
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.inline-ad-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: hsl(var(--accent) / 0.4);
}

.inline-ad-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inline-ad-card a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

.inline-ad-card .ad-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
}

/* Square Ad Below Map */
.map-below-ad {
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
    border: 1px solid hsl(var(--border) / 0.5);
    background: hsl(var(--card));
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.map-below-ad:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: hsl(var(--accent) / 0.4);
}

.map-below-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-below-ad a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

.map-below-ad .ad-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .top-banner-img {
        height: 140px !important;
    }
    
    .side-add-banner-img {
        height: 180px;
    }
    
    .top-banner .splide__pagination {
        bottom: -15px !important;
    }
    
    .inline-ad-card {
        aspect-ratio: 4/3;
    }
    
    .map-below-ad {
        max-width: 100%;
    }
}
