/* Sponsored listings. Shared by the site and the admin preview (same class names). */
.sp-slot { position: relative; box-sizing: border-box; margin: 24px 0; }
.sp-slot .sp-link-wrap { display: block; color: inherit; text-decoration: none; }
.sp-label { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 3px 6px; border-radius: 3px; background: #fff; color: #555; font-size: 11px; font-weight: 500; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }

/* Slot placed between full-width page sections: wrapped in .container (.sp-wrap) so it lines up with the content column.
   The wrapper carries the spacing; after a .custom-gap section (60px margin) it is pulled up so the gap is not doubled. */
.sp-wrap { margin-top: 24px; margin-bottom: 24px; }
.sp-wrap > .sp-slot { margin: 0; }
.custom-gap + .sp-wrap { margin-top: -20px; }
.sp-wrap:has(> .sp-ad ins[data-ad-status="unfilled"]) { display: none; }

/* BOX: image left, title + text + button right */
.sp-box { border: 1px solid #e5e5e5; border-radius: 8px; padding: 12px; background: #fff; }
.sp-box .sp-link-wrap { display: flex; align-items: center; gap: 16px; }
.sp-box .sp-img { display: block; flex: 0 0 200px; width: 200px; max-width: 200px; height: auto; border-radius: 6px; object-fit: cover; }
.sp-box .sp-body { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 90px; }
.sp-box .sp-title { display: block; font-size: 18px; font-weight: 600; line-height: 1.3; color: #222; }
.sp-box .sp-text { display: block; font-size: 14px; line-height: 1.45; color: #555; }
.sp-box .sp-btn { display: inline-block; margin-top: 4px; padding: 6px 16px; border-radius: 4px; background: #f26b21; color: #fff; font-size: 14px; font-weight: 500; line-height: 1.4; }

/* BANNER: the whole image at its own aspect ratio (no crop); width/height attributes reserve the space */
.sp-banner { border-radius: 8px; overflow: hidden; }
.sp-banner .sp-img { display: block; width: 100%; height: auto; }
.sp-banner .sp-label { box-shadow: 0 1px 3px rgba(0, 0, 0, .35); color: #333; }

/* LINK: one line with an arrow */
.sp-link { border-bottom: 1px solid #e5e5e5; padding: 8px 96px 8px 0; }
.sp-link .sp-title { font-size: 16px; font-weight: 500; color: #0b5ed7; }
.sp-link .sp-title::after { content: " \2192"; }

/* AdSense fallback: reserve the space so the page does not jump */
.sp-ad { min-height: 250px; overflow: hidden; }
.sp-ad:has(ins[data-ad-status="unfilled"]) { display: none; }

/* Sponsored blog post: "Sponsored by {name}" after the title and byline */
.sp-blog-label { margin: 4px 0 12px; font-size: 13px; font-style: italic; color: #666; }

@media (max-width: 575.98px) {
    /* BOX stacks: label, image, title, text, button - the label sits above the image instead of on it */
    .sp-box .sp-label { position: static; display: table; margin: 0 0 8px auto; padding: 0; }
    .sp-box .sp-link-wrap { flex-direction: column; align-items: stretch; gap: 10px; }
    .sp-box .sp-img { flex: 0 0 auto; width: 100%; max-width: 100%; }
    .sp-box .sp-body { padding-right: 0; }
    .sp-banner .sp-label { top: 6px; right: 6px; font-size: 10px; }
    .sp-link { padding-right: 88px; }
}
