/* ═══════════════════════════════════════════════════════════
   DevKit4You — Advertising System CSS
   Tasteful, non-intrusive ad placements
   ═══════════════════════════════════════════════════════════ */

/* ── Ad wrapper base ── */
.ad-unit {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink2);
  border: 1px solid var(--wire);
  transition: var(--trans);
}

.ad-label {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mist);
  padding: 4px 10px;
  background: var(--ink3);
  border-bottom: 1px solid var(--wire);
  display: block;
  user-select: none;
}

/* ── Leaderboard: 728×90 — top of tool pages (below header) ── */
.ad-leaderboard {
  width: 100%;
  max-width: 728px;
  margin: 0 auto 28px;
  min-height: 90px;
}

.ad-leaderboard .ad-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  padding: 12px;
}

/* ── Rectangle: 300×250 — sidebar / in-content ── */
.ad-rectangle {
  width: 100%;
  max-width: 320px;
  min-height: 250px;
}

.ad-rectangle .ad-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 12px;
}

/* ── Banner: 468×60 — between sections ── */
.ad-banner {
  width: 100%;
  max-width: 468px;
  margin: 0 auto;
  min-height: 60px;
}

.ad-banner .ad-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 8px 12px;
}

/* ── Sticky sidebar ad ── */
.ad-sidebar-sticky {
  position: sticky;
  top: 80px;
  width: 160px;
  min-height: 600px;
  flex-shrink: 0;
}

.ad-sidebar-sticky .ad-inner {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

/* ── Tool page with sidebar layout ── */
.tool-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 24px;
  align-items: start;
}

/* ── In-feed native ad (sponsor card in tool grid) ── */
.ad-native-card {
  background: var(--ink2);
  border: 1px solid var(--wire);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.ad-native-card::after {
  content: 'Sponsored';
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .1em;
  color: var(--mist);
  text-transform: uppercase;
}

.ad-native-card .ad-sponsor-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--ink4);
  border: 1px solid var(--wire2);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.ad-native-card .ad-sponsor-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--snow);
  margin-bottom: 6px;
}

.ad-native-card .ad-sponsor-desc {
  font-size: .78rem;
  color: var(--fog);
  line-height: 1.6;
  margin-bottom: 14px;
}

.ad-native-card .ad-sponsor-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--volt);
  text-decoration: none;
  background: var(--volt-dim);
  border: 1px solid rgba(245,200,66,.2);
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--trans);
}

.ad-native-card .ad-sponsor-cta:hover {
  background: rgba(245,200,66,.2);
}

/* ── Footer ad strip ── */
.ad-footer-strip {
  background: var(--ink3);
  border-top: 1px solid var(--wire);
  border-bottom: 1px solid var(--wire);
  padding: 12px 0;
  margin-bottom: 32px;
}

.ad-footer-strip .ad-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

/* ── Google AdSense placeholder styling ── */
.adsense-slot {
  display: block;
  width: 100%;
  min-height: 90px;
  background: transparent;
}

/* ── House ad (self-promotion when no paid ad) ── */
.ad-house {
  background: linear-gradient(135deg, var(--ink3) 0%, var(--ink2) 100%);
  border: 1px dashed var(--wire2);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.ad-house h4 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--snow);
  margin-bottom: 6px;
}

.ad-house p {
  font-size: .75rem;
  color: var(--fog);
  margin-bottom: 12px;
  line-height: 1.6;
}

.ad-house .ad-house-links {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.ad-house .ad-house-link {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--fog);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid var(--wire);
  border-radius: 4px;
  transition: var(--trans);
}

.ad-house .ad-house-link:hover {
  color: var(--volt);
  border-color: var(--volt);
  background: var(--volt-dim);
}

/* ── Responsive: hide sidebar ad on small screens ── */
@media (max-width: 900px) {
  .ad-sidebar-sticky { display: none; }
  .tool-with-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .ad-leaderboard { min-height: 50px; }
  .ad-leaderboard .ad-inner { min-height: 50px; }
  .ad-rectangle { max-width: 100%; }
}
