.post-media-grid {
  display: block;
}

.post-media-item {
  height: 100%;
  display: block;
}

.post-media-item > a,
.post-media-item > .post-video-container {
  display: block;
  width: 100%;
  height: 100%;
}

.post-media-split {
  display: flex;
  gap: 0.75rem;
  height: 100%;
}

.post-media-split .post-media-item {
  flex: 1;
  min-width: 0;
}

.post-media-triple {
  display: flex;
  gap: 0.75rem;
  height: 100%;
}

.post-media-triple > .post-media-item:first-child {
  flex: 1;
  min-width: 0;
}

.post-media-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.post-media-stack .post-media-item {
  flex: 1;
  min-height: 0;
}

.post-media-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.75rem;
  height: 100%;
}

.post-media-grid-4 .post-media-item {
  min-height: 0;
}

.post-video-container {
  position: relative;
  overflow: hidden;
  display: block;
  cursor: pointer;
}

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

.post-video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.post-video-container:hover .post-video-play-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.post-video-play-overlay svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.15s ease;
}

.post-video-container:hover .post-video-play-overlay svg {
  transform: scale(1.1);
}

.post-video-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.post-video-fullscreen.show {
  opacity: 1;
  visibility: visible;
}

.post-video-fullscreen-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.post-video-fullscreen-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.post-video-fullscreen-player {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  outline: none;
}

.post-video-fullscreen-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 10001;
}

.post-video-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

@media (max-width: 767.98px) {
  .post-media-split {
    flex-direction: column;
  }

  .post-media-triple {
    flex-direction: column;
  }

  .post-media-stack {
    flex-direction: row;
  }

  .post-video-fullscreen-container {
    padding: 0;
  }

  .post-video-fullscreen-player {
    border-radius: 0;
    max-height: 100vh;
  }

  .post-video-fullscreen-close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
  }
}
