/* Shared header/footer/FAQ-search chrome for every public-facing page
   (landing.php and everything linked from its header/footer: about.php,
   product.php, contact.php, training.php, terms.php, privacy.php) - one
   file so all of them stay visually identical instead of drifting the way
   6 copy-pasted <style> blocks inevitably would. Rendered via the matching
   markup in includes/site_chrome.php - see render_site_header()/
   render_site_footer(). Landing-page-only sections (hero, pricing cards,
   features grid, dismissible demo bar) stay in landing.php's own <style>
   block, not here. */
:root { --green: #217346; --green-d: #1a5c38; --green-l: #e6f0ea; }

/* ===== Two-tier header ===== */
.util-bar { background: var(--green-d); color: #fff; padding: 8px 32px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.util-search-btn { background: none; border: none; color: #fff; cursor: pointer; display: flex; align-items: center; padding: 4px; opacity: .9; }
.util-search-btn:hover { opacity: 1; }
.util-actions { display: flex; gap: 8px; }
.util-actions a { background: #fff; color: var(--green-d); padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; text-decoration: none; }
header.main-nav { background: #fff; padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 250; transition: padding .25s ease, box-shadow .25s ease; }
header.main-nav.scrolled { padding: 8px 32px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
header.main-nav .brand { display: flex; align-items: center; flex-shrink: 0; }
header.main-nav .brand img { height: 26px; width: auto; transition: height .25s ease; }
header.main-nav.scrolled .brand img { height: 20px; }
header.main-nav nav { display: flex; align-items: center; }
header.main-nav nav a { color: #1f2937; text-decoration: none; margin-left: 22px; font-size: 14px; font-weight: 600; white-space: nowrap; background: none; border: none; cursor: pointer; font-family: inherit; }
header.main-nav nav a.cta { background: var(--green); color: #fff; padding: 9px 20px; border-radius: 999px; }
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 30px; height: 30px; background: transparent; border: none; cursor: pointer; padding: 0; }
.nav-burger span { display: block; height: 2px; background: #1f2937; border-radius: 2px; }
.nav-close { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 700px) {
  .util-bar { padding: 7px 16px; }
  .util-actions a { padding: 5px 12px; font-size: 11px; }
  header.main-nav { padding: 12px 16px; }
  header.main-nav .brand img { height: 20px; }
  .nav-burger { display: inline-flex; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 190; }
  .nav-backdrop.open { opacity: 1; pointer-events: auto; }
  header.main-nav nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: 78vw; max-width: 300px;
    background: var(--green-d); flex-direction: column; align-items: stretch;
    padding: 64px 22px 24px; gap: 2px;
    transform: translateX(100%); transition: transform .25s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,.3); z-index: 195;
  }
  header.main-nav nav.open { transform: translateX(0); }
  header.main-nav nav a { color: #fff; margin-left: 0; padding: 13px 6px; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 15px; text-align: left; }
  header.main-nav nav a.cta { text-align: center; margin-top: 14px; border-radius: 6px; }
  .nav-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 14px; right: 16px; width: 34px; height: 34px;
    background: rgba(255,255,255,.14); border: none; border-radius: 8px; cursor: pointer;
  }
  .nav-close:hover { background: rgba(255,255,255,.26); }
  .nav-close span { position: absolute; width: 16px; height: 2px; background: #fff; border-radius: 2px; }
  .nav-close span:first-child { transform: rotate(45deg); }
  .nav-close span:last-child { transform: rotate(-45deg); }
}

/* ===== Footer ===== */
footer.bottom { background: #111827; color: #9ca3af; padding: 48px 32px 20px; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand img { height: 30px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand .segments { font-size: 13px; line-height: 2.1; color: #fff; }
.footer-links-group { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.footer-col a { display: block; color: #9ca3af; text-decoration: none; font-size: 13px; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-bottom-bar { max-width: 1100px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid #374151; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.footer-bottom-bar a { color: #9ca3af; }
.footer-bottom-bar a:hover { color: #fff; }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: #9ca3af; display: flex; }
.footer-social a:hover { color: #fff; }

/* ===== FAQ search modal ===== */
.faq-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500; align-items: flex-start; justify-content: center; padding: 8vh 20px; }
.faq-modal-backdrop.open { display: flex; }
.faq-modal { background: #fff; border-radius: 10px; max-width: 600px; width: 100%; max-height: 78vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.faq-modal-header { padding: 14px 16px; border-bottom: 1px solid #e5e7eb; display: flex; gap: 10px; align-items: center; }
.faq-modal-header input { flex: 1; border: 1px solid #d1d5db; border-radius: 6px; padding: 9px 12px; font-size: 14px; font-family: inherit; }
.faq-modal-header input:focus { outline: none; border-color: var(--green); }
.faq-modal-close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: #6b7280; padding: 2px 6px; }
.faq-modal-body { overflow-y: auto; padding: 6px 8px; }
.faq-item { border-bottom: 1px solid #f3f4f6; }
.faq-item button.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 12px 10px; font-weight: 600; cursor: pointer; font-size: 14px; color: #1f2937; font-family: inherit; }
.faq-item .faq-a { padding: 0 10px 12px; color: #4b5563; font-size: 13px; line-height: 1.6; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-no-results { padding: 24px 12px; text-align: center; color: #9ca3af; font-size: 13px; }
