/* Compact smartphone layout for the corporate front page. */
.office-list-toggle {
  display: none;
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}
.office-list-toggle[hidden] { display: none !important; }

@media (max-width: 760px) {
  .history-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
  }
  .history-tabs button {
    min-width: 0;
    padding: 13px 5px;
    text-align: center;
    justify-items: center;
    scroll-snap-align: none;
  }
  .history-tabs button span { font-size: 8px; letter-spacing: 0; }
  .history-tabs button strong { font-size: 11px; line-height: 1.35; }
  .history-tabs button[aria-selected="true"]::after { left: 7px; right: 7px; }
  .history-panel { padding: 12px; }
  .history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-card { display: block; min-height: 150px; padding: 15px 12px; }
  .history-year { margin-bottom: 10px; font-size: 21px; }
  .history-card h3 { font-size: 13px; line-height: 1.45; }
  .history-card p { font-size: 10px; line-height: 1.6; }
}

@media (max-width: 640px) {
  .sarkland-front section { padding: 68px 0; }
  .section-head { gap: 18px; margin-bottom: 30px; }

  .business-grid,
  .brand-grid,
  .office-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .business-card { grid-column: auto; min-height: 210px; padding: 19px 14px; }
  .business-card:last-child { grid-column: span 2; min-height: 165px; }
  .business-card .icon { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
  .business-card .index { top: 12px; right: 12px; font-size: 11px; }
  .business-card h3 { margin: 18px 0 8px; font-size: 15px; line-height: 1.45; }
  .business-card p { font-size: 11px; line-height: 1.65; }
  .business-card .arrow { right: 14px; bottom: 12px; }

  .brand-grid { gap: 10px; }
  .brand-media { height: 115px; }
  .brand-media.contain img { padding: 13px; }
  .brand-body { padding: 14px 12px; }
  .brand-body .category { font-size: 9px; }
  .brand-body h3 { margin: 4px 0 7px; font-size: 14px; line-height: 1.45; }
  .brand-body p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .brand-body .site-link { font-size: 11px; }

  .directory-top { display: block; margin-bottom: 17px; }
  .office-search { margin-top: 14px; }
  .office-grid { gap: 8px; }
  .office-card { min-height: 126px; padding: 12px 10px; }
  .office-card.compact-hidden { display: none; }
  .office-card .region { font-size: 9px; }
  .office-card h4 { margin: 5px 0 7px; font-size: 13px; line-height: 1.45; }
  .office-card address { overflow-wrap: anywhere; font-size: 10px; line-height: 1.55; }
  .office-tag { display: table; margin: 5px 0 0; padding: 2px 6px; font-size: 8px; }
  .office-list-toggle { display: block; }

  .sarkland-front footer,
  .sarkland-contact-page footer { padding: 38px 0 20px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-wordmark strong { font-size: 20px; }
  .footer-brand p { margin: 12px 0 4px; font-size: 11px; line-height: 1.65; }
  .footer-col h4 { margin-bottom: 9px; font-size: 11px; }
  .footer-col a { margin: 6px 0; font-size: 10px; line-height: 1.45; }
  .copyright { display: block; margin-top: 24px; padding-top: 16px; }
  .copyright span { display: block; margin-top: 6px; }
}
