/* ═══════════════════════════════════════════════════════════
   IT BOY — Portfolio V2.1 CSS
   Agency Showcase + Case Study + Inline Media
   ═══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   GRID
══════════════════════════════════════════════════ */
.pv2-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

/* ══════════════════════════════════════════════════
   CARD — base
══════════════════════════════════════════════════ */
.pv2-card {
  border-radius: var(--radius, 16px);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.35s ease,
              border-color 0.3s ease;
  cursor: default;
  /* stagger reveal animation */
  animation-fill-mode: both;
}
.pv2-card:hover {
  transform: translateY(-6px);
  border-color: rgba(26,86,219,0.35);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 0 0 1px rgba(26,86,219,0.12);
}

/* ── Hero image area ── */
.pv2-hero-img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-secondary);
}
.pv2-img-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94),
              filter   0.4s ease;
  will-change: transform;
}
.pv2-card:hover .pv2-img-bg {
  transform: scale(1.06);
  filter: brightness(0.5);
}

/* Category tag */
.pv2-category-tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 3;
  background: rgba(26,86,219,0.88);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Video play badge */
.pv2-play-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  z-index: 3;
  width: 52px; height: 52px;
  background: rgba(26,86,219,0.85);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
  box-shadow: 0 0 24px rgba(26,86,219,0.5);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.pv2-card:hover .pv2-play-badge { opacity: 0; transform: translate(-50%,-50%) scale(0.8); }

/* Single-button overlay (Case Study only) */
.pv2-overlay-single {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.pv2-card:hover .pv2-overlay-single { opacity: 1; }

/* Case study button — the only button */
.pv2-btn.pv2-case {
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-display, 'Rajdhani', sans-serif);
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  background: var(--brand, #1a56db);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.2);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.2s ease,
              background 0.2s ease;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pv2-btn.pv2-case:hover {
  background: var(--brand-light, #3b82f6);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26,86,219,0.5);
}

/* ── Info panel ── */
.pv2-info { padding: 20px 22px 16px; }
.pv2-info h3 {
  font-family: var(--font-display, 'Rajdhani', sans-serif);
  font-size: 1.15rem; font-weight: 700;
  color: var(--text-primary);
  margin: 6px 0 8px; line-height: 1.25;
}
.pv2-info > p {
  font-size: 0.84rem; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: 14px;
}
.pv2-tech-stack { display: flex; flex-wrap: wrap; gap: 5px; }
.pv2-tech {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 100px;
  background: rgba(26,86,219,0.09);
  border: 1px solid rgba(26,86,219,0.18);
  color: var(--brand-light, #3b82f6);
  transition: background 0.2s;
}
.pv2-tech:hover { background: rgba(26,86,219,0.18); }

/* ══════════════════════════════════════════════════
   INLINE PROJECT MEDIA SECTION
══════════════════════════════════════════════════ */
.pv2-media-section {
  padding: 0 22px 22px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
}
.pv2-media-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-light, #3b82f6);
  margin-bottom: 12px;
}

/* 3-column grid */
.pv2-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
/* 2-column variant */
.pv2-media-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.pv2-media-item {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}
.pv2-media-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
              filter 0.3s ease;
}
.pv2-media-item:hover img {
  transform: scale(1.08);
  filter: brightness(0.75);
}
/* Zoom icon on hover */
.pv2-media-item::after {
  content: '⤢';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: rgba(255,255,255,0.9);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.pv2-media-item:hover::after { opacity: 1; }

/* Video media items — play icon instead of zoom */
.pv2-media-video::after { content: '▶'; font-size: 1.2rem; }

/* Play badge on video thumbnails */
.pv2-media-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 34px; height: 34px;
  background: rgba(26,86,219,0.88);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: #fff;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.pv2-media-video:hover .pv2-media-play { opacity: 0; }


/* ══════════════════════════════════════════════════
   MEDIA LIGHTBOX (independent from plb-overlay)
   Opens when a pv2-media-item is clicked
══════════════════════════════════════════════════ */
.mlb-overlay {
  position: fixed;
  inset: 0;
  z-index: 70000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mlb-overlay.mlb-open {
  opacity: 1;
  pointer-events: auto;
}
.mlb-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,6,10,0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.mlb-dialog {
  position: relative;
  z-index: 2;
  width: min(1040px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.mlb-overlay.mlb-open .mlb-dialog { transform: scale(1) translateY(0); }

.mlb-media {
  width: 100%;
  max-height: 78vh;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #000;
  box-shadow: 0 40px 120px rgba(0,0,0,0.7);
}
.mlb-media img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}
.mlb-media video {
  width: 100%;
  max-height: 78vh;
  display: block;
  border-radius: 16px;
}
.mlb-caption {
  margin-top: 14px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
}

/* Dot counter */
.mlb-dots {
  display: flex; gap: 7px; margin-top: 16px;
}
.mlb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}
.mlb-dot.active {
  background: var(--brand-light, #3b82f6);
  transform: scale(1.3);
}

/* Close button */
.mlb-close {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 70010;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.mlb-close:hover { background: rgba(26,86,219,0.8); transform: scale(1.1); }

/* ── Glassmorphism nav buttons ── */
.mlb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 70010;
  width: 54px; height: 54px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: #fff;
  border: 1.5px solid rgba(255,255,255,0.25);
  /* Premium glassmorphism */
  background: rgba(26,86,219,0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0  4px 20px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.15),
    0  0  28px rgba(26,86,219,0.35);
  transition: background 0.25s ease,
              transform  0.25s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.25s ease,
              opacity    0.25s ease;
  user-select: none;
}
.mlb-nav:hover {
  background: rgba(26,86,219,0.75);
  transform: translateY(-50%) scale(1.12);
  box-shadow:
    0  6px 28px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.2),
    0  0  42px rgba(59,130,246,0.6);
}
.mlb-nav:active { transform: translateY(-50%) scale(0.95); }
.mlb-nav.disabled {
  opacity: 0.28;
  pointer-events: none;
  box-shadow: none;
}
.mlb-prev { left:  max(14px, calc(50% - min(520px, 48vw) - 44px)); }
.mlb-next { right: max(14px, calc(50% - min(520px, 48vw) - 44px)); }

/* Light mode */
[data-theme="light"] .mlb-nav {
  background: rgba(26,86,219,0.55);
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 4px 20px rgba(26,86,219,0.35), 0 0 28px rgba(26,86,219,0.25);
}
[data-theme="light"] .mlb-nav:hover {
  background: rgba(26,86,219,0.82);
  box-shadow: 0 6px 28px rgba(26,86,219,0.5), 0 0 42px rgba(59,130,246,0.5);
}
[data-theme="light"] .mlb-backdrop { background: rgba(200,215,240,0.92); }
[data-theme="light"] .mlb-caption { color: rgba(20,30,60,0.6); }


/* ══════════════════════════════════════════════════
   CASE STUDY MODAL (unchanged from v2)
══════════════════════════════════════════════════ */
.csm-overlay {
  position: fixed; inset: 0; z-index: 60000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
}
.csm-overlay.csm-open { opacity: 1; pointer-events: auto; }
.csm-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,6,10,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.csm-dialog {
  position: relative; z-index: 2;
  width: min(920px, 94vw); max-height: 92vh;
  background: var(--bg-card, #161a1e);
  border: 1px solid rgba(59,130,246,0.18); border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 60px 140px rgba(0,0,0,0.7), 0 0 80px rgba(26,86,219,0.08);
  transform: scale(0.93) translateY(24px);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.csm-overlay.csm-open .csm-dialog { transform: scale(1) translateY(0); }
.csm-scroll {
  overflow-y: auto; max-height: 92vh;
  scrollbar-width: thin; scrollbar-color: var(--brand) transparent;
}
.csm-scroll::-webkit-scrollbar { width: 4px; }
.csm-scroll::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 2px; }
.csm-close {
  position: absolute; top: 18px; right: 18px; z-index: 10;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%; color: #fff; font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.csm-close:hover { background: rgba(26,86,219,0.8); transform: scale(1.1); }
.csm-hero { width: 100%; height: 320px; position: relative; background: var(--bg-secondary, #0e1118); }
.csm-hero-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.csm-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,14,22,0.95) 0%, rgba(10,14,22,0.3) 60%, transparent 100%);
}
.csm-hero-label { position: absolute; bottom: 24px; left: 32px; display: flex; align-items: center; gap: 10px; }
.csm-hero-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 100px; background: var(--brand, #1a56db); color: #fff;
}
.csm-hero-title { font-family: var(--font-display,'Rajdhani',sans-serif); font-size: 1.5rem; font-weight: 700; color: #fff; }
.csm-body { padding: 36px 40px 48px; }
.csm-section { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.csm-section:last-child { border-bottom: none; margin-bottom: 0; }
.csm-section-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-light,#3b82f6); margin-bottom: 10px; }
.csm-section h3 { font-family: var(--font-display,'Rajdhani',sans-serif); font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.csm-section p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.75; }
.csm-tech-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.csm-tech-tag { font-size: 0.78rem; font-weight: 600; padding: 5px 13px; border-radius: 8px; background: rgba(26,86,219,0.1); border: 1px solid rgba(26,86,219,0.2); color: var(--brand-light,#3b82f6); }
.csm-results-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 16px; margin-top: 8px; }
.csm-metric { background: var(--bg-secondary,#111416); border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; text-align: center; transition: border-color 0.2s; }
.csm-metric:hover { border-color: rgba(26,86,219,0.4); }
.csm-metric-val { font-family: var(--font-display,'Rajdhani',sans-serif); font-size: 1.75rem; font-weight: 700; color: var(--brand-light,#3b82f6); line-height: 1; margin-bottom: 6px; }
.csm-metric-label { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }
.csm-media-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 12px; margin-top: 8px; }
.csm-media-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: zoom-in; }
.csm-media-img:hover { transform: scale(1.02); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.csm-media-video { width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block; }
.csm-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
[data-theme="light"] .csm-dialog { background: var(--bg-card,#fff); border-color: rgba(26,86,219,0.15); }
[data-theme="light"] .csm-hero  { background: var(--bg-secondary, #f0f2f8); }
[data-theme="light"] .csm-metric { background: var(--bg-secondary,#f5f7fa); }
[data-theme="light"] .csm-backdrop { background: rgba(240,244,255,0.92); }
[data-theme="light"] .csm-tech-tag { background: rgba(26,86,219,0.07); border-color: rgba(26,86,219,0.18); }


/* ══════════════════════════════════════════════════
   PREMIUM PORTFOLIO ANIMATIONS
══════════════════════════════════════════════════ */

/* Card reveal — cinematic stagger */
@keyframes pv2CardReveal {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pv2-card.revealed {
  animation: pv2CardReveal 0.65s cubic-bezier(0.34,1.56,0.64,1) both;
}
.pv2-card.revealed:nth-child(2)  { animation-delay: 0.07s; }
.pv2-card.revealed:nth-child(3)  { animation-delay: 0.14s; }
.pv2-card.revealed:nth-child(4)  { animation-delay: 0.21s; }
.pv2-card.revealed:nth-child(5)  { animation-delay: 0.28s; }
.pv2-card.revealed:nth-child(6)  { animation-delay: 0.35s; }

/* Filter transition — cards fade+slide when filter changes */
.pv2-card.pv2-filter-exit {
  animation: pv2FilterExit 0.22s ease forwards;
}
@keyframes pv2FilterExit {
  to { opacity: 0; transform: translateY(12px) scale(0.96); }
}
.pv2-card.pv2-filter-enter {
  animation: pv2FilterEnter 0.38s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes pv2FilterEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Media item click ripple */
@keyframes mlbRipple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}
.pv2-media-item .mlb-ripple {
  position: absolute; inset: 0;
  border-radius: 8px;
  background: rgba(26,86,219,0.3);
  animation: mlbRipple 0.45s ease-out forwards;
  pointer-events: none;
}


/* ══════════════════════════════════════════════════
   LIGHT MODE
══════════════════════════════════════════════════ */
[data-theme="light"] .pv2-card {
  background: var(--bg-card,#fff); border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .pv2-card:hover {
  border-color: rgba(26,86,219,0.3);
  box-shadow: 0 20px 60px rgba(26,86,219,0.12), 0 0 0 1px rgba(26,86,219,0.12);
}
[data-theme="light"] .pv2-tech { background: rgba(26,86,219,0.07); border-color: rgba(26,86,219,0.18); }
[data-theme="light"] .pv2-media-section { border-top-color: rgba(0,0,0,0.08); }


/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .pv2-grid { grid-template-columns: repeat(2,1fr); gap: 22px; }
}
@media (max-width: 768px) {
  .pv2-grid { grid-template-columns: 1fr; gap: 18px; }
  .pv2-hero-img { height: 200px; }
  /* On mobile always show the case study button */
  .pv2-overlay-single { opacity: 1; background: linear-gradient(to top,rgba(0,0,0,0.65) 0%,transparent 60%); }
  .pv2-card .pv2-img-bg { filter: brightness(0.8); }
  .csm-body { padding: 24px 22px 36px; }
  .csm-hero  { height: 240px; }
  .csm-hero-title { font-size: 1.15rem; }
  .csm-results-grid { grid-template-columns: repeat(2,1fr); }
  .mlb-nav { width: 44px; height: 44px; font-size: 1.2rem; }
  .mlb-prev { left: 8px; }
  .mlb-next { right: 8px; }
}
@media (max-width: 480px) {
  .pv2-media-grid { grid-template-columns: repeat(2,1fr); }
  .pv2-btn.pv2-case { padding: 9px 20px; font-size: 0.8rem; }
  .mlb-nav { width: 38px; height: 38px; font-size: 1rem; }
}


/* ══════════════════════════════════════════════════
   CASE STUDY — Clickable Media Grid (Fix 02–05)
   Appears directly below hero (position 2)
══════════════════════════════════════════════════ */
.csm-media-grid-clickable {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

/* Media item — same look as inline card media */
.csm-media-item {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}
.csm-media-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
              filter   0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.csm-media-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.65);
}

/* Zoom badge for images */
.csm-media-zoom-badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: rgba(255,255,255,0.9);
  opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none;
}
.csm-media-img-item:hover .csm-media-zoom-badge { opacity: 1; }

/* Play badge for videos */
.csm-media-play-badge {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 44px; height: 44px;
  background: rgba(26,86,219,0.85);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
  box-shadow: 0 0 20px rgba(26,86,219,0.5);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.csm-media-video-item:hover .csm-media-play-badge {
  opacity: 0;
  transform: translate(-50%,-50%) scale(0.8);
}

/* Smooth MLB image transition (Fix 05) */
.mlb-media img {
  animation: mlbImgFadeIn 0.28s ease both;
}
@keyframes mlbImgFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.mlb-media video {
  animation: mlbImgFadeIn 0.28s ease both;
}

/* Light mode */
[data-theme="light"] .csm-media-item { border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .csm-media-play-badge { box-shadow: 0 0 20px rgba(26,86,219,0.35); }

/* Fix 02: hero height handled in main .csm-hero rule above */


/* ══════════════════════════════════════════════════
   HERO SLIDESHOW NAV (Fix 03)
══════════════════════════════════════════════════ */

/* Smooth crossfade on hero image */
.csm-hero-img {
  transition: opacity 0.25s ease, transform 0.28s ease;
}

/* Hero prev/next buttons — glassmorphism style */
.csm-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(26,86,219,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: background 0.22s ease,
              transform  0.22s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.22s ease;
  user-select: none;
}
.csm-hero-prev { left: 16px; }
.csm-hero-next { right: 16px; }
.csm-hero-nav:hover {
  background: rgba(26,86,219,0.75);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 32px rgba(59,130,246,0.5);
}
.csm-hero-nav:active { transform: translateY(-50%) scale(0.94); }

/* Dot indicators */
.csm-hero-dots {
  position: absolute;
  bottom: 62px; left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex; gap: 7px;
}
.csm-hero-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.csm-hero-dot.active {
  background: #fff;
  transform: scale(1.35);
}

/* Light mode */
[data-theme="light"] .csm-hero-nav {
  background: rgba(26,86,219,0.55);
  border-color: rgba(255,255,255,0.35);
}
[data-theme="light"] .csm-hero-nav:hover {
  background: rgba(26,86,219,0.85);
}
[data-theme="light"] .csm-hero-dot { background: rgba(10,20,60,0.35); }
[data-theme="light"] .csm-hero-dot.active { background: rgba(10,20,60,0.85); }

/* Mobile */
@media (max-width: 480px) {
  .csm-hero-nav { width: 34px; height: 34px; font-size: 1.1rem; }
  .csm-hero-prev { left: 10px; }
  .csm-hero-next { right: 10px; }
}


/* ══════════════════════════════════════════════════
   R03 — Card Autoplay Video
══════════════════════════════════════════════════ */
.pv2-card-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none; /* don't block the case study button */
}
.pv2-card-video.pv2-video-ready {
  opacity: 1;
}
/* When video is playing, hide the static bg and play badge */
.pv2-card-video.pv2-video-ready ~ .pv2-play-badge {
  opacity: 0;
}


/* ══════════════════════════════════════════════════
   R02 — Hero Video Element
══════════════════════════════════════════════════ */
.csm-hero-slide-wrap {
  width: 100%; height: 100%;
  position: relative;
  transition: opacity 0.25s ease, transform 0.28s ease;
}
.csm-hero-video {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  position: relative;
  z-index: 2; /* above overlay so controls are clickable */
}
/* When hero contains a video: hide the gradient overlay completely so controls are unobstructed */
.csm-hero:has(.csm-hero-video) .csm-hero-overlay {
  opacity: 0;
  pointer-events: none;
}
/* When hero contains a video: taller to give controls room */
.csm-hero:has(.csm-hero-video) {
  height: 380px;
}
/* Hero label (badge + title) sits above video at z-index 8 but must not block controls */
.csm-hero:has(.csm-hero-video) .csm-hero-label {
  z-index: 9;
  background: rgba(10,14,22,0.65);
  padding: 6px 14px;
  border-radius: 8px;
  bottom: 8px;
  left: 12px;
  pointer-events: none;
}
/* Hero nav buttons sit above video */
.csm-hero:has(.csm-hero-video) .csm-hero-nav { z-index: 9; }
.csm-hero:has(.csm-hero-video) .csm-hero-dots { z-index: 9; bottom: 50px; }
/* slide-wrap must not clip video controls */
.csm-hero-slide-wrap { overflow: visible; }


/* ══════════════════════════════════════════════════
   R01 — Active Media Item Highlight (sync)
══════════════════════════════════════════════════ */
.csm-media-item.csm-media-active {
  outline: 2.5px solid var(--brand-light, #3b82f6);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.20);
}
.csm-media-item.csm-media-active img {
  filter: brightness(0.85);
}
/* Light mode */
[data-theme="light"] .csm-media-item.csm-media-active {
  outline-color: var(--brand, #1a56db);
  box-shadow: 0 0 0 4px rgba(26,86,219,0.15);
}


/* ══════════════════════════════════════════════════
   Audio Enable Overlay — "Click anywhere to enable audio"
   Appears on hero video when browser blocks unmuted autoplay.
   Matches existing glassmorphism design language.
══════════════════════════════════════════════════ */
.csm-audio-prompt {
  position: absolute;
  bottom: 70px;          /* above the hero label */
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 100px;
  /* Glassmorphism */
  background: rgba(10, 14, 26, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.csm-audio-prompt.csm-audio-prompt-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.csm-audio-icon {
  font-size: 1rem;
  line-height: 1;
}
.csm-audio-text {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.92);
}

[data-theme="light"] .csm-audio-prompt {
  background: rgba(240, 245, 255, 0.75);
  border-color: rgba(26, 86, 219, 0.18);
  box-shadow: 0 6px 24px rgba(26, 86, 219, 0.18);
}
[data-theme="light"] .csm-audio-text {
  color: rgba(10, 20, 60, 0.88);
}

@media (max-width: 480px) {
  .csm-audio-prompt {
    bottom: 56px;
    padding: 8px 16px;
    font-size: 0.73rem;
  }
}
