/* Option 1: navy skyline cards. Loaded only by the Contact page. */
.contact-office-directory {
  padding: 56px max(32px, calc((100vw - 1160px) / 2));
  border-top: 3px solid #826dff;
  background: #071a32;
  scroll-margin-top: 150px;
}
.contact-office-directory > .section-intro { margin: 0 0 32px; }
.contact-office-directory > .section-intro h2 { color: #fff; }
.contact-office-directory > .section-intro p { color: #d4ddec; }
/* Avoid a flash of duplicate footer directories while deferred scripts run. */
[data-site-footer] .footer-office-grid { display: none; }
#ism-office-locations {
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  background: #071a32;
  font-family: Arial, Helvetica, sans-serif;
  scroll-margin-top: 150px;
}

#ism-office-locations .footer-office {
  min-width: 0;
  padding: 0;
  border: 1px solid #2d4561;
  background: #102945;
  box-shadow: 0 8px 24px #0002;
  transition: transform .18s, box-shadow .18s;
}

#ism-office-locations .footer-office-skyline {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  margin: 0;
}

#ism-office-locations h3 {
  margin: 20px 22px 12px;
  color: #fff;
  font: 500 24px/1.1 Arial, Helvetica, sans-serif;
  letter-spacing: .01em;
  text-transform: uppercase;
}

#ism-office-locations .office-contact-details { padding-bottom: 16px; }
#ism-office-locations address {
  margin: 0 22px;
  color: #d4ddec;
  font: normal 16px/1.65 Arial, Helvetica, sans-serif;
}
#ism-office-locations .footer-office address a { margin: 12px 0 0; }
#ism-office-locations .office-contact-details > p { margin: 12px 0 0; }
#ism-office-locations .footer-office address br:has(+ a) { display: none; }

#ism-office-locations .footer-office a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: auto;
  min-height: 44px;
  margin: 0 22px 12px;
  color: #e0e6ff;
  font: 500 15px/normal Arial, Helvetica, sans-serif;
  text-decoration: none;
}

#ism-office-locations .footer-office a::after {
  content: '\2197';
  color: #aa9eff;
  font-size: 22px;
}

#ism-office-locations .footer-office a:hover { text-decoration: underline; }
#ism-office-locations .footer-office a:focus-visible {
  outline: 2px solid #9c8fff;
  outline-offset: 3px;
}

#ism-office-locations .footer-office:hover,
#ism-office-locations .footer-office:focus-within {
  transform: translateY(-3px);
  border-color: #8d7cf5;
  box-shadow: 0 12px 30px #0004;
}

@media (min-width: 701px) and (max-width: 1000px) {
  #ism-office-locations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .contact-office-directory { padding: 32px 20px; scroll-margin-top: 80px; }
  #ism-office-locations {
    grid-template-columns: 1fr;
    scroll-margin-top: 80px;
  }
  #ism-office-locations h3 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  #ism-office-locations .footer-office { transition: none; }
  #ism-office-locations .footer-office:hover,
  #ism-office-locations .footer-office:focus-within { transform: none; }
}

/* Mobile enhancement: six visible choices, one stable skyline panel. */
#ism-office-locations .office-city-selector { display: none; }
@media (max-width: 700px) {
  #ism-office-locations.has-city-selector { row-gap: 20px; }
  #ism-office-locations .office-city-selector {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    grid-area: 1 / 1;
  }
  #ism-office-locations .office-city-selector legend {
    padding: 0 0 16px;
    color: #fff;
    font: 600 1rem/1.3 Arial, Helvetica, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  #ism-office-locations .office-city-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  #ism-office-locations .office-city-choices label { position: relative; min-width: 0; cursor: pointer; }
  #ism-office-locations .office-city-choices input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }
  #ism-office-locations .office-city-choices span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    height: 100%;
    box-sizing: border-box;
    padding: 8px 3px;
    border: 1px solid #65809d;
    border-radius: 6px;
    background: #102945;
    color: #fff;
    font: 500 .875rem/1.3 Arial, Helvetica, sans-serif;
    text-align: center;
    overflow-wrap: anywhere;
  }
  #ism-office-locations .office-city-choices input:checked + span {
    background: #b5a8ff;
    border-color: #b5a8ff;
    color: #071a32;
    font-weight: 700;
  }
  #ism-office-locations .office-city-choices input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }
  #ism-office-locations.has-city-selector .footer-office {
    grid-area: 2 / 1;
    visibility: hidden;
    transform: none;
  }
  #ism-office-locations.has-city-selector .footer-office.is-selected-city { visibility: visible; }
}
