/**
 * "Apie autorių" box at the end of a news post (aligned with the 864px article column)
 */

.news-author {
  padding-top: 24px;
}

.news-author__inner {
  max-width: 864px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--news-border, #e5e7eb);
  border-radius: 12px;
  background: var(--news-surface, #f8f9fa);
}

.news-author__label {
  margin-bottom: 20px;
  color: var(--green1);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.news-author__row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas:
    "photo head"
    "photo bio";
  gap: 0 28px;
}

.news-author__photo {
  grid-area: photo;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 4px solid var(--white1);
  overflow: hidden;
  background-color: var(--green1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.news-author__photo picture,
.news-author__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-author__initials {
  font-family: "RoobertPRO";
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  color: var(--white1);
}

.news-author__head {
  grid-area: head;
  align-self: end;
}

/* Without a bio the name block is centred next to the photo */
.news-author__head:last-child {
  grid-row: 1 / span 2;
  align-self: center;
}

.news-author__name {
  color: var(--news-dark, #1b2e1c);
  transition: color 0.2s ease;
}

.news-author__name:hover {
  color: var(--green1);
  text-decoration: underline;
}

.news-author__position {
  margin-top: 2px;
  color: var(--green1);
}

.news-author__bio {
  grid-area: bio;
  align-self: start;
  margin-top: 12px;
  color: var(--news-text, #42493d);
}

@media screen and (max-width: 500px) {
  .news-author__inner {
    padding: 24px 20px;
  }

  .news-author__row {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "photo head"
      "bio bio";
    gap: 0 16px;
  }

  .news-author__photo {
    width: 72px;
    height: 72px;
    border-width: 3px;
  }

  .news-author__head,
  .news-author__head:last-child {
    grid-row: auto;
    align-self: center;
  }

  .news-author__bio {
    margin-top: 16px;
  }

  .news-author__initials {
    font-size: 26px;
  }
}
