/* RC5 shared header and footer. Keep this stylesheet layout-neutral outside the site shell. */
:root {
  --rc5-shell-green: #2e7d32;
  --rc5-shell-muted: #526057;
  --rc5-shell-line: #dfe7df;
}

.topbar-row {
  min-height: 76px;
  padding: 12px 0 !important;
  gap: 16px !important;
  flex-wrap: nowrap !important;
}

.brand {
  flex: 0 0 auto;
}

.brand img,
.topbar-row > a:first-child img {
  display: block !important;
  width: 150px !important;
  height: auto !important;
  max-height: 50px !important;
  object-fit: contain !important;
}

.top-nav {
  margin-left: 6px !important;
  gap: clamp(14px, 1.55vw, 24px) !important;
  font-size: .9rem !important;
  white-space: nowrap;
}

.header-actions {
  margin-left: auto !important;
  gap: 10px !important;
  flex-shrink: 0;
}

.rc5-search {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  min-width: 196px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--rc5-shell-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rc5-shell-muted);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.rc5-search:hover,
.rc5-search:focus-visible {
  color: var(--rc5-shell-green);
  border-color: rgba(46, 125, 50, .45);
  box-shadow: 0 8px 22px rgba(25, 48, 31, .08);
}

footer {
  position: relative;
  margin-top: 48px !important;
  padding: 32px 0 20px !important;
  overflow: hidden;
  border-top: 1px solid rgba(46, 125, 50, .16);
  background: linear-gradient(135deg, #f1f8f1 0%, #e5f1e6 58%, #dceadd 100%) !important;
  color: #243b2a !important;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2e7d32 0%, #79a944 58%, #6b4f38 100%);
}

footer > .container {
  width: min(1160px, calc(100% - 32px));
}

footer .footer-grid {
  grid-template-columns: minmax(250px, 1.2fr) minmax(120px, .62fr) minmax(250px, 1fr) minmax(190px, .82fr) !important;
  gap: clamp(22px, 3vw, 44px) !important;
  align-items: start;
}

footer .footer-grid > div:first-child {
  max-width: 330px;
}

footer .inline-31befc1ea171 {
  width: 154px !important;
  height: auto !important;
  margin: 0 0 10px !important;
}

footer .footer-grid > div:first-child p {
  max-width: 34ch;
  margin: 0;
  color: #4a5c4f;
  font-size: .86rem;
  line-height: 1.55;
}

footer .footer-title {
  margin: 4px 0 11px !important;
  color: #2e6f35 !important;
  font-size: .78rem !important;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left !important;
  text-transform: uppercase;
}

footer .footer-list {
  gap: 6px !important;
  text-align: left !important;
}

footer .footer-list a {
  min-height: 24px !important;
  padding-block: 1px;
  color: #314738;
  font-size: .86rem;
  line-height: 1.35;
}

footer .footer-list a:hover {
  color: #1f6f2a !important;
  transform: translateX(2px);
}

footer .footer-grid > div:nth-child(3) .footer-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px !important;
}

footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px !important;
  padding-top: 15px !important;
  border-top-color: rgba(46, 111, 53, .17) !important;
  color: #526458 !important;
  font-size: .78rem !important;
  text-align: left !important;
}

footer .footer-legal {
  gap: 16px;
}

footer .footer-legal a:hover {
  color: #1f6f2a;
}

@media (max-width: 1180px) {
  .rc5-search {
    min-width: 164px;
    padding-inline: 13px;
  }

  .top-nav {
    gap: 14px !important;
    font-size: .85rem !important;
  }
}

@media (max-width: 1024px) {
  .rc5-search,
  .top-nav {
    display: none !important;
  }

  .topbar-row {
    min-height: 66px;
  }
}

@media (max-width: 980px) {
  footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 34px !important;
  }

  footer .footer-grid > div:first-child {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .brand img,
  .topbar-row > a:first-child img {
    width: 128px !important;
    max-height: 44px !important;
  }
}

@media (max-width: 640px) {
  .topbar-row {
    flex-wrap: nowrap !important;
  }
}

@media (max-width: 560px) {
  footer {
    margin-top: 36px !important;
    padding: 28px 0 18px !important;
  }

  footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  footer .footer-grid > div:nth-child(3) .footer-list {
    column-gap: 14px !important;
  }

  footer .footer-bottom {
    align-items: flex-start;
    margin-top: 20px !important;
  }
}

@media (max-width: 480px) {
  .topbar-row {
    min-height: 60px;
    padding: 8px 0 !important;
  }

  .brand img,
  .topbar-row > a:first-child img {
    width: 116px !important;
  }
}

@media (max-width: 380px) {
  .brand img,
  .topbar-row > a:first-child img {
    width: 94px !important;
  }

  .header-actions {
    gap: 4px !important;
  }

  .header-actions > .btn {
    min-height: 38px;
    padding-inline: 9px;
    font-size: .76rem;
  }
}
