/* Brand serif for the name and tagline (must stay at the very top) */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,600;1,8..60,400&display=swap');

/* ===== BRADEN HEADER: stays on top, see-through, bigger logo, hamburger + Book button ===== */

/* The bar */
#masthead.site-header {
  position: sticky !important;
  top: 0;
  z-index: 1000;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 14px 32px !important;
  box-sizing: border-box;
  background: rgba(24, 28, 29, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-bar #masthead.site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #masthead.site-header { top: 46px; } }

/* Logo, site name and tagline */
#masthead .site-branding {
  display: grid !important;
  grid-template-columns: auto auto;
  column-gap: 20px;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
#masthead .site-logo { grid-row: 1 / span 2; margin: 0 !important; }
#masthead .site-logo img,
#masthead .custom-logo {
  height: 64px !important;
  width: auto !important;
  max-height: none !important;
  max-width: none !important;
}
#masthead .site-title,
#masthead .site-description {
  grid-column: 2;
  margin: 0 !important;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  text-align: left !important;
}
#masthead .site-title { align-self: end; font-size: 18px; line-height: 1.3; }
#masthead .site-description { align-self: start; font-size: 14px; line-height: 1.35; opacity: 0.85; }

/* Menu area: Book a Field Visit button + hamburger */
#site-navigation.main-navigation {
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
}
#site-navigation > div {
  display: block !important;
  order: 1;
  background: transparent !important;
  box-shadow: none !important;
}
#site-navigation .main-menu {
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  background: transparent !important;
  box-shadow: none !important;
}
#site-navigation .main-menu > li {
  display: none !important;
  margin: 0 !important;
  background: transparent !important;
}
#site-navigation .main-menu > li:last-child { display: block !important; }
#site-navigation .main-menu > li::before,
#site-navigation .main-menu > li::after,
#site-navigation .main-menu > li > a::before,
#site-navigation .main-menu > li > a::after { display: none !important; }
#site-navigation .main-menu > li > a {
  text-decoration: none !important;
  border: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
#site-navigation .main-menu > li:last-child > a {
  display: inline-block !important;
  background: #f3f4f4 !important;
  color: #1f2325 !important;
  padding: 10px 18px !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

/* Hamburger button */
#toggle-menu,
#toggle-menu:hover,
#toggle-menu:focus,
#toggle-menu:active {
  color: #f3f4f4 !important;
  background: transparent !important;
}
#toggle-menu {
  display: inline-flex !important;
  order: 2;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
  color: #f3f4f4 !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 4px;
  cursor: pointer;
}
#toggle-menu .dropdown-icon { display: none !important; }
#toggle-menu::before {
  content: "" !important;
  display: block !important;
  width: 20px !important;
  height: 14px !important;
  background:
    linear-gradient(#f3f4f4, #f3f4f4) top / 100% 2px no-repeat,
    linear-gradient(#f3f4f4, #f3f4f4) center / 100% 2px no-repeat,
    linear-gradient(#f3f4f4, #f3f4f4) bottom / 100% 2px no-repeat !important;
}
#toggle:checked + #toggle-menu::before {
  content: "\00d7" !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  color: #f3f4f4 !important;
  font-size: 28px !important;
  line-height: 1 !important;
}
#toggle:focus + #toggle-menu { outline: 2px solid #329855; outline-offset: 2px; }

/* Open menu: a dropdown panel under the hamburger */
#toggle:checked ~ div .main-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 32px;
  left: auto;
  width: 300px;
  flex-direction: column;
  gap: 0 !important;
  text-align: left !important;
  padding: 10px 24px 22px !important;
  background: rgba(24, 28, 29, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45) !important;
}
#toggle:checked ~ div .main-menu > li { display: block !important; }
#toggle:checked ~ div .main-menu > li > a {
  display: block !important;
  padding: 13px 0 !important;
  color: #f3f4f4 !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
#toggle:checked ~ div .main-menu > li > a:hover { color: #329855 !important; }
#toggle:checked ~ div .main-menu > li:nth-last-child(2) > a { border-bottom: 0 !important; }
#toggle:checked ~ div .main-menu > li:last-child > a {
  margin-top: 12px;
  padding: 12px 18px !important;
  text-align: center;
  border-bottom: 0 !important;
  border-radius: 6px !important;
  color: #1f2325 !important;
}
#toggle:checked ~ div .main-menu > li:last-child > a:hover { color: #1f2325 !important; background: #ffffff !important; }

/* Homepage: the footer is placed in the page itself, so hide the theme's copy there */
.home #block-2 { display: none !important; }

/* Footer jump links land below the header */
h2[id], h3[id] { scroll-margin-top: 110px; }

/* Smaller screens */
@media (max-width: 1000px) {
  #masthead .site-description { display: none; }
  #masthead .site-title { align-self: center; }
}
@media (max-width: 640px) {
  #masthead.site-header { padding: 10px 16px !important; flex-wrap: nowrap; gap: 10px; }
  #masthead .site-logo img,
  #masthead .custom-logo { height: 30px !important; }
  #masthead .site-title { display: none; }
  #site-navigation.main-navigation { gap: 8px; }
  #site-navigation .main-menu > li:last-child > a { padding: 8px 10px !important; font-size: 13px !important; }
  #toggle-menu { width: 40px; height: 36px; }
  #toggle:checked ~ div .main-menu { right: 16px; left: 16px; width: auto; }
}
@media (max-width: 360px) {
  #masthead .site-logo img,
  #masthead .custom-logo { height: 24px !important; }
}
/* ===== end BRADEN HEADER ===== */

/* ===== PHONE FIX: logo on the left, button + hamburger on the right, nothing overlapping ===== */
@media (max-width: 640px) {
  #masthead.site-header {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  #masthead .site-branding {
    display: block !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    position: static !important;
    border: 0 !important;
  }
  #masthead .site-logo { display: block !important; }
  #masthead .site-logo img,
  #masthead .custom-logo {
    height: 30px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain;
  }
  #site-navigation.main-navigation {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 0 0 auto !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  #site-navigation > div {
    width: auto !important;
    position: static !important;
    border: 0 !important;
    outline: 0 !important;
  }
  #site-navigation .main-menu { width: auto; }
  #site-navigation .main-menu > li:last-child > a { white-space: nowrap !important; }
}
@media (max-width: 400px) {
  #masthead .site-logo img,
  #masthead .custom-logo { height: 24px !important; }
  #site-navigation .main-menu > li:last-child > a { padding: 8px 9px !important; font-size: 12.5px !important; }
}
/* ===== end PHONE FIX ===== */

/* ===== PHONE: Book button only inside the hamburger, bigger logo ===== */
@media (max-width: 640px) {
  #site-navigation .main-menu > li:last-child { display: none !important; }
  #toggle:checked ~ div .main-menu > li:last-child { display: block !important; }
  #masthead .site-logo img,
  #masthead .custom-logo { height: 50px !important; }
}
@media (max-width: 400px) {
  #masthead .site-logo img,
  #masthead .custom-logo { height: 46px !important; }
}
@media (max-width: 340px) {
  #masthead .site-logo img,
  #masthead .custom-logo { height: 40px !important; }
}
/* ===== end ===== */

/* ===== BOOK A FIELD VISIT BUTTONS: light button with a green arrow ===== */
#site-navigation .main-menu > li:last-child > a:hover { background: #ffffff !important; color: #1f2325 !important; }
.wp-block-button .wp-block-button__link,
.wp-block-button__link {
  background: #f3f4f4 !important;
  color: #1f2325 !important;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 16px 32px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background .15s ease;
}
.wp-block-button__link::after { content: "\00a0\00a0\2192"; color: #329855; }
.wp-block-button__link:hover,
.wp-block-button__link:focus { background: #ffffff !important; color: #1f2325 !important; }
/* ===== end BUTTONS ===== */

/* ===== NAME + TAGLINE IN THE BRAND SERIF ===== */
#masthead .site-title,
#masthead .site-title a {
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-weight: 600 !important;
  font-size: 20px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
}
#masthead .site-description {
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-style: italic !important;
  font-size: 15px !important;
}
/* ===== end SERIF ===== */

/* ===== HOMEPAGE: header floats over the top photo from the very start ===== */
.home #content,
.home .site-content,
.home .site-main,
.home .site-main > article,
.home .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.home .entry-content > .wp-block-cover:first-child { margin-top: 0 !important; }
.home #masthead.site-header { margin-bottom: -93px !important; }
@media (max-width: 640px) {
  .home #masthead.site-header { margin-bottom: -71px !important; }
}
/* ===== end HOMEPAGE HEADER ===== */