/* ============ AMBIENT PAGE BACKGROUND (mask + pixel particles) ============ */
body { background: var(--ivory); }

#bgFX {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 85% 0%, rgba(10,0,64,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 5% 100%, rgba(170,14,65,0.06), transparent 60%),
    var(--ivory);
}

#bgParticles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ============ CONTACT GRID ============ */
/* padding-top moved here from an inline style attribute — inline styles
   always beat CSS class rules regardless of specificity, so the
   max-width:640px override below couldn't win against it. Desktop value
   (140px) is unchanged from what the inline style used to set. */
.contact-section { background: transparent; padding-top: 140px; }
.contact-section .section-eyebrow,
.contact-section .section-title,
.contact-section .section-body { text-align: center; margin-left: auto; margin-right: auto; }
.contact-section .section-body { max-width: 560px; }

.contact-grid {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 900px) {
  .contact-grid { flex-direction: row; align-items: stretch; }
}

.contact-info-card {
  background: var(--navy);
  border-radius: 20px;
  padding: 28px 22px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (min-width: 480px) {
  .contact-info-card { padding: 36px 32px; }
}
@media (min-width: 900px) {
  .contact-info-card { flex: 0 0 340px; }
}
.contact-info-card::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(170,14,65,0.28) 0%, transparent 70%);
  pointer-events: none;
}
.contact-info-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
@media (min-width: 480px) {
  .contact-info-title { font-size: 22px; }
}
.contact-info-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.contact-info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}
.contact-info-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(170,14,65,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.contact-info-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  margin-bottom: 3px;
}
.contact-info-value {
  font-size: 14.5px;
  color: var(--white);
  font-weight: 700;
  line-height: 1.5;
}
.contact-info-divider {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 6px 0 20px;
  position: relative;
  z-index: 1;
}
.contact-info-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px;
  flex: 1;
  box-shadow: 0 20px 50px rgba(10,0,64,0.06);
}
@media (min-width: 480px) {
  .contact-form-card { padding: 36px 32px; }
}
.contact-form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 560px) {
  .contact-form-row.two-col { flex-direction: row; }
}
.contact-field { flex: 1; margin-bottom: 18px; }
.contact-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 7px;
}
.contact-field input,
.contact-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.contact-field input:focus,
.contact-field textarea:focus { border-color: var(--crimson); }
.contact-field input::placeholder,
.contact-field textarea::placeholder { color: #9CA3AF; }
.contact-field textarea { min-height: 120px; }

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  background: var(--crimson);
  color: var(--white);
  border: none;
  padding: 14px 26px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-submit:hover { background: var(--crimson-dark); }
.contact-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.contact-field-error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--crimson);
  margin: -6px 0 14px;
}
.contact-field-error.visible { display: block; }

.contact-form-success,
.contact-form-error {
  display: none;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 14px;
}
.contact-form-success.visible,
.contact-form-error.visible { display: block; }

.contact-form-success {
  background: #ecfdf5;
  color: #059669;
}
.contact-form-error {
  background: var(--crimson-light);
  color: var(--crimson);
}

/* ============ OFFICE / MAP ============ */
.office-section { background: transparent; }
.office-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.office-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--heading);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.office-pill:hover { border-color: var(--crimson); }
.office-pill.active { background: var(--crimson); border-color: var(--crimson); color: var(--white); }

.office-address {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 16px;
}

.office-map-wrap {
  margin: 28px auto 0;
  max-width: 960px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(10,0,64,0.10);
  position: relative;
}
#officeMap { width: 100%; height: 320px; }
@media (min-width: 640px) {
  #officeMap { height: 380px; }
}
.office-open-maps {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--crimson);
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 100px;
  box-shadow: 0 8px 20px rgba(170,14,65,0.35);
}

/* Leaflet zoom control — enlarged for comfortable touch (default is 26px, well under the 44px minimum) */
.leaflet-control-zoom { border: none !important; box-shadow: 0 6px 18px rgba(10,0,64,0.12) !important; }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--heading) !important;
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  font-size: 20px !important;
}
.leaflet-control-zoom a:hover { background: var(--ivory) !important; }

/* ============ RICH MULTI-COLUMN FOOTER (overrides main.css footer) ============ */
footer { text-align: left; padding: 0; }

.footer-rich { padding: 48px 20px 24px; }
@media (min-width: 560px) {
  .footer-rich { padding: 56px 32px 28px; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1160px;
  margin: 0 auto;
}
@media (min-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr 1.2fr; }
}

.footer-brand-logo { height: 26px; width: auto; display: block; margin-bottom: 16px; opacity: 0.95; }

.footer-brand-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
  max-width: 260px;
}

.footer-trust-line {
  font-size: 12px;
  font-weight: 600;
  color: #86efac;
  margin-bottom: 18px;
}

.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.footer-social a:hover { background: var(--crimson); border-color: var(--crimson); }

.footer-col-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 4px; }
.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-col a:hover { color: var(--white); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-contact-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(170,14,65,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}
.footer-contact-text {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.footer-bottom {
  max-width: 1160px;
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 559px) {
  .footer-bottom { flex-direction: column; }
}

/* ============ MOBILE — .contact-info-card matches bhucheq-mobile-mockup.html's
   Contact frame, where the equivalent card (.cheq-card) is white, not navy.
   .contact-info-card sets `color` at the card level, so child text
   (.contact-info-title etc. with no own color) inherits the fix
   automatically; only children with an explicit white/light color of their
   own need their own override. Scoped to max-width:640px only, desktop
   untouched. ============ */
@media (max-width: 640px) {
  /* HERO — top padding is 76px measured .topbar-wrap clearance (re-measured
     on this page, same fixed component as About/BhuMap/KC) + the mockup's
     own 26px breathing room. No card-overlap technique on this page (see
     the divergence report), so there's no BhuMap-style risk from a tight
     bottom value. */
  .contact-section { padding-top: 102px; }
  .contact-section .section-eyebrow,
  .contact-section .section-title,
  .contact-section .section-body { text-align: left; margin-left: 0; margin-right: 0; }
  .contact-section .section-title { font-size: 26px; }
  .contact-section .section-body { font-size: 15px; line-height: 1.55; }

  .contact-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--heading);
    padding: 18px 18px 20px;
    box-shadow: 0 8px 22px rgba(10,0,64,0.06);
  }
  .contact-info-card::before { display: none; }
  .contact-info-title { font-size: 16px; }
  .contact-info-desc { color: var(--muted); }
  .contact-info-label { color: var(--muted); }
  .contact-info-value { color: var(--heading); }
  .contact-info-icon { background: rgba(170,14,65,0.08); }
  /* --line isn't a real CSS variable in this codebase (mockup-only token,
     rgba(10,0,64,0.08)); using its literal value here, same substitution
     BhuMap's pills/divider needed. */
  .contact-info-divider { border-top-color: rgba(10,0,64,0.08); }
  .contact-info-brand { color: var(--muted); }

  .contact-form-card {
    padding: 18px 18px 20px;
    box-shadow: 0 8px 22px rgba(10,0,64,0.06);
    border: none;
  }
  .contact-field label { font-weight: 600; }
  .contact-field input,
  .contact-field textarea {
    border-radius: 12px;
    border-color: rgba(10,0,64,0.08);
  }
  .contact-field textarea { min-height: 90px; }
  .contact-submit {
    display: block;
    width: 100%;
    border-radius: 14px;
  }
}
