.magic-post {
  --post-navy: #373d54;
  --post-yellow: #ffd65a;
  --post-cream: #eae7de;
  --post-max: 720px;
}

.magic-post__hero {
  background: var(--post-cream);
  padding: 72px 24px 64px;
  text-align: center;
}

.magic-post__hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.magic-post__cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.magic-post__cat {
  display: inline-block;
  background: var(--post-yellow);
  color: var(--post-navy);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  text-decoration: none;
}

.magic-post__cat:hover,
.magic-post__cat:focus {
  color: var(--post-navy);
  opacity: 0.85;
}

.magic-post__title {
  margin: 0 0 20px;
  color: var(--post-navy);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  font-weight: 300;
}

.magic-post__date {
  margin: 0;
  color: rgba(55, 61, 84, 0.6);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.magic-post__hero-image {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
}

.magic-post__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.magic-post__body {
  background: #fff;
  padding: 64px 24px 80px;
}

.magic-post__content {
  max-width: var(--post-max);
  margin: 0 auto;
  color: var(--post-navy);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 300;
}

.magic-post__content > * + * {
  margin-top: 1.4em;
}

.magic-post__content h2 {
  margin-top: 2.2em;
  margin-bottom: 0.5em;
  color: var(--post-navy);
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 500;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--post-yellow);
}

.magic-post__content h3 {
  margin-top: 1.8em;
  margin-bottom: 0.4em;
  color: var(--post-navy);
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 600;
}

.magic-post__content p {
  margin: 0;
}

.magic-post__content a {
  color: var(--post-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--post-yellow);
  text-decoration-thickness: 2px;
}

.magic-post__content a:hover,
.magic-post__content a:focus {
  color: var(--post-navy);
  text-decoration-color: var(--post-navy);
}

.magic-post__content blockquote {
  margin: 2em 0;
  padding: 20px 28px;
  border-left: 4px solid var(--post-yellow);
  background: var(--post-cream);
  border-radius: 0 8px 8px 0;
  font-size: 1.1em;
  font-style: italic;
}

.magic-post__content blockquote p {
  margin: 0;
}

.magic-post__content ul,
.magic-post__content ol {
  padding-left: 1.4em;
}

.magic-post__content li + li {
  margin-top: 0.4em;
}

.magic-post__content strong {
  font-weight: 600;
}

.magic-post__nav {
  background: var(--post-cream);
  padding: 48px 24px;
}

.magic-post__nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.magic-post__nav-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  text-decoration: none;
  color: var(--post-navy);
  transition: background-color 0.2s ease;
}

.magic-post__nav-card:hover,
.magic-post__nav-card:focus {
  background: var(--post-yellow);
  color: var(--post-navy);
}

.magic-post__nav-card--next {
  text-align: right;
}

.magic-post__nav-dir {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(55, 61, 84, 0.55);
}

.magic-post__nav-card:hover .magic-post__nav-dir,
.magic-post__nav-card:focus .magic-post__nav-dir {
  color: var(--post-navy);
}

.magic-post__nav-title {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
}

@media only screen and (max-width: 48em) {
  .magic-post__hero {
    padding: 48px 20px 40px;
  }

  .magic-post__body {
    padding: 40px 20px 56px;
  }

  .magic-post__nav-inner {
    grid-template-columns: 1fr;
  }

  .magic-post__nav-card--next {
    text-align: left;
  }
}