/* ==========================================================
   Contacto page
   Base, navbar and footer styles come from index.css
   ========================================================== */
:root {
  --color-contact-bg: #f2f2f2;
  --color-contact-title: #0a306a;
  --color-panel-blue: #7bb0ff;
  --color-input-bg: #eef8ff;
  --color-input-border: #b4b4b4;
  --color-required: #ff0000;
  --panel-shadow: 0 0 4px 0.5px rgba(0, 0, 0, 0.5);
}

.contact-page {
  background: var(--color-contact-bg);
}

h2 {
  margin: 0;
}

/* ==========================================================
   Header
   ========================================================== */
.contact__header {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 57px 24px 0;
  text-align: center;
}

.contact__title {
  font-size: 64px;
  font-weight: 600;
  line-height: normal;
  color: var(--color-contact-title);
}

.contact__intro {
  max-width: 879px;
  margin: 16px auto 0;
  font-size: 26px;
  font-weight: 500;
  line-height: normal;
}

/* Figma has an empty line between the two sentences */
.contact__intro--spaced {
  margin-top: 1.2em;
}

/* Cotty the parrot, mirrored, overlapping the form panel */
.contact__mascot {
  position: absolute;
  top: 104px;
  right: 40px;
  z-index: 2;
  width: 240px;
  height: 249px;
  overflow: hidden;
  transform: scaleX(-1);
  pointer-events: none;
}

.contact__mascot img {
  position: absolute;
  top: -17.19%;
  left: 0;
  width: 100%;
  height: 144.73%;
  max-width: none;
}

/* ==========================================================
   Layout grid: info + map on the left, form on the right
   ========================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 488fr) minmax(0, 836fr);
  grid-template-rows: 742px 531px;
  grid-template-areas:
    "info form"
    "map  form";
  gap: 28px 35px;
  width: calc(100% - 80px);
  max-width: 1359px;
  margin: 57px auto 44px;
}

/* ==========================================================
   Contact info panel
   ========================================================== */
.contact-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 46px 15px 40px;
  border-radius: 33px;
  background: var(--color-panel-blue);
  box-shadow: var(--panel-shadow);
  color: var(--color-white);
}

.contact-info__title {
  width: 340px;
  max-width: 100%;
  font-size: 32px;
  font-weight: 600;
  line-height: normal;
  text-align: center;
}

.contact-info__title--social {
  width: 430px;
  margin-top: 41px;
}

.contact-info__list {
  display: flex;
  flex-direction: column;
  gap: 27px;
  align-self: stretch;
  margin-top: 23px;
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 19px;
}

.contact-info__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: url("images/contact-circle.svg") center / contain no-repeat;
}

.contact-info__icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.contact-info__icon .contact-info__pin {
  height: 76px;
}

.contact-info__text {
  max-width: 357px;
  font-size: 24px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  overflow-wrap: anywhere;
}

a.contact-info__text:hover {
  text-decoration: underline;
}

.contact-info__socials {
  display: flex;
  gap: 48px;
  align-self: center;
  margin: 24px 0 0;
}

.contact-info__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: url("images/contact-circle-social.svg") center / contain no-repeat;
  transition: transform 0.2s ease;
}

.contact-info__social:hover {
  transform: scale(1.06);
}

.contact-info__social img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* ==========================================================
   Map panel
   ========================================================== */
.contact-map {
  grid-area: map;
  position: relative;
  border-radius: 33px;
  background: var(--color-panel-blue);
  box-shadow: var(--panel-shadow);
}

.contact-map__link {
  position: absolute;
  inset: 8px 7px 7px;
  display: block;
  overflow: hidden;
  border-radius: 28px;
}

.contact-map__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-map__card {
  position: absolute;
  top: 17px;
  left: 13px;
  width: min(351px, 100% - 26px);
  height: auto;
  border-radius: 13px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

.contact-map__zoom {
  position: absolute;
  right: 21px;
  bottom: 22px;
  width: 33px;
  height: 73px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

/* ==========================================================
   Form panel
   ========================================================== */
.contact-form-panel {
  grid-area: form;
  padding: 46px 16px 45px;
  border-radius: 33px;
  background: var(--color-white);
  box-shadow: var(--panel-shadow);
}

.contact-form {
  display: grid;
  grid-template-columns: minmax(0, 351fr) minmax(0, 433fr);
  align-items: start;
  row-gap: 17px;
  max-width: 804px;
  padding: 10px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

/* In Figma the first input runs right up to the second column */
.field--first {
  padding-right: 0;
}

.field label,
.contact-form__note,
.check {
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
}

.field__req {
  color: var(--color-required);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 43px;
  padding: 0 14px;
  border: 1px solid var(--color-input-border);
  border-radius: 12px;
  background: var(--color-input-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 20px;
}

.field select {
  appearance: none;
  padding-right: 40px;
  background: var(--color-input-bg) url("images/select-arrow.svg") right 1px center / 24px 8px no-repeat;
  cursor: pointer;
}

.field textarea {
  height: 114px;
  padding: 10px 14px;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.check input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.contact-form__note {
  padding: 10px;
}

/* Figma keeps an empty line under the privacy note */
.contact-form__note--privacy {
  padding-bottom: calc(10px + 1.2em);
}

.contact-form__note a {
  text-decoration: underline;
  text-underline-position: from-font;
}

.contact-form__note a:hover {
  color: var(--color-primary);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
}

.check input {
  appearance: none;
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  margin: 3px 0 0;
  border: 1px solid #000000;
  background: var(--color-white);
  cursor: pointer;
}

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

.contact-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 136px;
  height: 46px;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
}

.contact-form__submit:hover {
  background: #1a4688;
}

.contact-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Spam trap: kept off-screen so only bots fill it in */
.contact-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__status {
  margin: 8px 10px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: #e7f6ec;
  color: #1d6b38;
  font-size: 20px;
  line-height: 1.4;
}

.contact-form__status.is-error {
  background: #fdecec;
  color: #a12020;
}

/* ==========================================================
   Responsive
   ========================================================== */

/* Tablets: one column, mascot above the title */
/* The design sets the wrapped email a little lower than its icon */
@media (min-width: 1300px) {
  .contact-info__item--email .contact-info__text {
    translate: 0 13.8px;
  }
}

@media (max-width: 1100px) {
  .contact__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
  }

  .contact__mascot {
    position: relative;
    top: auto;
    right: auto;
    order: -1;
    width: 160px;
    height: 166px;
    margin-bottom: 8px;
  }

  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "info"
      "form"
      "map";
    gap: 28px;
    width: calc(100% - 48px);
    max-width: 836px;
    margin-top: 40px;
  }

  .contact-info__socials {
    align-self: center;
    margin-left: 0;
  }

  .contact-map {
    aspect-ratio: 488 / 531;
    max-height: 640px;
  }
}

/* Phones */
@media (max-width: 700px) {
  .contact__mascot {
    width: 120px;
    height: 125px;
  }

  .contact__title {
    font-size: 40px;
  }

  .contact__intro {
    font-size: 19px;
  }

  .contact__grid {
    width: calc(100% - 32px);
    margin-bottom: 40px;
  }

  .contact-info {
    padding: 32px 16px 32px;
    border-radius: 24px;
  }

  .contact-info__title {
    font-size: 24px;
  }

  .contact-info__title--social {
    margin-top: 32px;
  }

  .contact-info__list {
    gap: 20px;
    margin-top: 20px;
  }

  .contact-info__item {
    gap: 14px;
  }

  .contact-info__icon {
    width: 60px;
    height: 60px;
  }

  .contact-info__icon img {
    width: 36px;
    height: 36px;
  }

  .contact-info__icon .contact-info__pin {
    height: 56px;
  }

  .contact-info__text {
    font-size: 18px;
  }

  .contact-info__socials {
    gap: 32px;
    margin-top: 20px;
  }

  .contact-info__social {
    width: 64px;
    height: 64px;
  }

  .contact-info__social img {
    width: 48px;
    height: 48px;
  }

  .contact-map {
    border-radius: 24px;
  }

  .contact-map__link {
    border-radius: 19px;
  }

  .contact-form-panel {
    padding: 20px 6px 24px;
    border-radius: 24px;
  }

  .contact-form {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 8px;
    padding: 6px;
  }

  .field--first {
    padding-right: 10px;
  }

  .field label,
  .contact-form__note,
  .check {
    font-size: 18px;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }

  .check input {
    width: 20px;
    height: 20px;
    margin-top: 1px;
  }
}
