/* ==========================================================================
   Profile page styles
   Custom CSS for elements that cannot be expressed with Bootstrap utilities.
   ========================================================================== */

/* ── Profile header: two-column layout ── */
.ls-profile-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 767.98px) {
  .ls-profile-header {
    flex-direction: column-reverse;
    gap: 1rem;
  }
}

.ls-profile-header-identity {
  flex: 1 1 0%;
  min-width: 0;
}

.ls-profile-header-logo {
  flex: 0 0 220px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0;
}

@media (max-width: 767.98px) {
  .ls-profile-header-logo {
    flex: 0 0 auto;
    justify-content: flex-start;
    padding: 0;
  }
}

.ls-profile-header-logo img {
  max-width: 240px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 767.98px) {
  .ls-profile-header-logo img {
    max-width: 200px;
    max-height: 120px;
  }
}

/* ── Offices: scrollable accordion + map ── */

.ls-office-list {
  max-height: 50vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ls-office-list::-webkit-scrollbar {
  width: 6px;
}

.ls-office-list::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

@media (min-width: 992px) {
  .ls-office-list {
    max-height: 500px;
  }
}

.ls-office-map {
  min-height: 300px;
}

@media (min-width: 992px) {
  .ls-office-map {
    min-height: 500px;
    max-height: 500px;
  }
}

@media (max-width: 991.98px) {
  .ls-office-map {
    height: 250px;
  }
}

/* ── Profile anchor offset: header (56px) + nav (~48px) + gap (24px) ── */
.ls-profile-anchor-offset {
  scroll-margin-top: calc(var(--ls-header-height, 56px) + 72px);
}

/* ── Section navigation ── */

/* Horizontal nav: hide scrollbar on overflow */
.ls-profile-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ls-profile-nav::-webkit-scrollbar {
  display: none;
}

/* Nav link styling */
.ls-profile-nav .nav-link {
  color: var(--bs-primary);
  padding: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 4px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.ls-profile-nav .nav-link:hover {
  border-bottom-color: var(--bs-border-color);
}

.ls-profile-nav .nav-link.active {
  border-bottom-color: var(--bs-primary);
}

.ls-profile-nav .nav-link:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .ls-profile-nav .nav-link {
    transition: none;
  }
}

/* Mobile dropdown toggle chevron */
.ls-profile-nav-mobile .bi-chevron-down {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.ls-profile-nav-mobile [aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

/* Mobile dropdown overlay */
.ls-profile-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bs-white);
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  z-index: 1019;
  display: none;
}

.ls-profile-nav-dropdown.show {
  display: block;
}

.ls-profile-nav-dropdown a {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: var(--bs-primary);
  font-weight: 600;
  border-left: 4px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.ls-profile-nav-dropdown a:hover {
  background: var(--bs-tertiary-bg);
}

.ls-profile-nav-dropdown a.active {
  border-left-color: var(--bs-primary);
  background: var(--bs-tertiary-bg);
}

.ls-profile-nav-dropdown a:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .ls-profile-nav-dropdown a {
    transition: none;
  }
}

/* Section nav: sticky below site header, below offcanvas (z-index 1040) */
.ls-sticky-section-nav {
  position: sticky;
  top: var(--ls-header-height, 56px);
  z-index: 1020;
  background: var(--bs-white);
}

/* Sticky CTA button */
.ls-sticky-cta {
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Responsive grid: 7-column at xxl (Bootstrap lacks row-cols-7) ── */
@media (min-width: 1400px) {
  .ls-row-cols-xxl-7 > * {
    flex: 0 0 auto;
    width: calc(100% / 7);
  }
}

/* ── Profile body horizontal scroll carousels ──
   Team, Accreditations, Testimonials, and Related Firms all use the
   shared `.ls-carousel` component from custom.css. Per-instance card
   widths are set inline on each carousel via --ls-card-w-sm/md/lg
   custom properties. No per-carousel CSS lives here. */
