/* =========================================================
   Eurocash Agency — сторінка відгуків
   Clean / European / trustworthy. Один брендовий колір + нейтралі.
   ========================================================= */

:root {
  --brand:        #15507f;
  --brand-hover:  #0f3d61;
  --brand-soft:   #eef4f9;
  --brand-line:   #cfe0ee;

  --star:         #d69e2e;

  --ink:          #101828;
  --ink-2:        #475467;
  --muted:        #667085;
  --line:         #e5e8ee;
  --line-soft:    #eef0f4;
  --bg:           #ffffff;
  --bg-soft:      #f7f9fb;

  --radius:       14px;
  --radius-sm:    10px;
  --shadow:       0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lift:  0 6px 20px -8px rgba(16, 24, 40, .16);

  --container:    1120px;
  --narrow:       780px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* щоб липкий header не перекривав якорі */
:target, section[id], main[id] { scroll-margin-top: 86px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); font-weight: 650; line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.1vw, 2.75rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.35rem, 1.15rem + .9vw, 1.75rem); }
h3 { font-size: 1.02rem; font-weight: 600; }
p  { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 640; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.narrow    { max-width: var(--narrow); margin-inline: auto; }
.muted     { color: var(--muted); font-size: .93em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* ---------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 66px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); text-decoration: none; }
.logo__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff;
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
}
.logo__text { font-size: 1.02rem; font-weight: 640; letter-spacing: -.01em; }
.logo__text span { color: var(--muted); font-weight: 500; }

.site-nav { display: flex; gap: 22px; margin-left: auto; font-size: .95rem; }
.site-nav a { color: var(--ink-2); }
.site-nav a:hover { color: var(--brand); text-decoration: none; }
.site-nav a.is-current { color: var(--ink); font-weight: 600; }

.lang {
  display: inline-flex; padding: 3px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px;
}
.lang__item {
  padding: 4px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; letter-spacing: .03em;
  color: var(--muted);
}
.lang__item:hover { color: var(--brand); text-decoration: none; }
.lang__item.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------------------------------------------------------- breadcrumbs */

.breadcrumbs { border-bottom: 1px solid var(--line-soft); font-size: .85rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 12px 0; }
.breadcrumbs li { color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #c4cad4; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

/* ---------------------------------------------------------- hero */

.hero { padding: clamp(36px, 5vw, 68px) 0 clamp(30px, 4vw, 52px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(28px, 4vw, 56px); align-items: start; }

.eyebrow {
  margin: 0 0 12px; font-size: .78rem; font-weight: 640;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brand);
}
.lead { font-size: 1.06rem; color: var(--ink-2); max-width: 60ch; }

.facts { display: flex; flex-wrap: wrap; gap: 10px 12px; list-style: none; margin: 26px 0 0; padding: 0; }
.facts li {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: .88rem; color: var(--ink-2);
}
.facts span { font-weight: 680; color: var(--ink); }

/* rating card */
.rating-card {
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
}
.rating-card__top { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.rating-card__value {
  margin: 0; font-size: 3.4rem; line-height: 1; font-weight: 660;
  color: var(--ink); letter-spacing: -.03em;
}
.rating-card__sub { margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.rating-card__bars { display: grid; gap: 7px; padding: 18px 0 20px; }
.rating-card__cta { width: 100%; }

.stars { color: var(--star); letter-spacing: .12em; font-size: 1rem; }
.stars--lg { display: block; margin: 10px 0 0; font-size: 1.3rem; }

.bar { display: grid; grid-template-columns: 18px 1fr 26px; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.bar__label { text-align: right; font-variant-numeric: tabular-nums; }
.bar__track { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: 999px; background: var(--star); }
.bar__value { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: #c9d2dd; background: var(--bg-soft); color: var(--ink); }

.link-btn {
  padding: 0; border: 0; background: none; font: inherit; font-size: .88rem;
  color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--brand-hover); }

/* ---------------------------------------------------------- sections */

.section { padding: clamp(42px, 5.5vw, 76px) 0; }
.section--tight { padding: clamp(30px, 3.5vw, 46px) 0; }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--line-soft); }
.section__head { max-width: 62ch; margin-bottom: 26px; }
.section__head p { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------- filters */

.filters { display: grid; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.filters__row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.filters__label {
  flex: 0 0 68px; font-size: .78rem; font-weight: 640;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.filters__row--search { gap: 16px; padding-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font: inherit; font-size: .89rem; color: var(--ink-2);
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.chip:hover { border-color: #c9d2dd; background: var(--bg-soft); }
.chip__n { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.is-active .chip__n { color: rgba(255, 255, 255, .75); }
.chip[data-empty] { opacity: .45; cursor: not-allowed; }

.search {
  position: relative; display: flex; align-items: center;
  flex: 1 1 320px; max-width: 420px;
}
.search__icon {
  position: absolute; left: 13px; width: 17px; height: 17px;
  fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; pointer-events: none;
}
.search input {
  width: 100%; padding: 11px 38px 11px 40px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 80, 127, .12);
}
.search input::-webkit-search-cancel-button { display: none; }
.search__clear[hidden] { display: none; }
.search__clear {
  position: absolute; right: 8px; display: grid; place-items: center;
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: none; color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.search__clear:hover { background: var(--bg-soft); color: var(--ink); }

.results { margin: 18px 0 22px; font-size: .9rem; color: var(--muted); }
.results b { color: var(--ink); font-weight: 640; font-variant-numeric: tabular-nums; }

.empty {
  margin: 8px 0 0; padding: 34px 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); background: var(--bg-soft);
}

/* ---------------------------------------------------------- review cards */

.reviews__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

.review {
  padding: 22px 24px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.review:hover { border-color: #d5dce5; box-shadow: var(--shadow-lift); }
.review.is-filtered-out, .review.is-paged-out { display: none; }

.review__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 14px; }

.avatar {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: .84rem; font-weight: 660; letter-spacing: .01em;
  background: var(--brand-soft); color: var(--brand);
}
.avatar[data-tone="0"] { background: #eaf1f8; color: #1b527d; }
.avatar[data-tone="1"] { background: #e9f2ec; color: #23604a; }
.avatar[data-tone="2"] { background: #f5efe6; color: #7a5326; }
.avatar[data-tone="3"] { background: #eeecf7; color: #4a3e75; }
.avatar[data-tone="4"] { background: #f8ebec; color: #8a3b44; }
.avatar[data-tone="5"] { background: #e7f1f2; color: #1f5560; }

.review__who { min-width: 0; }
.review__name { display: block; color: var(--ink); font-weight: 620; font-size: .98rem; }
.review__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 2px; font-size: .82rem; color: var(--muted); }
.review__country::after { content: "·"; margin-left: 8px; color: #c4cad4; }
.review__lang { font-size: .7rem; font-weight: 640; letter-spacing: .05em; color: var(--muted); }

.review__rating { align-self: start; padding-top: 2px; white-space: nowrap; }
.review__rating .stars { font-size: .9rem; }

.review__text { margin: 0; font-size: .96rem; color: var(--ink-2); overflow-wrap: break-word; }
.review__text.is-clamped {
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical;
  line-clamp: 7; overflow: hidden;
}
.review__toggle {
  margin-top: 10px; padding: 0; border: 0; background: none;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--brand); cursor: pointer;
}
.review__toggle:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }

.reviews__more { margin-top: 26px; text-align: center; }
.reviews__more[hidden] { display: none; }

mark { background: #fdf0cf; color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------------------------------------------------------- topics */

.topics { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.topic { display: grid; grid-template-columns: minmax(140px, 210px) minmax(0, 1fr) 84px; align-items: center; gap: 14px; font-size: .93rem; }
.topic__name { color: var(--ink); }
.topic__track { height: 8px; border-radius: 999px; background: #e6ebf1; overflow: hidden; }
.topic__fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); opacity: .85; }
.topic__value { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.topic__value span { color: var(--muted); font-weight: 400; }

/* ---------------------------------------------------------- steps */

.steps { counter-reset: step; list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li { position: relative; padding-left: 44px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px;
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: .82rem; font-weight: 660;
}

/* ---------------------------------------------------------- form */

.form {
  margin-top: 24px; padding: clamp(20px, 3vw, 30px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: block; margin-bottom: 18px; border: 0; padding: 0; }
.field__label { display: block; margin-bottom: 7px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.field__hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }

.form input[type="text"], .form select, .form textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 80, 127, .12);
}
.form .is-invalid { border-color: #c0392b; }
.field__error { display: block; margin-top: 6px; font-size: .82rem; color: #c0392b; }

.field--rating { margin-bottom: 18px; }
.field--rating legend { padding: 0; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 4px; }
.rating-input label { cursor: pointer; }
.rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-input span { font-size: 1.6rem; line-height: 1; color: #dfe3ea; transition: color .12s ease; }
.rating-input label:hover span,
.rating-input label:hover ~ label span,
.rating-input input:checked ~ span,
.rating-input label:has(input:checked) span,
.rating-input label:has(input:checked) ~ label span { color: var(--star); }
.rating-input input:focus-visible ~ span { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.rating-input__value {
  order: -1; margin-left: 12px; font-size: .88rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.form__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; }
.note { margin: 0; font-size: .82rem; color: var(--muted); max-width: 44ch; }

.form__success {
  margin-top: 18px; padding: 14px 16px;
  border: 1px solid var(--brand-line); border-radius: var(--radius-sm);
  background: var(--brand-soft); color: var(--brand-hover); font-size: .92rem;
}

/* ---------------------------------------------------------- faq */

.faq-list { margin-top: 22px; border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 2px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; flex: 1; font-size: 1rem; font-weight: 600; }
.faq summary:hover h3 { color: var(--brand); }
.faq__icon { position: relative; flex: 0 0 16px; height: 16px; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; inset: 50% 0 auto 0;
  height: 1.6px; background: var(--muted); border-radius: 2px;
  transition: transform .18s ease;
}
.faq__icon::after { transform: rotate(90deg); }
.faq[open] .faq__icon::after { transform: rotate(0deg); }
.faq__answer { padding: 0 44px 20px 2px; color: var(--ink-2); }
.faq__answer p { margin: 0; font-size: .96rem; }

/* ---------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-top: clamp(38px, 4vw, 54px); font-size: .93rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 34px; }
.site-footer h2 { font-size: .8rem; font-weight: 640; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer p { margin: 0 0 10px; color: var(--ink-2); }
.site-footer__brand p { max-width: 34ch; color: var(--muted); }
.logo--footer { margin-bottom: 14px; }
.site-footer__links, .social { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__links a, .social a { color: var(--ink-2); }
.site-footer__links a:hover, .social a:hover { color: var(--brand); }
.site-footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 18px 20px; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--muted);
}
.site-footer__bottom p { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .rating-card { max-width: 460px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 780px) {
  .reviews__grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .lang { margin-left: auto; }
  .topic { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .topic__name  { grid-area: 1 / 1; }
  .topic__value { grid-area: 1 / 2; }
  .topic__track { grid-area: 2 / 1 / 3 / 3; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding-inline: 16px; }
  .filters__label { flex-basis: 100%; }
  .review { padding: 20px; }
  .facts li { font-size: .85rem; }
  .rating-card { padding: 22px; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .filters, .reviews__more, .form, .skip-link, .site-footer__links, .social { display: none; }
  .review { break-inside: avoid; border-color: #ccc; }
  .review__text.is-clamped { -webkit-line-clamp: unset; display: block; }
}
