/* ===========================================
   Top Cut Gardens — HEADER (shared across pages)
   =========================================== */

/* Sticky, consistent header wrapper on desktop/tablet */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #f3f3f3; /* matches brand background */
  border-bottom: 1px solid #e5e7eb;
}

/* --- Banner with logo --- */

.header__banner {
  width: 100%;
  background: #f3f3f3;
  border-top: 4px solid #0f172a; /* thick outer line */
  border-bottom: 1px solid #0f172a; /* thin inner line */
  padding: 10px 0;
  text-align: center;
}

.header__banner .logo {
  display: inline-block;
  line-height: 0;
}

.header__banner img {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: auto;
}

/* --- Nav bar below banner --- */

header.site-header .nav {
  background: #f3f3f3;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 0;
}

/* Desktop / default layout: horizontal row */
header.site-header .nav__list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap; /* allows wrapping on smaller widths */
}

header.site-header .nav__list a {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  font-size: 1.05rem;
}

header.site-header .nav__list a:hover {
  color: #15803d;
  text-decoration: underline;
}

/* Contact button */
header.site-header .nav__list .btn--primary {
  background: #064b1f; /* brand green */
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  border: 2px solid transparent;
  margin: 4px 0;
  display: inline-block;
}

header.site-header .nav__list .btn--primary:hover {
  background: #15803d;
}

/* ---------- MOBILE LAYOUT ---------- */

@media (max-width: 640px) {
  /* Don't stick the massive header on phones */
  header.site-header {
    position: static;
    top: auto;
  }

  /* Slightly tighter nav padding + move down a bit */
  header.site-header .nav {
    padding: 6px 0 8px;
    margin-top: 8px; /* 👈 Add this line */
  }

  /* Keep links in a row that wraps, not a huge column */
  header.site-header .nav__list {
    flex-direction: row; /* row layout */
    flex-wrap: wrap; /* wrap onto new lines */
    justify-content: center;
    gap: 8px 16px; /* tighter vertical/horizontal gaps */
    padding: 4px 0 6px;
  }

  header.site-header .nav__list a {
    font-size: 0.95rem;
  }

  header.site-header .nav__list .btn--primary {
    margin-top: 4px;
  }
}

/* Make sure hero starts tight under header */
header.site-header + .hero {
  margin-top: 0;
}

/* Back-to-top (shared) */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
  color: #fff;
  background: #064b1f;
  border: 1px solid #043517;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  z-index: 1000;

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.back-to-top:hover {
  background: #0a6b2a;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    font-size: 30px;
  }
}
