/*
 * Compact-site header contract.
 * This file must contain header rules only. Never add hero or page content here.
 */
body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a,
body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:last-child > a {
  font-size: 18px !important;
  line-height: 1.15 !important;
  font-weight: 330 !important;
}

body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:last-child > a {
  font-weight: 400 !important;
}

body.hg-compact-site .hg-site-nav--desktop {
  transform: translateY(1px) !important;
}

body.hg-compact-site .hg-site-header__ig,
body.hg-compact-site .hg-site-header__ig svg,
body.hg-compact-site .hg-site-header__ig img {
  color: var(--hgc-brown) !important;
}

@media (min-width: 768px) {
  body.hg-compact-site .hg-site-header__ig svg :is(rect, circle, path) {
    stroke-width: 1.25 !important;
  }

  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li > a,
  body.hg-compact-site .hg-site-header__ig {
    transition: color .22s ease, background-color .22s ease, border-color .22s ease,
      box-shadow .22s ease, transform .22s ease !important;
  }

  body.hg-compact-site .hg-site-header__ig {
    border-radius: 50% !important;
  }

  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a {
    position: relative !important;
  }

  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a::after {
    position: absolute;
    right: 8%;
    bottom: -7px;
    left: 8%;
    height: 1.5px;
    background: #876A52;
    content: '';
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .22s ease;
  }

  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a:hover,
  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a:focus-visible,
  body.hg-compact-site .hg-site-header__ig:hover,
  body.hg-compact-site .hg-site-header__ig:focus-visible {
    color: #876A52 !important;
    transform: translateY(-1px) !important;
  }

  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a:hover,
  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a:focus-visible {
    transform: translateY(-1px) !important;
  }

  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a:hover::after,
  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:not(:last-child) > a:focus-visible::after {
    transform: scaleX(1);
  }

  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:last-child > a:hover,
  body.hg-compact-site .hg-site-nav--desktop .hg-site-nav__menu > li:last-child > a:focus-visible {
    color: var(--hgc-paper, #FFFCFA) !important;
    background-color: #98775D !important;
    border-color: #98775D !important;
    box-shadow: 0 6px 16px rgba(77, 52, 32, .18) !important;
    transform: translateY(-1px) !important;
  }

  body.hg-compact-site .hg-site-header__ig:hover,
  body.hg-compact-site .hg-site-header__ig:focus-visible {
    background-color: rgba(135, 106, 82, .1) !important;
    box-shadow: 0 0 0 6px rgba(135, 106, 82, .1) !important;
  }
}

@media (max-width: 767px) {
  body.hg-compact-site .hg-site-nav--drawer a {
    font-size: 18px !important;
    font-weight: 330 !important;
  }

  body.hg-compact-site .hg-site-nav--drawer .hg-site-nav__menu > li:last-child > a {
    font-weight: 400 !important;
  }
}

/* Keep the editing toolbar from covering the navigation in WordPress previews. */
.admin-bar .hg-site-header {top:32px;}
@media(max-width:782px){.admin-bar .hg-site-header {top:46px;}}

/* Use the compact navigation before desktop links can collide with the logo. */
@media (max-width: 1023px) {
  body.hg-compact-site .hg-site-header,
  body.hg-compact-site .hg-site-header__inner {
    min-height: 64px !important;
  }
  body.hg-compact-site .hg-site-header__inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px 24px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 16px !important;
  }
  body.hg-compact-site .hg-site-header__logo,
  body.hg-compact-site .hg-site-header__logo img {
    width: clamp(136px, 16vw, 160px) !important;
    max-width: clamp(136px, 16vw, 160px) !important;
  }
  body.hg-compact-site .hg-site-nav--desktop,
  body.hg-compact-site .hg-site-header__ig {
    display: none !important;
  }
  body.hg-compact-site .hg-site-header__mobile-tools {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 16px !important;
    margin-left: 0 !important;
    min-width: 0 !important;
  }
  body.hg-compact-site .hg-site-drawer { display: block !important; }
}

/* Keep the frontend editing toolbar on one row without clipping dropdowns. */
@media (min-width: 783px) and (max-width: 1279px) {
  #wpadminbar #wp-admin-bar-customize,
  #wpadminbar #wp-admin-bar-comments,
  #wpadminbar #wp-admin-bar-rank-math { display: none !important; }
  #wpadminbar #wp-admin-bar-site-name > .ab-item,
  #wpadminbar #wp-admin-bar-my-account > .ab-item {
    display: block;
    max-width: 200px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (min-width: 783px) and (max-width: 1023px) {
  #wpadminbar #wp-admin-bar-elementor_edit_page { display: none !important; }
}

@media (max-width: 1023px) {
  body.hg-compact-site .hg-site-header__mobile-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--hgc-brown);
    color: #fff !important;
    font-size: 12px;
    line-height: 1;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
  }
  body.hg-compact-site .hg-site-header__toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: var(--hgc-brown) !important;
    box-shadow: none !important;
    cursor: pointer;
  }
  body.hg-compact-site .hg-site-header__toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
  }
  body.hg-compact-site .hg-site-header__toggle:focus-visible {
    outline: 2px solid var(--hgc-brown) !important;
    outline-offset: 4px;
  }
  body.hg-compact-site .hg-site-nav--drawer a {
    font-size: 18px !important;
    font-weight: 330 !important;
  }
  .admin-bar .hg-site-drawer { top: 32px; }
}
@media (max-width: 782px) {
  .admin-bar .hg-site-drawer { top: 46px; }
}

/* Inline-block baselines must not extend the toolbar row on phones. */
#wpadminbar #wp-admin-bar-my-account > .ab-item { display: block; }
