/* ==========================================================================
   Blog single page
   ========================================================================== */

/* ---------- Layout ---------- */
.post-layout {
  padding: 120px 0;
  background: var(--color-white) url('../../assets/images/misc/bg-faded-landscape.webp') center bottom / cover no-repeat;
}

.post-layout__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  align-items: start;
  gap: 80px;
}

/* ---------- Sidebar ---------- */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

.post-sidebar__block {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.post-sidebar__block[hidden] {
  display: none;
}

.post-sidebar__title {
  font-size: var(--fs-h5);
  line-height: var(--lh-title);
}

.search-form {
  display: flex;
}

.search-form__input {
  flex: 1;
  min-width: 0;
  border-right: 0;
}

.search-form__input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 91px;
  font-size: 14px;
  color: var(--color-white);
  background-color: var(--color-accent);
  border: 0;
  cursor: pointer;
  transition: background-color var(--duration-base) ease;
}

.search-form__submit:hover {
  background-color: var(--color-heading);
}

.post-meta__item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 15px;
  font-family: var(--font-secondary);
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
}

.post-meta__item + .post-meta__item {
  margin-top: 15px;
}

.post-meta__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.post-meta__item .icon {
  flex-shrink: 0;
  font-size: 15px;
}

.post-meta__item a {
  transition: color var(--duration-fast) ease;
}

.post-meta__item a:hover {
  color: var(--color-primary);
}

.post-list--sidebar {
  gap: 35px;
}

.post-list--sidebar .post-item__thumb {
  flex-basis: 95px;
}

.post-list--sidebar .post-item__excerpt {
  font-family: var(--font-primary);
  color: var(--color-muted);
}

/* ---------- Article ---------- */
.post-main {
  display: flex;
  flex-direction: column;
  gap: 60px;
  min-width: 0;
}

.post-main > [hidden] {
  display: none;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.post__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post__heading {
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
}

.post__text {
  color: var(--color-text);
}

.post-quote {
  padding: 20px;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
}

.post-quote__text {
  color: var(--color-muted);
}

.post-quote__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.post-quote__cite {
  font-style: normal;
  color: var(--color-heading);
}

.post-quote__tweet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-white);
  background-color: var(--color-secondary);
  transition: transform var(--duration-base) ease;
}

.post-quote__tweet .icon {
  font-size: 11px;
}

.post-quote__tweet:hover {
  transform: scale(0.9);
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-block: 20px;
}

.post-gallery__item {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 300px;
  padding: 30px;
  overflow: hidden;
  isolation: isolate;
}

.post-gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

.post-gallery__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.post-gallery__item:hover .post-gallery__image {
  transform: scale(1.05);
}

.post-gallery__caption {
  line-height: 19.2px;
  letter-spacing: -0.1px;
  text-align: center;
  color: var(--color-white);
}

.post__accordion {
  align-self: stretch;
}

.share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.share-links__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: var(--ls-button);
  color: var(--color-white);
  background-color: var(--color-accent);
  transition: background-color var(--duration-base) ease;
}

.share-links__link .icon {
  font-size: 15px;
}

.share-links__link:hover {
  background-color: var(--color-heading);
}

/* ---------- Author box ---------- */
.author-box {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 40px;
  background-color: var(--color-secondary);
}

.author-box__avatar {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.author-box__name {
  margin-bottom: 10px;
  font-size: 25.5px;
  line-height: 30.6px;
  color: var(--color-white);
}

.author-box__bio {
  margin-bottom: 20px;
  color: var(--color-white);
}

.author-box__link {
  display: inline-block;
  padding: 5px 10px;
  font-size: 13.6px;
  line-height: 13.6px;
  letter-spacing: var(--ls-button);
  color: var(--color-white);
  background-color: var(--color-accent);
  transition: transform var(--duration-base) ease;
}

.author-box__link:hover {
  transform: scale(0.9);
}

/* ---------- Comments ---------- */
.post-comments {
  padding-top: 20px;
}

.post-comments__title {
  margin-bottom: 10px;
  font-size: 32px;
  font-weight: var(--fw-semibold);
  line-height: 38.4px;
}

.post-comments__note {
  font-family: var(--font-secondary);
  font-weight: var(--fw-regular);
  color: var(--color-text);
}

.post-comments__note a {
  color: var(--color-heading);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-comments__note a:hover {
  color: var(--color-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .post-layout {
    padding: 60px 0 120px;
  }

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

  .post-list--sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .post-list--sidebar,
  .post-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .post__heading {
    font-size: 32px;
  }

  .author-box__avatar {
    display: none;
  }
}
