/* Case-study opening: a concise client profile followed by a wide media stage. */
.pv4-platform .pv4-case-body{max-width:1480px;margin-inline:auto}
.pv4-platform .pv4-case-hero{display:flex!important;flex-direction:column;gap:clamp(18px,2.7vw,38px)}
.pv4-platform .pv4-case-info{position:relative;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr);align-items:start;gap:clamp(22px,3vw,44px);width:100%;padding:clamp(28px,4vw,58px);overflow:hidden;border-radius:24px;background:radial-gradient(circle at 4% 105%,rgba(233,90,32,.16),transparent 36%),linear-gradient(135deg,#10293f,#163b55 65%,#0c263c);color:#fff}
.pv4-platform .pv4-case-info:before{content:"";position:absolute;inset:auto -90px -240px auto;width:500px;height:500px;border:1px solid rgba(255,255,255,.08);border-radius:50%;box-shadow:0 0 0 55px rgba(255,255,255,.025),0 0 0 110px rgba(255,255,255,.018);pointer-events:none}
.pv4-platform .pv4-case-intro,.pv4-platform .pv4-case-summary,.pv4-platform .pv4-case-info>.pv4-kpis,.pv4-platform .pv4-case-info>.pv4-actions{position:relative;z-index:1;min-width:0}
.pv4-platform .pv4-case-eyebrow{display:flex;align-items:center;gap:8px;margin-bottom:22px;color:#ffad82;font-size:11px;font-weight:800;letter-spacing:.14em}
.pv4-platform .pv4-case-eyebrow i{width:8px;height:8px;border-radius:50%;background:#f27437;box-shadow:0 0 0 5px rgba(242,116,55,.15)}
.pv4-platform .pv4-case-intro .pv4-tag{display:inline-flex;align-items:center;min-height:27px;padding:4px 11px;border-radius:999px;background:#f16a2e;color:#fff;font-size:11px;font-weight:800}
.pv4-platform .pv4-case-info h2{max-width:18ch;margin:16px 0 14px;color:#fff;font-size:clamp(32px,3.3vw,56px);font-weight:800;line-height:1.17;letter-spacing:-.03em;overflow-wrap:anywhere}
.pv4-platform .pv4-case-intro>p{max-width:58ch;margin:0;color:#cbd9e4;font-size:clamp(14px,1.1vw,17px);line-height:1.85}
.pv4-platform .pv4-case-summary{padding:clamp(20px,2.2vw,30px);border:1px solid rgba(255,255,255,.16);border-radius:18px;background:rgba(255,255,255,.065);backdrop-filter:blur(8px)}
.pv4-platform .pv4-case-summary-label{display:block;margin-bottom:8px;color:#ffad82;font-size:10px;font-weight:800;letter-spacing:.13em}
.pv4-platform .pv4-case-summary dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px;margin:0}
.pv4-platform .pv4-case-summary dl div{min-width:0;margin:0;padding:13px 0;border:0;border-bottom:1px solid rgba(255,255,255,.13)}
.pv4-platform .pv4-case-summary dt{margin-bottom:6px;color:#aec4d3;font-size:11px;font-weight:600}
.pv4-platform .pv4-case-summary dd{margin:0;color:#fff;font-size:13px;font-weight:800;line-height:1.55;overflow-wrap:anywhere}
.pv4-platform .pv4-case-counts{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}
.pv4-platform .pv4-case-counts span{display:flex;align-items:baseline;gap:6px;padding:7px 10px;border:1px solid rgba(255,255,255,.17);border-radius:9px;background:rgba(255,255,255,.055);color:#e7eff5;font-size:10px;font-weight:700}
.pv4-platform .pv4-case-counts strong{color:#ffad82;font:800 18px Arial,sans-serif}
.pv4-platform .pv4-case-info>.pv4-kpis{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px;margin:0}
.pv4-platform .pv4-case-info>.pv4-kpis>div{min-width:150px;margin:0;padding:13px 17px;border:1px solid rgba(255,255,255,.13);border-radius:12px;background:rgba(255,255,255,.065)}
.pv4-platform .pv4-case-info>.pv4-kpis strong,.pv4-platform .pv4-case-info>.pv4-kpis b{color:#ffad82}
.pv4-platform .pv4-case-info>.pv4-kpis span{color:#e3edf4}
.pv4-platform .pv4-case-info>.pv4-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px;margin:0;padding-top:3px}
.pv4-platform .pv4-case-info>.pv4-actions .pv4-btn{min-height:46px}
.pv4-platform .pv4-case-info>.pv4-actions .pv4-btn-outline{border-color:rgba(255,255,255,.5);color:#fff;background:transparent}
.pv4-platform .pv4-case-info>.pv4-actions .pv4-btn-outline:hover{background:rgba(255,255,255,.12)}

/* ==========================================================================
   SMART MEDIA SHOWCASE — UNIFIED STAGE (PHONE + TABLET + THUMBNAILS + FULLSCREEN)
   ========================================================================== */
.pv4-platform .pv4-managed-media {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding: clamp(20px, 2.5vw, 36px);
  border: 1px solid #d8e3e9;
  border-radius: 24px;
  background: #f3f7f9;
  box-sizing: border-box;
}

.pv4-platform .pv4-media-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(20, 46, 67, 0.08);
}
.pv4-platform .pv4-media-heading-title .pv4-media-subheading {
  display: block;
  margin-bottom: 6px;
  color: #d95a25;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}
.pv4-platform .pv4-media-heading-title h3 {
  margin: 0;
  color: #142e43;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
}
.pv4-platform .pv4-media-heading-count {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pv4-platform .pv4-badge-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d8e3e9;
  color: #4b6274;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.pv4-platform .pv4-badge-count strong {
  color: #e95a20;
  font-size: 16px;
  font-weight: 900;
}

/* Central Stage: Phone + Tablet aligned with perfect visual balance */
.pv4-platform .pv4-managed-media .pv4-media-pair {
  width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

/* When BOTH Tablet and Phone are present:
   Row 1: Tablet Screen & Phone Screen are direct row partners, perfectly vertically centered against each other.
   Row 2: Tablet Thumbnails (directly under Tablet Screen).
   Row 3: Tablet Actions (directly under Tablet Thumbnails).
   In RTL: Tablet is on Right (col 1), Phone is on Left (col 2).
   In LTR: Phone is on Left (col 1), Tablet is on Right (col 2).
*/
.pv4-platform .pv4-managed-media .pv4-media-pair.has-both {
  display: grid;
  grid-template-columns: minmax(0, 720px) 240px;
  grid-template-areas:
    "tablet phone"
    "thumbs ."
    "actions .";
  align-items: center;
  justify-content: center;
  column-gap: clamp(24px, 3.5vw, 42px);
  row-gap: 0;
}

[dir="ltr"] .pv4-platform .pv4-managed-media .pv4-media-pair.has-both {
  grid-template-columns: 240px minmax(0, 720px);
  grid-template-areas:
    "phone tablet"
    ".     thumbs"
    ".     actions";
}

.pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-tablet-carousel {
  display: contents;
}

.pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-tablet-frame {
  grid-area: tablet;
  width: 100%;
  max-width: 720px;
  align-self: center;
  justify-self: center;
}

.pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-reel-phone-wrap {
  grid-area: phone;
  width: 240px;
  max-width: 240px;
  align-self: center;
  justify-self: center;
  margin: 0;
}

.pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-tablet-thumbnails {
  grid-area: thumbs;
  justify-self: center;
  margin-top: 14px;
}

.pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-tablet-actions {
  grid-area: actions;
  justify-self: center;
  margin-top: 8px;
}

/* Tablet Only: Centered, wider canvas, zero dead space */
.pv4-platform .pv4-managed-media .pv4-media-pair.tablet-only {
  display: flex;
  justify-content: center;
}
.pv4-platform .pv4-managed-media .pv4-media-pair.tablet-only .pv4-tablet-carousel {
  flex: 1 1 840px;
  max-width: 880px;
  margin-inline: auto;
}

/* Phone Only: Centered, zero placeholder */
.pv4-platform .pv4-managed-media .pv4-media-pair.phone-only {
  display: flex;
  justify-content: center;
}
.pv4-platform .pv4-managed-media .pv4-media-pair.phone-only .pv4-reel-phone-wrap {
  flex: 0 0 280px;
  width: 280px;
  max-width: 300px;
  margin-inline: auto;
}

/* Tablet Frame & Screen Track */
.pv4-platform .pv4-managed-media .pv4-media-main.pv4-tablet-frame {
  position: relative !important;
  width: 100%;
  border-radius: 20px;
  background: #0d2133;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  overflow: visible !important;
}
.pv4-platform .pv4-managed-media .pv4-gallery-track {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  border-radius: 18px;
  overflow: hidden;
  background: #071725;
}
.pv4-platform .pv4-managed-media .pv4-gallery-track figure {
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.pv4-platform .pv4-managed-media .pv4-gallery-track :is(img, video, iframe) {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border: 0;
}

/* Tablet Navigation Arrows: Exactly vertically centered on left & right sides of the Tablet */
.pv4-platform .pv4-managed-media .pv4-tablet-nav {
  position: absolute !important;
  top: 50% !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  width: 100% !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  pointer-events: none !important;
  z-index: 120 !important;
}

.pv4-platform .pv4-managed-media .pv4-tablet-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: auto !important;
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  border-radius: 50% !important;
  background: #f26f21 !important;
  color: #ffffff !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 0 0 4px rgba(242, 111, 33, 0.18) !important;
  display: grid !important;
  place-items: center !important;
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  z-index: 130 !important;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease !important;
}

.pv4-platform .pv4-managed-media .pv4-tablet-prev {
  left: -16px !important;
  right: auto !important;
}

.pv4-platform .pv4-managed-media .pv4-tablet-next {
  right: -16px !important;
  left: auto !important;
}

.pv4-platform .pv4-managed-media .pv4-tablet-arrow:hover {
  background: #d84e16 !important;
  transform: translateY(-50%) scale(1.12) !important;
  box-shadow: 0 8px 24px rgba(242, 111, 33, 0.45), 0 0 0 6px rgba(242, 111, 33, 0.26) !important;
}
.pv4-platform .pv4-managed-media .pv4-tablet-arrow:active {
  transform: translateY(-50%) scale(0.96) !important;
}

/* Tablet Thumbnails: Directly beneath Tablet, centered */
.pv4-platform .pv4-managed-media .pv4-tablet-thumbnails {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 4px 6px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
}
.pv4-platform .pv4-managed-media .pv4-tablet-thumbnails button {
  width: 72px;
  height: 48px;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pv4-platform .pv4-managed-media .pv4-tablet-thumbnails button:hover {
  transform: translateY(-2px);
}
.pv4-platform .pv4-managed-media .pv4-tablet-thumbnails button[aria-pressed=true] {
  border-color: #e95a20;
  box-shadow: 0 3px 10px rgba(233, 90, 32, 0.28);
}
.pv4-platform .pv4-managed-media .pv4-tablet-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}
.pv4-platform .pv4-thumb-icon {
  font-size: 16px;
  color: #64748b;
}

/* Fullscreen Button: Directly beneath Thumbnails, centered with Tablet */
.pv4-platform .pv4-managed-media .pv4-tablet-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.pv4-platform .pv4-managed-media .pv4-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #142e43;
  border: 1px solid #c9d8e2;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 41, 63, 0.05);
  transition: all 0.2s ease;
}
.pv4-platform .pv4-managed-media .pv4-fullscreen-btn:hover {
  background: #e95a20;
  color: #ffffff;
  border-color: #e95a20;
  box-shadow: 0 4px 12px rgba(233, 90, 32, 0.25);
  transform: translateY(-1px);
}
.pv4-platform .pv4-fullscreen-icon {
  font-size: 14px;
  font-weight: bold;
}

/* Fullscreen Media Stage Styling */
.pv4-platform .pv4-media-main:fullscreen,
.pv4-platform .pv4-gallery:fullscreen {
  background: #050b11 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100vw !important;
  height: 100vh !important;
}
.pv4-platform .pv4-media-main:fullscreen .pv4-gallery-track,
.pv4-platform .pv4-gallery:fullscreen .pv4-gallery-track {
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
}

/* Phone Frame & Inner Carousel */
.pv4-platform .pv4-managed-media .pv4-reel-phone {
  position: relative;
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  aspect-ratio: 9/18.5;
  height: auto;
  padding: 10px;
  border-radius: 36px;
  background: #0d1e2d;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.pv4-platform .pv4-managed-media .pv4-reel-phone-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 16px;
  background: #050d14;
  border-radius: 12px;
  z-index: 15;
  pointer-events: none;
}
.pv4-platform .pv4-managed-media .pv4-reel-phone-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  z-index: 15;
  pointer-events: none;
}
.pv4-platform .pv4-managed-media .pv4-reel-phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  z-index: 1;
}
.pv4-platform .pv4-managed-media .pv4-reel-phone-screen figure {
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.pv4-platform .pv4-managed-media .pv4-reel-phone-screen :is(img, video, iframe) {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  object-fit: cover;
  position: static;
  transform: none;
}

/* Phone Navigation Arrows inside/around phone */
.pv4-platform .pv4-managed-media .pv4-reel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  pointer-events: none;
  z-index: 18;
  width: 100%;
  box-sizing: border-box;
}
.pv4-platform .pv4-managed-media .pv4-reel-nav button {
  position: relative;
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e95a20;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.pv4-platform .pv4-managed-media .pv4-reel-nav button:hover {
  background: #d84e16;
  transform: scale(1.1);
}
.pv4-platform .pv4-managed-media .pv4-reel-phone-caption {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: #435b6f;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.pv4-platform .pv4-managed-media .pv4-reel-phone-caption:empty {
  display: none;
}
.pv4-platform .pv4-managed-media .pv4-reel-count {
  display: block;
  text-align: center;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #7890a0;
}

/* Accessibility Focus Visible */
.pv4-platform .pv4-case-info :is(a,button):focus-visible,
.pv4-platform .pv4-managed-media :is(a,button):focus-visible {
  outline: 3px solid #ff9d6b;
  outline-offset: 3px;
}

/* Responsive Rules */
@media (max-width: 960px) {
  .pv4-platform .pv4-case-info {
    grid-template-columns: 1fr;
  }
  .pv4-platform .pv4-case-info > .pv4-kpis,
  .pv4-platform .pv4-case-info > .pv4-actions {
    grid-column: 1;
  }
  .pv4-platform .pv4-managed-media .pv4-media-pair.has-both {
    column-gap: 20px;
  }
  .pv4-platform .pv4-managed-media .pv4-reel-phone-wrap {
    width: 210px;
    max-width: 220px;
  }
}

@media (max-width: 768px) {
  .pv4-platform .pv4-case-hero {
    gap: 15px;
  }
  .pv4-platform .pv4-case-info {
    padding: 24px 19px;
    border-radius: 18px;
  }
  .pv4-platform .pv4-case-intro h2 {
    font-size: 31px;
  }
  .pv4-platform .pv4-case-summary {
    padding: 17px;
  }
  .pv4-platform .pv4-case-summary dl {
    gap: 0 10px;
  }
  .pv4-platform .pv4-case-info > .pv4-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .pv4-platform .pv4-case-info > .pv4-actions .pv4-btn {
    width: 100%;
    justify-content: center;
  }
  .pv4-platform .pv4-managed-media {
    padding: 18px 14px;
    border-radius: 18px;
  }
  .pv4-platform .pv4-media-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .pv4-platform .pv4-managed-media .pv4-media-pair.has-both {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 24px !important;
  }
  .pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-tablet-carousel {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    order: 1 !important;
  }
  .pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-tablet-frame {
    width: 100% !important;
  }
  .pv4-platform .pv4-managed-media .pv4-media-pair.has-both .pv4-reel-phone-wrap {
    width: min(250px, 80vw) !important;
    max-width: 250px !important;
    flex: 0 0 auto !important;
    order: 2 !important;
  }
  .pv4-platform .pv4-managed-media .pv4-gallery-track {
    aspect-ratio: 4/3;
  }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .pv4-platform[data-motion=on] .pv4-case[open] .pv4-case-intro {
    animation: pv4-case-rise .5s cubic-bezier(.2,.8,.2,1) both;
  }
  .pv4-platform[data-motion=on] .pv4-case[open] .pv4-case-summary {
    animation: pv4-case-rise .5s .09s cubic-bezier(.2,.8,.2,1) both;
  }
  .pv4-platform[data-motion=on] .pv4-case[open] .pv4-managed-media {
    animation: pv4-case-rise .55s .16s cubic-bezier(.2,.8,.2,1) both;
  }
  .pv4-platform[data-motion=on] .pv4-case[open] .pv4-case-counts span {
    animation: pv4-case-rise .45s cubic-bezier(.2,.8,.2,1) both;
  }
  .pv4-platform[data-motion=on] .pv4-case[open] .pv4-case-counts span:nth-child(2) {
    animation-delay: .08s;
  }
  .pv4-platform[data-motion=on] .pv4-case[open] .pv4-case-counts span:nth-child(3) {
    animation-delay: .16s;
  }
}
@keyframes pv4-case-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pv4-platform .pv4-case-info *,
  .pv4-platform .pv4-managed-media {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
