div, * {
  box-sizing: border-box;
}
body, html {
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  font-size: 20px;
  line-height: 1.4;
  color: #7F7F7F;
}

/** HEADER **/
.header {
  position: relative;
  width: 100%;
  background: #b5a591;
  overflow: hidden;
  padding: 30px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.header__band {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.header__title {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.header__title img {
  width: 400px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.header__logo {
  position: absolute;
  top: 20px;
  right: 25px;
  max-width: 110px;
  z-index: 1;
}
.header__logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/** WRAPPER **/
.wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 20px 0;
}

/** CONTENT **/
.content {
  width: 910px;
  padding: 20px 0;
}

/** FORM **/
form {
  width: 910px;
  padding: 20px 0;
  transition: 0.5s;
  position: relative;
}
form.sending .form__row {
  pointer-events: none;
  opacity: 0.5;
}
@keyframes sending-icon {
  0% { opacity: 0; width: 20px; transform: translate(calc(-50% - 30px), -50%); }
  30% { opacity: 1; width: 40px; }
  60% { transform: translate(calc(-50% + 30px), -50%); width: 20px; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + 30px), -50%); width: 20px; }
}
#sending-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  width: 20px;
  height: 20px;
  border-radius: 20px;
  background: #b5a591;
  box-shadow: 6px 6px 12px rgba(0,0,0,0.25);
  display: none;
}
form.sending #sending-icon {
  animation-name: sending-icon;
  display: block;
}
form #message {
  padding-top: 10px;
  width: 100%;
  text-align: right;
}
.form__row {
  width: 100%;
  display: flex;
  padding: 8px 0;
  align-items: flex-start;
}
.form__row label {
  width: 120px;
  flex-shrink: 0;
  padding-top: 8px;
}
.form__row input,
.form__row select {
  padding: 8px 10px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 0;
  outline: none;
  font-family: Arial, sans-serif;
  font-size: 18px;
  color: #7F7F7F;
  line-height: 1.3;
}
.form__row select {
  appearance: none;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23646567' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 36px;
}
/* Speciality row: select + other input on same row; when Other selected, 50/50 split */
.form__row__specialty-fields {
  flex: 1;
  display: flex;
  gap: 12px;
  min-width: 0;
}
.form__row__specialty-fields select {
  flex: 1;
  min-width: 0;
}
.form__row__specialty-fields input {
  flex: 0 0 0;
  min-width: 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
  padding-left: 0;
  padding-right: 0;
  border-width: 0;
  transition: flex 0.2s, width 0.2s, opacity 0.2s, padding 0.2s, border 0.2s;
}
.form__row--specialty.has-other .form__row__specialty-fields select {
  flex: 0 0 50%;
}
.form__row--specialty.has-other .form__row__specialty-fields input {
  flex: 1;
  min-width: 0;
  opacity: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
}
.form__row__specialty-fields input:disabled {
  opacity: 0.5;
  background: #f5f5f5;
}
.form__row.form__row--submit {
  justify-content: flex-end;
  padding-top: 20px;
}
.form__row.form__row--submit input {
  width: auto;
  min-width: 200px;
  background: #9a8b76;
  color: white;
  font-size: 26px;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}
.form__row.form__row--submit input:hover {
  background: #8a7b66;
}
.form__row.form__row--submit input.success {
  background: #6b8e6b;
}
.form__row.form__row--submit input:active {
  opacity: 0.9;
}
.form__row.form__row--checkbox {
  margin-bottom: 30px;
}
.form__row.form__row--checkbox label {
  width: 100%;
  min-width: 0;
  padding-top: 4px;
}
.form__row.form__row--checkbox [name='marketing'] {
  opacity: 0;
  height: 30px;
  position: absolute;
  pointer-events: none;
  left: 0;
  top: 0;
}
.checkbox {
  position: relative;
  width: 28px;
  height: 28px;
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox .checkbox__tick {
  position: absolute;
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: opacity 0.2s;
}
.checkbox .checkbox__tick--checked {
  opacity: 1;
}
.checkbox .checkbox__tick--unchecked {
  opacity: 0;
}
.checkbox:not(.checked) .checkbox__tick--checked {
  opacity: 0;
}
.checkbox:not(.checked) .checkbox__tick--unchecked {
  opacity: 1;
}

/** FOOTER **/
.footer {
  width: 910px;
  font-size: 14px;
  padding: 30px 0;
  line-height: 1.5;
}
.footer__logo {
  margin-bottom: 20px;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.footer__logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.footer p {
  margin: 0 0 12px 0;
}
.footer a {
  color: #7F7F7F;
  text-decoration: underline;
}

/** RESPONSIVE **/

/** TABLET: PORTRAIT */
@media screen and (max-width:768px) {
  form, .content, .footer {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
  .header {
    padding: 20px;
    flex-direction: column;
    align-items: center;
  }
  .header__band {
    flex-direction: column;
    align-items: center;
    padding-top: 0;
    order: 1;
  }
  .header__logo {
    position: static;
    order: 2;
    max-width: 90px;
    margin-top: 12px;
  }
  .header__title {
    width: 100%;
  }
  .header__title img {
    width: 320px;
    max-width: 95%;
  }
}

/** MOBILE */
@media screen and (max-width: 400px) {
  body {
    font-size: 15px;
  }
  .header {
    padding: 15px;
    min-height: 120px;
  }
  .header__band {
    padding-top: 0;
  }
  .header__title img {
    width: 280px;
    max-width: 95%;
  }
  .header__logo {
    max-width: 70px;
    margin-top: 10px;
  }

  /** WRAPPER **/
  .wrapper {
    padding: 0;
  }

  form {
    width: 100%;
    padding: 0 10px;
    transition: 0.5s;
    position: relative;
  }
  .form__row {
    flex-wrap: wrap;
  }
  .form__row label {
    width: 100%;
    min-width: 0;
  }
  .form__row input,
  .form__row select {
    width: 100%;
    font-size: 16px;
  }
  .form__row.form__row--checkbox label {
    width: calc(100% - 45px);
  }
  .checkbox {
    width: 24px;
    height: 24px;
  }
  .checkbox .checkbox__tick {
    width: 16px;
    height: 16px;
  }

  /** FOOTER **/
  .footer {
    width: 100%;
    font-size: 11px;
    margin-top: 20px;
    text-align: justify;
    padding: 20px 10px;
  }
}
