/* ==========================================================================
   Yazhi Software — contact page (form styles are reused by the quote page)
   ========================================================================== */

.page-banner + .section { padding-top: 64px; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 56px;
}

/* ---------- Contact details ---------- */
.contact-info h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; }
.contact-info > p { margin-top: 16px; font-size: 17px; line-height: 1.7; }

.contact-cards { display: grid; gap: 14px; margin-top: 32px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.contact-card:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-3px); }
.cc-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
}
.cc-icon svg { width: 22px; height: 22px; }
.contact-card small { display: block; font-size: 13.5px; color: var(--muted); }
.contact-card b { display: block; margin-top: 2px; font-size: 16.5px; font-weight: 600; color: var(--ink); word-break: break-word; }

/* ---------- Form card ---------- */
.form-card {
  scroll-margin-top: calc(var(--header-h) + 24px);
  padding: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(16, 32, 72, 0.08);
}
.form-card h3 { font-size: 24px; font-weight: 800; }
.form-sub { margin: 8px 0 28px; font-size: 15.5px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.field label span { color: #dc2626; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  appearance: none;
  padding-right: 42px;
  background: #fbfcfe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8396' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
  cursor: pointer;
}
.field input::placeholder,
.field textarea::placeholder { color: #a3abbd; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(11, 92, 240, 0.12);
}
.field.has-error input,
.field.has-error textarea { border-color: #dc2626; }
.field.has-error input:focus,
.field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
.field-error { display: block; min-height: 0; margin-top: 6px; font-size: 13px; color: #dc2626; }
.field-error:empty { display: none; }

.form-submit { width: 100%; justify-content: center; margin-top: 6px; }
.form-submit[disabled] { opacity: .7; cursor: wait; }

.form-status { margin-top: 14px; font-size: 14.5px; text-align: center; }
.form-status:empty { display: none; }
.form-status.is-success {
  padding: 14px;
  border-radius: 10px;
  background: #e3f7ec;
  color: #15803d;
  font-weight: 500;
}
.form-status.is-error {
  padding: 14px;
  border-radius: 10px;
  background: #fde8e8;
  color: #b91c1c;
}

/* ---------- Map ---------- */
.map-section { padding: 0 0 88px; }
.map-wrap {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
/* The iframe is taller than the frame and shifted up, which hides Google's
   place card (top-left) so only our own card names the location. */
.map-wrap iframe {
  display: block;
  width: 100%;
  height: calc(100% + 170px);
  margin-top: -170px;
  border: 0;
}
.map-card {
  position: absolute;
  left: 24px; bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px 18px 18px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.map-card b { display: block; font-size: 16px; color: var(--ink); }
.map-card span { display: block; margin-top: 2px; font-size: 14px; }
.map-card a { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--primary); }
.map-card a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .contact-layout { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 560px) {
  .form-card { padding: 26px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .map-section { padding-bottom: 64px; }
  .map-wrap { height: 340px; }
  .map-card { left: 12px; right: 12px; bottom: 12px; }
}
