.wpdef-template-portfolio {
  --wtp-bg-2: #eef4fb;
  --wtp-fg-0: #0f172a;
  --wtp-fg-1: #334155;
  --wtp-fg-2: #64748b;
  --wtp-fg-3: #8a97aa;
  --wtp-accent: #0f3d73;
  --wtp-accent-soft: rgba(15, 61, 115, 0.10);
  --wtp-accent-line: rgba(15, 61, 115, 0.26);
  --wtp-radius-lg: 16px;
  --wtp-ease: cubic-bezier(.22, .61, .36, 1);

  grid-column: 1 / -1;
  scroll-margin-top: 104px;
  margin-top: 48px;
  border: 1px solid rgba(15, 61, 115, 0.14);
  border-radius: var(--wtp-radius-lg);
  overflow: hidden;
  background: #f8fbff;
  color: var(--wtp-fg-1);
  box-shadow: 0 18px 45px rgba(15, 35, 70, 0.08);
}

.wpdef-template-portfolio *,
.wpdef-template-portfolio *::before,
.wpdef-template-portfolio *::after {
  box-sizing: border-box;
}

.wpdef-template-portfolio a {
  color: inherit;
  text-decoration: none;
}

.wpdef-template-portfolio.wtp-no-head {
  margin-top: 0;
}

.wpdef-template-portfolio.wtp-no-head .wtp-tabs {
  margin-top: 28px;
}

.wtp-head {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  gap: 38px;
  align-items: center;
  padding: 52px;
  background:
    linear-gradient(90deg, rgba(15, 61, 115, 0.18) 0 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(0deg, rgba(15, 61, 115, 0.16) 0 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(135deg, #071827 0%, #0b1220 52%, #071018 100%);
  color: #eaf5fb;
}

.wtp-copy {
  max-width: 780px;
}

.wtp-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 22px;
  padding: 8px 11px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  background: rgba(8, 30, 48, 0.72);
  color: #7de9ff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wtp-copy h2 {
  margin: 0;
  max-width: 710px;
  color: #edf7fb;
  font-size: clamp(2.05rem, 4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.wtp-copy p {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(234, 245, 251, 0.74);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.72;
}

.wtp-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  color: rgba(234, 245, 251, 0.84);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.wtp-points li {
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.wtp-video-card {
  position: relative;
  margin-top: 24px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.08);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
}

.wtp-video-card::before {
  content: "";
  position: absolute;
  inset: 22px -12px -12px 18px;
  z-index: 0;
  border-radius: 18px;
  background: rgba(34, 211, 238, 0.12);
  filter: blur(18px);
}

.wtp-video-facade,
.wtp-video-real {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #050b12;
}

.wtp-video-facade {
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(34, 211, 238, 0.2);
  background:
    radial-gradient(circle at 28% 38%, rgba(34, 211, 238, 0.18), transparent 55%),
    radial-gradient(circle at 76% 70%, rgba(96, 165, 250, 0.13), transparent 60%),
    linear-gradient(135deg, #1a2436 0%, #11192a 50%, #0e1422 100%);
  transition: filter 0.18s var(--wtp-ease);
}

.wtp-video-facade:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 3px;
}

@media (hover: hover) {
  .wtp-video-facade:hover {
    filter: brightness(1.08);
  }

  .wtp-video-facade:hover .wtp-video-play {
    transform: scale(1.06);
  }
}

.wtp-video-poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 5% 6%;
  text-align: center;
  pointer-events: none;
}

.wtp-video-eyebrow {
  color: #22d3ee;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.wtp-video-title {
  max-width: 90%;
  color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.wtp-video-play {
  width: 64px;
  height: 64px;
  margin-top: 4px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.18s var(--wtp-ease);
}

.wtp-video-play svg {
  display: block;
  width: 100%;
  height: 100%;
}

.wtp-video-label {
  color: rgba(230, 237, 243, 0.66);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wtp-video-real {
  object-fit: cover;
  border: 0;
}

.wtp-tabs {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 34px 22px;
}

.wtp-tab {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(15, 61, 115, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--wtp-fg-2);
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background .16s var(--wtp-ease), border-color .16s var(--wtp-ease), color .16s var(--wtp-ease);
}

.wtp-tab:hover,
.wtp-tab:focus-visible,
.wtp-tab.is-active {
  background: var(--wtp-accent);
  border-color: var(--wtp-accent);
  color: #fff;
}

.wtp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 34px 36px;
}

.wtp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  padding: 10px 10px 20px;
  border: 1px solid rgba(15, 61, 115, 0.13);
  border-radius: 8px;
  background: #fff;
  color: var(--wtp-fg-1);
  box-shadow: 0 14px 30px rgba(15, 35, 70, 0.07);
  transition: transform .16s var(--wtp-ease), border-color .16s var(--wtp-ease), box-shadow .16s var(--wtp-ease), background .16s var(--wtp-ease);
}

.wtp-card:hover,
.wtp-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(15, 61, 115, 0.28);
  background: #fbfdff;
  box-shadow: 0 18px 38px rgba(15, 35, 70, 0.11);
}

.wtp-card--locked {
  cursor: not-allowed;
  border-color: rgba(100, 116, 139, 0.24);
  background: #f1f5f9;
  color: #64748b;
  box-shadow: none;
}

.wtp-tier-ribbon {
  position: absolute;
  top: 22px;
  right: -42px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 154px;
  min-height: 28px;
  padding: 0 12px;
  transform: rotate(42deg);
  transform-origin: center;
  color: #fff;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
}

.wtp-tier-ribbon--free {
  background: linear-gradient(135deg, #078c59, #10b981);
}

.wtp-tier-ribbon--pro {
  background: linear-gradient(135deg, #172554, #0f3d73);
}

.wtp-card--locked:hover,
.wtp-card--locked:focus-visible {
  transform: none;
  border-color: rgba(100, 116, 139, 0.24);
  background: #f1f5f9;
  box-shadow: none;
}

.wtp-card.is-hidden {
  display: none;
}

.wtp-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1.95 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--wtp-bg-2);
}

.wtp-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wtp-card--locked .wtp-thumb {
  background: #dbe3ee;
}

.wtp-card--locked .wtp-thumb img {
  filter: grayscale(1);
  opacity: 0.42;
}

.wtp-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.48);
  color: #f8fafc;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.wtp-lock-overlay svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wtp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
}

.wtp-number {
  color: var(--wtp-fg-3);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
}

.wtp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--wtp-accent-line);
  background: var(--wtp-accent-soft);
  color: var(--wtp-accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wtp-card--locked .wtp-badge {
  border-color: rgba(100, 116, 139, 0.26);
  background: rgba(148, 163, 184, 0.16);
  color: #64748b;
}

.wtp-title {
  padding: 0 10px;
  color: var(--wtp-fg-0);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.15;
}

.wtp-desc {
  padding: 0 10px;
  color: var(--wtp-fg-2);
  font-size: 13px;
  line-height: 1.5;
}

.wtp-card--locked .wtp-title,
.wtp-card--locked .wtp-desc {
  color: #64748b;
}

.wtp-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin: auto 10px 0;
  padding: 0 10px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.10);
  color: #475569;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wtp-empty {
  margin: 0 34px 36px;
  padding: 24px;
  border: 1px dashed rgba(15, 61, 115, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--wtp-fg-2);
}

@media (max-width: 980px) {
  .wtp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wtp-head {
    grid-template-columns: 1fr;
    padding: 46px 34px;
  }
}

@media (max-width: 640px) {
  .wtp-head {
    padding: 34px 18px;
  }

  .wtp-copy h2 {
    font-size: clamp(1.9rem, 10vw, 2.85rem);
  }

  .wtp-copy p {
    font-size: 1rem;
  }

  .wtp-points {
    display: grid;
  }

  .wtp-tabs {
    margin: 22px 16px 18px;
  }

  .wtp-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0 16px 22px;
  }

  .wtp-video-title {
    font-size: 16px;
  }
}
