/* ======================================================================
   Secondary pages — visual system shared with the redesigned home page
   ====================================================================== */

.rd-subpage-main {
  min-height: 65vh;
  background: var(--cream);
}

/* --- shared page chrome ------------------------------------------------ */
.rd-subpage-main .container,
.rd-subpage-main .certificate-top,
.rd-subpage-main .certificate-price-wrap,
.rd-subpage-main #vyezd > .container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.rd-subpage-main .vyezd-home-btn,
.rd-subpage-main .home-btn-wrap {
  max-width: none;
  margin: 0 0 24px;
}

.rd-subpage-main .vyezd-home-btn a,
.rd-subpage-main .home-btn-wrap a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border: 1.5px solid var(--olive-light);
  border-radius: 999px;
  background: transparent;
  color: var(--olive-deep);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: background .2s, transform .15s;
}
.rd-subpage-main .vyezd-home-btn a:hover,
.rd-subpage-main .home-btn-wrap a:hover {
  background: var(--sage);
  color: var(--olive-deep);
  transform: translateY(-1px);
}

.rd-subpage-main .section-title {
  max-width: 820px;
  padding: 0;
  margin: 0 0 34px;
  text-align: left;
}
.rd-subpage-main .section-title h2 {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.12;
  font-weight: 600;
}
.rd-subpage-main .section-title h2::after { display: none !important; }

/* --- certificates ------------------------------------------------------ */
.rd-certificate-page #about {
  padding: 58px 0 70px;
  background:
    radial-gradient(90% 110% at 96% 0%, rgba(223,228,211,.78), transparent 62%),
    var(--cream);
}

.rd-certificate-page .certificate-layout {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
  gap: 52px;
  align-items: start;
}

.rd-certificate-page .certificate-image-block {
  position: sticky;
  top: 112px;
}
.rd-certificate-page .certificate-card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}
.rd-certificate-page .certificate-card .portfolio-wrap {
  position: relative;
  max-width: none;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
}
.rd-certificate-page .certificate-card img {
  display: block;
  width: 100%;
  transition: transform .35s ease;
}
.rd-certificate-page .certificate-card .portfolio-links {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: rgba(38,48,42,.34);
  transition: opacity .25s ease;
}
.rd-certificate-page .certificate-card .portfolio-links span {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: var(--olive-deep);
  font-size: 22px;
}
.rd-certificate-page .certificate-card:hover img { transform: scale(1.035); }
.rd-certificate-page .certificate-card:hover .portfolio-links { opacity: 1; }

.rd-certificate-page .certificate-text-block {
  min-width: 0;
  font-size: 17px;
}
.rd-certificate-page .certificate-text-block h4 {
  margin: 0 0 20px;
  font-size: 29px;
}
.rd-certificate-page .certificate-text-block h4:not(:first-child) { margin-top: 42px; }

.rd-certificate-page .certificate-feature-list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}
.rd-certificate-page .certificate-feature-item {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 13px;
  align-items: start;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.56);
}
.rd-certificate-page .certificate-feature-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sage);
  color: var(--olive-deep);
  font-weight: 700;
  line-height: 1;
}
.rd-certificate-page .certificate-feature-list-small .certificate-feature-icon {
  background: transparent;
  border: 1px solid var(--olive-light);
}
.rd-certificate-page .certificate-feature-text { line-height: 1.65; }
.rd-certificate-page .certificate-feature-text a,
.rd-certificate-page .certificate-note a {
  color: var(--olive-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rd-certificate-page .certificate-note {
  margin: 22px 0 0;
  padding: 17px 19px;
  border-left: 4px solid var(--olive);
  border-radius: 0 12px 12px 0;
  background: var(--sage);
  line-height: 1.65;
}

.rd-certificate-page #price {
  padding: 70px 0;
  background: var(--sage);
}
.rd-certificate-page #price .section-title { margin-bottom: 30px; }
.rd-certificate-page .certificate-price-wrap .row,
.rd-certificate-page .certificate-price-wrap .col-lg-6 {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.rd-certificate-page .certificate-price-wrap .col-lg-6 {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
}
.rd-certificate-page .resume-item {
  margin: 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.rd-certificate-page .resume-item::before { display:none !important; }
.rd-certificate-page .resume-item h4 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 27px;
}
.rd-certificate-page .certificate-price-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.rd-certificate-page .certificate-price-list li {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--cream);
}
.rd-certificate-page .certificate-price-list li span {
  font-size: 17px;
  line-height: 1.45;
}
.rd-certificate-page .certificate-price-list li em { font-style: normal; }
.rd-certificate-page .buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--olive);
  color: #fff;
  font-weight: 600;
  text-align: center;
  transition: transform .15s, background .2s;
}
.rd-certificate-page .buy-btn:hover {
  background: var(--olive-deep);
  color: #fff;
  transform: translateY(-1px);
}

.rd-certificate-page #contact {
  padding: 70px 0 82px;
  background: var(--cream);
}
.rd-certificate-page #contact > .container {
  max-width: 900px;
}
.rd-certificate-page #contact .row,
.rd-certificate-page #contact .col-lg-8 {
  display:block;
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
}
.rd-certificate-page .php-email-form {
  width: 100%;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.rd-certificate-page .php-email-form .section-title { margin-bottom: 28px; }
.rd-certificate-page .php-email-form .section-title h2 { font-size: clamp(32px,4vw,44px); }
.rd-certificate-page .form-group { margin-bottom: 18px; }
.rd-certificate-page .php-email-form label {
  display:block;
  margin-bottom:7px;
  color:var(--ink);
  font-size:14px;
  font-weight:600;
}
.rd-certificate-page .php-email-form input,
.rd-certificate-page .php-email-form textarea {
  width:100%;
  min-height:48px;
  padding:11px 13px;
  border:1.5px solid var(--line);
  border-radius:11px;
  background:var(--cream);
  color:var(--ink);
  font:inherit;
  outline:none;
}
.rd-certificate-page .php-email-form input:focus,
.rd-certificate-page .php-email-form textarea:focus {
  border-color:var(--olive);
  box-shadow:0 0 0 3px rgba(107,122,79,.13);
}
.rd-certificate-page .file-upload-wrap { position:relative; }
.rd-certificate-page .file-clear-btn {
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  background:var(--sage);
  color:var(--ink);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.rd-certificate-page .php-email-form .loading,
.rd-certificate-page .php-email-form .error-message,
.rd-certificate-page .php-email-form .sent-message { display:none; margin:12px 0; }
.rd-certificate-page .php-email-form .error-message { color:#8c2c24; }
.rd-certificate-page .php-email-form .sent-message { color:#3d6735; }
.rd-certificate-page .php-email-form button[type="submit"] {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px 26px;
  border:0;
  border-radius:999px;
  background:var(--olive);
  color:#fff;
  font:600 15px/1.2 var(--font-body);
  cursor:pointer;
}
.rd-certificate-page .text-center { text-align:center; }

/* --- home visit -------------------------------------------------------- */
.rd-vyezd-page #vyezd {
  padding: 58px 0 80px;
  background:
    radial-gradient(95% 100% at 95% 0%, rgba(223,228,211,.82), transparent 60%),
    var(--cream);
}
.rd-vyezd-page #vyezd > .container { max-width: 980px; }
.rd-vyezd-page .vyezd-intro {
  max-width: 820px;
  margin: 0 0 24px;
  font-size: 18px;
}
.rd-vyezd-page .vyezd-intro p { margin: 0 0 13px; line-height: 1.7; }
.rd-vyezd-page .vyezd-foot {
  max-width: 820px;
  margin: 0 0 30px;
  padding: 17px 19px;
  border-left: 4px solid var(--olive);
  border-radius: 0 12px 12px 0;
  background: var(--sage);
  line-height: 1.65;
}

.rd-vyezd-page .vyezd-calc {
  max-width: 820px;
  margin: 0 0 24px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.rd-vyezd-page .vyezd-calc h4 {
  margin:0 0 22px;
  font-size:30px;
  color:var(--ink);
}
.rd-vyezd-page .vyezd-field { margin-bottom:20px; }
.rd-vyezd-page .vyezd-field > label {
  display:block;
  margin-bottom:8px;
  color:var(--ink);
  font-size:14px;
  font-weight:600;
}
.rd-vyezd-page .vyezd-combo { position:relative; }
.rd-vyezd-page .vyezd-search {
  width:100%;
  min-height:50px;
  padding:12px 48px 12px 14px;
  border:1.5px solid var(--line);
  border-radius:12px;
  background:var(--cream);
  color:var(--ink);
  font:inherit;
  outline:none;
}
.rd-vyezd-page .vyezd-search:focus {
  border-color:var(--olive);
  box-shadow:0 0 0 3px rgba(107,122,79,.13);
}
.rd-vyezd-page .vyezd-search::placeholder { color:#72786f; opacity:1; }
.rd-vyezd-page .vyezd-combo-arrow {
  position:absolute;
  top:0;
  right:0;
  width:48px;
  height:50px;
  border:0;
  background:transparent;
  color:var(--olive-deep);
  cursor:pointer;
}
.rd-vyezd-page .vyezd-combo-arrow::before {
  content:"";
  position:absolute;
  width:10px;
  height:10px;
  left:18px;
  top:17px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  transition:transform .2s;
}
.rd-vyezd-page .vyezd-combo.open .vyezd-combo-arrow::before { transform:rotate(225deg); top:22px; }
.rd-vyezd-page .vyezd-options {
  list-style:none;
  position:absolute;
  left:0;
  right:0;
  top:100%;
  z-index:30;
  display:none;
  max-height:280px;
  overflow:auto;
  margin:7px 0 0;
  padding:7px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  box-shadow:var(--shadow-sm);
}
.rd-vyezd-page .vyezd-combo.open .vyezd-options { display:block; }
.rd-vyezd-page .vyezd-option {
  padding:9px 11px;
  border-radius:9px;
  color:var(--ink);
  cursor:pointer;
}
.rd-vyezd-page .vyezd-option:hover,
.rd-vyezd-page .vyezd-option.is-active { background:var(--sage); }
.rd-vyezd-page .vyezd-option.is-selected { color:var(--olive-deep); font-weight:700; }
.rd-vyezd-page .vyezd-option-empty { text-align:center; color:#737a72; cursor:default; }

.rd-vyezd-page .vyezd-toggle { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rd-vyezd-page .vyezd-toggle input { position:absolute; opacity:0; pointer-events:none; }
.rd-vyezd-page .vyezd-toggle label {
  margin:0;
  padding:12px 14px;
  border:1.5px solid var(--line);
  border-radius:12px;
  background:var(--cream);
  color:var(--ink-soft);
  text-align:center;
  font-weight:600;
  cursor:pointer;
}
.rd-vyezd-page .vyezd-toggle input:checked + label {
  border-color:var(--olive);
  background:var(--olive);
  color:#fff;
}

.rd-vyezd-page .vyezd-placeholder {
  margin-top:22px;
  padding:19px;
  border:1px dashed var(--olive-light);
  border-radius:13px;
  background:var(--cream);
  color:var(--ink-soft);
  text-align:center;
}
.rd-vyezd-page .vyezd-result {
  display:none;
  margin-top:22px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--cream);
}
.rd-vyezd-page .vyezd-result.show { display:block; }
.rd-vyezd-page .vyezd-result-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:14px 18px;
  background:var(--sage);
  color:var(--ink);
  font-weight:700;
}
.rd-vyezd-page .vyezd-zone {
  padding:5px 10px;
  border:1px solid var(--olive-light);
  border-radius:999px;
  font-size:13px;
  font-weight:700;
}
.rd-vyezd-page .vyezd-price-rows { display:grid; grid-template-columns:1fr 1fr; }
.rd-vyezd-page .vyezd-price-cell { padding:22px; text-align:center; }
.rd-vyezd-page .vyezd-price-cell + .vyezd-price-cell { border-left:1px solid var(--line); }
.rd-vyezd-page .vyezd-time { font-size:14px; color:var(--ink-soft); }
.rd-vyezd-page .vyezd-price { margin-top:4px; font-family:var(--font-head); font-size:34px; font-weight:700; color:var(--olive-deep); }
.rd-vyezd-page .vyezd-legend {
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin-top:20px;
  color:var(--ink-soft);
  font-size:13px;
}
.rd-vyezd-page .vyezd-legend > span { display:inline-flex; align-items:center; gap:7px; }
.rd-vyezd-page .vyezd-dot { width:9px; height:9px; border-radius:50%; background:var(--olive); }
.rd-vyezd-page .vyezd-dot.d1 { opacity:.82; }
.rd-vyezd-page .vyezd-dot.d2 { opacity:.65; }
.rd-vyezd-page .vyezd-dot.d3 { opacity:.48; }

.rd-vyezd-page .vyezd-cta {
  max-width:820px;
  margin:0;
  padding:28px 30px;
  border-radius:var(--radius-lg);
  background:var(--sage);
}
.rd-vyezd-page .vyezd-cta-title {
  margin:0 0 16px;
  font-family:var(--font-head);
  font-size:28px;
  font-weight:600;
}
.rd-vyezd-page .vyezd-contacts { display:flex; flex-wrap:wrap; gap:10px; }
.rd-vyezd-page .vyezd-contact {
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:46px;
  padding:10px 16px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--paper);
  color:var(--olive-deep);
  font-weight:600;
}
.rd-vyezd-page .vyezd-contact i { font-size:19px; }
.rd-vyezd-page .vyezd-contact:hover { background:var(--olive); color:#fff; border-color:var(--olive); }

/* --- accessibility compatibility ------------------------------------- */
body.a11y-enabled .rd-subpage-main,
body.a11y-enabled .rd-certificate-page #about,
body.a11y-enabled .rd-certificate-page #price,
body.a11y-enabled .rd-certificate-page #contact,
body.a11y-enabled .rd-vyezd-page #vyezd,
body.a11y-enabled .certificate-card .portfolio-wrap,
body.a11y-enabled .certificate-feature-item,
body.a11y-enabled .certificate-note,
body.a11y-enabled .resume-item,
body.a11y-enabled .certificate-price-list li,
body.a11y-enabled .php-email-form,
body.a11y-enabled .vyezd-foot,
body.a11y-enabled .vyezd-calc,
body.a11y-enabled .vyezd-cta,
body.a11y-enabled .vyezd-option,
body.a11y-enabled .vyezd-options {
  background: var(--a11y-bg) !important;
  color: var(--a11y-text) !important;
  box-shadow:none !important;
}
body.a11y-enabled .rd-subpage-main :where(.certificate-feature-item,.certificate-note,.resume-item,.certificate-price-list li,.php-email-form,.vyezd-foot,.vyezd-calc,.vyezd-placeholder,.vyezd-result,.vyezd-cta,.vyezd-options) {
  border-color:var(--a11y-text) !important;
}
body.a11y-enabled .rd-subpage-main :where(.buy-btn,.vyezd-toggle input:checked + label,.vyezd-contact) {
  background:var(--a11y-text) !important;
  color:var(--a11y-bg) !important;
  border-color:var(--a11y-text) !important;
}
body.a11y-enabled .rd-subpage-main :where(.certificate-feature-icon,.vyezd-result-head) {
  background:var(--a11y-bg) !important;
  color:var(--a11y-text) !important;
  border:2px solid var(--a11y-text) !important;
}
body.a11y-enabled .rd-certificate-page .certificate-price-wrap .col-lg-6 {
  grid-template-columns:1fr !important;
}
body.a11y-enabled .rd-certificate-page .certificate-layout {
  grid-template-columns:1fr !important;
}
body.a11y-enabled .rd-certificate-page .certificate-image-block { position:static !important; }

/* --- responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .rd-certificate-page .certificate-layout { grid-template-columns:1fr; gap:34px; }
  .rd-certificate-page .certificate-image-block { position:static; max-width:520px; }
  .rd-certificate-page .certificate-price-wrap .col-lg-6 { grid-template-columns:1fr; }
}

@media (max-width: 620px) {
  .rd-certificate-page #about,
  .rd-vyezd-page #vyezd { padding-top:38px; padding-bottom:58px; }
  .rd-certificate-page #price,
  .rd-certificate-page #contact { padding-top:54px; padding-bottom:58px; }
  .rd-subpage-main .container,
  .rd-subpage-main .certificate-top,
  .rd-subpage-main .certificate-price-wrap,
  .rd-subpage-main #vyezd > .container { padding-left:16px; padding-right:16px; }
  .rd-subpage-main .section-title { margin-bottom:25px; }
  .rd-certificate-page .certificate-feature-item { grid-template-columns:34px minmax(0,1fr); padding:13px; }
  .rd-certificate-page .php-email-form,
  .rd-vyezd-page .vyezd-calc,
  .rd-vyezd-page .vyezd-cta { padding:20px; border-radius:18px; }
  .rd-vyezd-page .vyezd-toggle { grid-template-columns:1fr; }
  .rd-vyezd-page .vyezd-price-cell { padding:17px 10px; }
  .rd-vyezd-page .vyezd-price { font-size:29px; }
  .rd-vyezd-page .vyezd-result-head { align-items:flex-start; flex-direction:column; }
  .rd-vyezd-page .vyezd-contacts { flex-direction:column; }
  .rd-vyezd-page .vyezd-contact { justify-content:center; width:100%; }
}


/* === v37: headerless secondary pages, single-column certificate, restored distance colours === */

/* Certificate: keep the image in the same single content column as the text,
   matching the structure of the original page while retaining the redesign styling. */
.rd-certificate-page .certificate-layout {
  display: block;
}
.rd-certificate-page .certificate-image-block {
  position: static;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 40px;
}
.rd-certificate-page .certificate-card .portfolio-wrap {
  width: 100%;
}
.rd-certificate-page .certificate-text-block {
  width: 100%;
}

/* Home-visit calculator: restore the original four distance-zone colours.
   Accessibility palettes intentionally keep their own high-contrast colours. */
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-result-head.t0 { background:#4E7F0E; color:#fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-result-head.t1 { background:#B5542B; color:#fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-result-head.t2 { background:#CE004C; color:#fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-result-head.t3 { background:#5311AB; color:#fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-result-head .vyezd-zone {
  color:inherit;
  border-color:rgba(255,255,255,.7);
}
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-dot.d0 { background:#4E7F0E; opacity:1; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-dot.d1 { background:#B5542B; opacity:1; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-dot.d2 { background:#CE004C; opacity:1; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-dot.d3 { background:#5311AB; opacity:1; }

@media (max-width: 560px) {
  .rd-certificate-page .certificate-image-block {
    max-width: 100%;
    margin-bottom: 32px;
  }
}


/* === v38: centred secondary-page composition === */
.rd-subpage-main {
  text-align: center;
}
.rd-subpage-main .section-title {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.rd-subpage-main .vyezd-home-btn,
.rd-subpage-main .home-btn-wrap {
  text-align: center;
}

/* Certificates */
.rd-certificate-page .certificate-text-block,
.rd-certificate-page .resume-item,
.rd-certificate-page .certificate-price-list li,
.rd-certificate-page .php-email-form {
  text-align: center;
}
.rd-certificate-page .certificate-feature-item {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.rd-certificate-page .certificate-feature-icon {
  margin: 0 auto;
}
.rd-certificate-page .certificate-note {
  text-align: center;
}
.rd-certificate-page .php-email-form label {
  text-align: center;
}
.rd-certificate-page .php-email-form input,
.rd-certificate-page .php-email-form textarea {
  text-align: center;
}
.rd-certificate-page .php-email-form input[type="file"] {
  text-align: center;
}
.rd-certificate-page .php-email-form button[type="submit"] {
  margin-left: auto;
  margin-right: auto;
}

/* Home visit */
.rd-vyezd-page .vyezd-intro,
.rd-vyezd-page .vyezd-foot,
.rd-vyezd-page .vyezd-calc,
.rd-vyezd-page .vyezd-cta {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.rd-vyezd-page .vyezd-field > label,
.rd-vyezd-page .vyezd-calc h4,
.rd-vyezd-page .vyezd-cta-title {
  text-align: center;
}
.rd-vyezd-page .vyezd-search {
  text-align: center;
}
.rd-vyezd-page .vyezd-search::placeholder {
  text-align: center;
}
.rd-vyezd-page .vyezd-option {
  text-align: center;
}
.rd-vyezd-page .vyezd-result-head {
  justify-content: center;
  text-align: center;
}
.rd-vyezd-page .vyezd-legend,
.rd-vyezd-page .vyezd-contacts {
  justify-content: center;
}
.rd-vyezd-page .vyezd-legend > span,
.rd-vyezd-page .vyezd-contact {
  justify-content: center;
}

@media (max-width: 620px) {
  .rd-vyezd-page .vyezd-result-head {
    align-items: center;
  }
}

/* === v39: secondary-page scale and original interaction details === */

/* Keep the back-to-home control separate from the centred page composition. */
.rd-subpage-main .vyezd-home-btn,
.rd-subpage-main .home-btn-wrap {
  text-align: left;
  margin: 0 0 18px;
}

/* These pages do not have the site header, so start the content close to the top. */
.rd-certificate-page #about,
.rd-vyezd-page #vyezd {
  padding-top: 0;
}

/* Bring secondary pages closer to the scale of the original pages while
   retaining the typography, colours and rounded shapes of the redesign. */
.rd-subpage-main .section-title h2 {
  font-size: clamp(32px, 3.4vw, 40px);
}
.rd-certificate-page .certificate-top,
.rd-certificate-page .certificate-price-wrap {
  max-width: 920px;
}
.rd-certificate-page .certificate-text-block {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
}
.rd-certificate-page .certificate-text-block h4 {
  font-size: 24px;
  margin-bottom: 16px;
}
.rd-certificate-page .certificate-text-block h4:not(:first-child) {
  margin-top: 34px;
}
.rd-certificate-page .certificate-feature-list {
  gap: 10px;
  margin-bottom: 20px;
}

/* Numbered steps and bullet points behave like a real list: marker on the left,
   text beside it. The rest of the certificate page remains centred. */
.rd-certificate-page .certificate-feature-item {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  justify-items: stretch;
  align-items: start;
  padding: 12px 14px;
  text-align: left;
}
.rd-certificate-page .certificate-feature-icon {
  width: 30px;
  height: 30px;
  margin: 0;
  justify-self: start;
  font-size: 14px;
}
.rd-certificate-page .certificate-feature-list-small .certificate-feature-icon {
  font-size: 18px;
}
.rd-certificate-page .certificate-feature-text {
  line-height: 1.6;
}
.rd-certificate-page .certificate-note {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding: 15px 18px;
  font-size: 16px;
}
.rd-certificate-page #price,
.rd-certificate-page #contact {
  padding-top: 58px;
  padding-bottom: 64px;
}
.rd-certificate-page .resume-item {
  padding: 20px;
}
.rd-certificate-page .resume-item h4 {
  font-size: 22px;
  margin-bottom: 15px;
}
.rd-certificate-page .certificate-price-list {
  gap: 10px;
}
.rd-certificate-page .certificate-price-list li {
  padding: 13px;
}
.rd-certificate-page .certificate-price-list li span {
  font-size: 16px;
}
.rd-certificate-page .buy-btn {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 14px;
}
.rd-certificate-page #contact > .container {
  max-width: 760px;
}
.rd-certificate-page .php-email-form {
  padding: 26px;
}
.rd-certificate-page .php-email-form .section-title h2 {
  font-size: clamp(30px, 3vw, 36px);
}
.rd-certificate-page .php-email-form input,
.rd-certificate-page .php-email-form textarea {
  min-height: 46px;
}

/* Home visit: original content width and a slightly more compact overall scale. */
.rd-vyezd-page #vyezd > .container {
  max-width: 900px;
}
.rd-vyezd-page .section-title,
.rd-vyezd-page .vyezd-intro,
.rd-vyezd-page .vyezd-foot,
.rd-vyezd-page .vyezd-calc,
.rd-vyezd-page .vyezd-cta {
  max-width: 760px;
}
.rd-vyezd-page .vyezd-intro {
  font-size: 17px;
  margin-bottom: 22px;
}
.rd-vyezd-page .vyezd-intro p {
  line-height: 1.65;
}
.rd-vyezd-page .vyezd-foot {
  padding: 15px 18px;
  font-size: 16px;
  margin-bottom: 22px;
}
.rd-vyezd-page .vyezd-calc {
  padding: 26px;
}
.rd-vyezd-page .vyezd-calc h4 {
  font-size: 22px;
  margin-bottom: 20px;
}

/* Search field itself follows the original left-to-right input alignment. */
.rd-vyezd-page .vyezd-search,
.rd-vyezd-page .vyezd-search::placeholder,
.rd-vyezd-page .vyezd-option {
  text-align: left;
}

.rd-vyezd-page .vyezd-placeholder {
  padding: 22px;
  font-size: 15px;
}
.rd-vyezd-page .vyezd-price {
  font-size: 30px;
}
.rd-vyezd-page .vyezd-legend {
  font-size: 14px;
}
.rd-vyezd-page .vyezd-dot {
  width: 13px;
  height: 13px;
}
.rd-vyezd-page .vyezd-cta {
  padding: 24px 26px;
}
.rd-vyezd-page .vyezd-cta-title {
  font-size: 20px;
  margin-bottom: 16px;
}

/* Restore branded messenger colours and the original equal-size buttons. */
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contacts {
  gap: 14px;
}
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact {
  width: 165px;
  min-width: 165px;
  min-height: 46px;
  justify-content: center;
  padding: 11px 18px;
  border: 0;
  color: #fff;
  font-size: 15px;
}
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.tg { background: #2AABEE; color: #fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.wa { background: #25D366; color: #fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.sms { background: #149ddd; color: #fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.tg:hover { background: #1f96d4; color: #fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.wa:hover { background: #1fb855; color: #fff; }
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.sms:hover { background: #128bc4; color: #fff; }

@media (max-width: 620px) {
  .rd-certificate-page #about,
  .rd-vyezd-page #vyezd {
    padding-top: 0;
  }
  .rd-subpage-main .vyezd-home-btn,
  .rd-subpage-main .home-btn-wrap {
    margin-bottom: 15px;
  }
  .rd-certificate-page .certificate-feature-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }
  .rd-vyezd-page .vyezd-calc,
  .rd-vyezd-page .vyezd-cta {
    padding: 20px 18px;
  }
  /* Match the original mobile treatment: equal circular messenger buttons. */
  body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contacts {
    flex-direction: row;
    gap: 18px;
  }
  body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    padding: 0;
    border-radius: 50%;
  }
  body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact i {
    font-size: 26px;
  }
  body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}


/* === v40: back button alignment + home-visit contact refinements === */

/* Match the original inner-page geometry: 20px breathing room at the top,
   and align the back button with the same centred content column instead of
   the outer page edge. */
.rd-certificate-page #about,
.rd-vyezd-page #vyezd {
  padding-top: 20px;
}
.rd-vyezd-page .vyezd-home-btn {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 20px;
  text-align: left;
}
.rd-certificate-page .home-btn-wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto 20px;
  text-align: left;
}

/* SMS follows the redesigned site's olive action colour, while Telegram and
   WhatsApp retain their familiar service colours. All three stay equal size. */
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.sms {
  background: var(--olive);
  color: #fff;
}
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact.sms:hover {
  background: var(--olive-deep);
  color: #fff;
}
body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact {
  width: 165px;
  min-width: 165px;
  box-sizing: border-box;
  text-decoration: none;
}

@media (max-width: 620px) {
  .rd-certificate-page #about,
  .rd-vyezd-page #vyezd {
    padding-top: 18px;
  }
  .rd-vyezd-page .vyezd-home-btn,
  .rd-certificate-page .home-btn-wrap {
    margin-bottom: 18px;
  }
  /* Preserve the original compact mobile treatment after the v40 desktop sizing. */
  body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    padding: 0;
    border-radius: 50%;
  }
  body:not(.a11y-enabled) .rd-vyezd-page .vyezd-contact span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
