/* Правовой слой: политика, форма обращения, виджет отзывов */

.policy-reading { max-width: 900px; }
.policy-reading section { margin-bottom: 2rem; }
.policy-reading h2 { margin: 0 0 .75rem; font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); }
.policy-reading p, .policy-reading li { font-size: 1rem; line-height: 1.65; }
.policy-reading ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.policy-reading table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .95rem; }
.policy-reading th, .policy-reading td { padding: .6rem .7rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.policy-reading th { background: var(--paper-bright); font-weight: 700; }
.policy-meta { margin: .5rem 0 2rem; padding: .9rem 1.1rem; background: var(--paper-bright); border-left: 3px solid var(--brick); font-size: .95rem; }
.policy-settings-link { padding: 0; color: var(--brick); background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.policy-settings-link:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }

.order-form { display: grid; gap: .9rem; margin-top: 1.25rem; }
.order-form .field { display: grid; gap: .35rem; }
.order-form label { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.order-form input[type="text"], .order-form input[type="tel"], .order-form input[type="email"], .order-form select, .order-form textarea {
  width: 100%; padding: .75rem .85rem; color: var(--ink); background: var(--white); border: 1px solid var(--line); font: inherit;
}
.order-form textarea { min-height: 110px; resize: vertical; }
.order-form .consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; line-height: 1.5; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); }
.order-form .consent input { margin-top: .25rem; }
.order-form .field-wide { grid-column: 1 / -1; }
.order-form .field-hint { color: var(--muted); font-size: .74rem; line-height: 1.4; }
.order-form .field-optional { font-weight: 400; text-transform: none; letter-spacing: 0; }
.order-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-form button[type="submit"] { justify-self: start; padding: .9rem 1.6rem; color: var(--white); background: var(--brick); border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.order-form button[type="submit"]:hover { background: var(--brick-dark); }
.form-status { margin-top: .5rem; font-size: .92rem; }
.form-status[data-state="ok"] { color: #1f6b3a; }
.form-status[data-state="error"] { color: var(--brick-dark); }
.form-note { margin-top: .75rem; font-size: .84rem; color: var(--muted); }

.reviews-widget { position: relative; max-width: 760px; min-height: 900px; margin: 1.5rem auto 0; }
.reviews-widget-panel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 2rem; text-align: center; color: var(--muted); background: var(--paper-bright); border: 1px dashed var(--line); font-size: .95rem; }
.reviews-widget iframe { position: relative; z-index: 1; display: block; width: 100%; height: 900px; border: 0; }
.reviews-widget-fallback { margin-top: 1rem; font-size: .9rem; }
.reviews-widget-caption { margin: 1.5rem 0 0; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Призыв к обращению после доказательных блоков */
.proof-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1.1rem 1.3rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brick);
}
.proof-cta p { margin: 0; flex: 1 1 320px; font-size: .95rem; line-height: 1.5; }
.proof-cta .button { flex: 0 0 auto; }

/* Залипающая панель действий на мобильных */
.sticky-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  display: none;
  gap: .5rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom, 0px));
  background: var(--navy-deep);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .28);
}
.sticky-cta[data-visible="true"] { display: flex; }
.sticky-cta a { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; font-size: .92rem; font-weight: 700; text-decoration: none; }
.sticky-cta .sticky-call { color: var(--white); background: transparent; border: 1px solid rgba(255, 255, 255, .55); }
.sticky-cta .sticky-form { color: var(--white); background: var(--brick); border: 1px solid var(--brick); }
body.has-sticky-cta { padding-bottom: 74px; }
@media (min-width: 821px) { .sticky-cta { display: none !important; } }

/* Форма в одной карточке с контактами */
.contact-section .contact-form-block {
  max-width: none;
  margin-top: 1.75rem;
  padding: 1.5rem 0 0;
  background: transparent;
  border-top: 1px solid var(--line);
}
.contact-section .contact-form-block h3 { margin: 0 0 .4rem; color: var(--navy); font-family: var(--serif); font-size: clamp(1.25rem, 1.8vw, 1.55rem); }
.contact-section .contact-form-block > p { margin: 0; color: var(--muted); font-size: .88rem; }
.contact-section .contact-form-block a { color: var(--brick); text-decoration: underline; }
.contact-section .order-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.15rem; margin-top: 1.1rem; }
.contact-section .order-form label { color: var(--muted); font-size: .72rem; }
.contact-section .order-form input[type="text"],
.contact-section .order-form input[type="tel"],
.contact-section .order-form input[type="email"],
.contact-section .order-form input[type="date"],
.contact-section .order-form select {
  height: 46px;
  padding: 0 .7rem;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: .95rem;
}
.contact-section .order-form input[type="date"] { padding-right: .5rem; }
.contact-section .order-form input:focus-visible,
.contact-section .order-form textarea:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }
.contact-section .order-form .consent,
.contact-section .order-form button[type="submit"],
.contact-section .order-form .form-status,
.contact-section .order-form .form-note { grid-column: 1 / -1; }
.contact-section .order-form .consent { color: var(--ink); font-size: .82rem; }
.contact-section .order-form button[type="submit"] { justify-self: start; padding: .75rem 1.4rem; }
.contact-section .order-form .form-note { color: var(--muted); font-size: .78rem; }
.contact-section .order-form .form-status[data-state="error"] { color: var(--brick-dark); }
.contact-section .order-form .form-status[data-state="ok"] { color: #1f6b3a; }

@media (max-width: 700px) {
  .reviews-widget iframe { min-height: 900px; }
  .policy-reading table { display: block; overflow-x: auto; }
  .contact-section .contact-form-block { padding: 1.25rem 1.15rem 1.4rem; }
  .contact-section .order-form { grid-template-columns: 1fr; }
}

/* Ссылка на форму в шапке остаётся видимой на узких экранах */
.header-contact .header-form-link { color: var(--white); background: var(--brick); border: 1px solid var(--brick); box-shadow: 0 2px 0 rgba(13,30,42,.15); white-space: nowrap; font-size: .86rem; }
.header-contact .header-form-link:hover, .header-contact .header-form-link:focus-visible { background: var(--brick-dark); border-color: var(--brick-dark); }
.header-contact .header-call-link { color: var(--navy); background: transparent; border: 1px solid var(--navy); }
.header-contact .header-call-link:hover, .header-contact .header-call-link:focus-visible { color: var(--white); background: var(--navy); }
/* От планшета и шире видны обе кнопки, поэтому главным действием делаем звонок */
@media (min-width: 541px) {
.header-contact .header-call-link { color: var(--white); background: var(--brick); border: 1px solid var(--brick); box-shadow: 0 2px 0 rgba(13,30,42,.15); }
.header-contact .header-call-link:hover, .header-contact .header-call-link:focus-visible { background: var(--brick-dark); border-color: var(--brick-dark); }
.header-contact .header-form-link { color: var(--navy); background: transparent; border: 1px solid var(--navy); box-shadow: none; }
.header-contact .header-form-link:hover, .header-contact .header-form-link:focus-visible { color: var(--white); background: var(--navy); border-color: var(--navy); }
}
.header-form-short { display: none; }
@media (max-width: 1450px) {
  .header-contact .header-phone { display: none; }
  .header-inner { gap: .75rem; }
  .primary-nav { gap: .75rem; }
  .primary-nav a { font-size: .8rem; }
  .header-contact { gap: .65rem; }
}
@media (max-width: 1180px) {
  .header-contact .button-small.header-form-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: .3rem .45rem;
    font-size: .66rem;
    line-height: 1.2;
    white-space: nowrap;
  }
  .header-form-long { display: none; }
  .header-form-short { display: inline; }
}
