/* ================================================================
   Swadesh Bharat News — Promotional Ads
   ================================================================
   Slot classes:
     .sbn-ad--banner-top     full-width strip, below hero
     .sbn-ad--banner-mid     full-width strip, after videos
     .sbn-ad--banner-bottom  full-width strip, after all news
     .sbn-ad--header         masthead leaderboard (728×90 style)
     .sbn-ad--sidebar        stacked 300×250 boxes in sidebar
   ================================================================ */

/* ── Shared base ─────────────────────────────────────────────── */
.sbn-ad {
    position: relative;
    width: 100%;
}

/* "विज्ञापन" badge — sits top-right of every ad block */
.sbn-ad__label {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, .42);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 2px 7px;
    border-bottom-left-radius: 4px;
    z-index: 2;
    pointer-events: none;
    line-height: 1.6;
}

/* ── BANNER SLOTS (top / mid / bottom) ───────────────────────── */
.sbn-ad--banner {
    margin: 20px 0;
    background: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
}

/* Inner row: flexbox so 1-3 ads share the width equally */
.sbn-ad-banner__row {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: var(--sbn-container, 1240px);
    margin: 0 auto;
}

/* Each individual ad cell */
.sbn-ad-banner__item {
    flex: 1 1 0;
    position: relative;
    overflow: hidden;
    min-height: 90px;
    background: #e8e8e8;
}

/* Divider between sibling cells */
.sbn-ad-banner__item + .sbn-ad-banner__item {
    border-left: 2px solid #fff;
}

.sbn-ad-banner__link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.sbn-ad-banner__item img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform .35s ease, filter .3s ease;
}

/* Single-ad banner: taller */
.sbn-ad--count-1 .sbn-ad-banner__item img {
    height: 140px;
    object-fit: cover;
    object-position: center;
}

.sbn-ad-banner__link:hover img {
    transform: scale(1.03);
    filter: brightness(.92);
}

/* Optional text overlay that appears on hover */
.sbn-ad-banner__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 18px 12px 8px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .28s ease, transform .28s ease;
    pointer-events: none;
    line-height: 1.4;
}
.sbn-ad-banner__link:hover .sbn-ad-banner__title {
    opacity: 1;
    transform: translateY(0);
}

/* "No image" placeholder keeps height consistent */
.sbn-ad-banner__item:empty,
.sbn-ad-banner__item:not(:has(img)) {
    display: none;
}

/* Responsive: on small screens stack vertically */
@media (max-width: 600px) {
    .sbn-ad-banner__row          { flex-direction: column; }
    .sbn-ad-banner__item         { flex: none; width: 100%; }
    .sbn-ad-banner__item + .sbn-ad-banner__item { border-left: none; border-top: 2px solid #fff; }
    .sbn-ad-banner__item img,
    .sbn-ad--count-1 .sbn-ad-banner__item img { height: 100px; }
}

/* ── HEADER SLOT ─────────────────────────────────────────────── */
.sbn-ad--header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    max-width: 728px;
    /* Hide gracefully when no ad — won't take space */
}

.sbn-ad--header img {
    display: block;
    max-height: 90px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 3px;
    transition: opacity .2s;
}

.sbn-ad--header a:hover img {
    opacity: .88;
}

/* On mobile collapse so it doesn't crowd the header */
@media (max-width: 900px) {
    .sbn-ad--header { display: none; }
}

/* ── SIDEBAR SLOT ────────────────────────────────────────────── */
.sbn-ad--sidebar {
    margin-bottom: 24px;
    position: relative;
}

/* Push label inside the first item */
.sbn-ad--sidebar .sbn-ad__label {
    top: 0;
    right: 0;
}

.sbn-ad-sidebar__item {
    overflow: hidden;
    border-radius: 6px;
    background: #e8e8e8;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.10);
}

.sbn-ad-sidebar__link {
    display: block;
}

.sbn-ad-sidebar__item img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform .3s ease, filter .3s ease;
}

.sbn-ad-sidebar__link:hover img {
    transform: scale(1.04);
    filter: brightness(.9);
}

/* ── Slot-specific accent colours ───────────────────────────── */
/* Top banner: slightly warmer strip */
.sbn-ad--banner-top {
    background: #faf6f0;
    border-color: #e8ddd0;
}

/* Mid banner: cooler strip to visually separate content sections */
.sbn-ad--banner-mid {
    background: #f0f4fa;
    border-color: #d8e2f0;
}

/* Bottom banner: neutral */
.sbn-ad--banner-bottom {
    background: #f0f0f0;
    border-color: #e0e0e0;
}

/* ── "Advertisement" label per slot ─────────────────────────── */
.sbn-ad--banner-top    .sbn-ad__label { background: rgba(180, 100, 20, .55); }
.sbn-ad--banner-mid    .sbn-ad__label { background: rgba(0, 80, 160, .50); }
.sbn-ad--banner-bottom .sbn-ad__label { background: rgba(30, 30, 30, .45); }
.sbn-ad--sidebar       .sbn-ad__label { background: rgba(0, 0, 0, .38); font-size: 9px; }
