body.modal-open {
  overflow: hidden;
}

.template-hero {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.newsletter-hero img {
  width: 100%;
  height: auto;
  max-height: 320px;
  display: block;
}

.tv-wrap {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  gap: 96px;
  width: 80%;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.post-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px 8px 0 0;
  display: block;
}

.post-card-thumb-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}

.thumbnail-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: block;
  text-indent: -9999px;
}

.post-card-thumbnail {
  width: 100%;
  height: 190px;
  background-size: cover;
  background-position: center;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.post-card-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(2.4);
  transform-origin: center center;
  transition: transform 0.3s ease;
  width: 100%;
  height: 200px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.post-card-preview-iframe iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.post-card-thumb-wrap:hover .post-card-thumbnail {
  opacity: 0;
}

.post-card-thumb-wrap:hover .post-card-preview-iframe {
  opacity: 1;
}

.post-card-body {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.post-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-card .share-button {
  width: 40px;
  height: 40px;
  background-color: #e0e0e0;
  border: none;
  cursor: pointer;
  border-radius: 100%;
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center center;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' fill='%23fafafa'%3e%3cpath d='M549.7 124.1c-6.3-23.7-24.8-42.3-48.3-48.6C458.8 64 288 64 288 64S117.2 64 74.6 75.5c-23.5 6.3-42 24.9-48.3 48.6-11.4 42.9-11.4 132.3-11.4 132.3s0 89.4 11.4 132.3c6.3 23.7 24.8 41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z'/%3e%3c/svg%3e");
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 24px 32px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-content p {
  font-weight: var(--font-weight-400);
  font-size: var(--font-size-15);
  color: var(--color-light-gray);
}

.modal-content button.modal-close {
  background: #f2f2f2;
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-400);
  color: var(--color-light-gray);
  border: none;
  padding: 8px 16px;
  border-radius: 32px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-content button.modal-close:hover {
  background: #e0e0e0;
  color: var(--color-black);
  font-weight: var(--font-weight-400);
}

@media screen and (max-width: 960px) {
  .tv-wrap {
    flex-direction: column;
    gap: 16px;
    width: 90%;
  }
  .post-card-thumb-wrap:hover .post-card-thumbnail {
    opacity: 1 !important;
  }
  .post-card-thumb-wrap:hover .post-card-preview-iframe {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .modal-overlay {
    justify-content: center;
    align-items: flex-end;
  }
  .modal-content {
    padding: 24px 32px 40px 32px;
    width: 100%;
  }
}