.modern-post {
  --modern-post-ink: #151b2b;
  --modern-post-muted: #667085;
  --modern-post-surface: #f5f8fd;
  max-width: 1120px;
  margin: 0 auto 5rem;
  color: var(--modern-post-ink);
}

.modern-post__header {
  position: relative;
  max-width: 100%;
  margin: 0 auto 3rem;
  padding: 4rem 3rem;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(0, 72, 180, 0.1);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 12% 10%, rgba(230, 0, 126, 0.14), transparent 32%),
    radial-gradient(circle at 88% 90%, rgba(0, 122, 255, 0.18), transparent 36%),
    #f8faff;
}

.modern-post__eyebrow,
.modern-post__section-heading > span {
  display: block;
  margin-bottom: 0.5rem;
  color: #e6007e;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modern-post__eyebrow {
  margin-bottom: 1rem;
}

.modern-post__title {
  max-width: 920px;
  margin: 0 auto;
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.15;
}

.modern-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  color: var(--modern-post-muted);
  font-size: 0.875rem;
}

.modern-post__meta > span[aria-hidden='true'] {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: #e6007e;
}

.modern-post__content {
  max-width: 840px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 2rem;
}

.modern-post__content > p:first-child {
  font-size: 1.5rem;
  line-height: 2.5rem;
}

.modern-post__content p {
  margin-bottom: 1.25rem;
}

.modern-post__content p:last-child {
  margin-bottom: 0;
}

.modern-post__content h2,
.modern-post__content h3 {
  margin: 2.5rem 0 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.modern-post__content h2 {
  font-size: 1.875rem;
}

.modern-post__content h3 {
  font-size: 1.5rem;
}

.modern-post__content strong {
  font-weight: 800;
}

.modern-post__content a {
  color: #007aff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.modern-post__content ul,
.modern-post__content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

.modern-post__content ul {
  list-style: disc;
}

.modern-post__content ol {
  list-style: decimal;
}

.modern-post__media-section {
  margin-top: 4rem;
  padding: 3rem;
  border-radius: 1.5rem;
  background: var(--modern-post-surface);
}

.modern-post__section-heading {
  margin-bottom: 2rem;
}

.modern-post__section-heading h2 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
}

.modern-post__video-section {
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 72, 180, 0.96), rgba(0, 122, 255, 0.88));
}

.modern-post__video-section .modern-post__section-heading > span {
  color: #fff;
  opacity: 0.72;
}

.modern-post__video-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  background: #000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.modern-post__video-wrap--short {
  max-width: 430px;
  aspect-ratio: 9 / 16;
}

.modern-post__video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modern-post__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.modern-post__gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(21, 27, 43, 0.1);
}

.modern-post__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.modern-post__gallery-item::after {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 72, 180, 0.42), transparent 65%);
  transition: opacity 0.3s ease;
}

.modern-post__gallery-item:hover img,
.modern-post__gallery-item:focus-visible img {
  transform: scale(1.045);
}

.modern-post__gallery-item:hover::after,
.modern-post__gallery-item:focus-visible::after,
.modern-post__gallery-item:hover .modern-post__gallery-zoom,
.modern-post__gallery-item:focus-visible .modern-post__gallery-zoom {
  opacity: 1;
}

.modern-post__gallery-item:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px #007aff, 0 0 0 8px #fff;
}

.modern-post__gallery-item:first-child:nth-last-child(n + 4) {
  grid-column: span 2 / span 2;
  grid-row: span 2 / span 2;
  min-height: 360px;
  aspect-ratio: auto;
}

.modern-post__gallery-zoom {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  color: #007aff;
  opacity: 0;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 27, 43, 0.22);
  transition: opacity 0.3s ease;
}

.modern-post__gallery-zoom svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

@media (max-width: 1023px) {
  .modern-post__title {
    font-size: 3rem;
  }

  .modern-post__gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .modern-post__header {
    margin-bottom: 2.5rem;
    padding: 3rem 1.5rem;
  }

  .modern-post__title {
    font-size: 2.25rem;
  }

  .modern-post__content,
  .modern-post__content > p:first-child {
    font-size: 1.125rem;
    line-height: 2rem;
  }

  .modern-post__media-section {
    margin-top: 3rem;
    padding: 2rem 1.25rem;
  }

  .modern-post__section-heading h2 {
    font-size: 1.875rem;
  }

  .modern-post__gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .modern-post__gallery-item:first-child:nth-last-child(n + 4) {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .modern-post__gallery-zoom {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modern-post__gallery-item img,
  .modern-post__gallery-item::after,
  .modern-post__gallery-zoom {
    transition: none;
  }
}
