/**
 * Sticky site header — works with Elementor Theme Builder header or .ates-site-header markup
 */

.ates-topbar {
  background: var(--ates-brand-green-dark, #034b35);
  color: #fff;
  font-size: 0.875rem;
}

.ates-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 38px;
  flex-wrap: wrap;
}

.ates-topbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.ates-topbar__contact {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.ates-site-header,
body.ates-pen-body .elementor-location-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ates-site-header__bar,
.ates-site-header .ates-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--ates-header-height);
  padding-inline: var(--ates-site-gutter);
  background: #ffffff;
  border-bottom: 1px solid var(--ates-brand-border);
  box-shadow: var(--ates-shadow-header);
}

.ates-site-header.is-scrolled .ates-site-header__bar,
.ates-site-header.is-scrolled .ates-header-inner {
  min-height: calc(var(--ates-header-height) - 8px);
  box-shadow: 0 4px 20px rgba(15, 26, 20, 0.08);
}

.ates-site-header__logo img,
.ates-site-header .custom-logo {
  display: block;
  height: auto;
  max-height: 52px;
  width: auto;
}

@media (max-width: 1023px) {
  .ates-site-header__logo img,
  .ates-site-header .custom-logo {
    max-height: 44px;
  }
}

.ates-site-header__nav .ates-nav,
.ates-site-header__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
}

.ates-site-header__nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ates-site-header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .ates-site-header__nav {
    display: flex;
  }
}

.ates-site-header__nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--ates-font-ui);
  color: var(--ates-text-primary);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.ates-site-header__nav a:hover,
.ates-site-header__nav a[aria-current="page"] {
  background: var(--ates-brand-green-muted);
  color: var(--ates-brand-green);
}

.ates-site-header__cta {
  display: none;
}

@media (min-width: 1024px) {
  .ates-site-header__cta {
    display: inline-flex;
  }
}

.ates-site-header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ates-brand-green);
  cursor: pointer;
}

.ates-site-header__menu-btn:hover,
.ates-site-header__menu-btn:focus-visible {
  background: var(--ates-brand-surface);
}

@media (min-width: 1024px) {
  .ates-site-header__menu-btn {
    display: none;
  }
}

/* Offset main content below sticky header in non-Elementor templates */
body.ates-pen-body:not(.elementor-default) main,
body.ates-pen-body .ates-main-offset {
  scroll-margin-top: calc(var(--ates-header-stack) + 1rem);
}

.ates-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  min-height: var(--ates-topbar-height);
  padding-inline: var(--ates-site-gutter);
  font-size: 0.8125rem;
  font-family: var(--ates-font-ui);
  color: #fff;
  background: var(--ates-brand-dark);
}

@media (min-width: 1024px) {
  .ates-topbar {
    display: flex;
  }

  :root {
    --ates-header-stack: calc(var(--ates-header-height) + var(--ates-topbar-height));
  }
}

.ates-topbar a {
  color: #fff;
  text-decoration: none;
  opacity: 0.92;
}

.ates-topbar a:hover {
  opacity: 1;
  color: var(--ates-brand-green-muted);
}