/* Adsterra placements — no labels, padding, margins, borders, backgrounds
   or size limits. Ads display exactly as Adsterra serves them.
   The only rule: an ad placed inside a grid spans the full row instead
   of squeezing into one cell. */

.vlx-grid-ad {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
}

/* Centers an ad horizontally — nothing else is added around it. */
.vlx-ad-center {
    display: flex;
    justify-content: center;
}

/* Top ad slot. The site header is fixed to the top of the screen, so the
   slot is pushed down by the header's height — otherwise the header sits
   on top of the ad and hides most of it. The page content's own top
   offset is removed so there's no double gap. Ad is centered. */
.vlx-top-ad {
    margin-top: var(--header-height);
    display: flex;
    justify-content: center;
}
.vlx-top-ad ~ main .page {
    margin-top: 0;
}
/* Blog post side ads — pinned to the far left and far right edges of the
   screen (0 margin, 0 padding), just below the header, and fixed in place
   (they don't scroll with the page). Only ever loaded on screens 1200px+
   wide — 160x600 on tall windows, 160x300 on shorter ones. The article gets side padding so it sits clear of both ads and
   never feels crowded. */
.vlx-side-ad {
    position: fixed;
    top: calc(var(--header-height) + 0.5rem);
    width: 160px;
    margin: 0;
    padding: 0;
    z-index: 1;
}
.vlx-side-ad-left  { left: 0; }
.vlx-side-ad-right { right: 0; }

@media (min-width: 1200px) {
    section#blog-single.page.vlx-has-sides {
        padding-left: 11rem;
        padding-right: 11rem;
        box-sizing: border-box;
    }
}

/* Space around the ad that sits between the template grid and the
   page-number links, so it doesn't crowd either one. The space is on the
   wrapper — the ad itself is untouched. */
.vlx-ad-after-grid {
    margin: 2.5rem 0 3rem;
}
@media (max-width: 767px) {
    .vlx-ad-after-grid {
        margin: 0 0 1rem;
    }
}

/* Ad at the end of a blog article (screens under 1200px wide) — a little
   space so it doesn't touch the last paragraph or the next section. */
.vlx-ad-article-end {
    margin: 1.5rem 0;
}

/* The small "Ad" label above every ad. It sits outside the ad itself — no
   box, border or background — with only a few pixels between it and the ad.
   Label and ad are stacked and centered together. */
.vlx-ad-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.vlx-ad-label {
    display: block;
    font-size: 0.65rem;
    line-height: 1;
    letter-spacing: 0.03em;
    color: rgb(140, 140, 140);
    margin: 0 0 0.25rem;
}
