/* KA Forms: image left, form right */
.kaf {
  --kaf-text: #1C1A19;
  --kaf-muted: #8a8580;
  --kaf-line: #d6d0c3;
  --kaf-border: #e4e0db;
  --kaf-red: #a8453f;
  --kaf-red-bg: #f8efee;
  --kaf-green: #3f7d4f;
  --kaf-green-bg: #eef5ef;
  --kaf-button: #535e64;

  display: grid;
  grid-template-columns: minmax(0, 31%) minmax(0, 1fr);
  max-width: 1200px;
  margin: 40px auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--kaf-border);
  border-radius: 6px;
  color: var(--kaf-text);
}

.kaf--no-image {
  grid-template-columns: minmax(0, 1fr);
}

.kaf__media {
  min-height: 100%;
  background: #efebe6;
}

.kaf__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kaf__body {
  padding: 34px 44px 18px;
}

.kaf__title {
  margin: 0 0 28px;
  font-size: 40px;
  font-weight: 200;
  line-height: 1.2;
  text-transform: none;
  color: var(--kaf-text);
}

/* Alerts */
.kaf__alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border-left: 3px solid var(--kaf-red);
  background: var(--kaf-red-bg);
}

.kaf__alert[hidden] {
  display: none;
}

.kaf__alert p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.kaf__icon {
  flex: 0 0 18px;
  margin-top: 2px;
  color: var(--kaf-red);
}

.kaf__alert--success {
  border-left-color: var(--kaf-green);
  background: var(--kaf-green-bg);
}

.kaf__alert--success .kaf__icon {
  color: var(--kaf-green);
}

/* Form */
.kaf__form.is-sent {
  display: none;
}

.kaf__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.kaf__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.kaf__field {
  margin-bottom: 16px;
}

.kaf__field--full {
  grid-column: 1 / -1;
}

.kaf__label {
  display: block;
  margin: 0 0 2px;
  font-size: 12px;
  float: left;
  font-weight: 400;
  color: var(--kaf-text);
}

.kaf__req {
  margin-left: 1px;
  color: var(--kaf-red);
}

.kaf__input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--kaf-line);
  border-radius: 0;
  background: transparent;
  color: var(--kaf-text);
  font-size: 15px;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.kaf__input::placeholder {
  color: #9d9892;
}

.kaf__input:focus {
  outline: none;
  border-bottom-color: var(--kaf-text);
}

.kaf__input--area {
  height: 100px;
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

.has-error .kaf__input {
  border-bottom-color: var(--kaf-red);
}

.kaf__error {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--kaf-red);
}

.kaf__error:empty {
  display: none;
}

/* Checkboxes */
.kaf__checks {
  margin-top: 4px;
}

.kaf__check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
}

.kaf__check input {
  position: absolute;
  opacity: 0;
  width: 16px;
  height: 16px;
  margin: 0;
}

.kaf__box {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 1px solid #b9b3ad;
  background: #fff;
}

.kaf__check input:checked + .kaf__box {
  border-color: var(--kaf-text);
  background: var(--kaf-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.kaf__check input:focus-visible + .kaf__box {
  outline: 2px solid var(--kaf-text);
  outline-offset: 2px;
}

.has-error .kaf__box {
  border-color: var(--kaf-red);
}

.kaf__check a {
  color: #5d2b2b;
  font-weight: 500;
  text-decoration: underline;
}

.kaf__legal {
  margin: 12px 0 14px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--kaf-muted);
}

.kaf__field--check {
  margin-bottom: 0;
}

/* Button */
.kaf__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    margin: 24px 0 16px;
    border: 0;
    border-radius: 32px;
    background: var(--kaf-button);
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
button.disabled.kaf__submit {
    background: #FBFAF9;
    color: #95897E;
    cursor: no-drop;
}
button.kaf__submit:hover svg {
    display: block;
}
button.kaf__submit svg, button.disabled.kaf__submit:hover svg {
    display: none;
}
.kaf__submit:hover,
.kaf__submit:focus-visible {
  background: #3d454b;
}

.kaf__submit.is-loading span {
  opacity: 0.5;
}

.kaf__submit.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: kaf-spin 0.8s linear infinite;
}

@keyframes kaf-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 991px) {
  .kaf {
    grid-template-columns: minmax(0, 1fr);
  }

  .kaf__media {
    max-height: 320px;
    overflow: hidden;
  }

  .kaf__body {
    padding: 28px 24px 12px;
  }

  .kaf__title {
    font-size: 32px;
  }
}

@media (max-width: 575px) {
  .kaf {
    margin: 24px 0;
  }

  .kaf__media {
    max-height: 220px;
  }

  .kaf__body {
    padding: 24px 16px 8px;
  }

.kaf__title {
    font-size: 24px;
    text-align: left;
}

  .kaf__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
