/* ============================================================
   site.css - shared shell + header for all MVPartner AI pages
   Single source of truth: edit tokens / nav / header / dropdown HERE.
   Page-specific styles remain inline in each page.
   ============================================================ */

:root { --navy: #0B1D3D; --gold: #D4AF37; --silver: #A6AEB6; --light: #F2F4F7; --white: #FFFFFF; --text: #111827; --muted: #5B6472; --line: #E2E7EE; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Montserrat, Inter, Arial, sans-serif; color: var(--text); background: var(--white); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
site-nav header { background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 24px; }
.logo { display: block; max-width: 210px; height: auto; }
nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 650; color: var(--navy); }
.nav-toggle { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy); color: var(--white); border: 1px solid var(--navy); border-radius: 6px; padding: 13px 22px; font-weight: 700; font-size: 14px; transition: 0.2s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11, 29, 61, 0.15); }
.button.secondary { background: var(--white); color: var(--navy); border-color: var(--gold); }
.cta .button { background: var(--gold); color: var(--navy); border-color: var(--gold); }
@media (max-width: 900px) {
  .container { width: min(100% - 32px, 720px); }
  site-nav header { position: relative; }
  nav { display: none; }
  .nav { justify-content: center; padding: 14px 0; }
  .logo { max-width: 185px; }
  .button { width: 100%; padding: 15px 20px; }
}
@media (min-width: 901px) {
  html, body { overflow-x: clip; }
  .container { width: min(100% - 72px, 1180px) !important; margin-left: auto !important; margin-right: auto !important; }
}
@media (min-width: 901px) and (max-width: 1120px) {
  .container { width: min(100% - 52px, 1060px) !important; }
}
@media (max-width: 900px) {
  html, body { max-width: 100%; overflow-x: clip; }
  site-nav header { position: relative !important; }
  .container { width: min(100% - 28px, 720px) !important; }
  .nav { justify-content: flex-start !important; padding: 10px 0 !important; min-height: 58px !important; }
  .logo { max-width: 150px !important; width: 150px !important; height: auto !important; }
  nav { display: none !important; }
  .button { width: 100% !important; min-height: 52px !important; padding: 14px 18px !important; }
}
@media (max-width: 460px) {
  .container { width: calc(100% - 24px) !important; }
  .logo { max-width: 136px !important; width: 136px !important; }
}
.nav-item.has-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-trigger { font: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: var(--navy); font-size: 14px; font-weight: 650; }
.nav-trigger .caret { font-size: 10px; line-height: 1; transition: transform .2s ease; }
.has-dropdown:hover .caret, .has-dropdown:focus-within .caret { transform: rotate(180deg); }
.dropdown-menu { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-6px); display: flex; flex-direction: column; min-width: 184px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 30px rgba(11,29,61,0.12); padding: 8px; gap: 2px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 30; }
.dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-dropdown:hover .dropdown-menu, .has-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.dropdown-menu a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; transition: background .15s ease, color .15s ease; }
.dropdown-menu a:hover { background: var(--light); color: var(--navy); }
.nav-trigger:focus-visible, .dropdown-menu a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .caret, .dropdown-menu { transition: none; }
}

/* custom element wrapper for the shared nav (see nav.js) */
site-nav { display: block; min-height: 82px; }
@media (max-width: 900px) { site-nav { min-height: 58px; } }

/* ---- mobile menu (hamburger) — only active below 900px ---- */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; margin: 0;
    background: none; border: 0; cursor: pointer; color: var(--navy);
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    content: ""; display: block; width: 24px; height: 2px;
    background: currentColor; border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease, background .2s ease;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before { position: absolute; left: 0; top: -7px; }
  .nav-toggle__bars::after  { position: absolute; left: 0; top: 7px; }
  header.nav-open .nav-toggle__bars { background: transparent; }
  header.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  header.nav-open .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

  .nav { justify-content: space-between !important; }

  /* nav is collapsed by default (existing rules); expands as a panel when open */
  header.nav-open nav {
    display: flex !important; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(11, 29, 61, 0.10);
    padding: 6px 20px 18px; z-index: 40;
  }
  header.nav-open nav > a:not(.button),
  header.nav-open .nav-trigger {
    width: 100%; text-align: left; justify-content: space-between;
    font-size: 16px; font-weight: 600; color: var(--navy);
    padding: 15px 2px; border-bottom: 1px solid var(--line);
  }
  header.nav-open .caret { display: none; }
  header.nav-open .nav-item.has-dropdown { display: block; width: 100%; }
  /* Resources sub-links shown inline (no hover on touch) */
  header.nav-open .dropdown-menu {
    position: static; opacity: 1; visibility: visible; pointer-events: auto;
    transform: none; min-width: 0; border: 0; border-radius: 0;
    box-shadow: none; padding: 0 0 0 14px; gap: 0;
  }
  header.nav-open .dropdown-menu::before { display: none; }
  header.nav-open .dropdown-menu a {
    padding: 13px 2px; border-bottom: 1px solid var(--line);
    font-size: 15px; color: var(--muted);
  }
  header.nav-open .button { width: 100% !important; margin-top: 14px; }
}
