/* ===== Hero subtitle (contact-page-only addition to the shared hero) ===== */
.hero-subtitle {
  margin-top: 20px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 28px;
}

/* ===== Contact main layout =====
   WordPress uses a 1290px content area with a fixed 15px side gutter that only
   kicks in below that width (max-width includes the gutter via border-box). */
.contact-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 100px 15px 120px;
}

/* ===== Intro: heading + info card + form (single 2-column row on WordPress) ===== */
.contact-intro {
  margin-bottom: 100px;
}

.contact-intro-inner {
  display: flex;
  align-items: stretch;
  gap: 30px;
}

.contact-intro-left {
  /* Fixed (not grow-based) 50/50 split: flex-grow can't be used for an even split
     here because .contact-form-card's own padding/border set a hard minimum
     render width, which skews grow-based distribution unevenly. */
  flex: 0 0 calc(50% - 15px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--color-text-paragraph);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
}

.section-eyebrow svg {
  color: var(--color-software-primary);
  flex-shrink: 0;
}

.contact-intro-title {
  font-size: 55px;
  line-height: 1.1;
  color: var(--color-text-title);
  margin: 0 0 40px;
}

.contact-intro-title .highlight {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
}

.contact-info-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(2, 8, 66, 0.1);
  border-radius: 14px;
  overflow: hidden;
}

.contact-info-cell {
  padding: 40px 40px 35px;
}

.contact-info-cell:nth-child(odd) {
  border-right: 1px solid rgba(2, 8, 66, 0.1);
}

.contact-info-cell:nth-child(-n+2) {
  border-bottom: 1px solid rgba(2, 8, 66, 0.1);
}

.contact-info-icon {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  color: var(--color-software-primary);
}

.contact-info-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.contact-info-label {
  display: block;
  color: var(--color-text-paragraph);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 12px;
}

.contact-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-info-list li + li {
  margin-top: 4px;
}

.contact-info-list a {
  color: var(--color-text-title);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-info-list a:hover {
  color: var(--color-software-primary);
}

.contact-info-text {
  color: var(--color-text-title);
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

.contact-info-text strong {
  font-weight: 700;
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(2, 8, 66, 0.1);
  color: var(--color-text-paragraph);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-social a:hover,
.contact-social a:focus-visible {
  background: var(--color-software-primary);
  border-color: var(--color-software-primary);
  color: #ffffff;
  outline: none;
}

/* ===== Contact form (second column of .contact-intro-inner) ===== */
.contact-form-card {
  flex: 0 0 calc(50% - 15px);
  min-width: 0;
  background: var(--color-software-gray-dark);
  border: 1px solid rgba(2, 8, 66, 0.1);
  border-radius: 14px;
  padding: 50px;
}

.contact-form-card h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.contact-form-card > p {
  margin-bottom: 30px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-field {
  flex: 1;
  min-width: 0;
}

.form-field {
  margin-bottom: 20px;
  position: relative;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(2, 8, 66, 0.1);
  border-radius: 10px;
  padding: 0 20px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-title);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select {
  height: 58px;
}

.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4.5 6.75L9 11.25L13.5 6.75' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  padding-right: 44px;
  cursor: pointer;
}

.contact-form select:invalid {
  color: var(--color-text-paragraph);
}

.contact-form textarea {
  height: 150px;
  padding: 20px;
  resize: vertical;
}

.contact-form ::placeholder {
  color: var(--color-text-paragraph);
  opacity: 1;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--color-software-primary);
  box-shadow: 0 0 0 3px rgba(35, 66, 173, 0.15);
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: #d33a3a;
}

.form-error {
  display: none;
  margin-top: 8px;
  color: #d33a3a;
  font-family: var(--font-body);
  font-size: 14px;
}

.form-field.has-error .form-error {
  display: block;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 480px;
  color: var(--color-text-paragraph);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  cursor: pointer;
}

.form-checkbox input {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-software-primary);
  cursor: pointer;
}

.contact-form .btn {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.form-response {
  margin: 20px 0 0;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  display: none;
}

.form-response.is-success {
  display: block;
  background: rgba(35, 66, 173, 0.08);
  color: var(--color-software-primary);
}

.form-response.is-error {
  display: block;
  background: rgba(211, 58, 58, 0.08);
  color: #d33a3a;
}

/* ===== Map ===== */
.contact-map-section {
  margin-bottom: 0;
}

.contact-map-wrap {
  border-radius: 14px;
  overflow: hidden;
  height: 500px;
}

.contact-map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: brightness(88%) contrast(105%) saturate(60%) hue-rotate(18deg);
}

/* ===== Responsive ===== */
/* Measured on the live WordPress site: the intro heading drops from 55px to a flat
   35px at <=1024px (no intermediate step down to 768/480), and stays 35px through
   mobile. The form card heading stays a flat 24px at every breakpoint. */
@media (max-width: 1024px) {
  .contact-main { padding: 70px 15px 90px; }
  .contact-intro { margin-bottom: 50px; }
  .contact-intro-inner { flex-direction: column; align-items: stretch; gap: 50px; }
  .contact-intro-left,
  .contact-form-card { flex: 0 0 auto; }
  .contact-intro-title { font-size: 35px; margin-bottom: 30px; }
  .contact-info-cell { padding: 15px; }
  .contact-form-card { padding: 24px 20px; }

  .form-footer { flex-direction: column; align-items: stretch; }
  .form-checkbox { max-width: 100%; }
  .contact-form .btn { justify-content: center; width: 100%; }
}

@media (max-width: 768px) {
  .contact-main { padding: 50px 15px 60px; }

  .contact-info-card { grid-template-columns: 1fr; }
  .contact-info-cell { border-right: none !important; border-bottom: 1px solid rgba(2, 8, 66, 0.1); }
  .contact-info-cell:last-child { border-bottom: none; }

  .form-row { flex-direction: column; gap: 0; }

  .contact-map-wrap { height: 320px; }
}

@media (max-width: 480px) {
  .contact-main { padding: 40px 15px 50px; }
  .section-eyebrow { font-size: 16px; }
  .contact-info-label,
  .contact-info-list a,
  .contact-info-text { font-size: 16px; }
  .contact-map-wrap { height: 260px; }
}
