/* Part v-offices: the office pages (/offices/ and /offices/<town>/), as v-offices.php prints them. The gl-v classes
   exist only there, and the body carries gl-v-page. The look follows Our History and the two guides (p-guides.css):
   headings in a rail from 1024 px, hairline rules, navy ink, no boxes or shadows. Controls that must show have navy
   edges, because pale grays wash out on Adam's screens. Until these pages get a kind in gl_page_kinds(), every
   part's stylesheet loads on them, so the rules carry #main to stay ahead of other parts' broad rules. */

.gl-v { margin: 4px 0 32px; color: var(--gl-ink); }
#main .gl-v p { margin: 0; font-size: 17px; line-height: 1.6; }
.gl-v :is(p, li, h2, h3) { text-wrap: pretty; }
/* Safari evens out short lines under "pretty", which broke an address as "5475 Dyer / Ave, Suite 141". */
.gl-v p.gl-v-addr { text-wrap: wrap; }
#main .gl-v :is(h2, h3) { text-transform: none; letter-spacing: 0; }
#main .gl-v p.gl-v-lede { margin: 0 0 16px; font-size: 19px; line-height: 1.55; }

/* ---------- The top: address, the ways in, and the map ---------- */

.gl-v-top { margin: 0; }
#main .gl-v p.gl-v-addr { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 24px; font-size: 19px; line-height: 1.5; }
.gl-v-addr > .gl-i { margin-top: 4px; color: var(--gl-navy); }
/* Directions, a text link under the address. Padding makes it a 44 px tap, and the matching negative margin keeps the
   lines where they were. */
#main .gl-v a.gl-v-dir { display: inline-flex; align-items: center; gap: 6px; margin-block: -6px; padding-block: 10px; color: var(--gl-navy); font-size: 17px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.gl-v-dir .gl-i { width: 16px; height: 16px; }
@media (hover: hover) { #main .gl-v a.gl-v-dir:hover { text-decoration-thickness: 2px; } }
/* Marion's page: the building beside the address, with Call and Email under both. */
.gl-v-info--photo { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 20px; align-items: start; }
.gl-v-info--photo > .gl-v-acts { grid-column: 1 / -1; margin-top: 4px !important; }
#main .gl-v img.gl-v-office-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; margin: 0 0 24px; object-fit: cover; border-radius: var(--gl-radius); }
.gl-v-info--photo p.gl-v-lede { margin-bottom: 10px !important; }
/* Call and Email. Each is a 48 px button; the call is the solid one. */
#main .gl-v p.gl-v-acts { display: flex; flex-wrap: wrap; gap: 12px; }
#main .gl-v a.gl-v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--gl-navy);
  border-radius: var(--gl-radius);
  background: #fff;
  color: var(--gl-navy);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  transition: background-color var(--gl-fast);
}
#main .gl-v a.gl-v-btn--solid { background: var(--gl-navy); color: #fff; }
.gl-v-btn .gl-i { width: 20px; height: 20px; }
.gl-v-btn--line .gl-i:last-child { width: 16px; height: 16px; }

/* The map: b-services.js draws it and b-services.css styles its pins and labels. Without scripts it isn't drawn, and
   b-services.css hides its box. */
.gl-v-mapwrap { margin-top: 32px; }
body.gl-v-page #growthland-map.gl-bc-map { height: 300px; min-height: 0; }

@media (min-width: 1024px) {
  /* The details and the map side by side, level at the top. */
  .gl-v-top--map { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 48px; align-items: start; }
  .gl-v-top--map .gl-v-mapwrap { margin-top: 0; }
  /* Marion's details carry the building photo, so a 5 to 7 split left the address a 220 px column that broke
     "Suite 141" onto its own line. Its details and map split evenly. */
  .gl-v-top--map:has(> .gl-v-info--photo) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body.gl-v-page #growthland-map.gl-bc-map { height: 340px; }
  html:not(.gl-js) .gl-v-top--map { display: block; }
}

/* ---------- Sections: the heading in a rail beside the text from 1024 px ---------- */

.gl-v-sec { margin-top: 72px; }
#main .gl-v .gl-v-head h2 { margin: 0 0 20px; font-size: 1.625rem; line-height: 1.25; }
.gl-v-body > :last-child { margin-bottom: 0; }
@media (min-width: 1024px) {
  .gl-v-sec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 48px; align-items: start; }
  .gl-v-body { grid-column: 2; }
  #main .gl-v .gl-v-head h2 { max-width: 13em; margin: 0; }
}

/* A text link with an arrow, as the guides end their sections. Each is a 44 px tap. */
#main .gl-v p.gl-v-links { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 12px; }
#main .gl-v a.gl-v-more { display: inline-block; padding-block: 10px; line-height: 24px; color: var(--gl-navy); font-weight: 600; text-decoration: none; }
.gl-v-end { white-space: nowrap; }
.gl-v-more .gl-i { width: 18px; height: 18px; margin-left: 8px; vertical-align: -3px; transition: transform var(--gl-fast); }

/* ---------- People: ruled rows, two across where they fit ---------- */

#main .gl-v .gl-v-people { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 40px; margin: 0; padding: 0; border-bottom: 1px solid var(--gl-rule); list-style: none; }
#main .gl-v .gl-v-person { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 16px; align-items: start; margin: 0; padding: 16px 0 10px; border-top: 1px solid var(--gl-rule); }
#main .gl-v .gl-v-photo { display: block; width: 72px; height: 72px; max-width: none; margin: 0; border-radius: var(--gl-radius); object-fit: cover; object-position: 50% 20%; background: var(--gl-wash); }
/* No photo yet: a silhouette on navy (e-content.css). */
#main .gl-v h3.gl-v-name { margin: 0; font-size: 1.125rem; line-height: 1.35; color: var(--gl-navy); }
/* The name opens the person's profile. Padding makes it a 44 px tap, and the matching negative margin keeps the lines
   where they were. */
#main .gl-v h3.gl-v-name a { display: inline-block; padding-block: 11px; margin-block: -11px; color: var(--gl-navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
#main .gl-v p.gl-v-title { margin-top: 2px; font-size: 15px; line-height: 1.45; color: var(--gl-muted); }
#main .gl-v p.gl-v-pacts { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 2px; }
#main .gl-v a.gl-v-plink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gl-navy); font-size: 16px; font-weight: 600; text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: .2em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.gl-v-plink .gl-i { width: 18px; height: 18px; }
@media (min-width: 600px) {
  #main .gl-v .gl-v-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Listings: the listing cards from d-listings.php ---------- */

#main .gl-v .gl-v-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; margin: 0; padding: 0; list-style: none; }
#main .gl-v .gl-v-cards > li { min-width: 0; margin: 0; padding: 0; }
.gl-v-cards .gl-card-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 160ms cubic-bezier(.23, 1, .32, 1); }
#main .gl-v-cards a.gl-card:is(:hover, :focus) { color: var(--gl-ink); text-decoration: none; }
#main .gl-v-cards a.gl-card:focus-visible { outline: 3px solid #5b7bd5; outline-offset: 4px; }
@media (min-width: 1024px) {
  #main .gl-v .gl-v-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* More from the office, folded under the first six. */
.gl-v-rest { margin-top: 20px; }
#main .gl-v .gl-v-rest > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--gl-navy); border-radius: var(--gl-radius); color: var(--gl-navy); font-size: 16px; font-weight: 600; cursor: pointer; list-style: none; }
.gl-v-rest > summary::-webkit-details-marker { display: none; }
.gl-v-rest[open] > summary { margin-bottom: 24px; }

/* ---------- Other offices: ruled rows, three across where they fit ---------- */

#main .gl-v .gl-v-offices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); column-gap: 32px; margin: 0; padding: 0; border-bottom: 1px solid var(--gl-rule); list-style: none; }
#main .gl-v .gl-v-office { margin: 0; padding: 14px 0 8px; border-top: 1px solid var(--gl-rule); }
#main .gl-v h3.gl-v-office-name { margin: 0; font-size: 1.125rem; line-height: 1.35; }
/* Office names read as headings, so they underline on hover only, like the "Email" and phone links in the lists. The
   link carries a class (v-offices.php) so a-global.css's underline for plain links in list items passes it by. */
#main .gl-v :is(h2.gl-v-all-name, h3.gl-v-office-name) a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gl-navy); text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.gl-v-main-note { margin-left: 6px; font-size: 15px; font-weight: 400; color: var(--gl-muted); white-space: nowrap; }
#main .gl-v p.gl-v-office-addr { font-size: 15px; line-height: 1.5; color: var(--gl-muted); }
#main .gl-v a.gl-v-office-tel { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--gl-navy); font-size: 17px; text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: .2em; font-variant-numeric: tabular-nums lining-nums; }

/* ---------- /offices/: the four offices beside the map ---------- */

#main .gl-v .gl-v-all { margin: 0; padding: 0; border-bottom: 1px solid var(--gl-rule); list-style: none; }
#main .gl-v .gl-v-all-item { margin: 0; padding: 20px 0 14px; border-top: 1px solid var(--gl-rule); }
#main .gl-v h2.gl-v-all-name { margin: 0 0 8px; font-size: 1.375rem; line-height: 1.3; }
#main .gl-v--all p.gl-v-addr { margin-bottom: 16px; font-size: 17px; }
#main .gl-v--all p.gl-v-links { margin-top: 6px; }
@media (min-width: 1024px) {
  .gl-v--all .gl-v-top--map { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
  /* The map stays in view beside the list while it fits the screen. */
  .gl-v--all .gl-v-mapwrap { position: sticky; top: 104px; }
  body.gl-v-page .gl-v--all #growthland-map.gl-bc-map { height: min(480px, calc(100vh - 136px)); min-height: 400px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  /* The narrower half column keeps the address on one line by giving the photo less room. */
  .gl-v-info--photo { grid-template-columns: 168px minmax(0, 1fr); }
}
@media (min-width: 600px) and (max-width: 1023px) {
  /* Two offices to a row on tablets and the Fold's inner screen, with the map across the full width under them. */
  #main .gl-v .gl-v-all { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  #main .gl-v--all p.gl-v-acts { gap: 8px; }
  #main .gl-v--all a.gl-v-btn { padding: 0 14px; }
}

/* ---------- Motion and phones ---------- */

@media (hover: hover) {
  #main .gl-v a.gl-v-btn:hover { background: var(--gl-wash); }
  #main .gl-v a.gl-v-btn--solid:hover { background: var(--gl-navy-hover); color: #fff; }
  #main .gl-v a.gl-v-more:hover > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .gl-v-more:hover .gl-i { transform: translateX(3px); }
  #main .gl-v h3.gl-v-name a:hover { text-decoration-thickness: 2px; }
  #main .gl-v :is(a.gl-v-plink, a.gl-v-office-tel, h2.gl-v-all-name a, h3.gl-v-office-name a):hover { text-decoration-line: underline; }
  .gl-v-cards .gl-card:hover .gl-card-photo img { transform: scale(1.03); }
  #main .gl-v .gl-v-rest > summary:hover { background: var(--gl-wash); }
}
@media (prefers-reduced-motion: reduce) {
  #main .gl-v a.gl-v-btn, .gl-v-more .gl-i, .gl-v-cards .gl-card-photo img { transition: none; }
  .gl-v-more:hover .gl-i, .gl-v-cards .gl-card:hover .gl-card-photo img { transform: none; }
}

@media (max-width: 849px) {
  .gl-v-sec { margin-top: 44px; }
  #main .gl-v .gl-v-head h2 { font-size: 1.5rem; }
}
@media (max-width: 599px) {
  #main .gl-v p.gl-v-lede { font-size: 18px; }
  #main .gl-v p.gl-v-addr { font-size: 18px; }
  /* Call and Email side by side, the call taking the spare width. */
  #main .gl-v p.gl-v-acts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  #main .gl-v a.gl-v-btn { padding: 0 14px; }
  #main .gl-v a.gl-v-btn:only-child { grid-column: 1 / -1; }
  .gl-v-info--photo { grid-template-columns: 136px minmax(0, 1fr); column-gap: 16px; }
  #main .gl-v img.gl-v-office-photo { margin-bottom: 20px; }
  body.gl-v-page #growthland-map.gl-bc-map { height: 260px; }
  /* Cards become rows with the photo at the left, as on the 404 page. */
  #main .gl-v .gl-v-cards { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #main .gl-v .gl-v-cards > li + li { border-top: 1px solid var(--gl-rule); }
  .gl-v-cards .gl-card { flex-direction: row; align-items: flex-start; gap: 14px; padding: 14px 0; }
  #main .gl-v .gl-v-cards > li:first-child .gl-card { padding-top: 0; }
  .gl-v-cards .gl-card-photo { flex: none; width: 120px; aspect-ratio: 4 / 3; }
  .gl-v-cards .gl-card-flag { top: 4px; left: 4px; padding: 0 6px; }
  .gl-v-cards .gl-card-body { flex: 1 1 auto; min-width: 0; }
  #main .gl-v .gl-v-person { grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; }
  #main .gl-v .gl-v-photo { width: 64px; height: 64px; }
}

/* ---------- Contact Us: the "Office page" link that v-offices.php adds to each office row ---------- */

@media (max-width: 999px) {
  /* Beside "Office page", "People in this office" wrapped to two lines in its half of the row. Each takes a full row. */
  body .gl-bc .gl-bc-acts.gl-v-acts-linked > li:nth-last-child(-n + 2) { grid-column: 1 / -1; }
}

@media print {
  .gl-v-mapwrap, .gl-v-rest > summary { display: none; }
  .gl-v-sec { margin-top: 24pt; }
  .gl-v-person, .gl-v-office, .gl-v-all-item, .gl-v-cards > li { break-inside: avoid; }
}

/* On touch screens the map's + and - buttons were 30 px; 44 px is a comfortable tap target (11/4 audit). */
@media (pointer: coarse) { .leaflet-bar a, .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; } }
