/* =========================================================
   layout.css
   Global layout only: containers, header, footer, shared spacing.
   ========================================================= */

.container {
  width: min(100% - 32px, 1160px);
  margin-inline: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button {
  color: var(--white);
  background: var(--dark-green);
}

.primary-button:hover,
.primary-button:focus-visible {
  color: var(--white);
  background: var(--green);
}

.secondary-button {
  color: var(--dark-green);
  background: var(--white);
  border-color: var(--dark-green);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.top-bar {
  color: var(--white);
  background: var(--dark-green);
  font-size: 0.9rem;
}

.top-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding-block: 8px;
  text-align: center;
}

.top-bar a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-row {
  overflow: visible;
}

.nav-inner {
  position: relative;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo-link {
  position: relative;
  flex: 0 0 180px;
  width: 180px;
  height: 74px;
  z-index: 3;
}

.logo-link img {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 190px;
  max-width: none;
  max-height: 96px;
  object-fit: contain;
}

.menu-toggle {
  display: inline-grid;
  place-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}

.menu-toggle span:not(.screen-reader-text) {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark-green);
}

.site-nav {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% + 8px);
  display: grid;
  gap: 4px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(38, 50, 41, 0.16);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.site-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--dark-green);
  background: var(--soft-green);
}

.header-button {
  display: none;
}

.site-footer {
  padding-block: 46px 88px;
  color: rgba(255,255,255,0.82);
  background: #23382e;
}

.footer-inner {
  display: grid;
  gap: 24px;
}

.footer-logo img {
  width: 190px;
}

.footer-details {
  display: grid;
  gap: 8px;
}

.footer-details p,
.footer-small {
  margin: 0;
}

.site-footer a {
  color: var(--white);
  font-weight: 700;
}

.mobile-call {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  padding: 12px 18px;
  color: var(--white);
  background: var(--dark-green);
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(38, 50, 41, 0.25);
}

@media (min-width: 900px) {
  .nav-inner {
    min-height: 82px;
  }

  .logo-link {
    flex-basis: 230px;
    width: 230px;
    height: 82px;
  }

  .logo-link img {
    bottom: -12px;
    width: 245px;
    max-height: 118px;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 8px 10px;
  }

  .header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    color: var(--white);
    background: var(--dark-green);
    border-radius: 999px;
    font-weight: 700;
  }

  .footer-inner {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }

  .footer-small {
    grid-column: 1 / -1;
  }

  .mobile-call {
    display: none;
  }
}
