#contact .container {
  display: flex;
  flex-flow: row nowrap;
  gap: 2rem;
}

#contactForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 1.4rem;
  flex: 1;
}

#contactForm button {
  grid-column: 1 / -1;
  padding: 1rem 0;
  border-radius: 1rem;
  outline: none;
  border: none;
  cursor: pointer;
  background: var(--bg-main-color);
  background-size: 200% 100%;
  background-position: 0% 50%;
  transition: background-position 800ms ease;
  color: #fff;
}

#contactForm button:hover {
  background-position: 100% 50%;
}

#contactForm button:active {
  transform: translateY(0) scale(0.98);
}

#contactForm .full {
  grid-column: 1 / -1;
}

#contactForm .field input,
#contactForm .field textarea,
#contactForm .field select {
  width: 100%;
  color: var(--accent-color);
  padding: 1.2rem 1.4rem;
  border-radius: 1rem;
  border: 0.1rem solid #d9dee4;
  background: transparent;
  outline: none;
  font-size: 1.6rem;
}

#contactForm .field input:focus,
#contactForm .field textarea:focus,
#contactForm .field select:focus {
  box-shadow: 0 0 0 3px rgba(11, 78, 134, 0.12);
}

#contactForm .field input::placeholder,
#contactForm .field textarea::placeholder,
#contactForm .field select::placeholder {
  color: #9aa6b2;
}

#contactForm .field textarea {
  resize: none;
  height: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* make the dropdown arrow scale with font-size */
#contactForm .field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa6b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 1.2em;
}

#contactForm .field select:required:invalid {
  color: #9aa6b2;
}

/* ---------- Right: info card ---------- */
.contact-card {
  width: calc(40% - clamp(2rem, 4vw, 4rem));
  color: var(--accent-color);
  background: var(--sub-color);
  border-radius: 2rem;
  padding: 2rem 4rem;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 2rem;
}

.contact-card h3 {
  font-size: clamp(1.8rem, 3vw, 4rem);
  margin-bottom: 0.5rem;
}

.contact-card .contact-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contact-card .contact-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(1.4rem, 1.5vw, 1.6rem);
}

.contact-card .contact-list li a {
  color: inherit;
  text-decoration: none;
}

.contact-card .contact-list li .copy-btw {
  color: inherit;
  background-color: transparent;
  outline: none;
  border: none;
}

.contact-card .contact-list li .copy-btw:hover {
  text-decoration: underline;
}

.contact-card .contact-list li a:hover {
  text-decoration: underline;
}

/* ---------- Scalable SVG icons ---------- */
.contact-card .ico {
  inline-size: 2rem;
  block-size: 2rem;
  flex: 0 0 auto;
  fill: none;
  stroke-width: 2;
  color: currentColor; /* inherit text color */
  display: inline-block;
}

.contact-card .ico path[fill],
.contact-card .ico path:not([fill]) {
  fill: currentColor;
  stroke: none;
}

/* Locations */
.locations .locations-container {
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: auto 1fr;
  gap: 1rem;
}

.locations .location {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5rem;
}

.locations .location .ico {
  margin-top: 0.5rem;
}

.locations .location h4 {
  font-size: clamp(1.4rem, 1.5vw, 2rem);
}

.locations .address {
  cursor: pointer;
  font-size: clamp(1.5rem, 1.8vw, 1.6rem);
  margin-top: 0.3rem;
}

.locations .address:hover {
  text-decoration: underline;
}

/* ---------- Responsive tweaks ---------- */

@media (max-width: 1300px) {
  .contact-card {
    width: 45%;
  }
}

@media (max-width: 900px) {
  #contact .container {
    flex-flow: column nowrap;
  }

  .locations .locations-container {
    display: grid;
    grid-template-rows: auto 1fr auto 1fr;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .contact-card {
    width: 100%;
  }
  .locations .address {
    margin-top: 0rem;
  }

  .locations .location .ico {
    margin-top: 0rem;
  }
}

@media (max-width: 700px) {
  .contact-card {
    padding: clamp(1.4rem, 3vw, 2rem);
  }
}
