.post-detail-section {
  margin-block: unset;
}

.post-detail {
  border: 2px solid var(--wp--preset--color--border);
}

.post-detail__header {
  display: flex;
  flex-direction: column;
  gap: var(--wp--custom--spacing--lg, 2.5rem);
  border-block-end: 2px solid var(--wp--preset--color--border);
  padding: 1rem;

  @media (min-width: 1024px) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 4rem;
  }
}

.post-detail__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  @media (min-width: 1024px) {
    flex-direction: row;
  }
}

.post-detail__sidebar-aside {
  display: flex;
  flex-direction: column;
  width: 100%;

  @media (min-width: 1024px) {
    width: 50%;
    align-self: stretch;
    border-bottom: none;
  }
}

.post-detail__sidebar-aside__header {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  border-block-end: 2px solid var(--wp--preset--color--border);
  gap: 2rem;

  @media (min-width: 1024px) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
  }

  & .post-detail__sidebar-aside__header--left,
  & .post-detail__sidebar-aside__header--right {
    display: flex;
    flex-direction: column;
    gap: var(--wp--custom--spacing--sm, 1rem);
    padding: 2rem;
  }

  & .post-detail__sidebar-aside__header--left {
    @media (min-width: 1024px) {
      border-inline-end: 2px solid var(--wp--preset--color--border);
    }
  }
}

.post-detail__label {
  display: block;
  font-size: var(--wp--preset--font-size--2-xs, 0.875rem);
  color: var(--wp--preset--color--foreground-muted, #6B6B6B);
  margin-bottom: 0.5rem;
}

.post-detail__author {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-detail__author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-detail__author-avatar {
  width: 100%;
  max-width: 85px;
  flex-shrink: 0;
  object-fit: cover;
}

.post-detail__author-text {
  display: flex;
  flex-direction: column;
}

strong.post-detail__author-name {
  font-size: var(--wp--preset--font-size--sm);
}

span.post-detail__author-role {
  font-size: var(--wp--preset--font-size--2-xs, 0.875rem);
  color: var(--wp--preset--color--primary);
}

span.post-detail__updated-date {
  display: block;
  font-size: var(--wp--preset--font-size--sm);
  line-height: 1.2;
  color: var(--wp--preset--color--primary);
}

.post-detail__share-icons {
  display: flex;
  gap: 0.5rem;
  width: fit-content;
}

a.post-detail__share-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--wp--preset--color--foreground, #0D0D0D);
  color: var(--wp--preset--color--background, #FBFBFB);
  transition: opacity 0.2s ease;

  &:hover {
    opacity: 0.8;
  }
}

nav.post-detail__sidebar {
  display: none;
  padding: 1rem;

  @media (min-width: 1024px) {
    display: block;
    position: sticky;
    top: calc(var(--header-height, 6rem) + 1.5rem);
    padding: 2rem;
  }
}

ul.post-detail__sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;

  @media (min-width: 1024px) {
    max-height: calc(100vh - var(--header-height, 6rem) - 3rem);
    overflow-y: auto;
  }
}

.post-detail__sidebar-item {
  border-bottom: 2px solid var(--wp--preset--color--border);

  &:last-child {
    border-bottom: unset;
    margin-block-end: var(--wp--custom--spacing--lg);
  }

  & a {
    padding: 1rem 0;
    font-size: var(--wp--preset--font-size--sm);
    color: var(--wp--preset--color--foreground);

    @media (min-width: 1024px) {
      display: flex;
    }
  }

  & .link-arrow::before {
    color: var(--wp--preset--color--primary);
    opacity: 1;
    transform: translateX(0);
  }

  & .link-arrow > span {
    left: 0;
    color: var(--wp--preset--color--foreground);
  }

  @media (min-width: 1024px) {
    & .link-arrow:hover::before {
      transform: translateX(4px);
    }

    & .link-arrow:hover > span {
      color: var(--wp--preset--color--primary);
    }
  }
}

.sub-service-sidebar__title-section {
  padding: 2rem;
}

.sub-service-sidebar__title {
  font-size: var(--wp--preset--font-size--xl);
  line-height: 1.01;
}

.sub-service-cta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
}

.sub-service-cta__heading {
  font-size: var(--wp--preset--font-size--lg);
  max-width: 10ch;
  line-height: 39px;
}

p.sub-service-cta__subtext {
  font-size: 19px;
  width: 100%;
  max-width: fit-content;
  font-weight: 600;
}

.sub-service-cta__links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-block-start: 2.5rem;
}

.sub-service-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-size: var(--wp--preset--font-size--sm);
  color: var(--wp--preset--color--primary);

  & .btn-hover-reveal__mask {
    width: auto;
    height: auto;
  }
}

.sub-service-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
  flex-shrink: 0;
}

.post-detail__featured-image {
  mix-blend-mode: darken;
}

.post-detail__content {
  width: 100%;
  max-width: var(--wp--custom--layout--prose-width, 720px);
  border-inline-start: 2px solid var(--wp--preset--color--border);
  padding-block: 2rem 4rem;
  padding-inline: 2rem;
  
  @media (min-width: 1024px) {
    width: 50%;
    padding-inline-start: 6rem;
  }

  & p {
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.4;
    margin-block: 1.5rem;
  }

  & p:first-child {
    margin-block-start: 0;
  }

  & a {
    font-size: var(--wp--preset--font-size--sm);
    color: var(--wp--preset--color--primary);
  }

  & h2,
  & h3 {
    color: var(--wp--preset--color--primary);
    margin-block: 2rem 1rem;
    scroll-margin-top: calc(var(--header-height, 6rem) + 1.25rem);
  }
  
  & h2 {
    font-size: var(--wp--preset--font-size--lg);
    line-height: 39px;
  }
  
  & h2:first-child {
    font-size: var(--wp--preset--font-size--lg);
    margin-block-start: 0;
  }

  & h3 {
    font-size: var(--wp--preset--font-size--md);
  }

  & li {
    font-size: var(--wp--preset--font-size--sm);
    margin-block: 1.5rem;
    margin-inline-start: 2rem;
    padding-block-end: 1rem;
    border-bottom: 2px solid var(--wp--preset--color--border);

    &:last-child {
      border-bottom: unset;
    }
  }

  & ol {
    list-style: numeric;

    & li::marker {
      color: var(--wp--preset--color--primary);
    }
  }

  & ul {
    list-style: disc;

    & li::marker {
      color: var(--wp--preset--color--primary);
    }
  }
}

