.af-quote-page {
  overflow: clip;
}

.af-quote-hero {
  position: relative;
  color: white;
  padding: 62px 0 38px;
}

.af-quote-hero__media,
.af-quote-hero__overlay {
  position: absolute;
  inset: 0;
}

.af-quote-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af-quote-hero__overlay {
  background:
    linear-gradient(90deg, rgba(5, 45, 53, 0.88) 0%, rgba(5, 45, 53, 0.64) 45%, rgba(5, 45, 53, 0.36) 100%),
    linear-gradient(180deg, rgba(0, 77, 42, 0.2), rgba(5, 45, 53, 0.22));
}

.af-quote-hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  gap: 28px;
  align-items: start;
  min-height: 580px;
}

.af-quote-hero__copy {
  padding: 26px 0 22px;
}

.af-quote-hero__copy h1,
.af-quote-hero__copy h2,
.af-quote-form-card__header h2,
.af-section--quote-benefits .af-section-heading h2,
.af-section--quote-info .af-section-heading h2,
.af-quote-help-card__body h2 {
  margin: 0;
}

.af-quote-hero__copy h1 {
  font-size: clamp(2.8rem, 4.8vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.af-quote-hero__subtitle {
  margin-top: 12px;
  max-width: 11ch;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08;
}

.af-quote-hero__copy > p:last-of-type {
  max-width: 54ch;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.68;
}

.af-quote-proof-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.af-quote-proof {
  padding-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.af-quote-proof:last-child {
  border-right: 0;
}

.af-quote-proof__icon,
.af-quote-benefit__icon,
.af-quote-info-card__icon,
.af-process-step__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.af-quote-proof__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  margin-bottom: 16px;
  color: #8cffbd;
  border: 1px solid rgba(140, 255, 189, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.af-quote-proof__icon svg,
.af-segmented-toggle__button svg,
.af-quote-form__privacy svg,
.af-quote-help-card__contacts svg,
.af-quote-benefit__icon svg,
.af-quote-info-card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.af-quote-proof h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.af-quote-proof p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.65;
}

.af-quote-form-card {
  position: relative;
  top: 10px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--af-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(5, 45, 53, 0.18);
}

.af-quote-form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--af-green), #82f3b0);
}

.af-quote-form-card__header {
  margin-bottom: 20px;
}

.af-quote-form-card__header h2 {
  font-size: 2rem;
  color: var(--af-text);
}

.af-quote-form {
  display: grid;
  gap: 18px;
  color: var(--af-text);
}

.af-quote-form__message {
  padding: 14px 16px;
  border-radius: 18px;
  color: #0b4d30;
  background: rgba(20, 168, 92, 0.12);
  border: 1px solid rgba(20, 168, 92, 0.2);
  line-height: 1.6;
}

.af-quote-form__segment {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.af-quote-form__segment legend,
.af-field > span {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--af-text);
}

.af-segmented-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.af-segmented-toggle__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--af-border);
  border-radius: 14px;
  color: var(--af-text);
  background: #fff;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.af-segmented-toggle__button:hover {
  transform: translateY(-1px);
  border-color: var(--af-border-strong);
  box-shadow: 0 14px 24px rgba(5, 45, 53, 0.08);
}

.af-segmented-toggle__button.is-active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--af-green), var(--af-green-dark));
}

.af-form-grid {
  display: grid;
  gap: 14px;
}

.af-form-grid--two {
  grid-template-columns: 1fr 1fr;
}

.af-form-grid--three {
  grid-template-columns: repeat(3, 1fr);
}

.af-field {
  display: grid;
  gap: 8px;
}

.af-field small {
  color: var(--af-muted);
  font-weight: 500;
}

.af-field input,
.af-field select,
.af-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--af-border);
  border-radius: 14px;
  color: var(--af-text);
  background: var(--af-surface-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.af-field textarea {
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.af-field input:focus-visible,
.af-field select:focus-visible,
.af-field textarea:focus-visible,
.af-segmented-toggle__button:focus-visible,
.af-quote-form__submit:focus-visible {
  outline: 3px solid rgba(20, 168, 92, 0.24);
  outline-offset: 3px;
}

.af-field input:hover,
.af-field select:hover,
.af-field textarea:hover {
  border-color: var(--af-border-strong);
}

.af-field input:focus,
.af-field select:focus,
.af-field textarea:focus {
  border-color: rgba(20, 168, 92, 0.36);
  box-shadow: 0 0 0 4px rgba(20, 168, 92, 0.08);
  background: #fff;
}

.af-field.is-invalid input,
.af-field.is-invalid select,
.af-field.is-invalid textarea {
  border-color: #cb3b2e;
  box-shadow: 0 0 0 3px rgba(203, 59, 46, 0.1);
}

.af-field--company.is-highlighted input {
  border-color: rgba(0, 122, 61, 0.46);
  box-shadow: 0 0 0 3px rgba(0, 122, 61, 0.08);
}

.af-quote-form__submit {
  width: 100%;
  min-height: 56px;
}

.af-quote-form__privacy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--af-muted);
  line-height: 1.6;
}

.af-quote-form__privacy svg {
  color: var(--af-green);
  flex: 0 0 auto;
}

.af-section--quote-process {
  padding-top: 36px;
}

.af-quote-process-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
}

.af-quote-process {
  max-width: 460px;
}

.af-process-list {
  display: grid;
  gap: 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.af-process-step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
}

.af-process-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 58px;
  left: 27px;
  width: 2px;
  height: calc(100% + 10px);
  background: rgba(0, 122, 61, 0.22);
}

.af-process-step__dot {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--af-green), var(--af-green-dark));
  font-weight: 800;
}

.af-process-step__content h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.af-process-step__content p {
  margin: 0;
  color: var(--af-muted);
  line-height: 1.7;
}

.af-section--quote-benefits,
.af-section--quote-info {
  padding-top: 20px;
}

.af-quote-benefits-panel {
  padding: 28px 30px;
  border: 1px solid var(--af-border);
  border-radius: 26px;
  background: linear-gradient(180deg, #fbfcfb, #f4f8f6);
  box-shadow: var(--af-shadow);
}

.af-quote-benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.af-quote-benefit {
  padding: 10px 18px;
  text-align: center;
}

.af-quote-benefit + .af-quote-benefit {
  border-left: 1px solid var(--af-border);
}

.af-quote-benefit__icon,
.af-quote-info-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  margin: 0 auto 16px;
  color: white;
  background: linear-gradient(135deg, var(--af-green), var(--af-green-dark));
}

.af-quote-benefit h3,
.af-quote-info-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.af-quote-benefit p,
.af-quote-info-card p,
.af-quote-help-card__body p {
  margin: 0;
  color: var(--af-muted);
  line-height: 1.7;
}

.af-quote-info-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
}

.af-quote-info-panel,
.af-quote-help-card {
  padding: 22px;
  border: 1px solid var(--af-border);
  border-radius: 20px;
  background: white;
  box-shadow: var(--af-shadow);
}

.af-quote-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.af-quote-info-card {
  padding: 16px;
  border: 1px solid var(--af-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f9fbfa);
}

.af-quote-info-card__icon {
  width: 52px;
  height: 52px;
  margin: 0 0 14px;
}

.af-quote-help-card {
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f6faf7);
}

.af-quote-help-card__media {
  margin: -22px -22px 18px;
  height: 220px;
}

.af-quote-help-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af-quote-help-card__body {
  display: grid;
  gap: 14px;
}

.af-quote-help-card__body h2 {
  font-size: 2rem;
}

.af-quote-help-card__contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.af-quote-help-card__contacts a,
.af-quote-help-card__contacts div {
  display: flex;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--af-border);
  border-radius: 16px;
  color: var(--af-text);
  background: white;
}

.af-quote-help-card__contacts svg {
  color: var(--af-green);
  flex: 0 0 auto;
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .af-quote-hero__layout,
  .af-quote-process-layout,
  .af-quote-info-layout,
  .af-quote-benefits-grid,
  .af-quote-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .af-quote-hero__layout {
    grid-template-columns: 1fr;
  }

  .af-quote-form-card {
    top: 0;
  }

  .af-quote-proof-list {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .af-quote-hero {
    padding: 48px 0 30px;
  }

  .af-quote-hero__copy {
    padding: 24px 0 10px;
  }

  .af-quote-hero__copy h1 {
    font-size: clamp(2.6rem, 12vw, 3.8rem);
  }

  .af-quote-hero__subtitle {
    max-width: none;
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .af-quote-proof-list,
  .af-form-grid--two,
  .af-form-grid--three,
  .af-quote-benefits-grid,
  .af-quote-info-grid,
  .af-quote-help-card__contacts,
  .af-quote-process-layout,
  .af-quote-info-layout {
    grid-template-columns: 1fr;
  }

  .af-quote-proof {
    padding-right: 0;
    border-right: 0;
  }

  .af-segmented-toggle {
    grid-template-columns: 1fr;
  }

  .af-quote-form-card,
  .af-quote-benefits-panel,
  .af-quote-info-panel,
  .af-quote-help-card {
    padding: 22px;
  }

  .af-quote-help-card__media {
    margin: -22px -22px 18px;
    height: 200px;
  }

  .af-quote-benefit {
    padding: 12px 0;
    text-align: left;
  }

  .af-quote-benefit + .af-quote-benefit {
    border-left: 0;
    border-top: 1px solid var(--af-border);
    padding-top: 22px;
  }
}
