/* ==========================================================================
   CONTACT PAGE — Civic Precision / Institutional Minimalism
   Aesthetic: Nordic government authority — clean, confident, no noise.
   ========================================================================== */

/* ── Page canvas ── */
.contact-page { background: #f8fafc; color: #0a1c33; }
.contact-page .btn span { margin-left: .5rem; }

/* ── Hero ── */
.contact-hero {
  position: relative;
  min-height: clamp(420px, 72vh, 760px);
  padding: 5rem 0 0;
  background: #061325;
  color: #fff;
  overflow: hidden;
}

/* Clear hero photograph with a restrained navy wash for readable content */
.contact-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../public/assest/hero-bg3.jpg') center 35% / cover no-repeat;
  opacity: 0.2;
  pointer-events: none;
}

/* Single thin gold accent line — right edge */
.contact-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(245,159,11,.35), transparent);
  pointer-events: none;
}

.contact-hero .container { position: relative; z-index: 1; }

.contact-hero .breadcrumb {
  margin-bottom: 3.5rem;
  color: rgba(255,255,255,.4);
  font-size: .75rem;
}
.contact-hero .breadcrumb a { color: rgba(255,255,255,.6); }
.contact-hero .breadcrumb .sep { color: #f59e0b; margin: 0 .45rem; }

.contact-hero-content { max-width: 760px; padding-bottom: 4.5rem; }

/* Eyebrow label */
.contact-kicker {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.4rem;
  color: #f59e0b;
  font: 700 .65rem / 1 var(--font-display);
  letter-spacing: .2em;
}
.contact-kicker::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.contact-hero h1 {
  margin: 0 0 1.35rem;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: .95;
  letter-spacing: -.065em;
  color: #fff;
  font-weight: 800;
}

.contact-hero-copy {
  max-width: 52ch;
  margin: 0 0 2.5rem;
  color: rgba(255,255,255,.62);
  font-size: 1.2rem;
  line-height: 1.58;
}

.contact-hero-actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.contact-hero .text-link {
  color: rgba(255,255,255,.72);
  font-weight: 600;
  font-size: .88rem;
  border-bottom: 1px solid rgba(255,255,255,.28);
  padding-bottom: .2rem;
  transition: color .2s, border-color .2s;
}
.contact-hero .text-link:hover { color: #fff; border-color: rgba(255,255,255,.65); }

/* Stats bar — sits at the bottom of the hero, flush */
.contact-hero-stats {
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(255,255,255,.09);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.6rem 2.5rem;
  flex: 1;
}
.stat-item:first-child { padding-left: 0; }

.stat-item strong {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
}
.stat-item > span:last-child {
  color: rgba(255,255,255,.48);
  font-size: .75rem;
  line-height: 1.5;
  max-width: 13ch;
}
.stat-divider {
  width: 1px;
  background: rgba(255,255,255,.1);
  align-self: stretch;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #44d58a;
  box-shadow: 0 0 0 4px rgba(68,213,138,.18);
  flex: 0 0 auto;
}

/* ── Split layout: dark left panel + white form ── */
.contact-split {
  display: grid;
  grid-template-columns: 400px 1fr;
  align-items: start;
}

/* Left: dark navy sticky panel */
.contact-panel-left {
  background: #0a1c33;
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.07);
}

.panel-inner {
  padding: 3.5rem 2.5rem;
  flex: 1;
}

.panel-inner .eyebrow {
  display: block;
  margin: 0 0 .75rem;
  color: #f59e0b;
  font: 700 .63rem / 1.2 var(--font-display);
  letter-spacing: .2em;
}

.panel-inner h2 {
  margin: 0 0 .9rem;
  color: #fff;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: 1.02;
}

.rail-intro {
  margin: 0 0 2.25rem;
  color: rgba(255,255,255,.48);
  line-height: 1.58;
  font-size: 1.05rem;
}

.quick-contact {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
  transition: transform .22s ease;
}
.quick-contact:hover { transform: translateX(5px); }

.quick-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2.2rem;
  height: 2.2rem;
  background: rgba(255,255,255,.07);
  border-radius: .55rem;
  font-weight: 800;
  font-size: .85rem;
  color: #f59e0b;
}

.quick-contact small {
  display: block;
  margin-bottom: .2rem;
  color: rgba(255,255,255,.38);
  font: 700 .6rem / 1.2 var(--font-display);
  letter-spacing: .14em;
}
.quick-contact strong { font-size: .87rem; color: #fff; }

.rail-address {
  margin-top: 1.6rem;
  padding: 1.25rem;
  border-radius: .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.rail-address small {
  display: block;
  margin-bottom: .6rem;
  color: rgba(255,255,255,.38);
  font: 700 .6rem / 1.2 var(--font-display);
  letter-spacing: .14em;
}
.rail-address p {
  margin: 0 0 .85rem;
  color: rgba(255,255,255,.65);
  font-size: .84rem;
  line-height: 1.6;
}
.rail-address a {
  color: #f59e0b;
  font-size: .74rem;
  font-weight: 700;
  text-decoration: none;
}
.rail-address a:hover { text-decoration: underline; }

.rail-hours {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  margin-top: 1.6rem;
  color: rgba(255,255,255,.45);
  font-size: .79rem;
  line-height: 1.55;
}
.rail-hours > span { color: #f59e0b; font-size: 1rem; flex: 0 0 auto; margin-top: .06rem; }
.rail-hours p { margin: 0; }
.rail-hours strong { color: rgba(255,255,255,.75); }

/* ── Right panel: white form canvas ── */
.contact-panel-right {
  background: #fff;
  padding: 4rem 4.5rem;
  border-left: 1px solid #e8edf3;
}

.form-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: .65rem;
}

.form-heading .eyebrow {
  display: block;
  margin: 0 0 .5rem;
  color: #b98a00;
  font: 700 .63rem / 1.2 var(--font-display);
  letter-spacing: .2em;
}

.form-heading h2 {
  margin: 0;
  color: #0a1c33;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: 1.02;
}

.required-note { color: #94a3b8; font-size: .7rem; flex: 0 0 auto; }

.form-intro {
  margin: 0 0 2.25rem;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.58;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.contact-form .form-group { margin: 0; }

.contact-form .form-label {
  display: block;
  margin-bottom: .5rem;
  color: #1e3a5f;
  font-size: .77rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.contact-form .form-label span { color: #b45309; }

.contact-form .form-control {
  width: 100%;
  min-height: 3rem;
  padding: .82rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
  background: #fafbfd;
  font-size: .88rem;
  color: #0f172a;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
}
.contact-form .form-control:hover { border-color: #cbd5e1; }
.contact-form .form-control:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,159,11,.13);
  background: #fff;
}
.contact-form .form-control::placeholder { color: #b0bec5; }

.contact-form textarea.form-control { min-height: 9rem; resize: vertical; }

.form-helper {
  display: block;
  margin-top: .45rem;
  font-size: .68rem;
  color: #94a3b8;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  color: #64748b;
  font-size: .74rem;
  line-height: 1.6;
  cursor: pointer;
}
.consent-check input { flex: 0 0 auto; margin-top: .22rem; accent-color: #d97706; }

.form-submit {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: .5rem;
}

/* ── Department directory — editorial row list ── */
.directory-section { padding: 5rem 0; background: #f8fafc; }

.directory-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.directory-heading .eyebrow {
  display: block;
  margin: 0 0 .5rem;
  color: #b98a00;
  font: 700 .63rem / 1.2 var(--font-display);
  letter-spacing: .2em;
}

.directory-heading h2 {
  margin: 0;
  color: #0a1c33;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: 1.02;
}

.directory-heading > p {
  max-width: 30ch;
  margin: 0;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.58;
  text-align: right;
}

/* Row list — replaces 4-column card grid */
.directory-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e2e8f0;
}

.dir-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto 1.8rem;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0a1c33;
  transition: padding-left .22s ease, background .22s;
}
.dir-row:hover { padding-left: .75rem; background: #fff; }

.dir-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: .65rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: currentColor;
  background: #f1f5f9;
  flex: 0 0 3rem;
}
.dir-icon img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  border-radius: .35rem;
}

.dir-info { display: flex; flex-direction: column; gap: .3rem; }
.dir-info strong { font-size: 1.15rem; font-weight: 600; letter-spacing: -.045em; color: #0a1c33; }
.dir-info span { font-size: 1rem; line-height: 1.5; color: #64748b; }

.dir-email {
  font-size: .77rem;
  font-weight: 600;
  color: currentColor;
  opacity: .7;
  white-space: nowrap;
}

.dir-arrow {
  font-size: 1rem;
  color: #cbd5e1;
  text-align: right;
  transition: color .22s, transform .22s;
}
.dir-row:hover .dir-arrow { color: currentColor; transform: translateX(3px) translateY(-3px); }

/* Directorate colour accents */
.dir-row.aviation  { color: #0b5ca8; } .dir-row.aviation  .dir-icon { background: #eff6ff; }
.dir-row.maritime  { color: #087c72; } .dir-row.maritime  .dir-icon { background: #f0fdfa; }
.dir-row.railways  { color: #b45309; } .dir-row.railways  .dir-icon { background: #fffbeb; }
.dir-row.roads     { color: #b42318; } .dir-row.roads     .dir-icon { background: #fff5f5; }

/* ── CTA strip ── */
.contact-cta { padding: 4rem 0; background: #061325; color: #fff; }
.contact-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.contact-cta .eyebrow {
  display: block;
  margin: 0 0 .6rem;
  color: #f59e0b;
  font: 700 .63rem / 1.2 var(--font-display);
  letter-spacing: .2em;
}
.contact-cta h2 { margin: 0; color: #fff; font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 600; letter-spacing: -.065em; line-height: 1.02; }
.contact-cta p:not(.eyebrow) { margin: .75rem 0 0; color: rgba(255,255,255,.55); font-size: 1.05rem; line-height: 1.58; }

/* ── Entrance animations ── */
@keyframes contact-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.contact-hero .breadcrumb  { animation: contact-fade-up .5s .00s ease both; }
.contact-kicker            { animation: contact-fade-up .5s .08s ease both; }
.contact-hero h1           { animation: contact-fade-up .6s .14s ease both; }
.contact-hero-copy         { animation: contact-fade-up .6s .22s ease both; }
.contact-hero-actions      { animation: contact-fade-up .6s .30s ease both; }
.contact-hero-stats        { animation: contact-fade-up .55s .42s ease both; }

/* ── Responsive breakpoints ── */
@media (max-width: 1100px) {
  .contact-split { grid-template-columns: 340px 1fr; }
  .panel-inner { padding: 2.75rem 1.85rem; }
  .contact-panel-right { padding: 3rem 2.75rem; }
}

@media (max-width: 860px) {
  .contact-split { grid-template-columns: 1fr; }
  .contact-panel-left { position: static; min-height: auto; }
  .panel-inner { padding: 2.5rem 1.5rem; }
  .contact-panel-right { padding: 2.5rem 1.5rem; border-left: none; border-top: 1px solid #e8edf3; }
  .rail-intro { max-width: 44ch; }
  .dir-row { grid-template-columns: 3rem 1fr 1.8rem; }
  .dir-email { display: none; }
}

@media (max-width: 640px) {
  .contact-hero {
    min-height: clamp(480px, 78vh, 700px);
    padding: 3.5rem 0 0;
  }
  .contact-hero-content { padding-bottom: 3rem; }
  .contact-hero h1 { font-size: 3rem; }
  .contact-hero-actions { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .contact-hero-stats { flex-direction: column; }
  .stat-item { padding: 1rem 0; width: 100%; border-top: 1px solid rgba(255,255,255,.07); }
  .stat-item:first-child { border-top: none; }
  .stat-divider { display: none; }
  .contact-panel-right { padding: 2rem 1.1rem; }
  .form-row { grid-template-columns: 1fr; gap: 1rem; }
  .form-heading { flex-direction: column; align-items: flex-start; }
  .form-submit { flex-direction: column; align-items: flex-start; }
  .directory-heading { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .directory-heading > p { text-align: left; max-width: none; }
  .dir-row { grid-template-columns: 2.5rem 1fr 1.5rem; gap: 1rem; padding: 1.25rem 0; }
  .contact-cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-hero .breadcrumb,
  .contact-kicker,
  .contact-hero h1,
  .contact-hero-copy,
  .contact-hero-actions,
  .contact-hero-stats { animation: none; }
  .quick-contact, .dir-row { transition: none; }
}

/* ── Clean contact experience below the existing hero ── */
.contact-page .contact-split {
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1.35fr);
  gap: 1.25rem;
  align-items: stretch;
  max-width: 1240px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  background: #f7f9fc;
}

.contact-page .contact-panel-left,
.contact-page .contact-panel-right {
  position: static;
  min-height: 0;
  border: 1px solid #e5eaf1;
  border-radius: 1rem;
  box-shadow: 0 12px 34px rgba(15, 35, 60, .045);
}

.contact-page .contact-panel-left {
  display: block;
  background: #f0f5fa;
  color: #15304d;
}

.contact-page .panel-inner { padding: 2rem; }
.contact-page .panel-inner .eyebrow,
.contact-page .form-heading .eyebrow,
.contact-page .directory-heading .eyebrow {
  color: #8a6900;
  font-family: inherit;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.contact-page .panel-inner h2 {
  max-width: 16ch;
  margin-bottom: .75rem;
  color: #102943;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -.04em;
  line-height: 1.15;
}
.contact-page .rail-intro {
  margin-bottom: 1.25rem;
  color: #5e7084;
  font-size: .92rem;
}
.contact-page .quick-contact {
  gap: .75rem;
  padding: .85rem 0;
  border-color: #dce4ed;
  color: #15304d;
}
.contact-page .quick-contact:hover { transform: translateX(3px); }
.contact-page .quick-icon {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid #dbe4ed;
  border-radius: .65rem;
  background: #fff;
  color: #9a7500;
}
.contact-page .quick-contact small { color: #738398; }
.contact-page .quick-contact strong {
  color: #15304d;
  font-size: .88rem;
  overflow-wrap: anywhere;
}
.contact-page .rail-hours {
  margin-top: .5rem;
  padding-top: .95rem;
  border-top: 1px solid #dce4ed;
  color: #687b90;
}
.contact-page .rail-hours > span { color: #9a7500; }
.contact-page .rail-hours strong { color: #29445f; }

.contact-page .contact-panel-right {
  padding: 2.25rem clamp(1.5rem, 3vw, 2.75rem);
  border-left: 1px solid #e5eaf1;
  background: #fff;
}
.contact-page .form-heading { align-items: center; }
.contact-page .form-heading h2 {
  color: #102943;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -.045em;
}
.contact-page .required-note { color: #75859a; font-size: .73rem; }
.contact-page .form-intro { margin-bottom: 1.6rem; color: #64758a; font-size: .92rem; }
.contact-page .contact-form { gap: 1rem; }
.contact-page .form-row { gap: 1rem; }
.contact-page .contact-form .form-label { color: #29445f; font-size: .78rem; }
.contact-page .contact-form .form-control {
  min-height: 2.9rem;
  border-color: #dce4ed;
  border-radius: .55rem;
  background-color: #fff;
  font-size: .88rem;
}
.contact-page .contact-form .form-control:focus {
  border-color: #52799d;
  box-shadow: 0 0 0 3px rgba(50, 96, 138, .12);
}
.contact-page .contact-form textarea.form-control { min-height: 7.5rem; }
.contact-page .form-submit { padding-top: .2rem; }
.contact-page .form-submit .btn {
  min-height: 2.75rem;
  gap: .75rem;
  padding: .7rem 1.1rem;
  border: 1px solid #173d61;
  border-radius: .5rem;
  background: #173d61;
  box-shadow: none;
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.contact-page .form-submit .btn:hover {
  transform: none;
  border-color: #102f4d;
  background: #102f4d;
  box-shadow: 0 2px 6px rgba(16, 47, 77, .14);
}
.contact-page .form-submit .btn:focus-visible {
  outline: 3px solid rgba(49, 95, 137, .28);
  outline-offset: 3px;
}
.contact-page .form-submit .btn span { margin-left: 0; }
.contact-page .contact-success {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #b9dfc8;
  border-radius: .6rem;
  background: #f0faf3;
  color: #23633b;
  font-size: .9rem;
}

.contact-page .directory-section { padding: 1rem 0 5rem; background: #f7f9fc; }
.contact-page .directory-heading { align-items: flex-end; margin-bottom: 1.5rem; }
.contact-page .directory-heading h2 {
  color: #102943;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 650;
  letter-spacing: -.045em;
}
.contact-page .directory-heading > p { color: #64758a; font-size: .92rem; }
.contact-page .directory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  border: 0;
}

/* Give the photo room to read clearly with the hero copy removed. */
.contact-page .contact-hero {
  min-height: clamp(400px, 52vh, 600px);
  padding-bottom: 1.5rem;
}
.contact-page .contact-hero .container {
  min-height: inherit;
  display: flex;
  flex-direction: column;
}
.contact-page .contact-hero .breadcrumb { margin-bottom: 0; }
.contact-page .contact-hero-content {
  display: flex;
  flex: 1;
  align-items: center;
  max-width: none;
  padding-bottom: 0;
}
.contact-page .dir-row {
  grid-template-columns: 2.8rem minmax(0, 1fr) 1.5rem;
  gap: .9rem;
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: .8rem;
  background: #fff;
}
.contact-page .dir-row:hover { padding-left: 1.1rem; border-color: #cbd8e5; background: #fff; }
.contact-page .dir-icon { width: 2.8rem; height: 2.8rem; border-radius: .7rem; }
.contact-page .dir-info { min-width: 0; }
.contact-page .dir-info strong { font-size: .95rem; letter-spacing: -.02em; }
.contact-page .dir-info span { font-size: .78rem; line-height: 1.45; }
.contact-page .dir-email { grid-column: 2; overflow-wrap: anywhere; white-space: normal; font-size: .72rem; }
.contact-page .dir-arrow { grid-column: 3; grid-row: 1 / span 2; align-self: center; }

@media (max-width: 860px) {
  .contact-page .contact-split { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 2.5rem; padding-bottom: 3rem; }
  .contact-page .contact-panel-left { min-height: 0; }
  .contact-page .contact-panel-right { padding: 2rem; }
  .contact-page .dir-row { grid-template-columns: 2.8rem minmax(0, 1fr) 1.5rem; }
  .contact-page .dir-email { display: block; }
}

@media (max-width: 600px) {
  .contact-page .contact-hero { min-height: clamp(340px, 48vh, 460px); padding-top: 3rem; }
  .contact-page .contact-split { padding: 1.5rem 1rem 2.75rem; }
  .contact-page .panel-inner,
  .contact-page .contact-panel-right { padding: 1.35rem; }
  .contact-page .form-row { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .contact-page .form-heading { align-items: flex-start; }
  .contact-page .directory-section { padding: .5rem 0 3rem; }
  .contact-page .directory-section > .container { padding-left: 1rem; padding-right: 1rem; }
  .contact-page .directory-heading { gap: .7rem; }
  .contact-page .directory-list { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page .dir-row,
  .contact-page .quick-contact { transition: none; }
}
