/* Global office cards, used only by contact_us.shtml. */
.office-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 24px;
  padding: 48px 60px;
  background: #f5f5f5;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.office-cards .office-card {
  min-width: 0;
  padding: 28px;
  border-radius: 8px;
  background: #fdfcfc;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  color: #f5f5f5;
}

.office-card .office-card__header {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 80px;
  padding-bottom: 26px;
  border-bottom: 1px solid #d2d6db;
}

.office-card .office-card__flag {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
}

.office-card .office-card__heading {
  min-width: 0;
}

.office-card .office-card__city {
  margin: 0 0 6px;
  color: #111925;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.office-card .office-card__subtitle {
  margin: 0 0 6px;
  color: #596373;
  font-size: 12px;
  line-height: 1.5;
}

.office-card .office-card__country {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #e10e13;
  font-size: 14px;
  line-height: 1.5;
}

.office-card__country .office-card__country-flag {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 50%;
}

.office-card .office-card__details {
  display: grid;
  gap: 20px;
  margin: 26px 0 0;
}

.office-card .office-card__field dt {
  margin: 0 0 7px;
  color: #596373;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.office-card .office-card__field dd {
  margin: 0;
  color: #111925;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.office-card__field dd > span {
  display: block;
}

.office-card .office-card__field a {
  color: inherit;
  text-decoration: none;
}

.office-card .office-card__field a:hover,
.office-card .office-card__field a:focus-visible {
  color: #e10e13;
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .office-cards {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 20px;
    padding: 28px 20px;
  }

  .office-cards .office-card {
    padding: 24px;
  }

  .office-card .office-card__header {
    gap: 16px;
    padding-bottom: 24px;
  }

  .office-card .office-card__city {
    font-size: 20px;
  }
}

/* Domestic offices: three columns on desktop, city disclosures on mobile. */
.domestic-offices {
  margin-top: 64px;
  padding: 36px 60px;
  background: #f5f5f5;
  color: #111925;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.domestic-offices .domestic-offices__heading {
  display: block;
  margin-bottom: 36px;
  text-align: center;
}

.domestic-offices .domestic-offices__heading h2 {
  margin: 0;
  color: #111925;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
}

.domestic-offices .domestic-offices__heading p {
  margin: 12px 0 0;
  color: #596373;
  font-size: 18px;
  line-height: 1.6;
}

.domestic-offices .domestic-offices__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 24px;
}

.domestic-offices .domestic-office {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  border: 1px solid #e3e6eb;
  border-radius: 8px;
  background: #fff;
}

.domestic-offices .domestic-office__city {
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e3e6eb;
  color: #111925;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.domestic-offices .domestic-office__details {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

/* Fixed card height; natural field heights and spacing match the global cards. */
.domestic-offices article.domestic-office {
  box-sizing: border-box;
  height: 348px;
}

.domestic-offices article.domestic-office .domestic-office__details {
  display: grid;
  flex: 0 0 auto;
  grid-template-rows: repeat(3, max-content);
  align-content: start;
  gap: 20px;
}

.domestic-offices .domestic-office--wide {
  grid-column: span 2;
}

.domestic-offices .domestic-office--wide .domestic-office__details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.domestic-office--wide .domestic-office__field--address-primary {
  grid-area: 1 / 1;
}

.domestic-office--wide .domestic-office__field--address-secondary {
  grid-area: 1 / 2;
}

.domestic-office--wide .domestic-office__field--phone-primary {
  grid-area: 2 / 1;
}

.domestic-office--wide .domestic-office__field--phone-secondary {
  grid-area: 2 / 2;
}

.domestic-office--wide .domestic-office__field--phone-shared {
  grid-row: 2;
  grid-column: 1 / -1;
}

.domestic-office--wide .domestic-office__field--email {
  grid-row: 3;
  grid-column: 1 / -1;
}

.domestic-offices .domestic-office__field dt {
  margin: 0 0 7px;
  color: #596373;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.domestic-offices .domestic-office__field dd {
  margin: 0;
  color: #111925;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

/* Reserve two address lines on desktop; phone and email keep natural heights. */
.domestic-offices article.domestic-office .domestic-office__field--address dd {
  min-height: 3.5em;
}

.domestic-office__address {
  display: block;
}

.domestic-office__address + .domestic-office__address {
  margin-top: 12px;
}

.domestic-offices .domestic-office a {
  color: inherit;
  text-decoration: none;
}

.domestic-offices .domestic-office a:hover,
.domestic-offices .domestic-office a:focus-visible {
  color: #e10e13;
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .domestic-offices {
    margin-top: 40px;
    padding: 28px 20px;
  }

  .domestic-offices .domestic-offices__heading {
    display: block;
    margin-bottom: 20px;
  }

  .domestic-offices .domestic-offices__heading h2 {
    margin-bottom: 8px;
    font-size: 24px;
  }

  .domestic-offices .domestic-offices__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .domestic-offices details.domestic-office {
    display: block;
    padding: 0;
  }

  .domestic-offices .domestic-office__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    color: #111925;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    cursor: pointer;
    list-style: none;
  }

  .domestic-office__summary::-webkit-details-marker {
    display: none;
  }

  .domestic-office__summary:focus-visible {
    outline: 2px solid #e10e13;
    outline-offset: -3px;
    border-radius: 8px;
  }

  .domestic-office__toggle {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-right: 3px;
    border-right: 1.5px solid #596373;
    border-bottom: 1.5px solid #596373;
    transform: rotate(45deg);
  }

  .domestic-office[open] .domestic-office__toggle {
    transform: rotate(225deg);
  }

  .domestic-offices .domestic-office__details {
    margin: 0 20px;
    padding: 20px 0;
    border-top: 1px solid #e3e6eb;
  }

  .domestic-offices .domestic-offices__heading p {
    margin-top: 8px;
    font-size: 16px;
  }
}
