/* =========================================================================
   PP Content Studio — front-end rules for designer-managed media
   (logo aspect ratio, display size, fit / focal point, alignment, hero images, mobile menu)
   ========================================================================= */

/* logos always keep their aspect ratio; photos follow the designer's fit and focal point */
img[data-pp-fit] { object-fit: var(--pp-fit, contain) !important; object-position: var(--pp-px, 50%) var(--pp-py, 50%) !important; }

/* display size = a percentage of the design default of this usage (desktop) */
img[data-pp-k][data-pp-size="height"] { height: calc(var(--pp-dh, 48px) * var(--pp-k, 1)) !important; width: auto !important; max-height: none !important; }
img[data-pp-k][data-pp-size="width"] { width: calc(100% * var(--pp-k, 1)) !important; height: auto !important; }
@media (max-width: 768px) {
  img[data-pp-k][data-pp-km][data-pp-size="height"] { height: calc(var(--pp-dhm, var(--pp-dh, 40px)) * var(--pp-km, 1)) !important; }
  img[data-pp-k][data-pp-km][data-pp-size="width"] { width: calc(100% * var(--pp-km, 1)) !important; }
}

/* alignment of photos / illustrations */
img[data-pp-align] { display: block; }
img[data-pp-align="start"] { margin-inline: 0 auto; }
img[data-pp-align="center"] { margin-inline: auto; }
img[data-pp-align="end"] { margin-inline: auto 0; }

/* optional hero image (set in Content Studio → Media → Hero images) */
.pp-hero-media { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.pp-hero-media img { width: 100% !important; height: 100% !important; display: block; }
.pp-hero-media picture { display: block; width: 100%; height: 100%; }
.pp-hero-media::after { content: ""; position: absolute; inset: 0; }
.pp-hero-media[data-pp-overlay="dark"]::after { background: linear-gradient(180deg, rgba(17, 17, 17, .74), rgba(17, 17, 17, .58)); }
.pp-hero-media[data-pp-overlay="light"]::after { background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .72)); }
.pp-hero-media[data-pp-overlay="none"]::after { display: none; }
section:has(> .pp-hero-media), div:has(> .pp-hero-media) { position: relative; isolation: isolate; }
section:has(> .pp-hero-media) > *:not(.pp-hero-media), div:has(> .pp-hero-media) > *:not(.pp-hero-media) { position: relative; z-index: 1; }
.pp-media-cap { font-size: 13px; color: var(--pp-muted, #4E4E50); margin-top: 10px; text-align: start; }

/* the approved square lockups need a square box: header logo heights for the lockup (design default) */
.pp-header.pp-solid .pp-logo img { height: 52px; }
.pp-header:not(.pp-solid) .pp-logo img { height: 56px; }
@media (max-width: 640px) { .pp-logo img { height: 44px !important; } }

/* corporate logo on a dark header: the approved coloured file sits on a white plate (no recolouring) */
.pp-header:not(.pp-solid) .pp-logo[data-pp-plate] { background: #fff; border-radius: 12px; padding: 4px 7px; }
[dir="rtl"] .pp-menu-ico { transform: scaleX(-1); }

/* ---------- navigation on small screens: a Menu button opens the same navigation ---------- */
.pp-menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pp-menu-btn { display: none; }
@media (max-width: 1020px) {
  .pp-header-inner .pp-lang { margin-inline-start: auto; }
  .pp-menu-btn { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: 12px; background: transparent; border: 1.5px solid currentColor; color: #1a2230; border-radius: 10px; padding: 8px 12px; font-family: inherit; font-size: 14px; font-weight: var(--pp-w-ui); cursor: pointer; user-select: none; line-height: 1; }
  .pp-header:not(.pp-solid) .pp-menu-btn { color: #fff; }
  .pp-menu-ico { width: 18px; height: 14px; position: relative; display: inline-block; }
  .pp-menu-ico::before, .pp-menu-ico::after, .pp-menu-ico i { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; }
  .pp-menu-ico::before { top: 0; } .pp-menu-ico::after { bottom: 0; } .pp-menu-ico i { top: 6px; }
  .pp-menu-toggle:checked ~ .pp-nav { display: flex; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; gap: 0; margin: 0; background: #fff; box-shadow: 0 18px 34px rgba(11, 13, 18, .16); padding: 8px 28px 14px; }
  .pp-menu-toggle:checked ~ .pp-nav a { color: #1a2230 !important; opacity: 1; padding: 13px 0; border-bottom: 1px solid var(--pp-line); font-size: 15px; }
  .pp-menu-toggle:checked ~ .pp-nav a:last-child { border-bottom: 0; }
  .pp-menu-toggle:checked ~ .pp-nav a.on { color: var(--pp-red) !important; }
  .pp-menu-toggle:focus-visible ~ .pp-menu-btn { outline: 2.5px solid var(--pp-red); outline-offset: 3px; }
}

/* ---------- product pages written in the block editor (Content Studio → Products) ---------- */
.pps-hero { padding: calc(72px + 40px) 0 48px; background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); }
.pps-hero-logo { display: block; height: 72px; width: auto; max-width: 320px; object-fit: contain; margin: 0 0 20px; }
.pps-hero-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pps-hero .pp-h1 { max-width: 860px; }
.pps-hero .pp-lead { max-width: 780px; }
.pps-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.pps-sec { padding: 72px 0; }
.pps-soft { background: var(--pp-soft); }
.pps-in { max-width: var(--pp-wrap); margin: 0 auto; padding: 0 28px; }
.pps-sec h2 { font-size: 36px; font-weight: var(--pp-w-heading); line-height: var(--pp-lh-h2); margin: 0 0 18px; color: var(--pp-text); }
.pps-sec h3 { font-size: 19px; font-weight: var(--pp-w-subheading); margin: 0 0 8px; color: var(--pp-text); }
.pps-sec p { font-size: 16.5px; line-height: 1.8; color: #3f4750; max-width: 820px; margin: 0 0 14px; }
.pps-sec ul, .pps-sec ol { margin: 0 0 14px; padding-inline-start: 22px; max-width: 820px; }
.pps-sec li { font-size: 15.5px; line-height: 1.8; color: #3f4750; margin-bottom: 6px; }
.pps-sec li::marker { color: var(--pp-red); font-weight: var(--pp-w-data); }
.pps-sec .pps-eyebrow { display: inline-block; font-size: 12.5px; font-weight: var(--pp-w-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--pp-red); margin: 0 0 16px; }
.pps-sec .pps-note { font-size: 13px; color: #8a8f96; border-inline-start: 3px solid var(--pp-line); padding-inline-start: 14px; }
.pps-card { background: #fff; border: 1px solid var(--pp-line); border-radius: 14px; padding: 22px 24px; height: 100%; }
.pps-sec .pps-card h3 { color: var(--pp-red-deep); font-size: 17px; }
.pps-sec .pps-card p { font-size: 14.5px; line-height: 1.7; margin: 0; max-width: none; }
.pps-fact { background: #fff; border: 1px solid var(--pp-line); border-inline-start: 4px solid var(--pp-red); border-radius: 14px; padding: 22px 24px; height: 100%; }
.pps-sec .pps-fact-n { font-size: 30px; font-weight: var(--pp-w-data); color: var(--pp-red-deep); margin: 0 0 4px; letter-spacing: -.01em; line-height: 1.2; }
.pps-sec .pps-fact-l { font-size: 13.5px; color: #54687c; margin: 0; }
.pps-img img { border-radius: 14px; width: 100%; height: auto; object-fit: cover; }
.pps-sec .pps-img figcaption { font-size: 13px; color: var(--pp-muted); margin: 10px 0 0; text-align: start; }
.pps-sec .wp-block-button__link { background: var(--pp-red); color: #fff; border-radius: 10px; font-size: 14.5px; font-weight: var(--pp-w-ui); padding: 12px 24px; }
.pps-sec .wp-block-button__link:hover { background: var(--pp-red-deep); }
.pps-cols { --wp--style--block-gap: 20px; gap: 20px; align-items: stretch; }
.pps-cols > .wp-block-column { margin: 0; }
.pps-media img { height: 100%; min-height: 240px; }
.pps-body > p, .pps-body > .wp-block-group:not(.pps-sec), .pps-body > .pps-note { max-width: var(--pp-wrap); margin-inline: auto; padding: 24px 28px 0; }
@media (max-width: 1020px) {
  .pps-sec { padding: 52px 0; }
  .pps-sec h2 { font-size: 28px; }
  .pps-cols { --wp--style--block-gap: 14px; gap: 14px; }
}
