/* =======================================================
   SPACE EDGE DESIGN — PROJECT PAGE
   Matches site-wide white + red brand exactly
   ======================================================= */

/* ── HERO ───────────────────────────────────────────────── */
.portfolio-hero {
  padding: 160px 0 80px;
  background: var(--bg-white);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
}

.hero-desc {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  font-family: var(--font-body);
}

@media (max-width: 768px) {
  .portfolio-hero { padding: 120px 0 60px; }
}

/* ── PROJECTS SECTION ───────────────────────────────────── */
.projects-section {
  padding: 100px 0 120px;
  background: var(--bg-white);
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;                /* cards separated by their own top padding */
}

/* ── INDIVIDUAL SHOWCASE CARD ───────────────────────────── */
.pv-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 72px;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid var(--border-light);

  /* entrance animation */
  opacity: 0;
  transform: translateY(44px);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.pv-card:last-child {
  border-bottom: none;
}

.pv-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Alternating — even cards: content left, video right */
.pv-card:nth-child(even) {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
.pv-card:nth-child(even) .pv-video-col  { order: 2; }
.pv-card:nth-child(even) .pv-content-col { order: 1; }

/* stagger */
.pv-card:nth-child(1) { transition-delay:   0ms; }
.pv-card:nth-child(2) { transition-delay: 100ms; }
.pv-card:nth-child(3) { transition-delay: 200ms; }
.pv-card:nth-child(4) { transition-delay: 300ms; }
.pv-card:nth-child(5) { transition-delay: 400ms; }
.pv-card:nth-child(6) { transition-delay: 500ms; }
.pv-card:nth-child(7) { transition-delay: 600ms; }
.pv-card:nth-child(8) { transition-delay: 700ms; }

/* Alternating row backgrounds */
.pv-card:nth-child(odd)  { background: var(--bg-white); }
.pv-card:nth-child(even) { background: var(--bg-white); }

/* Full-bleed row tint for even cards */
.projects-section .pv-card:nth-child(even) {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50% + 0px);
  padding-right: calc(50vw - 50% + 0px);
  background: #FAFAFA;
}

/* ── VIDEO COLUMN ───────────────────────────────────────── */
.pv-video-col {
  display: flex;
  justify-content: center;
}

.pv-video-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  background: #F0F0F0;
  border: 1px solid var(--border);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}

.pv-card:hover .pv-video-frame {
  transform: translateY(-6px);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.13),
    0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: rgba(193, 39, 45, 0.2);
}

.pv-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;     /* no right-click / download */
}

.pv-card:hover .pv-video {
  transform: scale(1.03);
}

/* Number badge on video */
.pv-video-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 5px 13px;
  border-radius: 40px;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-display);
}

/* Placeholder when no video src */
.pv-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(160deg, #f5f5f5 0%, #ececec 100%);
  z-index: 1;
  pointer-events: none;
}

.pv-video-placeholder.hidden {
  display: none;
}

.placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid rgba(193, 39, 45, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--primary);
}

.placeholder-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  padding: 0 20px;
  font-family: var(--font-display);
}

/* ── CONTENT COLUMN ─────────────────────────────────────── */
.pv-content-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pv-project-number {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--primary);
  text-transform: uppercase;
  font-family: var(--font-display);
}

.pv-title {
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-family: var(--font-display);
  transition: color 0.25s ease;
}

.pv-card:hover .pv-title {
  color: var(--primary);
}

.pv-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-body);
}

.pv-location svg {
  width: 14px;
  height: 14px;
  fill: var(--primary);
  flex-shrink: 0;
}

.pv-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  font-family: var(--font-body);
  max-width: 500px;
}

/* Meta card */
.pv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-white);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pv-meta-item {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pv-meta-item:nth-child(even) {
  border-right: none;
}

.pv-meta-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.pv-meta-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
}

.pv-meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  font-family: var(--font-display);
}

/* Service tags */
.pv-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pv-service-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-body);
  background: #F2F2F2;
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 30px;
  font-family: var(--font-display);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.pv-service-tag:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(193, 39, 45, 0.25);
}

/* Action buttons */
.pv-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.pv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-display);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  letter-spacing: 0.02em;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.pv-btn:active { transform: scale(0.97); }

/* Primary — red filled */
.pv-btn-primary {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
}

.pv-btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(193, 39, 45, 0.25);
}

/* Outline — white + red border */
.pv-btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.pv-btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.pv-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.pv-btn-primary:hover svg,
.pv-btn-outline:hover svg {
  transform: translateX(3px);
}

/* ── CONSULTATION SECTION ───────────────────────────────── */
.consultation-section {
  padding: 100px 0;
  background: #FAFAFA;
  border-top: 1px solid var(--border);
}

.consultation-card {
  background: var(--bg-white);
  padding: 52px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.consultation-title {
  font-size: 1.85rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  color: var(--text-dark);
  font-family: var(--font-display);
}

.consultation-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 35px;
  font-size: 1rem;
  line-height: 1.65;
  font-family: var(--font-body);
}

.consultation-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-message {
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 500;
  display: none;
  font-family: var(--font-body);
}

.form-message.success {
  display: block;
  background: rgba(46, 204, 113, 0.08);
  color: #219653;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.form-message.error {
  display: block;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(193, 39, 45, 0.2);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pv-card,
  .pv-card:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 60px 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .pv-card:nth-child(even) .pv-video-col,
  .pv-card:nth-child(even) .pv-content-col {
    order: unset;
  }

  .pv-video-frame {
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .projects-section { padding: 60px 0 80px; }

  .pv-card { padding: 50px 0; gap: 28px; }

  .pv-video-frame { max-width: 240px; border-radius: 18px; }

  .pv-title { font-size: 1.7rem; }

  .pv-meta { grid-template-columns: 1fr; }

  .pv-meta-item { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
  .pv-meta-item:last-child { border-bottom: none !important; }

  .pv-actions { flex-direction: column; }
  .pv-btn { justify-content: center; }

  .consultation-card { padding: 24px 16px; border-radius: var(--radius-md); }
}

@media (max-width: 480px) {
  .pv-video-frame { max-width: 210px; border-radius: 16px; }
}