/* ── Contact Page ──────────────────────────────────────────────── */

.contact-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem;
}

/* ── Flash messages ─────────────────────────────────────────────── */
.flash-bar {
  margin-bottom: 24px;
}
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  border: 1px solid #b6e2be;
  background: #edfbf0;
  color: #1a6b2f;
}
.flash__close {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  line-height: 1;
  padding: 0 2px;
}
.flash__close:hover { opacity: 1; }

/* ── Hero ───────────────────────────────────────────────────────── */
.contact-hero {
  text-align: center;
  margin-bottom: 56px;
}
.contact-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: #3a8c3f;
  font-weight: 600;
  margin-bottom: 10px;
}
.contact-hero__heading {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: #1a2e1a;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.contact-hero__sub {
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
  color: #5a6b5a;
  line-height: 1.65;
  text-align: justify;
  text-justify: inter-word;
}

/* ── Grid ───────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}

/* ── Info Panel ─────────────────────────────────────────────────── */
.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.info-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: 12px;
  background: #f7fdf7;
  border: 1px solid #dff0df;
  transition: box-shadow 0.2s;
}
.info-card:hover {
  box-shadow: 0 4px 16px rgba(42, 120, 42, 0.08);
}
.info-card__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e6f5e6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a7a2a;
  font-size: 15px;
}
.info-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #3a8c3f;
  margin: 0 0 2px;
}
.info-card__text {
  font-size: 0.875rem;
  color: #374437;
  text-decoration: none;
  line-height: 1.6;
  display: block;
  margin: 0;
}
.info-card__text:hover { color: #1a6b2f; }
.info-card__text--highlight {
  font-weight: 600;
  color: #1a5e1a;
}
.wa-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: #25a825;
  background: #eafaea;
  border-radius: 20px;
  padding: 1px 8px;
  margin-left: 4px;
}

/* ── Contact Form ───────────────────────────────────────────────── */
.contact-form-wrap {
  background: #fff;
  border: 1px solid #e4ede4;
  padding: 36px 32px;
  box-shadow: 0 2px 20px rgba(107, 107, 107, 0.05);
}
.form-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a2e1a;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

.field-group {
  margin-bottom: 18px;
}
.field-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374437;
  margin-bottom: 7px;
}
.field-group label i {
  margin-right: 6px;
  color: #3a8c3f;
  font-size: 0.8rem;
}

/* Django renders form fields as raw HTML — target them generically */
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 0.92rem;
  border: 1.5px solid #d4e4d4;
  border-radius: 8px;
  outline: none;
  background: #fafffe;
  color: #1a2e1a;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #3a8c3f;
  box-shadow: 0 0 0 3px rgba(58, 140, 63, 0.1);
}
.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}

.field-group--error input,
.field-group--error textarea,
.field-group--error select {
  border-color: #d9534f;
}
.field-error {
  margin: 5px 0 0;
  font-size: 0.8rem;
  color: #c0392b;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: #1f7a22;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.submit-btn:hover {
  background: #165f18;
  transform: translateY(-1px);
}
.submit-btn:active { transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .contact-page { padding: 90px 16px 60px; }

  .contact-grid {
    grid-template-columns: 1fr;
  }
  /* Show form first on mobile */
  .contact-form-wrap { order: -1; }

  .contact-form-wrap {
    padding: 24px 20px;
  }
  .contact-hero { margin-bottom: 36px; }
}

/* Site refresh overrides */
.contact-page {
  max-width: 1180px;
  padding: 54px 24px 72px;
}

.contact-hero {
  margin-bottom: 34px;
  padding: 58px 24px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 55, 30, 0.94), rgba(29, 126, 67, 0.9)),
    url("https://res.cloudinary.com/urbanagriculture/image/upload/v1756716876/Urbanagriculture/Introsection/bqhfcjbkmxn7pdcevaxl.webp") center / cover;
  box-shadow: 0 24px 58px rgba(19, 74, 39, 0.16);
}

.contact-hero__heading {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 800;
}

.contact-hero__sub {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
}

.main-content .contact-hero .contact-hero__sub {
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
}

.contact-grid {
  gap: 24px;
}

.info-card {
  border-radius: 8px;
  background: #ffffff;
  border-color: #dfeae3;
  box-shadow: 0 12px 30px rgba(19, 74, 39, 0.08);
}

.info-card__icon {
  border-radius: 8px;
  background: #e8f6ec;
  color: #176b3a;
}

.contact-form-wrap {
  border-radius: 8px;
  border-color: #dfeae3;
  box-shadow: 0 18px 48px rgba(19, 74, 39, 0.11);
}

.form-heading {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  min-height: 46px;
  background: #ffffff;
  border: 1px solid #d9e7dd;
}

.submit-btn {
  min-height: 48px;
  background: #176b3a;
  box-shadow: 0 12px 28px rgba(23, 107, 58, 0.22);
}

@media (max-width: 768px) {
  .contact-page {
    padding: 28px 16px 54px;
  }

  .contact-hero {
    padding: 42px 18px;
  }
}
