.post-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.post-menu .post-menu__title {
  margin: 0;
  color: var(--main-color);
  font-size: 1.75rem;
}

.post-menu button.trigger {
  background-color: #fff;
  border: 2px solid var(--highlight-color);
  padding: 1rem;
  border-radius: 50%;
  background-image: url(../images/chevron-down-gold.svg);
  background-repeat: no-repeat;
  background-size: 80% auto;
  background-position: center center;
  transition: transform 0.5s ease-in-out;
}

.post-menu button.trigger[aria-expanded="true"] {
  transform: rotate(180deg);
}

.post-menu button.trigger span {
  display: block;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* desktop menu */
.post-menu__list {
  display: flex;
  list-style-type: none;
  align-items: baseline;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.post-menu__item {
  line-height: 1.1;
  text-align: center;
  max-width: 16ch;
  display: block;
}

.post-menu__item a {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  color: var(--main-color);
  background-color: #f6f6f6;
  border-radius: 0.5em 0.5em 0 0;
}

.post-menu__item a::after {
  content: "";
  position: absolute;
  /* bottom: calc((1.5rem + 1px) * -1); */
  bottom: 0;
  left: 0;
  display: block;
  height: 3px;
  width: 100%;
  margin: 0 auto;
  background-color: var(--highlight-color);
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.35s ease-in;
}

.post-menu__item.current a {
  background-color: var(--highlight-color);
  color: #fff;
}
.post-menu__item.current a::after {
  opacity: 1;
}

.post-menu__item a:hover {
  text-decoration: none;
}

.post-menu__item a:hover::after {
  opacity: 1;
}

/* mobile menu */
.post-menu__mobile {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 0;
  opacity: 0;
  padding: 1rem var(--main-padding);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border-top: 1px solid var(--border-color);
  overflow: hidden;
  transition: max-height 0.75s ease-in-out, opacity 0.4s ease-in-out 0.1s;
}

/* Expanded state */
.post-menu__mobile[data-expanded="true"] {
  max-height: 50rem;
  opacity: 1;
  transition: max-height 0.75s ease-in-out, opacity 0.4s ease-in-out;
}

/* Collapsed state */
.post-menu__mobile[data-expanded="false"] {
  max-height: 0;
  opacity: 0;
}

.post-menu__mobile ul {
  list-style-type: none;
  padding: 0;
}

.post-menu__mobile ul li {
  border-bottom: 1px solid var(--highlight-color);
  margin-top: 0.5rem;
}

.post-menu__mobile ul li a {
  color: var(--main-color);
  font-weight: 400;
}

.post-menu__mobile ul li.current a {
  opacity: 0.5;
}

/* mobile */
@media (width < 900px) {
  .post-menu {
    position: relative;
    padding-bottom: 1rem;
  }

  .post-menu__nav {
    display: none;
  }
}

/* tablet and desktop */
@media (900px <= width) {
  .post-menu button.trigger,
  .post-menu__mobile {
    display: none;
  }
}
