/* ==========================================================================
   /monetization/ — page-specific layout
   Links after site.css (tokens/buttons) + inner.css (shared inner-page bits).
   Only the per-section arrangement and image sizing live here.
   ========================================================================== */

/* Body offset: fixed 82px header + fixed 50px 2nd-level strip (>=1200px).
   Below 1200px the strip is hidden and the header collapses to the 60px
   mobile bar (same as the homepage), so the strip's 50px is dropped. */
body { padding-top: 132px; }
@media screen and (max-width: 1199px) { body { padding-top: 60px; } }

/* ------------------------------------------------------------------ hero */
.ihero-inner { position: relative; z-index: 1; }

/* ----------------------------------------------- 02 High-Performance Ad Formats */
.adformats-visual { position: relative; min-height: 300px; }
/* specificity must beat inner.css `.two-col .col-visual img { width:100% }` */
.two-col .col-visual .af-laptop { display: block; width: 80%; margin-left: auto; }
/* iPhone device: the scrolling ad strip (af-phone) layered BEHIND the
   transparent-screen frame PNG (af-frame), overlapping the laptop's
   bottom-left corner — matches live's layered composition. */
.two-col .col-visual .af-phone-device {
  position: absolute; left: 4%; bottom: -7%;
  width: 30%; line-height: 0;
  filter: drop-shadow(0 18px 30px rgba(10,12,40,.22));
}
.two-col .col-visual .af-frame {
  position: relative; display: block; width: 100%; height: auto; z-index: 2;
}
.two-col .col-visual .af-phone {
  position: absolute; z-index: 1;
  top: 1.6%; left: 7.4%; width: 85.9%; height: 98%;
  object-fit: cover;
}

/* ------------------------------------------------------ 03 Selected partners */
.dds-img { width: 100%; max-width: 580px; }
.partners-section .dds-copy { background: rgba(255,255,255,.55); }
.partners-wall { margin-top: 44px; padding: 26px 40px 38px; }
.partners-heading {
  text-align: center; color: var(--coral);
  font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0 0 22px;
}
.partner-logos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr);
}
.partner-logos li { display: grid; place-items: center; padding: 20px 16px; min-height: 66px; }
.partner-logos li:not(:nth-child(6n+1)) { border-left: 1px solid #D7DEE8; }
.partner-logos img { max-height: 32px; max-width: 100%; width: auto; }

/* ------------------------------------------------------ 04 Adaptive Ad Layout */
.adaptive-visual { text-align: center; }
.speed-labels {
  display: flex; justify-content: space-around;
  max-width: 320px; margin: 12px auto 12px;
}
.speed-labels span { font-size: 25px; font-weight: 700; color: var(--navy); }
/* Connection-speed demo. Live implements this as an autoplay/loop MP4 (Tilda
   video atom, 500x472 source) rendered at ~309px wide; we mirror that with a
   muted autoplay <video>. max-width matches live's render; the video's own
   frames play smoothly so no GPU compositor hack is needed.
   2026-08-04: the source master carried a 1px pure-black bottom row on every
   frame, which rendered as a thin grey hairline under the phones. Re-encoded
   with `crop=500:470:0:0` (also 10-bit 4:4:4 -> yuv420p for Safari, 5.2MB ->
   203KB), so the asset is now 500x470 and the line is gone. */
.adaptive-visual .speed-video {
  display: block; width: 100%; max-width: 309px;
  margin: 0 auto; border-radius: 4px;
}

/* ------------------------------------------------------ 05 Smart Ad Refresh */
.refresh-top { align-items: center; margin: 26px 0 44px; }
/* Frame + animation stack. Live layers an animated GIF (rec776671828
   comp-11_2.gif, 550x350) over the static browser-chrome SVG; measured on
   live/monetization/ at 1440: frame 489x369.89 @ x104/y3302, GIF 408x259.63
   @ x145/y3355 — i.e. the same relative slot as /ad_optimization/
   (41/489, 53/369.89, 408/489, 259.63/369.89). The wrapper is the
   positioning context so the slot holds at every width. MP4 is shared with
   /ad_optimization/ (that page likewise reuses this page's connection-speed.mp4). */
.refresh-frame { position: relative; width: 100%; max-width: 470px; margin: 0 auto; }
.refresh-browser { width: 100%; max-width: 470px; display: block; }
.refresh-anim {
  position: absolute;
  left: 8.384%; top: 14.328%; width: 83.436%; height: 70.19%;
  object-fit: fill;
}

/* ------------------------------------------------- 06 Seamless Integration */
.integration-panel { align-items: center; gap: 40px; }
.integration-code { max-width: 300px; margin: 0 auto; }

/* ------------------------------------------------------- 07 Analytics */
.analytics-body { align-items: start; gap: 48px; }
.analytics-cards { display: flex; flex-direction: column; gap: 22px; }
.analytics-dash { width: 100%; max-width: 620px; }

/* --------------------------------------------------------- 08 Payments */
.payments-panel { align-items: center; gap: 40px; }
.payments-illus { max-width: 250px; margin-left: auto; }

/* ------------------------------------------------ 09 Price Floor Optimization */
.pricefloor-note { margin-top: 30px; padding: 30px 34px; }

/* --------------------------------------------------- 10 Real people / support */
.support-panel { padding: 44px 56px 52px; }
.support-body { margin-top: 26px; align-items: center; gap: 48px; }
.support-photo { width: 100%; max-width: 400px; border-radius: 14px; }

/* ------------------------------------------------ 11 Google AdSense Mediation */
.adsense-diagram { width: 100%; max-width: 560px; margin: 0 auto; }

/* --------------------------------------------------------- 13 Clickio Bidder */
.bidder-diagram { width: 100%; max-width: 580px; margin-top: 26px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; gap: 34px; }
  .ihero-grid { grid-template-columns: 1fr; gap: 28px; }
  .analytics-body, .support-body, .integration-panel, .payments-panel { gap: 30px; }
  .payments-illus, .integration-code { margin: 0 auto; }
  /* stack visuals above copy consistently except where copy should lead */
  .adsense-body .col-visual { order: 2; }
}

@media screen and (max-width: 860px) {
  .ihero { padding: 32px 0 44px; }
  .ihero-title { text-align: left; font-size: clamp(34px, 9vw, 46px); margin: 6px 0 26px; }
  .ihero-sub { font-size: 16px; max-width: none; }
  .ihero-bullets li { font-size: 16px; }
  .ihero-cta .pill-btn { flex: 1; min-width: 140px; }

  .ipanel { padding: 30px 24px; border-radius: 28px; }
  .support-panel { padding: 30px 24px 36px; }

  .partner-logos { grid-template-columns: repeat(3, 1fr); }
  .partner-logos li { border-left: 0 !important; border-top: 1px solid #E1E7EF; }
  .partner-logos li:nth-child(-n+3) { border-top: 0; }

  .adformats-visual { min-height: 0; max-width: 420px; margin: 0 auto; }

  /* comparison tables: shrink type, keep inside the panel (no page scroll) */
  .cmp--refresh { padding-left: 16px; }
  /* Mobile keeps close to the desktop type scale (tester: the 14px version
     read cramped next to the old overflowing one): 15px cells / 16px bold
     headers, roomier 15px vertical padding, tighter 8px horizontal padding so
     the three auto-layout columns still fit 390px with no page h-scroll. */
  .cmp--refresh th, .cmp--refresh td { padding: 15px 8px; font-size: 15px; overflow-wrap: break-word; }
  .cmp--refresh thead th { font-size: 16px; line-height: 1.3; padding-top: 22px; padding-bottom: 18px; }
  /* Italian only: "Implementazione dell'aggiornamento" exceeds a third of
     390px even alone on a line, forcing the auto-layout table past its card.
     Dictionary hyphenation (page lang="it") keeps it inside. Other languages
     fit whole words, so they stay unhyphenated. */
  :lang(it) .cmp--refresh th, :lang(it) .cmp--refresh td { hyphens: auto; }
  /* auto layout: let columns size to their words so long ES/PT words
     ("Configuración incorrecta") are not clipped by fixed equal columns */
  .cmp--refresh table { table-layout: auto; }
  .cmp--factors { padding: 4px 16px 10px; }
  .cmp--factors th, .cmp--factors td { padding: 12px 4px; }
  .cmp--factors thead th { font-size: 15px; white-space: normal; }
  .cmp--factors tbody td:first-child { font-size: 14px; }
  .cmp--factors tbody td:first-child, .cmp--factors thead th:first-child { width: 36%; }
}

@media screen and (max-width: 480px) {
  /* Below ~480px the 16px bold headers' longest words ("Implementación",
     "Configuración") force the three-column auto layout wider than the white
     card; one step down keeps whole words and the card edge intact. */
  .cmp--refresh thead th { font-size: 15px; }

  .partner-logos { grid-template-columns: repeat(2, 1fr); }
  .partner-logos li:nth-child(-n+3) { border-top: 1px solid #E1E7EF; }
  .partner-logos li:nth-child(-n+2) { border-top: 0; }
}
