/* ───── Цвета: поменяйте --cpo-accent на фирменный ───── */
.cpo-reviews, .cpo-single, .cpo-pagination {
  --cpo-accent: #0b6e99;
  --cpo-accent-soft: #e6f2f7;
  --cpo-ink: #1c2530;
  --cpo-muted: #627080;
  --cpo-line: #e2e8ee;
  --cpo-surface: #ffffff;
  --cpo-radius: 18px;
}

/* ═════════ СПИСОК ═════════ */
.cpo-reviews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin: 32px 0;
}

.cpo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  background: var(--cpo-surface);
  border: 1px solid var(--cpo-line);
  border-radius: var(--cpo-radius);
  transition: border-color .2s, box-shadow .2s;
}
.cpo-card::before {               /* большая кавычка */
  content: "\201C";
  position: absolute;
  top: 6px; right: 22px;
  font: 700 84px/1 Georgia, "Times New Roman", serif;
  color: var(--cpo-accent-soft);
  pointer-events: none;
}
.cpo-card:hover,
.cpo-card:focus-within {
  border-color: var(--cpo-accent);
  box-shadow: 0 10px 30px -14px rgba(11, 110, 153, .35);
}

.cpo-card__title {
  position: relative;
  margin: 0 0 12px;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cpo-card__link { color: var(--cpo-ink); text-decoration: none; }
.cpo-card__link::after { content: ""; position: absolute; inset: -28px -28px -200px; } /* вся карточка кликабельна */
.cpo-card__link:focus-visible { outline: 3px solid var(--cpo-accent); outline-offset: 4px; border-radius: 4px; }

.cpo-card__text {
  position: relative;
  margin: 0 0 22px;
  color: #3b4755;
  font-size: .98rem;
  line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}

.cpo-card__who {
  margin-top: auto;
  display: flex; align-items: center; gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--cpo-line);
}
.cpo-card__meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.cpo-card__meta strong { color: var(--cpo-ink); font-size: .98rem; }
.cpo-card__meta span   { color: var(--cpo-muted); font-size: .88rem; }

/* Аватар: фото показывается маленьким — миниатюра 300px даёт запас ×4, пикселей нет */
.cpo-avatar {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cpo-accent-soft);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--cpo-line);
}
.cpo-avatar .cpo-avatar__img {
  display: block;
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 25%;     /* лица обычно в верхней части кадра */
}
.cpo-avatar__ph {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  color: var(--cpo-accent); font-weight: 700; font-size: 1.3rem;
}

/* Пагинация */
.cpo-pagination { display: flex; justify-content: center; gap: 8px; margin: 8px 0 40px; flex-wrap: wrap; }
.cpo-pagination .page-numbers {
  min-width: 42px; height: 42px; padding: 0 12px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--cpo-line); border-radius: 12px;
  color: var(--cpo-ink); text-decoration: none; background: #fff;
}
.cpo-pagination .page-numbers.current,
.cpo-pagination a.page-numbers:hover { background: var(--cpo-accent); border-color: var(--cpo-accent); color: #fff; }

/* ═════════ Заголовок страницы и кнопка «Оставить отзыв» ═════════ */
.cpo-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px 32px; flex-wrap: wrap;
  margin: 8px 0 28px;
}
.cpo-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -.01em;
  text-transform: none;
  color: #1c2530;
}
.cpo-head p { margin: 0; max-width: 52ch; font-size: 17px; line-height: 1.55; color: #5b6978; }

.cpo-cta,
.cpo-cta:visited {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px;
  border: 0; border-radius: 999px;
  background: #02778b; color: #fff;
  font: 600 16px/1.2 inherit; font-family: inherit;
  text-decoration: none;
  box-shadow: 0 8px 20px -10px rgba(2, 119, 139, .7);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.cpo-cta:hover, .cpo-cta:focus-visible {
  background: #025f6f; color: #fff; text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(2, 119, 139, .8);
}
.cpo-cta:focus-visible { outline: 3px solid #a9c624; outline-offset: 3px; }
.cpo-cta svg { flex: none; }

/* Призыв под списком */
.cpo-ask {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px 32px; flex-wrap: wrap;
  margin: 48px 0 24px;
  padding: 32px 36px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 20%, rgba(169, 198, 36, .28) 0, transparent 38%),
    linear-gradient(120deg, #d6edf2 0%, #e4f2e6 100%);
}
.cpo-ask h3 { margin: 0 0 6px; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.25; color: #1c2530; text-transform: none; }
.cpo-ask p  { margin: 0; max-width: 54ch; color: #3b4755; line-height: 1.6; }

@media (max-width: 600px) {
  .cpo-head .cpo-cta, .cpo-ask .cpo-cta { width: 100%; }
  .cpo-ask { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) { .cpo-cta { transition: none; } .cpo-cta:hover { transform: none; } }

/* ═════════ Полоса хлебных крошек ═════════
   Фон, высота и цвета берутся из темы (.inner-main-title, .breadcrumb-trail).
   Правила ниже действуют ТОЛЬКО на странице отзыва (.cpo-banner-wrap),
   чтобы не затрагивать родные крошки темы на других страницах. */
.cpo-banner-wrap .trail-items {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center;
}
.cpo-banner-wrap .trail-items li { display: inline-flex; align-items: center; margin: 0; padding: 0; }
.cpo-banner-wrap .trail-items li:not(.trail-end)::after {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  margin: 0 9px 0 5px;
  border-top: 2px solid #a9c624;
  border-right: 2px solid #a9c624;
  transform: rotate(45deg);
}
.cpo-banner-wrap .trail-items li > span { display: inline-block; }

/* ═════════ ОТДЕЛЬНЫЙ ОТЗЫВ ═════════ */
/* Контейнер по центру страницы (!important — чтобы тема не сбрасывала отступы) */
body main.cpo-single {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  align-self: center;
  padding: 40px 20px 64px !important;
  color: var(--cpo-ink);
}
.cpo-review { justify-content: center; }

.cpo-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; font-size: .88rem; color: var(--cpo-muted); }
.cpo-crumbs a { color: var(--cpo-muted); text-decoration: none; }
.cpo-crumbs a:hover { color: var(--cpo-accent); }
.cpo-crumbs a + a::before { content: "/"; margin-right: 6px; color: #b4bec9; }

.cpo-review {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.cpo-review--nophoto { grid-template-columns: minmax(0, 720px); justify-content: center; }

/* Фото: показывается в натуральный размер, а свободное место заполняет размытая копия */
.cpo-single .cpo-photo {
  position: sticky; top: 24px;
  margin: 0;
  padding: 28px;
  display: grid; place-items: center;
  grid-template-columns: minmax(0, 1fr);   /* колонка не шире рамки */
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
  background: var(--cpo-accent-soft);
}
.cpo-single .cpo-photo::before {
  content: "";
  position: absolute; inset: -40px; z-index: -1;
  background: var(--cpo-bg) center / cover no-repeat;
  filter: blur(26px) saturate(1.15);
  opacity: .6;
}
.cpo-single .cpo-photo .cpo-photo__img {
  display: block;
  width: auto !important;       /* перебиваем width:100% темы */
  height: auto !important;
  max-width: 100% !important;   /* перебивает inline max-width: фото не шире рамки и не крупнее оригинала */
  margin: 0 auto;
  justify-self: center;
  max-height: 460px;
  border-radius: 14px;
  image-rendering: auto;
  box-shadow: 0 14px 40px -16px rgba(0, 0, 0, .45);
}

.cpo-review__date { display: block; margin-bottom: 12px; color: var(--cpo-muted); font-size: .92rem; }
.cpo-review__title {
  margin: 0 0 28px;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.cpo-review__text {
  max-width: 62ch;
  padding-left: 24px;
  border-left: 4px solid var(--cpo-accent);
  font-size: 1.15rem;
  line-height: 1.75;
  color: #2f3a47;
}
.cpo-review__text p { margin: 0 0 1em; }
.cpo-review__text p:last-child { margin-bottom: 0; }

.cpo-review__who { display: flex; flex-direction: column; margin-top: 28px; padding-left: 28px; line-height: 1.4; }
.cpo-review__who strong { font-size: 1.1rem; }
.cpo-review__who span   { color: var(--cpo-muted); }

/* Соседние отзывы */
.cpo-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.cpo-pager__item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 22px;
  border: 1px solid var(--cpo-line); border-radius: 14px;
  color: var(--cpo-ink); text-decoration: none;
  transition: border-color .2s;
}
.cpo-pager__item:hover { border-color: var(--cpo-accent); }
.cpo-pager__item small { color: var(--cpo-muted); }
.cpo-pager__item span { font-weight: 600; line-height: 1.35; }
.cpo-pager__item--next { grid-column: 2; text-align: right; }
.cpo-pager__item:only-child:not(.cpo-pager__item--next) { grid-column: 1; }

.cpo-back { margin: 28px 0 0; text-align: center; }
.cpo-back a {
  display: inline-block; padding: 12px 26px;
  border-radius: 999px; background: var(--cpo-accent); color: #fff; text-decoration: none; font-weight: 600;
}
.cpo-back a:hover { filter: brightness(1.1); }
.cpo-back a:focus-visible, .cpo-pager__item:focus-visible { outline: 3px solid var(--cpo-accent); outline-offset: 3px; }

/* ═════════ Мобильная версия ═════════ */
@media (max-width: 820px) {
  .cpo-review { grid-template-columns: 1fr; gap: 28px; }
  .cpo-single .cpo-photo { position: relative; top: 0; padding: 20px; }
  .cpo-review__text { font-size: 1.05rem; padding-left: 18px; }
  .cpo-review__who { padding-left: 22px; }
  .cpo-pager { grid-template-columns: 1fr; }
  .cpo-pager__item--next { grid-column: 1; text-align: left; }
}
@media (max-width: 480px) {
  .cpo-card { padding: 22px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cpo-card, .cpo-pager__item { transition: none; }
}
