:root {
  --subpage-content-top: 90px;
}

/* jeśli header jest fixed */
main.page-content,
main.subpage-content {
  padding-top: var(--subpage-content-top);
}

/* =========================
   HERO / VIDEO
   ========================= */

.project-hero-section {
  padding: 96px 0 32px;
}

.project-video-wrap,
.project-image-wrap {
  width: 100%;
  max-width: 900px;
  margin: 60px auto;
  overflow: hidden;
  border-radius: 16px;
}

.project-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  box-shadow: none;
  background: #000;
}

.project-video-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================
   CONTENT
   ========================= */

.project-content-section {
  padding-top: 16px;
}

.project-text {
  max-width: 980px;
}

.project-text .para-top {
  margin: 0 0 var(--space-lg);
}

.project-text strong {
  font-weight: 700;
}

.project-meta {
  margin-top: var(--space-xl);
}

.project-list {
  margin: 0 0 var(--space-lg);
  padding-left: 1.4em;
  color: var(--color-text);
}

.project-list li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* =========================
   ACTIONS
   ========================= */

.project-actions {
  margin-top: var(--space-xl);
}

.section-actions--between {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  align-items: center;
}

.btn--light-outline {
  background: transparent;
  color: var(--color-black);
  border: 2px solid var(--color-black);
}

.btn--light-outline:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* =========================
   IMAGE BLOCK
   ========================= */

.project-image-frame {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* =========================
   MEDIA CARD (img + video)
   ========================= */

.project-media-card {
  width: 100%;
  max-width: 960px;
  margin: 60px auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-black);
  background: var(--color-white);
}

.project-media-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-media-card__media img,
.project-media-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-media-card__media video {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-media-card.is-active .project-media-card__media video {
  opacity: 1;
}

.project-media-card.is-active .project-media-card__media img {
  opacity: 0;
}

/* autoplay media (np. logo animation) */

.project-media-card--autoplay video {
  position: relative;
  opacity: 1 !important;
  pointer-events: auto;
  object-fit: contain;
  background: #fff;
}

.project-media-card--autoplay img {
  display: none;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1024px) {
  .project-hero-section {
    padding: 88px 0 24px;
  }

  .project-video-wrap,
  .project-image-wrap,
  .project-media-card {
    margin: 48px auto;
  }
}

@media (max-width: 768px) {
  :root {
    --subpage-content-top: 70px;
  }

  .project-hero-section {
    padding: 64px 0 20px;
  }

  .project-content-section {
    padding-top: 8px;
  }

  .project-video-wrap,
  .project-image-wrap,
  .project-media-card {
    margin: 36px auto;
  }

  .section-actions--between {
    flex-direction: column;
    align-items: stretch;
  }

  .section-actions--between .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .project-actions {
    flex-direction: column;
  }

  .project-actions .btn--dark {
    order: 1;
  }

  .project-actions .btn--light-outline {
    order: 2;
  }
}