/*
Theme Name: Zepf Child
Theme URI: https://zepf.furpaw.ru/
Description: Дочерняя тема Astra для сайта Zepf.
Author: FurPaw
Template: astra
Version: 1.9.0
Text Domain: zepf-child
*/

/*
 * Основной CSS сайта пока остаётся в:
 * Внешний вид → Настроить → Дополнительные стили.
 *
 * Ниже находятся стили записей типа zepf_work с адресами /work/.../
 */

/* =========================================================
   УНИВЕРСАЛЬНАЯ СТРАНИЦА ОТДЕЛЬНОЙ РАБОТЫ
   ========================================================= */

.single-zepf_work .site-content {
  padding: 0;
}

.single-zepf_work .site-content > .ast-container {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0;
}

.single-zepf_work #primary,
.single-zepf_work .site-main {
  width: 100%;
  margin: 0;
  padding: 0;
}

.single-zepf_work #primary.zepf-single-work {
  left: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-bottom: 90px !important;
}

.zepf-single-work {
  position: relative;
  left: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  padding: 52px var(--zepf-page-x, 24px) 90px;
  background:
    radial-gradient(circle at 88% 2%, rgba(247, 216, 232, 0.65), transparent 24%),
    var(--zepf-bg, #fffafd);
  color: var(--zepf-text, #241826);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

.zepf-single-work,
.zepf-single-work *,
.zepf-single-work *::before,
.zepf-single-work *::after {
  box-sizing: border-box;
}

.zepf-single-work__inner {
  width: min(var(--zepf-content, 1180px), 100%);
  margin: 0 auto;
}

.zepf-work-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 34px;
  transform: translateY(28px);
  color: var(--zepf-accent-text, #c04e8c);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.zepf-work-back::before {
  content: "←";
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.zepf-work-back:hover {
  color: var(--zepf-accent-dark, #bd4382);
}

.zepf-work-back:hover::before {
  transform: translateX(-3px);
}

.zepf-work-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 54px;
  align-items: center;
}

.zepf-work-copy {
  max-width: 610px;
  transform: translateY(-28px);
}

.zepf-work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.zepf-work-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #edcedd;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--zepf-accent-text, #c04e8c);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
}

.zepf-work-tag:hover {
  border-color: var(--zepf-accent, #d85c9c);
  background: var(--zepf-soft, #f7d8e8);
}

.zepf-work-title {
  max-width: none;
  margin: 0 0 18px;
  color: var(--zepf-text, #241826);
  font-size: clamp(46px, 6vw, 76px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -2px;
  overflow-wrap: anywhere;
}

.zepf-work-summary {
  max-width: 620px;
  margin: 0;
  color: var(--zepf-muted, #6f5f72);
  font-size: 18px;
  line-height: 1.72;
}

.zepf-work-author {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-top: 26px;
  color: inherit;
  text-decoration: none;
}

.zepf-work-author__avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 50%;
  background: var(--zepf-soft, #f7d8e8);
}

.zepf-work-author__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zepf-work-author__copy {
  display: grid;
  gap: 2px;
}

.zepf-work-author__label {
  color: #9a8694;
  font-size: 12px;
}

.zepf-work-author__name {
  color: #483843;
  font-size: 15px;
  font-weight: 750;
}

.zepf-work-author:hover .zepf-work-author__name {
  color: var(--zepf-accent-text, #c04e8c);
}

.zepf-work-cover {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 30px;
  background:
    radial-gradient(circle at 24% 24%, rgba(216, 92, 156, 0.16), transparent 20%),
    linear-gradient(145deg, #fff, #fff5fa);
  box-shadow: 0 18px 48px rgba(95, 48, 77, 0.11);
}

.zepf-work-cover::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(216, 92, 156, 0.12);
  border-radius: 22px;
  pointer-events: none;
}

.zepf-work-cover__link {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 26px;
}

.zepf-work-cover img {
  display: block;
  width: 100%;
  max-height: 720px;
  border-radius: 20px;
  object-fit: contain;
}

.zepf-work-cover--empty {
  padding: 36px;
  text-align: center;
}

.zepf-work-cover__placeholder {
  position: relative;
  z-index: 1;
  max-width: 360px;
  color: var(--zepf-muted, #6f5f72);
  font-size: 16px;
  line-height: 1.65;
}

/* Основной контент */

.zepf-work-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 42px;
  align-items: start;
  margin-top: 76px;
}

.zepf-work-content {
  min-width: 0;
  padding: 34px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(95, 48, 77, 0.07);
}

.zepf-work-content > :first-child {
  margin-top: 0 !important;
}

.zepf-work-content > :last-child {
  margin-bottom: 0 !important;
}

.zepf-work-content h2,
.zepf-work-content h3,
.zepf-work-content h4 {
  color: var(--zepf-text, #241826);
}

.zepf-work-content h2 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.15;
}

.zepf-work-content p,
.zepf-work-content li {
  color: var(--zepf-muted, #6f5f72);
  font-size: 16px;
  line-height: 1.72;
}

.zepf-work-content p {
  margin: 0 0 20px;
}

.zepf-work-content figure {
  margin-top: 28px;
  margin-bottom: 28px;
}

.zepf-work-content img,
.zepf-work-content video {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

.zepf-work-content .wp-block-gallery {
  gap: 16px;
}

/*
 * Красивое расположение изображений из стандартного блока «Галерея».
 * Обычные отдельные блоки «Изображение» остаются вертикальными.
 */
.zepf-work-content .wp-block-gallery.has-nested-images {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch;
  margin: 28px 0 !important;
}

.zepf-work-content .wp-block-gallery.has-nested-images figure.wp-block-image {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100% !important;
  min-height: 280px;
  margin: 0 !important;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 20px;
  background: #fffafd;
}

.zepf-work-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 250px;
  max-height: 680px;
  border-radius: 14px;
  object-fit: contain;
}

/*
 * Класс zepf-work-gallery-featured делает первое изображение
 * большим, а остальные размещает сеткой по два.
 */
.zepf-work-content
  .wp-block-gallery.has-nested-images.zepf-work-gallery-featured
  figure.wp-block-image:first-child {
  grid-column: 1 / -1;
  min-height: 380px;
}

.zepf-work-content
  .wp-block-gallery.has-nested-images.zepf-work-gallery-featured
  figure.wp-block-image:first-child
  img {
  min-height: 350px;
}

.zepf-work-content .wp-block-gallery.has-nested-images figcaption {
  margin-top: 10px;
  color: var(--zepf-muted, #6f5f72);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.zepf-work-info {
  position: sticky;
  top: 24px;
  padding: 26px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(95, 48, 77, 0.07);
}

.admin-bar .zepf-work-info {
  top: 56px;
}

.zepf-work-info h2 {
  margin: 0 0 20px;
  color: var(--zepf-text, #241826);
  font-size: 24px;
  line-height: 1.2;
}

.zepf-work-info__list {
  display: grid;
  gap: 0;
  margin: 0;
}

.zepf-work-info__row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #f0e1e9;
}

.zepf-work-info__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.zepf-work-info dt {
  color: #a08b99;
  font-size: 13px;
}

.zepf-work-info dd {
  margin: 0;
  color: #4d3a47;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.zepf-work-info dd a {
  color: inherit;
  text-decoration: none;
}

.zepf-work-info dd a:hover {
  color: var(--zepf-accent-text, #c04e8c);
}

/* Навигация между работами */

.zepf-work-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 54px;
}

.zepf-work-navigation--single {
  grid-template-columns: minmax(0, 1fr);
}

.zepf-work-nav-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 22px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 20px;
  background: #fff;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.zepf-work-nav-card:hover {
  border-color: #dfaeca;
  box-shadow: 0 8px 24px rgba(95, 48, 77, 0.07);
  transform: translateY(-3px);
}

.zepf-work-nav-card--next {
  text-align: right;
}

.zepf-work-nav-card__label {
  color: #a08b99;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.zepf-work-nav-card__title {
  color: var(--zepf-text, #241826);
  font-size: 17px;
  font-weight: 750;
}

/* Нижний призыв */

.zepf-work-cta {
  margin-top: 76px;
  padding: 42px;
  border: 1px solid #e6c4d5;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(247, 216, 232, 0.88), rgba(255, 255, 255, 0.94));
  text-align: center;
}

.zepf-work-cta h2 {
  margin: 0 0 12px;
  color: var(--zepf-text, #241826);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.zepf-work-cta p {
  max-width: 690px;
  margin: 0 auto 24px;
  color: var(--zepf-muted, #6f5f72);
  font-size: 17px;
  line-height: 1.65;
}

.zepf-work-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--zepf-accent, #d85c9c);
  box-shadow: 0 10px 24px rgba(216, 92, 156, 0.24);
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.zepf-work-cta__button:hover {
  background: var(--zepf-accent-dark, #bd4382);
  color: #fff;
}

/* Адаптивность */

@media (max-width: 980px) {
  .zepf-work-hero,
  .zepf-work-body {
    grid-template-columns: 1fr;
  }

  .zepf-work-copy {
    max-width: none;
    transform: none;
  }

  .zepf-work-info {
    position: static;
  }
}

@media (max-width: 760px) {
  .single-zepf_work #primary.zepf-single-work {
    padding-bottom: 64px !important;
  }

  .zepf-single-work {
    padding: 38px 16px 64px;
  }

  .zepf-work-back {
    transform: translateY(18px);
  }

  .zepf-work-title {
    font-size: 44px;
    letter-spacing: -1px;
  }

  .zepf-work-summary {
    font-size: 16px;
  }

  .zepf-work-cover {
    min-height: 420px;
  }

  .zepf-work-content {
    padding: 24px;
  }

  .zepf-work-content .wp-block-gallery.has-nested-images {
    grid-template-columns: 1fr !important;
  }

  .zepf-work-content
    .wp-block-gallery.has-nested-images.zepf-work-gallery-featured
    figure.wp-block-image:first-child {
    grid-column: auto;
  }

  .zepf-work-navigation {
    grid-template-columns: 1fr;
  }

  .zepf-work-nav-card--next {
    text-align: left;
  }

  .zepf-work-cta {
    padding: 32px 22px;
  }
}

@media (max-width: 520px) {
  .zepf-work-title {
    font-size: 38px;
  }

  .zepf-work-cover {
    min-height: 320px;
  }

  .zepf-work-cover__link {
    padding: 16px;
  }

  .zepf-work-info__row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .zepf-work-info dd {
    text-align: left;
  }
}

/* =========================================================
   УНИВЕРСАЛЬНАЯ СТРАНИЦА АВТОРА
   ========================================================= */

.author .site-content {
  padding: 0;
}

.author .site-content > .ast-container {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0;
}

.author #primary,
.author .site-main {
  width: 100%;
  margin: 0;
}

body.author #primary.zepf-author-page {
  width: 100%;
  padding: 56px var(--zepf-page-x, 24px) 90px;
}

.zepf-author-page {
  width: 100%;
  padding: 56px var(--zepf-page-x, 24px) 90px;
  background:
    radial-gradient(circle at 88% 4%, rgba(247, 216, 232, 0.62), transparent 25%),
    var(--zepf-bg, #fffafd);
  color: var(--zepf-text, #241826);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

.zepf-author-page,
.zepf-author-page *,
.zepf-author-page *::before,
.zepf-author-page *::after {
  box-sizing: border-box;
}

.zepf-author-page__inner {
  width: min(var(--zepf-content, 1180px), 100%);
  margin: 0 auto;
}

.zepf-author-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 36px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(95, 48, 77, 0.11);
}

.zepf-author-avatar {
  width: 190px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 28px;
  background: linear-gradient(145deg, #fff5fa, #f6dbe9);
  box-shadow: 0 14px 34px rgba(95, 48, 77, 0.12);
}

.zepf-author-avatar img,
.zepf-author-avatar__image {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  object-fit: cover;
}

.zepf-author-kicker {
  margin: 0 0 10px;
  color: var(--zepf-accent, #d85c9c);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zepf-author-title {
  margin: 0 0 14px;
  color: var(--zepf-text, #241826);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -2px;
  overflow-wrap: anywhere;
}

.zepf-author-description {
  max-width: 700px;
  margin: 0;
  color: var(--zepf-muted, #6f5f72);
  font-size: 17px;
  line-height: 1.75;
}

.zepf-author-description > :first-child {
  margin-top: 0;
}

.zepf-author-description > :last-child {
  margin-bottom: 0;
}

.zepf-author-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.zepf-author-meta__item {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #edcedd;
  border-radius: 999px;
  background: var(--zepf-soft-2, #fff3f9);
  color: #5e4354;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.zepf-author-meta__item[href]:hover {
  border-color: var(--zepf-accent, #d85c9c);
  color: var(--zepf-accent-dark, #bd4382);
}

.zepf-author-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.zepf-author-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--zepf-accent, #d85c9c);
  box-shadow: 0 10px 24px rgba(216, 92, 156, 0.22);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

.zepf-author-button:hover {
  background: var(--zepf-accent-dark, #bd4382);
  color: #fff;
}

.zepf-author-button--disabled,
.zepf-author-button--disabled:hover {
  background: #c7b7c0;
  box-shadow: none;
  color: #fff;
  cursor: not-allowed;
}

.zepf-author-button--secondary {
  border: 1px solid var(--zepf-border, #ead3df);
  background: #fff;
  box-shadow: none;
  color: #5e4354;
}

.zepf-author-button--secondary:hover {
  border-color: #dfaeca;
  background: #fff7fb;
  color: var(--zepf-accent-dark, #bd4382);
}

.zepf-author-section {
  margin-top: 64px;
}

.zepf-author-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.zepf-author-section__head h2 {
  margin: 0;
  color: var(--zepf-text, #241826);
  font-size: 38px;
  line-height: 1.1;
}

.zepf-author-section__head p {
  margin: 0;
  color: var(--zepf-muted, #6f5f72);
  font-size: 15px;
}

.zepf-author-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.zepf-author-filter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 999px;
  background: #fff;
  color: #695363;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.zepf-author-filter:hover,
.zepf-author-filter.is-active {
  border-color: var(--zepf-accent, #d85c9c);
  background: var(--zepf-accent, #d85c9c);
  color: #fff;
}

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

.zepf-author-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(95, 48, 77, 0.07);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.zepf-author-card:hover {
  border-color: #dfaeca;
  box-shadow: 0 18px 48px rgba(95, 48, 77, 0.11);
  transform: translateY(-4px);
}

.zepf-author-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.zepf-author-card__image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 28%, rgba(216, 92, 156, 0.25), transparent 18%),
    linear-gradient(145deg, #fff3f8, #e8c8d9 55%, #b987a2);
}

.zepf-author-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.zepf-author-card:hover .zepf-author-card__image img {
  transform: scale(1.035);
}

.zepf-author-card__placeholder {
  color: rgba(255, 255, 255, 0.92);
  font-size: 72px;
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(91, 45, 74, 0.22);
}

.zepf-author-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.91);
  color: var(--zepf-accent-dark, #bd4382);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.zepf-author-card__body {
  padding: 19px 20px 21px;
}

.zepf-author-card__title {
  margin: 0 0 8px;
  color: var(--zepf-text, #241826);
  font-size: 21px;
  font-weight: 750;
  line-height: 1.2;
}

.zepf-author-card__meta {
  color: #917f8b;
  font-size: 13px;
  line-height: 1.5;
}

.zepf-author-empty {
  padding: 34px;
  border: 1px dashed #dcb7c9;
  border-radius: 22px;
  background: #fff;
  color: var(--zepf-muted, #6f5f72);
  text-align: center;
}

.zepf-author-empty p {
  margin: 0 0 10px;
}

.zepf-author-empty a {
  color: var(--zepf-accent-dark, #bd4382);
  font-weight: 700;
}

.zepf-author-pagination {
  margin-top: 34px;
}

.zepf-author-pagination .page-numbers {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zepf-author-pagination .page-numbers li {
  margin: 0;
}

.zepf-author-pagination a.page-numbers,
.zepf-author-pagination span.page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 12px;
  background: #fff;
  color: #5f4958;
  font-weight: 750;
  text-decoration: none;
}

.zepf-author-pagination a.page-numbers:hover,
.zepf-author-pagination span.page-numbers.current {
  border-color: var(--zepf-accent, #d85c9c);
  background: var(--zepf-accent, #d85c9c);
  color: #fff;
}

@media (max-width: 980px) {
  .zepf-author-hero {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .zepf-author-avatar {
    width: 160px;
  }

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

@media (max-width: 760px) {
  body.author #primary.zepf-author-page,
  .zepf-author-page {
    padding: 38px 16px 64px;
  }

  .zepf-author-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .zepf-author-avatar {
    width: 140px;
  }

  .zepf-author-title {
    font-size: 44px;
    letter-spacing: -1px;
  }

  .zepf-author-section__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .zepf-author-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   СТАБИЛЬНОЕ ОФОРМЛЕНИЕ 404, В ТОМ ЧИСЛЕ ДЛЯ /?s=...
   ========================================================= */

/*
 * Убирает белую обёртку Astra вокруг пользовательской страницы 404.
 * Это также страхует случай, когда плагин 404 сохраняет часть классов
 * поисковой выдачи после запроса, который нашёл совпадения.
 */
body.error404 .site-content,
body.page-id-327 .site-content,
body.search:has(.zepf-404-page) .site-content {
  padding: 0 !important;
  background: transparent !important;
}

body.error404 .site-content > .ast-container,
body.page-id-327 .site-content > .ast-container,
body.search:has(.zepf-404-page) .site-content > .ast-container {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.error404 #primary,
body.error404 .site-main,
body.page-id-327 #primary,
body.page-id-327 .site-main,
body.search:has(.zepf-404-page) #primary,
body.search:has(.zepf-404-page) .site-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.error404 article.ast-article-single,
body.error404 article.ast-article-post,
body.page-id-327 article.ast-article-single,
body.page-id-327 article.ast-article-post,
body.search:has(.zepf-404-page) article.ast-article-single,
body.search:has(.zepf-404-page) article.ast-article-post {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.error404 .entry-content,
body.page-id-327 .entry-content,
body.search:has(.zepf-404-page) .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* =========================================================
   СОБСТВЕННЫЙ КАТАЛОГ «ВСЕ РАБОТЫ»
   ========================================================= */

.zepf-custom-portfolio-catalog {
  width: 100%;
  margin-top: 0;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid #ead3df;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 9px 25px rgba(95, 48, 77, 0.07);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card:hover {
  border-color: #dfb6cc;
  box-shadow: 0 14px 32px rgba(95, 48, 77, 0.12);
  transform: translateY(-4px);
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card .zepf-portfolio-card-image {
  position: relative;
  display: block;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 3 !important;
  margin: 0 !important;
  overflow: hidden;
  background: #f3e3eb;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card .zepf-portfolio-card-image a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card .zepf-portfolio-card-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 10px !important;
  background: #f3e3eb !important;
  object-fit: contain !important;
  object-position: center !important;
  transition: transform 0.28s ease;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card:hover img {
  transform: scale(1.035);
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card-image--empty {
  display: grid;
  place-items: center;
  padding: 22px;
  color: #8e7887;
  font-size: 14px;
  text-align: center;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card-body {
  flex: 1 1 auto;
  padding: 17px 18px 19px;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card-type {
  margin: 0 0 8px;
  color: #c04e8c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card-title {
  margin: 0;
  color: #2d202a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card-title a,
.zepf-custom-portfolio-catalog .zepf-portfolio-card-type a,
.zepf-custom-portfolio-catalog .zepf-portfolio-card-stage a {
  color: inherit;
  text-decoration: none;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card-title a:hover {
  color: #c04e8c;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-card-stage {
  margin: 8px 0 0;
  color: #8e7887;
  font-size: 12px;
  line-height: 1.4;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 34px 0 0;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #ead3df;
  border-radius: 12px;
  background: #fff;
  color: #665361;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-pagination .current,
.zepf-custom-portfolio-catalog .zepf-portfolio-pagination a:hover {
  border-color: #d86ca3;
  background: #f7d8e8;
  color: #b84f85;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-pagination .dots {
  border-color: transparent;
  background: transparent;
}

.zepf-custom-portfolio-catalog .zepf-portfolio-empty {
  margin: 0;
  padding: 24px;
  border: 1px dashed #dfbfd0;
  border-radius: 18px;
  background: #fff;
  color: #7c6976;
  text-align: center;
}

@media (max-width: 1000px) {
  .zepf-custom-portfolio-catalog .zepf-portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .zepf-custom-portfolio-catalog .zepf-portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .zepf-custom-portfolio-catalog .zepf-portfolio-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   ЖИВЫЕ ФИЛЬТРЫ КАТАЛОГА
   ========================================================= */

.zepf-filter-button.is-loading,
.zepf-portfolio-filters.is-loading {
  cursor: progress;
  pointer-events: none;
}

.zepf-filter-button.is-active .wp-block-button__link,
.zepf-filter-button .wp-block-button__link[aria-pressed="true"],
.wp-block-button__link.is-active[data-zepf-filter-taxonomy],
.wp-block-button__link.is-active[data-zepf-filter-reset="1"],
.wp-block-button__link[aria-pressed="true"][data-zepf-filter-taxonomy],
.wp-block-button__link[aria-pressed="true"][data-zepf-filter-reset="1"] {
  border-color: var(--zepf-accent, #d86ca3) !important;
  background: var(--zepf-soft, #f7d8e8) !important;
  color: #b84f85 !important;
}

.zepf-custom-portfolio-catalog {
  scroll-margin-top: 34px;
}

.zepf-custom-portfolio-catalog.is-loading {
  cursor: progress;
  pointer-events: none;
}

.zepf-portfolio-live-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* Фильтры портфолио не должны запускать плавную прокрутку страницы. */
html:has(#portfolio-catalog),
body:has(#portfolio-catalog) {
  scroll-behavior: auto !important;
}


/* =========================================================
   УНИВЕРСАЛЬНЫЕ АРХИВЫ ТЕРМИНОВ РАБОТ
   /work_type/.../  /work_stage/.../  /work_format/.../
   ========================================================= */

body.tax-work_type .site-content,
body.tax-work_stage .site-content,
body.tax-work_format .site-content {
  padding: 0 !important;
}

body.tax-work_type .site-content > .ast-container,
body.tax-work_stage .site-content > .ast-container,
body.tax-work_format .site-content > .ast-container {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.tax-work_type #primary,
body.tax-work_type .site-main,
body.tax-work_stage #primary,
body.tax-work_stage .site-main,
body.tax-work_format #primary,
body.tax-work_format .site-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.tax-work_type #primary.zepf-taxonomy-page,
body.tax-work_stage #primary.zepf-taxonomy-page,
body.tax-work_format #primary.zepf-taxonomy-page {
  padding: 56px var(--zepf-page-x, 24px) 90px !important;
}

.zepf-taxonomy-page {
  position: relative;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 3%, rgba(247, 216, 232, 0.72), transparent 25%),
    radial-gradient(circle at 4% 88%, rgba(246, 224, 236, 0.58), transparent 20%),
    var(--zepf-bg, #fffafd);
  color: var(--zepf-text, #241826);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

.zepf-taxonomy-page,
.zepf-taxonomy-page *,
.zepf-taxonomy-page *::before,
.zepf-taxonomy-page *::after {
  box-sizing: border-box;
}

.zepf-taxonomy-page__inner {
  width: min(var(--zepf-content, 1180px), 100%);
  margin: 0 auto;
}

.zepf-taxonomy-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--zepf-accent-text, #c04e8c);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
  text-decoration: none;
}

.zepf-taxonomy-back:hover {
  color: var(--zepf-accent, #d85c9c);
}

.zepf-taxonomy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 38px;
  align-items: center;
  padding: 42px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 18px 48px rgba(95, 48, 77, 0.10);
}

.zepf-taxonomy-kicker {
  margin: 0 0 12px;
  color: var(--zepf-accent, #d85c9c);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zepf-taxonomy-title {
  max-width: 800px;
  margin: 0 0 16px;
  color: var(--zepf-text, #241826);
  font-size: clamp(44px, 6.5vw, 76px);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.zepf-taxonomy-description {
  max-width: 720px;
  margin: 0;
  color: var(--zepf-muted, #6f5b69);
  font-size: 17px;
  line-height: 1.72;
}

.zepf-taxonomy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.zepf-taxonomy-meta__item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 999px;
  background: #fff7fb;
  color: #795f70;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.zepf-taxonomy-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  aspect-ratio: 1;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid #e8c8d8;
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(247, 216, 232, 0.9));
  box-shadow: 0 18px 38px rgba(95, 48, 77, 0.13);
  color: var(--zepf-accent, #d85c9c);
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.zepf-taxonomy-mark::before,
.zepf-taxonomy-mark::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  background: rgba(216, 92, 156, 0.12);
}

.zepf-taxonomy-mark::before {
  top: -28px;
  right: -18px;
  width: 92px;
  height: 92px;
}

.zepf-taxonomy-mark::after {
  bottom: -34px;
  left: -25px;
  width: 110px;
  height: 110px;
}

.zepf-taxonomy-mark__letter {
  position: relative;
  z-index: 1;
}

.zepf-taxonomy-section {
  margin-top: 54px;
}

.zepf-taxonomy-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.zepf-taxonomy-section__head h2 {
  margin: 0;
  color: var(--zepf-text, #241826);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.zepf-taxonomy-section__head p {
  margin: 0;
  color: var(--zepf-muted, #7b6674);
  font-size: 14px;
  line-height: 1.5;
}

.zepf-taxonomy-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 28px;
}

.zepf-taxonomy-term {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 999px;
  background: #fff;
  color: #745e6c;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.zepf-taxonomy-term:hover {
  border-color: #dfa9c4;
  color: #b84f85;
  transform: translateY(-1px);
}

.zepf-taxonomy-term.is-active {
  border-color: #d86ca3;
  background: #f7d8e8;
  color: #ad447b;
}

.zepf-taxonomy-empty {
  padding: 34px;
  border: 1px dashed #dfbfd0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  color: #765f6e;
  text-align: center;
}

.zepf-taxonomy-empty p {
  margin: 0 0 18px;
}

.zepf-taxonomy-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--zepf-accent, #d85c9c);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

@media (max-width: 760px) {
  body.tax-work_type #primary.zepf-taxonomy-page,
  body.tax-work_stage #primary.zepf-taxonomy-page,
  body.tax-work_format #primary.zepf-taxonomy-page {
    padding: 38px 16px 64px !important;
  }

  .zepf-taxonomy-hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 24px;
  }

  .zepf-taxonomy-mark {
    width: 132px;
    margin: 0;
    border-radius: 26px;
    font-size: 58px;
  }

  .zepf-taxonomy-title {
    font-size: clamp(38px, 13vw, 58px);
  }

  .zepf-taxonomy-section {
    margin-top: 42px;
  }

  .zepf-taxonomy-section__head {
    display: block;
  }

  .zepf-taxonomy-section__head p {
    margin-top: 8px;
  }
}

/* =========================================================
   СИНХРОНИЗИРОВАННЫЙ ПРОФИЛЬ В HERO ГЛАВНОЙ
   ========================================================= */

.zepf-home-artist-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 26px 0 4px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(95, 48, 77, 0.07);
}

.zepf-home-artist-profile,
.zepf-home-artist-profile * {
  box-sizing: border-box;
}

.zepf-home-artist-profile__avatar {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--zepf-border, #ead3df);
  border-radius: 16px;
  background: var(--zepf-soft, #f7d8e8);
  text-decoration: none;
}

.zepf-home-artist-profile__avatar img,
.zepf-home-artist-profile__avatar-image {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: cover;
}

.zepf-home-artist-profile__content {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.zepf-home-artist-profile__name {
  width: fit-content;
  color: var(--zepf-text, #241826);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.zepf-home-artist-profile__name:hover {
  color: var(--zepf-accent-dark, #bd4382);
}

.zepf-home-artist-profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.zepf-home-artist-profile__status,
.zepf-home-artist-profile__price {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #edcedd;
  border-radius: 999px;
  background: #fff7fb;
  color: #6d5364;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.zepf-home-artist-profile__status::before {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.zepf-home-artist-profile__status.is-open {
  color: #3b7651;
}

.zepf-home-artist-profile__status.is-closed {
  color: #8a6679;
}

@media (max-width: 520px) {
  .zepf-home-artist-profile {
    width: 100%;
    align-items: flex-start;
  }

  .zepf-home-artist-profile__avatar {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }
}

