/**
 * Сторінка автора-експерта + плашка автора під статтею.
 *
 * Токени взято з блогової частини теми: текст #101820, акцент #983E31,
 * темний #643633, жовтий #FCC443, кремовий #FFEECA, приглушений #747474.
 * Мобільний-перший, брейкпоінти як у blog.css (768px) + 1024px.
 */

.author-page {
  color: #101820;
  font-family: "Manrope", sans-serif;
  padding: 8px 0 60px;
}

.author-page h1,
.author-page h2,
.author-page h3,
.author-page p,
.author-page li,
.author-page strong,
.author-page span,
.author-page time,
.author-page blockquote {
  font-family: "Manrope", sans-serif;
  color: #101820;
}

/* ---------------------------------------------------------------- HERO */

.author-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 0 40px;
}

.author-hero__media {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background-color: #FFEECA;
}

.author-hero__media img,
img.author-hero__photo {
  display: block;
  width: 100%;
  height: 100%;
  /* На мобільному квадрат, щоб фото не з'їдало пів екрана до тексту. */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 18%;
}

.author-hero__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.author-hero__eyebrow {
  display: inline-block;
  padding: 3px 8px;
  margin: 0 0 12px;
  border-radius: 4px;
  background-color: #FFEECA;
  color: #983E31;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.author-hero__name {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 600;
  line-height: 38px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.author-hero__role {
  margin: 0 0 20px;
  color: #983E31;
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
}

.author-hero__bio p {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}

.author-hero__bio p:last-child {
  margin-bottom: 0;
}

.author-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.author-hero__link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #E7DFD5;
  border-radius: 50px;
  color: #101820;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}

.author-hero__link:hover,
.author-hero__link:focus-visible {
  border-color: #983E31;
  background-color: #FFEECA;
  color: #983E31;
}

/* --------------------------------------------------------------- QUOTE */

.author-quote {
  position: relative;
  margin: 0 0 40px;
  padding: 44px 20px 24px;
  border-radius: 16px;
  background-color: #FFEECA;
}

.author-quote::before {
  content: "“";
  position: absolute;
  top: 4px;
  left: 18px;
  color: #FCC443;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 72px;
  line-height: 1;
}

.author-quote__text {
  margin: 0 0 12px;
  padding: 0;
  border: none;
  color: #643633;
  font-size: 17px;
  font-weight: 500;
  line-height: 27px;
}

.author-quote__author {
  color: #983E31;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------- FACTS */

.author-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 48px;
  padding: 1px;
  list-style: none;
  border-radius: 12px;
  background-color: #EFE7DC;
  overflow: hidden;
}

.author-facts__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px;
  background-color: #FFFFFF;
}

.author-facts__value {
  color: #983E31;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.author-facts__label {
  color: #747474;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

/* ------------------------------------------------------------ SECTIONS */

.author-section {
  margin: 0 0 48px;
}

.author-section__title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  line-height: 30px;
  text-transform: uppercase;
}

.author-section__lead {
  max-width: 720px;
  margin: 0 0 24px;
  color: #747474;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}

/* --------------------------------------------------------- CREDENTIALS */

/* Не картки: кваліфікація читається як редакційний перелік — тонка лінійка
   зверху кожного рядка й та сама типографіка, що в заголовках карток блогу. */
.author-credentials__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-credentials__item {
  padding: 18px 0;
  border-top: 1px solid #EFE7DC;
}

/* Замикає перелік знизу. В одну колонку це останній пункт, у дві — останній
   рядок, тобто два останні пункти; правила живуть у різних брейкпоінтах,
   тож подвійної лінійки не виходить. */
.author-credentials__item:last-child {
  border-bottom: 1px solid #EFE7DC;
}

.author-credentials__name {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.author-credentials__text {
  margin: 0;
  color: #747474;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}

/* --------------------------------------------------------------- PRESS */

.author-press__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-press__item {
  display: flex;
}

.author-press__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 20px 14px;
  border: 1px solid #EFE7DC;
  border-radius: 12px;
  background-color: #FFFFFF;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.author-press__link:hover,
.author-press__link:focus-visible {
  border-color: #983E31;
  box-shadow: 0 6px 18px rgba(100, 54, 51, 0.10);
  transform: translateY(-2px);
}

.author-press__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.author-press__logo img {
  max-width: 110px;
  max-height: 30px;
  width: auto;
  height: auto;
  object-fit: contain;
  /* Логотипи в медіатеці залиті кремовим (#FDF9ED) — вони робились під темний
     фон промо-стрічки. На білій картці нормалізуємо їх у монохром. */
  filter: brightness(0);
  opacity: 0.7;
  transition: opacity 0.25s;
}

.author-press__link:hover .author-press__logo img,
.author-press__link:focus-visible .author-press__logo img {
  opacity: 1;
}

.author-press__wordmark {
  color: #101820;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.author-press__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #747474;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

/* -------------------------------------------------- LAB / CERTIFICATES */

.author-certs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-certs__item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #EFE7DC;
  border-radius: 12px;
  background-color: #FFFFFF;
}

.author-certs__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 150px;
  background-color: #FFF8EA;
  text-decoration: none;
}

.author-certs__media img {
  display: block;
  max-width: 100%;
  max-height: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Значки-SVG у медіатеці мають крихітні власні розміри (GMP — 55×55),
   і WP віддає їх у width/height. Масштабуємо до розміру картки. */
.author-certs__media img[src$=".svg"] {
  width: 112px;
  height: 112px;
  max-height: 112px;
}

a.author-certs__media {
  cursor: zoom-in;
}

.author-certs__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #FCC443;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23101820' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 0.25s;
}

a.author-certs__media:hover .author-certs__zoom,
a.author-certs__media:focus-visible .author-certs__zoom {
  opacity: 1;
}

.author-certs__item--doc .author-certs__text {
  padding-top: 56px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='none' stroke='%23983E31' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6.5A1.5 1.5 0 0 0 5 3.5v17A1.5 1.5 0 0 0 6.5 22h11a1.5 1.5 0 0 0 1.5-1.5V7z'/%3E%3Cpath d='M14 2v5h5M8.5 12.5h7M8.5 16.5h4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 20px 20px;
}

.author-certs__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 20px;
}

.author-certs__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  text-transform: uppercase;
}

.author-certs__meta {
  color: #983E31;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.author-certs__note {
  margin: 0;
  color: #747474;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}

/* --------------------------------------------------------------- POSTS */

.author-posts__list.is-collapsed .author-posts__rest {
  display: none;
}

.author-posts__more {
  display: flex;
  justify-content: center;
  margin: 8px 0 0;
}

.author-posts__more .btn.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 200px;
  padding: 8px 24px;
  border: none;
  border-radius: 50px;
  background-color: #FCC443;
  color: #101820;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.author-posts__more .btn.btn-primary:hover,
.author-posts__more .btn.btn-primary:focus-visible {
  background-color: #983E31;
  color: #FFFFFF;
}

.author-posts .blog-post .author a,
.author-posts .blog-post .author .author-link {
  color: #747474;
  text-decoration: none;
}

.author-posts .blog-post .author a:hover {
  color: #983E31;
  text-decoration: underline;
}

/* ------------------------------------------------- ПРОСТИЙ АРХІВ АВТОРА */

.author-page--plain {
  padding-top: 24px;
}

.author-plain__header {
  margin: 0 0 32px;
}

.author-plain__title {
  margin: 0 0 8px;
  font-size: 27px;
  font-weight: 600;
  line-height: 36px;
  text-transform: uppercase;
}

.author-plain__desc,
.author-plain__empty {
  margin: 0;
  color: #747474;
  font-size: 15px;
  line-height: 24px;
}

/* ------------------------------------------- ПЛАШКА АВТОРА ПІД СТАТТЕЮ */

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 32px 0 0;
  padding: 20px;
  border: 1px solid #EFE7DC;
  border-radius: 12px;
  background-color: #FFF8EA;
  font-family: "Manrope", sans-serif;
}

.author-box__photo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
}

.author-box__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
}

.author-box__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.author-box__label {
  color: #983E31;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.author-box__name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-transform: uppercase;
}

.blog-post-content.blog-post-content-new .author-box__name a {
  color: #101820;
  text-decoration: none;
}

.blog-post-content.blog-post-content-new .author-box__name a:hover {
  color: #983E31;
}

.author-box__role {
  color: #747474;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.blog-post-content.blog-post-content-new .author-box__bio,
.author-box__bio {
  margin: 6px 0 0;
  color: #101820;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}

.author-box__link {
  align-self: flex-start;
  margin: 8px 0 0;
}

.blog-post-content.blog-post-content-new .author-box__link {
  color: #983E31;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: underline;
}

/* Підпис «Автор: …» у шапці статті та в картках блогу. */
.blog-post-section-new .heading .author a,
.blog-list.blog-list-new .blog-post .author a {
  color: inherit;
  text-decoration: none;
}

.blog-post-section-new .heading .author a:hover,
.blog-list.blog-list-new .blog-post .author a:hover {
  color: #983E31;
  text-decoration: underline;
}

/* ---------------------------------------------------------- ≥ 768px */

@media (min-width: 768px) {
  .author-page {
    padding: 16px 0 80px;
  }

  .author-hero {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    margin: 0 0 56px;
  }

  .author-hero__media img,
  img.author-hero__photo {
    aspect-ratio: 4 / 5;
  }

  .author-hero__name {
    font-size: 40px;
    line-height: 48px;
  }

  .author-hero__role {
    font-size: 16px;
  }

  .author-quote {
    margin: 0 0 56px;
    padding: 32px 40px 28px 88px;
  }

  .author-quote::before {
    top: 14px;
    left: 36px;
    font-size: 90px;
  }

  .author-quote__text {
    font-size: 20px;
    line-height: 32px;
  }

  .author-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 64px;
  }

  .author-facts__item {
    padding: 22px 20px;
  }

  .author-facts__value {
    font-size: 27px;
    line-height: 36px;
  }

  .author-section {
    margin: 0 0 64px;
  }

  .author-section__title {
    margin: 0 0 16px;
    font-size: 27px;
    line-height: 36px;
  }

  .author-credentials__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
  }

  .author-credentials__item {
    padding: 22px 0;
  }

  .author-credentials__item:nth-last-child(-n + 2) {
    border-bottom: 1px solid #EFE7DC;
  }

  .author-press__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .author-certs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-box {
    gap: 20px;
    padding: 24px;
  }

  .author-box__photo {
    width: 88px;
    height: 88px;
  }
}

/* --------------------------------------------------------- ≥ 1024px */

@media (min-width: 1024px) {
  .author-hero {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
    gap: 56px;
  }

  .author-hero__name {
    font-size: 46px;
    line-height: 54px;
  }

  .author-certs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------- prefers-reduced-motion */

@media (prefers-reduced-motion: reduce) {
  .author-press__link,
  .author-hero__link,
  .author-certs__zoom,
  .author-posts__more .btn.btn-primary {
    transition: none;
  }

  .author-press__link:hover {
    transform: none;
  }
}