/* =========================================================
   Contact page styles (page-specific)
   Aligned with Research / Programmes / About patterns
   ========================================================= */

/* Hero background */
.hero.hero--contact {
  background:
    linear-gradient(to right, rgba(5, 9, 20, 0.94), rgba(5, 9, 20, 0.62)),
    url("../../../assets/img/contact-bg.jpg")
      center/cover no-repeat;
}

.hero--contact .hero-title { max-width: 26ch; }
.hero--contact .hero-accent { color: var(--color-primary); }

/* Hero aside card (match Research hero card treatment) */
.contact-hero-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 198, 233, 0.12), transparent 55%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--color-text-main);
  padding: 1.35rem 1.4rem 1.25rem;
  box-shadow: var(--shadow-soft);
}

.contact-hero-card .programme-label {
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.contact-hero-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.contact-hero-list li {
  margin: 0 0 0.5rem;
}

.contact-hero-list a {
  color: var(--color-text-main);
  text-decoration: none;
}

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

.contact-hero-note {
  margin: 0.85rem 0 0;
  font-size: var(--fs-xs);
  color: rgba(161, 165, 181, 0.9);
  line-height: 1.6;
}

/* On-page nav (match Research nav container approach) */
.contact-nav { padding: 26px 0; }

.contact-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-subnav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  padding: 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(245, 245, 247, 0.85);
}

.contact-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: rgba(11, 16, 32, 0.85);
  text-decoration: none;
  border: 1px solid transparent;
}

.contact-subnav a:hover {
  background: rgba(255, 147, 76, 0.08);
  border-color: rgba(255, 147, 76, 0.25);
  text-decoration: none;
}

/* Ensure ghost button reads well on light sections (mirrors Research fix) */
.section-light .btn-ghost,
.section-soft .btn-ghost {
  color: rgba(11, 16, 32, 0.62) !important;
}

.section-light .btn-ghost:hover,
.section-soft .btn-ghost:hover {
  color: white !important;
}

/* Main contact grid */
.contact-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.contact-info-text {
  font-size: var(--fs-sm);
  color: rgba(11, 16, 32, 0.78);
  margin: 0;
}

.contact-info a {
  color: var(--color-primary);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-info-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
  margin: 0.95rem 0 0.9rem;
}

/* Bullets (reuse Research list style language) */
.contact-bullets {
  margin: 0.6rem 0 0;
  padding-left: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: rgba(11, 16, 32, 0.78);
}

.contact-bullets li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.28rem;
}

.contact-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.12rem;
  font-size: 0.85rem;
  color: var(--color-primary);
}

/* Topic chips (optional UX polish) */
.contact-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.topic-chip {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: rgba(11, 16, 32, 0.85);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: var(--fs-sm);
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.topic-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 147, 76, 0.55);
  background: rgba(255, 147, 76, 0.08);
}

/* Form */
.contact-form {
  padding: 1.1rem 1.1rem 1.15rem;
}

.form-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.form-row label {
  font-size: var(--fs-sm);
  font-weight: 650;
  color: rgba(11, 16, 32, 0.85);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.7rem 0.75rem;
  font-family: inherit;
  font-size: var(--fs-base);
  color: rgba(11, 16, 32, 0.92);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 147, 76, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 147, 76, 0.14);
}

.form-row--inline {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 0.6rem;
}

.form-row--inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
}

.form-note {
  margin: 0.85rem 0 0;
  font-size: var(--fs-xs);
  color: rgba(11, 16, 32, 0.72);
  line-height: 1.6;
}

.form-note a {
  color: rgba(11, 16, 32, 0.85);
  text-decoration: underline;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Referrals grid + other ways grid */
.referrals-grid,
.other-ways-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.1rem;
}

/* Steps grid (reuse Research patterns) */
.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

/* Responsive mirrors Research behaviour */
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .referrals-grid,
  .other-ways-grid { grid-template-columns: minmax(0, 1fr); }

  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .contact-subnav {
    border-radius: 18px;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .steps-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Defensive */
[hidden] { display: none !important; }
