/* ==========================================================================
   Brandon Text @font-face — paths are relative to this file
   (includes/css/styles.css → ../../fonts/brandon/)
   Only the 5 weights the directory uses: 300, 400, 500, 700, 900. No italics.
   ========================================================================== */

@font-face {
  font-family: 'Brandon Text';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('../../fonts/brandon/BrandonText-Light.woff2') format('woff2'),
       url('../../fonts/brandon/BrandonText-Light.woff') format('woff');
}

@font-face {
  font-family: 'Brandon Text';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../../fonts/brandon/BrandonText-Regular.woff2') format('woff2'),
       url('../../fonts/brandon/BrandonText-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Brandon Text';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../../fonts/brandon/BrandonText-Medium.woff2') format('woff2'),
       url('../../fonts/brandon/BrandonText-Medium.woff') format('woff');
}

@font-face {
  font-family: 'Brandon Text';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../../fonts/brandon/BrandonText-Bold.woff2') format('woff2'),
       url('../../fonts/brandon/BrandonText-Bold.woff') format('woff');
}

@font-face {
  font-family: 'Brandon Text';
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url('../../fonts/brandon/BrandonText-Black.woff2') format('woff2'),
       url('../../fonts/brandon/BrandonText-Black.woff') format('woff');
}

/* ==========================================================================
   Safe Harbor Marinas — On-Site Contractor & Vendor Directory
   All selectors scoped under .shm-directory-page to prevent collisions
   with the theme's global style.css.
   Tokens pulled from Figma variables (get_variable_defs):
     Night Current #101921 · Horizon Blue #2D4D5A · Pure White #FFFFFF
   ========================================================================== */

/* ==========================================================================
   Safe Harbor Marinas — On-Site Contractor & Vendor Directory
   Tokens pulled from Figma variables (get_variable_defs):
     Night Current #101921 · Horizon Blue #2D4D5A · Pure White #FFFFFF
     H2: Brandon Text Light / 48px / 58px line-height / -1px tracking
   Additional raw values (not bound to Figma variables) were read directly
   off the exported node styles via get_design_context.
   ========================================================================== */
:root {
  --night-current: #101921;
  --horizon-blue: #2d4d5a;
  --pure-white: #ffffff;
  --card-bg: #17242f;
  --muted: #818a94;
  --eyebrow: #d6dfeb;
  --divider: rgba(129, 138, 148, 0.25);
  --font: 'Brandon Text', 'Helvetica Neue', Arial, sans-serif;
  --content-max: 1512px;
  --gap-grid: 16px;
}
.shm-directory-page, .shm-directory-page * {
  box-sizing: border-box;
}
.shm-directory-page,
.shm-directory-page {
  margin: 0;
  padding: 0;
}
/* Safety net: dark bg on the root so no white shows if content ever overflows. */
html,
body {
  background: var(--night-current);
}
.shm-directory-page {
  background: var(--night-current);
  color: var(--pure-white);
  font-family: var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.shm-directory-page img {
  display: block;
  max-width: 100%;
}
.shm-directory-page a {
  color: inherit;
  text-decoration: none;
}
.shm-directory-page ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* --------------------------------------------------------------------
   Header (desktop) / Mobile Nav (mobile) — toggled via media query
   -------------------------------------------------------------------- */
.shm-directory-page .site-header {
  background: var(--night-current);
  height: 96px;
}
.shm-directory-page .site-header .header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shm-directory-page .logo-desktop {
  display: block;
  height: 14px;
}
.shm-directory-page .logo-desktop img {
  height: 100%;
  width: auto;
}
.shm-directory-page .account-switcher {
  display: none; /* hidden in source design (opacity: 0) */
}
.shm-directory-page .mobile-nav {
  display: none;
  background: var(--night-current);
  height: 75px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
}
.shm-directory-page .menu-trigger {
  width: 30px;
  height: 13.5px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.shm-directory-page .menu-trigger img {
  width: 100%;
  height: 100%;
}
.shm-directory-page .menu-trigger-spacer {
  width: 30px;
  height: 13.5px;
  visibility: hidden;
}
.shm-directory-page .logo-mobile {
  width: 230px;
  height: 17.5px;
}
.shm-directory-page .logo-mobile img {
  width: 100%;
  height: 100%;
}
/* --------------------------------------------------------------------
   Hero / page-header
   -------------------------------------------------------------------- */
.shm-directory-page .hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* --------------------------------------------------------------------
   Right column (hero + filter-dropdown + grid) — top-aligned with sidebar
   -------------------------------------------------------------------- */
.shm-directory-page .content-column {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.shm-directory-page .eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.shm-directory-page .hero h1 {
  margin: 0;
  font-weight: 300;
  font-size: 48px;
  line-height: 58px;
  letter-spacing: -1px;
  color: var(--pure-white);
}
/* --------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------- */
.shm-directory-page .directory-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 80px 80px 0;
}
.shm-directory-page .directory-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
/* Location pages have no sidebar — content column spans full width. */
.shm-directory-page .directory-layout.is-location {
  gap: 0;
}
.shm-directory-page .directory-layout.is-location .content-column {
  width: 100%;
  flex: 1 1 100%;
}
/* --------------------------------------------------------------------
   Sidebar / category filter (desktop)
   -------------------------------------------------------------------- */
.shm-directory-page .sidebar {
  flex: 0 0 300px;
  width: 300px;
  position: sticky;
  top: 80px;
}
.shm-directory-page .sidebar-heading {
  margin: 0 0 38px;
  font-weight: 700;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.shm-directory-page .category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shm-directory-page .category-item {
  display: block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 30px;
  letter-spacing: -0.27px;
  color: var(--muted);
}
.shm-directory-page .category-item:hover {
  color: var(--pure-white);
}
.shm-directory-page .category-item.active {
  background: var(--card-bg);
  color: var(--pure-white);
  letter-spacing: -0.267px;
}
/* mobile-only filter dropdown */
/* mobile-only filter dropdown (custom, scrollable) */
.shm-directory-page .filter-dropdown {
  display: none;
  position: relative;
  width: 100%;
}
.shm-directory-page .filter-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: none;
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--pure-white);
  font-family: var(--font);
  font-size: 16px;
  line-height: normal;
  text-align: left;
  cursor: pointer;
}
.shm-directory-page .filter-toggle img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-left: 12px;
  transition: transform 0.15s ease;
}
.shm-directory-page .filter-dropdown.is-open .filter-toggle img {
  transform: rotate(180deg);
}
.shm-directory-page .filter-menu {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px 0;
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 45vh;          /* cap the height so the list isn't huge */
  overflow-y: auto;          /* scroll inside the panel */
  -webkit-overflow-scrolling: touch;
  background: var(--card-bg);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.shm-directory-page .filter-option {
  padding: 12px 16px;
  color: var(--pure-white);
  font-size: 16px;
  line-height: normal;
  cursor: pointer;
}
.shm-directory-page .filter-option.is-selected {
  color: var(--muted);
}
.shm-directory-page .filter-option:focus {
  outline: none;
}

/* --------------------------------------------------------------------
   Contractor grid + cards
   -------------------------------------------------------------------- */
.shm-directory-page .contractor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-grid);
}
.shm-directory-page .contractor-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.shm-directory-page .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.shm-directory-page .contractor-name {
  margin: 0;
  font-weight: 400;
  font-size: 24px;
  line-height: 30px;
  color: var(--pure-white);
}
.shm-directory-page .badge {
  flex-shrink: 0;
  background: var(--horizon-blue);
  color: var(--pure-white);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
.shm-directory-page .contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 22px;
  color: var(--muted);
}
.shm-directory-page .contact-row .sep {
  width: 1px;
  height: 14px;
  background: var(--divider);
}
.shm-directory-page .contact-row a {
  color: inherit;
  text-decoration: none;
}
.shm-directory-page .contact-row a:hover {
  text-decoration: underline;
}
.shm-directory-page .divider {
  width: 100%;
  height: 1px;
  border: none;
  background: var(--divider);
  margin: 0;
}
.shm-directory-page .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.shm-directory-page .tags .tag {
  /* reset native button styling so the tag looks exactly like the Figma label */
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  font-weight: 500;
  font-size: 12px;
  line-height: inherit;
  color: var(--muted);
  cursor: pointer;
}
.shm-directory-page .tags .tag:focus {
  outline: none;
}
.shm-directory-page .card-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
/* --------------------------------------------------------------------
   Footer (desktop) / Footer (mobile) — toggled via media query
   -------------------------------------------------------------------- */
.shm-directory-page .site-footer {
  background: var(--night-current);
  padding: 66px 80px 44px;
}
.shm-directory-page .site-footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
}
.shm-directory-page .footer-helm {
  width: 76px;
  height: 76px;
}
.shm-directory-page .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
  margin-top: -20px;
}
.shm-directory-page .footer-brand {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.shm-directory-page .footer-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}
.shm-directory-page .footer-socials img {
  width: 24px;
  height: 24px;
}
.shm-directory-page .footer-copy {
  margin: 16px 0 0;
  text-align: right;
  font-size: 12px;
  line-height: 16px;
  color: var(--pure-white);
}
/* Footer legal menu — inline links with | separators, inheriting the
   copyright's 12px. Wrapper is a <div> so the <ul> sits inline legally. */
.shm-directory-page .footer-copy .footer-menu,
.shm-directory-page .footer-copy .footer-menu li {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: inherit;
  line-height: inherit;
}
.shm-directory-page .footer-copy .footer-menu li::before {
  content: "|";
  margin: 0 8px;
  color: var(--pure-white);
}
.shm-directory-page .footer-copy .footer-menu a {
  color: var(--pure-white);
  text-decoration: none;
  font-size: inherit;
}
.shm-directory-page .footer-copy .footer-menu a:hover {
  text-decoration: underline;
}
.shm-directory-page .site-footer-mobile {
  display: none;
  background: var(--night-current);
  padding: 60px 20px 30px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.shm-directory-page .footer-helm-mobile {
  width: 74px;
  height: 74px;
}
.shm-directory-page .footer-mobile-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 35px 0 30px;
}
.shm-directory-page .footer-mobile-socials {
  display: flex;
  align-items: center;
}
.shm-directory-page .footer-mobile-socials a {
  display: flex;
  padding: 0 8px;
}
.shm-directory-page .footer-mobile-socials img {
  width: 20px;
  height: 20px;
}
.shm-directory-page .footer-mobile-brand {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.shm-directory-page .footer-mobile-legal {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--pure-white);
}
.shm-directory-page .footer-mobile-legal .sep {
  color: var(--muted);
  padding: 0 4px;
}
/* Mobile footer legal menu — inline with | separators, year on its own line. */
.shm-directory-page .footer-mobile-year {
  display: block;
}
.shm-directory-page .footer-mobile-legal .footer-mobile-menu,
.shm-directory-page .footer-mobile-legal .footer-mobile-menu li {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: inherit;
  line-height: inherit;
}
.shm-directory-page .footer-mobile-legal .footer-mobile-menu li:not(:first-child)::before {
  content: "|";
  margin: 0 6px;
  color: var(--muted);
}
.shm-directory-page .footer-mobile-legal .footer-mobile-menu a {
  color: var(--pure-white);
  text-decoration: none;
  font-size: inherit;
}
/* ==========================================================================
   Mid-range (tablet / small laptop, 769px–1100px)
   Reduce the heavy 80px padding and fixed sidebar so the 2-column layout
   fits without forcing horizontal overflow (which revealed a white gap on
   the right in the ~768–900px range).
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1100px) {
  .shm-directory-page .site-header .header-inner {
    padding: 0 32px;
  }
  .shm-directory-page .directory-content {
    padding: 48px 32px 0;
  }
  .shm-directory-page .site-footer {
    padding: 48px 32px 44px;
  }
  .shm-directory-page .directory-layout {
    gap: 24px;
  }
  .shm-directory-page .sidebar {
    flex: 0 0 220px;
    width: 220px;
  }
}

/* ==========================================================================
   Responsive breakpoint — Mobile frame (402px reference) below 768px.
   Desktop 2-up grid stays intact above this breakpoint.
   ========================================================================== */

@media (max-width: 768px) {
  .shm-directory-page .site-header {
    display: none;
  }
  .shm-directory-page .mobile-nav {
    display: flex;
  }
  .shm-directory-page .directory-content {
    padding: 48px 20px 0;
  }
  .shm-directory-page .hero {
    gap: 12px;
  }
  .shm-directory-page .eyebrow {
    font-size: 12px;
    line-height: normal;
  }
  .shm-directory-page .hero h1 {
    font-size: 32px;
    line-height: 38.4px;
    letter-spacing: -1.6px;
  }
  .shm-directory-page .directory-layout {
    flex-direction: column;
  }
  .shm-directory-page .content-column {
    gap: 32px;
  }
  .shm-directory-page .sidebar {
    display: none;
  }
  .shm-directory-page .filter-dropdown {
    display: block;
  }
  .shm-directory-page .contractor-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .shm-directory-page .contractor-card {
    border-radius: 4px;
  }
  .shm-directory-page .contractor-name {
    font-size: 20px;
  }
  .shm-directory-page .contact-row {
    gap: 8px 16px;
  }
  .shm-directory-page .site-footer {
    display: none;
  }
  .shm-directory-page .site-footer-mobile {
    display: flex;
  }
}