/* Contact branches and staff; loaded after the shared card and theme styles. */
.contact-branches,
.contact-staff {
  --contact-panel: var(--theme-panel, #fff);
  --contact-ink: var(--theme-ink, #36291f);
  --contact-muted: var(--theme-muted, #69594c);
  --contact-line: var(--theme-line, #eadbcf);
  --contact-accent: var(--theme-accent, #934815);
  color: var(--contact-ink);
  scroll-margin-top: 110px;
}

.contact-branches {
  padding-block: 0 clamp(38px, 5vw, 64px);
  background: var(--theme-bg, #fff);
}

.contact-staff {
  padding-block: clamp(38px, 5vw, 64px);
  border-block-start: 1px solid var(--contact-line);
  background: var(--theme-bg, #fff8f1);
}

.contact-branches__heading,
.contact-staff__heading {
  margin-block-end: 24px;
  max-width: 740px;
}

.contact-branches__heading h2,
.contact-staff__heading h2 {
  margin: 6px 0 12px;
  color: var(--contact-ink);
  font-family: var(--heading, inherit);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.18;
  letter-spacing: -.025em;
}

.contact-branches__heading p:not(.eyebrow),
.contact-staff__heading p:not(.eyebrow) {
  margin: 0;
  color: var(--contact-muted);
  font-size: 15px;
  line-height: 1.65;
}

.contact-branches__heading .eyebrow,
.contact-staff__heading .eyebrow {
  color: var(--contact-accent);
}

.contact-branches__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.contact-branch {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--contact-line);
  border-radius: var(--theme-radius, 20px);
  background: var(--contact-panel);
  box-shadow: 0 5px 20px rgb(57 38 23 / 4%);
}

.contact-branch__map {
  height: clamp(220px, 22vw, 250px);
  flex-shrink: 0;
  border-block-end: 1px solid var(--contact-line);
  background: var(--theme-soft, #f7eee4);
}

.contact-branch__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-branch__map .consent-map__placeholder {
  box-sizing: border-box;
  min-height: 0;
  height: 100%;
  gap: 12px;
  padding: 20px;
  background: var(--theme-soft, #f7eee4);
  color: var(--contact-muted);
  font-size: 14px;
}

.contact-branch__map .consent-map__placeholder button {
  min-height: 44px;
  padding: 10px 18px;
  border-color: var(--contact-line);
  background: var(--contact-panel);
  color: var(--contact-accent);
}

.contact-branch__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(20px, 2.4vw, 28px);
}

.contact-branch__body h3 {
  margin: 0 0 12px;
  color: var(--contact-ink);
  font-family: var(--heading, inherit);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.3;
}

.contact-branch__body p {
  margin: 0 0 14px;
  color: var(--contact-muted);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.contact-branch__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: auto;
  padding-block-start: 8px;
}

.contact-branch__actions a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--contact-line);
  border-radius: 999px;
  background: var(--contact-panel);
  color: var(--contact-accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.contact-branch__actions a:first-child {
  background: var(--contact-accent);
  color: var(--theme-on-accent, #fff);
  border-color: var(--contact-accent);
}

.contact-branch__actions svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact-staff__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.contact-staff__card.about-team__card {
  display: grid;
  grid-template-columns: minmax(96px, 36%) minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: 44px;
  border-color: var(--contact-line);
  border-radius: var(--theme-radius, 16px);
  background: var(--contact-panel);
  color: var(--contact-ink);
  text-decoration: none;
  box-shadow: 0 4px 16px rgb(57 38 23 / 4%);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.contact-staff__card .about-team__photo {
  display: grid;
  align-items: center;
  min-width: 0;
  background: var(--theme-soft, #f4e8dc);
}

.contact-staff__card .about-team__photo a {
  display: block;
  min-height: 44px;
}

/* Keep about-team.css portrait ratios and individual face-scale adjustments. */
.contact-staff__card .about-team__photo img.team-placeholder {
  padding: 17%;
  background: #f4e8dc;
}

.contact-staff__card .about-team__photo:has(img.team-placeholder) {
  background: #f4e8dc;
}

.contact-staff__card .about-team__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px 12px;
}

.contact-staff__card .about-team__info h3 {
  color: var(--contact-ink);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.35;
  overflow-wrap: normal;
}

.contact-staff__card .about-team__info p {
  color: var(--contact-muted);
  font-size: 13px;
  line-height: 1.5;
}

.contact-branches :is(a, button):focus-visible,
.contact-staff a:focus-visible {
  outline: 3px solid var(--contact-accent);
  outline-offset: 3px;
}

.contact-staff__card .about-team__photo a:focus-visible {
  outline-offset: -3px;
}

.contact-staff__card:focus-within {
  border-color: var(--contact-accent);
  box-shadow: 0 0 0 2px var(--contact-accent);
}

@media (hover: hover) {
  .contact-branch__actions a:hover,
  a.contact-staff__card:hover,
  .contact-staff__card:has(a):hover {
    border-color: var(--contact-accent);
    box-shadow: 0 6px 18px rgb(57 38 23 / 10%);
  }
}

@media (max-width: 1000px) {
  .contact-staff__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .contact-branches__grid { grid-template-columns: 1fr; gap: 20px; }
  .contact-branch__map { height: 235px; }
  .contact-branches__heading,
  .contact-staff__heading { margin-block-end: 20px; }
  .contact-staff__grid { gap: 12px; }
}

@media (max-width: 560px) {
  .contact-staff__grid { grid-template-columns: 1fr; }
  .contact-staff__card.about-team__card { grid-template-columns: minmax(100px, 32%) minmax(0, 1fr); }
  .contact-staff__card .about-team__info { padding: 16px; }
  .contact-staff__card .about-team__info h3 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-branch__actions a,
  .contact-staff__card.about-team__card { transition: none; }
}
