.wh-office-locations-grid,
.wh-office-locations-grid * {
  box-sizing: border-box;
}

/* Protect this component from broad theme typography rules (including #page_content p). */
.wh-office-locations-grid :where(p, h3, a, span, button) {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

#page_content .wh-office-locations-grid p,
#page_content .wh-office-locations-grid h3,
#page_content .wh-office-locations-grid a,
#page_content .wh-office-locations-grid span {
  margin: 0;
  padding: 0;
}

.wh-office-locations-grid {
  --wh-navy: #1a2c46;
  --wh-card: #ceced0;
  --wh-text: #2f3540;
  --wh-muted: #555b66;
  --wh-accent: #f49a4f;
  --wh-partner: #1a2c46; /* brand navy, matches attorney names elsewhere (.lawers_slider h4) */

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 28px;
  margin: 20px 0;
  align-items: stretch;
}

.wh-office-card {
  background: var(--wh-card);
  color: var(--wh-text);
  border: 1px solid #bcc0c6;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.wh-office-card-header {
  background: var(--wh-navy);
  color: #fff;
  text-align: center;
  padding: 42px 24px;
}

.wh-office-card-header h3 {
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.wh-office-card-body {
  padding: 34px 34px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: "Halant", serif;
  font-size: 20px;
  line-height: 1.35;
}

.wh-office-top {
  margin-bottom: 6px;
}

.wh-office-label {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--wh-muted);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.wh-office-partner {
  margin-bottom: 14px !important;
  font-size: 26px;
  line-height: 1.15;
}

.wh-office-partner a {
  color: var(--wh-partner);
  text-decoration: none;
}

.wh-office-partner a:hover,
.wh-office-partner a:focus-visible {
  color: #253c5c;
}

.wh-office-attorneys {
  margin: 28px 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wh-office-attorneys a {
  color: var(--wh-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 154, 79, 0.45);
  padding-bottom: 2px;
}

.wh-office-phone,
.wh-office-fax {
  font-size: 20px;
  line-height: 1.12;
  margin: 0;
}

.wh-office-phone span,
.wh-office-fax span {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--wh-muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-right: 10px;
}

.wh-office-contact {
  margin-bottom: 20px;
}

.wh-office-contact .wh-office-phone + .wh-office-fax {
  margin-top: 8px;
}

.wh-office-address-group {
  margin-top: 0;
  margin-bottom: 14px;
}

.wh-office-address {
  padding-top: 18px;
  border-top: 1px solid rgba(47, 53, 64, 0.2);
}

.wh-office-address p {
  font-size: 20px;
  line-height: 1.16;
  margin-bottom: 6px;
}

.wh-office-address p:last-child {
  margin-bottom: 0;
}

.wh-office-directions {
  margin-top: 12px;
  padding-top: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wh-office-directions a {
  color: var(--wh-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 154, 79, 0.5);
  padding-bottom: 2px;
}

.wh-office-attorneys a:focus-visible,
.wh-office-directions a:focus-visible,
.wh-office-partner a:focus-visible {
  outline: 2px solid var(--wh-navy);
  outline-offset: 3px;
}

.wh-office-map-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.wh-office-map-modal.is-open {
  display: block;
}

.wh-office-map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.wh-office-map-modal__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, calc(100% - 32px));
  height: min(700px, calc(100% - 32px));
  background: #fff;
  padding: 14px;
}

.wh-office-map-modal__dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.wh-office-map-modal__close {
  position: absolute;
  right: 18px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 40px;
  line-height: 1;
  color: var(--wh-navy);
  cursor: pointer;
}

.wh-office-map-modal__actions {
  margin-top: 10px;
  text-align: right;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.wh-office-map-modal__actions a {
  color: var(--wh-navy);
  text-decoration: none;
}

body.wh-office-modal-open {
  overflow: hidden;
}

@media (max-width: 1199px) {
  .wh-office-locations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wh-office-card-header h3 {
    font-size: 44px;
  }

  .wh-office-card-body {
    padding: 28px 26px;
  }

  .wh-office-partner {
    font-size: 22px;
  }

  .wh-office-top {
    margin-bottom: 20px;
  }

  .wh-office-phone,
  .wh-office-fax,
  .wh-office-address p {
    font-size: 18px;
  }
}

@media (max-width: 767px) {
  .wh-office-locations-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wh-office-card-header {
    padding: 30px 18px;
  }

  .wh-office-card-header h3 {
    font-size: 34px;
  }

  .wh-office-card-body {
    padding: 22px 18px 24px;
    font-size: 18px;
  }

  .wh-office-partner {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .wh-office-attorneys {
    margin: 0;
  }

  .wh-office-top {
    margin-bottom: 18px;
  }

  .wh-office-contact {
    margin-bottom: 18px;
  }

  .wh-office-phone,
  .wh-office-fax,
  .wh-office-address p {
    font-size: 17px;
  }

  .wh-office-directions {
    margin-top: 22px;
  }
}
