/* ── Sponsor banner (SEO pages) ──
   Data-driven, mirrors .th-banner placement in .logo-side.
   Built by buildSponsorSection() in build-seo-pages.js; styled per-sponsor
   via inline --sp-accent CSS custom property. */

.sp-banner { display: block; position: relative; }
.sp-banner.hidden { display: none; }

.sp-banner-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: visible;
  border-radius: 16px;
  padding: 16px 18px;
  text-decoration: none;
  isolation: isolate;
  color: var(--text-0, #f5f5f5);
  background: var(--bg-raised, #1c1c1c);
  border: 1px solid var(--border-base, rgba(255,255,255,.08));
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  transition: transform .18s ease, box-shadow .25s ease;
}
/* Accent glow from bottom-left corner */
.sp-banner-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 130% 110% at 0% 115%, var(--sp-accent, transparent) 0%, transparent 60%);
  opacity: .15;
  pointer-events: none;
  z-index: 0;
}
.sp-banner-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}

/* Body (left) */
.sp-banner-body {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 40px;
  position: relative;
  z-index: 1;
}

.sp-banner-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.sp-banner-desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-3, rgba(255,255,255,.55));
}

.sp-banner-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--sp-accent, var(--text-0, #f5f5f5));
  color: #111;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  align-self: flex-start;
  transition: filter .15s ease;
}
.sp-banner-link:hover .sp-banner-cta { filter: brightness(1.08); }

/* Picture — absolute, pinned to bottom-right corner */
.sp-banner-figure {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 120px;
  height: 120px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  border-bottom-right-radius: inherit;
}
.sp-banner-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
}

/* «Спонсор» + info circle — под текстом */
.sp-banner-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}
.sp-banner-eyebrow {
  font-size: 10px;
  font-weight: 500;
  color: #fff;
}
.sp-banner-info {
  position: relative;
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  color: #fff;
  cursor: help;
}
.sp-banner-info svg { width: 8px; height: 8px; }

/* Tooltip */
.sp-banner-tip {
  position: absolute;
  bottom: calc(100% + 7px);
  top: auto;
  right: 0;
  z-index: 3;
  width: max-content;
  max-width: 200px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  color: #111;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none;
}
.sp-banner-info:hover .sp-banner-tip,
.sp-banner-info:focus-visible .sp-banner-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* erid strip */
.sp-banner-erid {
  position: absolute;
  bottom: 6px; right: 10px;
  z-index: 2;
  font-size: 8.5px;
  color: var(--text-4, rgba(255,255,255,.35));
  letter-spacing: .02em;
}

@media (prefers-reduced-motion: reduce) {
  .sp-banner-link:hover { transform: none; }
}

@media (max-width: 640px) {
  .sp-banner { order: 3; }
  .sp-banner-link { padding: 18px 20px; }
  .sp-banner-title { font-size: 16px; }
  .sp-banner-desc  { font-size: 12px; }
}
