:root {
  --contact-section-y: 88px;
  --contact-hero-height: 390px;
  --contact-row-height: 56px;
  --contact-row-alt: #F3F6F9;
  --contact-row-hover: #EEF2F6;
}

.contact-page .main-nav a[aria-current="page"],
.contact-page .mobile-nav a[aria-current="page"] { color: var(--slate); }

.contact-hero {
  position: relative;
  min-height: var(--contact-hero-height);
  overflow: hidden;
  background: var(--navy);
}
.contact-hero-art,
.contact-hero-art img,
.contact-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.contact-hero-art img { object-fit: cover; object-position: center center; }
.contact-hero-shade {
  background: linear-gradient(90deg, rgba(3,27,75,.90) 0%, rgba(3,27,75,.66) 38%, rgba(3,27,75,.20) 70%, rgba(3,27,75,.04) 100%);
}
.contact-hero-inner {
  position: relative;
  z-index: 1;
  min-height: var(--contact-hero-height);
  display: flex;
  align-items: center;
}
.contact-hero-copy { color: var(--white); }
.contact-hero-copy h1 {
  margin: 0 0 10px;
  font-size: 52px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -1.6px;
}
.contact-hero-copy p { margin: 0; font-size: 26px; line-height: 1.35; }

.contact-section { padding-block: var(--contact-section-y); }
.contact-office-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 92px;
  align-items: start;
}
.direct-contacts > .container > h2 {
  margin: 0;
  color: var(--navy);
  font-size: 38px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -1.1px;
}
.contact-location-block { margin: 0; }
.contact-location-block + .contact-location-block {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}
.contact-location-block h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.3;
}
.contact-location-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.contact-location-line svg,
.contact-action-static svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-location-line address,
.registration-card address {
  color: var(--navy);
  font-style: normal;
  font-size: 16px;
  line-height: 1.65;
}
.contact-action-static {
  width: max-content;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.3;
}
.contact-actions {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.contact-actions a {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.3;
}
.contact-actions a:hover,
.contact-actions a:focus-visible,
.contact-table a:hover,
.contact-table a:focus-visible { color: var(--slate); outline: none; }
.contact-actions svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.company-details {
  display: grid;
  gap: 34px;
  margin: 36px 0 0;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.company-details div { margin: 0; }
.company-details dt,
.registration-card h3,
.contact-group-title {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}
.company-details dd {
  margin: 0;
  color: var(--slate);
  font-size: 15px;
  line-height: 1.65;
}
.contact-map-wrap { align-self: start; }
.contact-map {
  aspect-ratio: 560 / 680;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--ice-bg);
}
.contact-map img,
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }

/* Map placeholder: nothing third-party is requested until the visitor presses the button (script.js).
   The panel is a solid card so no text sits directly on the picture. */
.contact-map { position: relative; }
.contact-map-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(calc(100% - 40px), 340px);
  padding: 22px 22px 20px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 6px 24px var(--shadow);
  text-align: center;
}
.contact-map-show { display: none; cursor: pointer; }
.contact-map.is-ready .contact-map-show { display: inline-flex; }
.contact-map-show:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.contact-map-notice { margin: 0; color: var(--slate); font-size: 13px; line-height: 1.5; }
.contact-map-link {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.contact-map-link:hover,
.contact-map-link:focus-visible { text-decoration-thickness: 2px; }
.contact-map-link:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.contact-registrations { background: var(--ice-bg); }
.registration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: stretch;
}
.registration-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
}
.registration-card h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.25;
}
.registration-card p {
  margin: 0 0 20px;
  color: var(--slate);
  font-size: 15px;
  line-height: 1.6;
}
.registration-card address { color: var(--slate); font-size: 15px; line-height: 1.6; }

.direct-contacts > .container > h2 { margin-bottom: 54px; }
.contact-group-title { color: var(--slate); margin-bottom: 18px; }
.managers-title,
.company-title { margin-top: 44px; }
.contact-table-wrap { width: 100%; overflow: hidden; }
.contact-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--navy);
}
.contact-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.contact-table tr:nth-child(odd) { background: var(--contact-row-alt); }
.contact-table tbody tr { transition: background .18s ease; }
.contact-table tbody tr:hover { background: var(--contact-row-hover); }
.contact-table th,
.contact-table td {
  min-height: var(--contact-row-height);
  padding: 15px 18px;
  border: 0;
  vertical-align: middle;
  text-align: left;
  font-size: 14px;
  line-height: 1.55;
}
.contact-table th { font-weight: 700; }
.contact-table td:nth-child(2) { color: var(--slate); }
.contact-table td:nth-child(3) { white-space: nowrap; }
.contact-table td:nth-child(4) { text-align: right; white-space: nowrap; }
.contact-table col.col-name { width: 20%; }
.contact-table col.col-role { width: 48%; }
.contact-table col.col-phone { width: 16%; }
.contact-table col.col-email { width: 16%; }
.contact-table a { color: inherit; text-decoration: none; }

.contact-page .footer-main { padding-top: 54px; }

@media (max-width: 1024px) {
  :root { --contact-section-y: 76px; }
  .contact-office-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 44%); gap: 54px; }
  .contact-map,
  .contact-map img,
  .contact-map iframe { min-height: 430px; height: 430px; }
  .contact-table col.col-name { width: 20%; }
  .contact-table col.col-role { width: 44%; }
  .contact-table col.col-phone { width: 18%; }
  .contact-table col.col-email { width: 18%; }
}

@media (max-width: 768px) {
  :root { --contact-section-y: 64px; --contact-hero-height: 610px; }
  .contact-hero-art img { object-position: center center; }
  .contact-hero-shade { background: linear-gradient(180deg, rgba(3,27,75,.78) 0%, rgba(3,27,75,.48) 42%, rgba(3,27,75,.18) 100%); }
  .contact-hero-inner { align-items: flex-start; }
  .contact-hero-copy { padding-top: 60px; }
  .contact-hero-copy h1 { font-size: 38px; letter-spacing: -1px; }
  .contact-hero-copy p { font-size: 21px; }

  .contact-office-grid,
  .registration-grid { grid-template-columns: 1fr; }
  .contact-office-grid { gap: 48px; }
  .direct-contacts > .container > h2 { font-size: 32px; letter-spacing: -.7px; }
  .contact-location-block + .contact-location-block { margin-top: 30px; padding-top: 30px; }
  .company-details { gap: 30px; margin-top: 32px; padding-top: 32px; }
  .contact-map,
  .contact-map img,
  .contact-map iframe { min-height: 0; height: auto; aspect-ratio: 1 / .86; }
  .registration-grid { gap: 18px; }
  .registration-card { min-height: 0; padding: 27px 24px; }
  .direct-contacts > .container > h2 { margin-bottom: 42px; }
  .managers-title,
  .company-title { margin-top: 42px; }

  .contact-table-wrap { overflow: visible; }
  .contact-table,
  .contact-table tbody,
  .contact-table tr,
  .contact-table th,
  .contact-table td { display: block; width: 100%; }
  .contact-table tbody { display: grid; gap: 12px; }
  .contact-table tr {
    padding: 19px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
  }
  .contact-table tr:nth-child(odd) { background: var(--contact-row-alt); }
  .contact-table th,
  .contact-table td {
    min-height: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
  }
  .contact-table th { margin-bottom: 4px; font-size: 16px; }
  .contact-table td:nth-child(2) { margin-bottom: 16px; font-size: 14px; }
  .contact-table td:nth-child(3),
  .contact-table td:nth-child(4) { display: inline-block; width: auto; color: var(--navy); font-size: 14px; }
  .contact-table td:nth-child(3) { margin-right: 20px; }
  .contact-table td:nth-child(4) { text-align: left; }
}

@media (max-width: 420px) {
  :root { --contact-section-y: 58px; --contact-hero-height: 590px; }
  .contact-hero-copy { padding-top: 52px; }
  .contact-hero-copy h1 { font-size: 36px; }
  .contact-map,
  .contact-map img,
  .contact-map iframe { aspect-ratio: 1 / .95; }
  .contact-table td:nth-child(3),
  .contact-table td:nth-child(4) { display: block; }
  .contact-table td:nth-child(3) { margin: 0 0 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page * { scroll-behavior: auto; }
}
