/* Shared top navigation for every page. Markup comes from navHtml() in
   scripts/build-service-pages.mjs; the build also inlines this file into
   index.html (between the SITE-NAV-CSS markers) so the homepage keeps zero
   render-blocking stylesheets. Behaviour (mobile menu, scroll collapse) lives
   in assets/site-nav.js. */
html { scroll-padding-top: 84px; }
.site-nav { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,0.06); font-family: 'DM Sans', system-ui, sans-serif; }
.sn-row { max-width: 1200px; margin: 0 auto; padding: 0 32px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sn-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.sn-brand img { width: 40px; height: 40px; object-fit: contain; display: block; }
.sn-brand > span { font-family: 'Source Serif 4', Georgia, serif; font-size: 20px; font-weight: 700; color: #1a2332; letter-spacing: -0.3px; white-space: nowrap; }
.sn-brand em { font-style: italic; font-weight: 600; font-size: 1.06em; color: #b7791f; display: inline-block; transform: rotate(-5deg) translateY(-1px); margin-right: 3px; }
/* "Expert Academic Help" -> "Expert AH" once the page scrolls (site-nav.js). */
.sn-brand .rest { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: bottom; max-width: 130px; opacity: 1; transition: max-width 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease; }
.site-nav.sn-collapsed .sn-brand .rest { max-width: 0; opacity: 0; }

.sn-menu { display: flex; align-items: center; gap: 6px; }
.sn-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: #555; text-decoration: none; padding: 10px 12px; border-radius: 8px; background: none; border: none; cursor: pointer; font-family: inherit; white-space: nowrap; }
.sn-link:hover, .sn-item:focus-within > .sn-link { color: #1a2332; background: rgba(26,35,50,0.04); }
.sn-link .fa-chevron-down { font-size: 10px; transition: transform 0.2s; }
.sn-link[aria-current="page"] { color: #1a2332; font-weight: 600; }

/* Desktop dropdowns: open on hover or keyboard focus, no JS needed. */
.sn-item { position: relative; }
.sn-drop { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px); min-width: 250px; background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 14px; box-shadow: 0 16px 40px rgba(26,35,50,0.12); padding: 10px; opacity: 0; visibility: hidden; transition: opacity 0.15s, transform 0.15s, visibility 0.15s; }
.sn-drop::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* hover bridge */
.sn-item:hover > .sn-drop, .sn-item:focus-within > .sn-drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sn-item:hover > .sn-link .fa-chevron-down, .sn-item:focus-within > .sn-link .fa-chevron-down { transform: rotate(180deg); }
.sn-drop.sn-wide { min-width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; }
.sn-drop a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: #1a2332; font-size: 14px; font-weight: 500; }
.sn-drop a:hover, .sn-drop a:focus-visible { background: #f5f3ef; }
.sn-drop a i { width: 18px; text-align: center; color: #b7791f; font-size: 14px; }
.sn-drop .sn-all { grid-column: 1 / -1; border-top: 1px solid rgba(0,0,0,0.06); margin-top: 6px; padding-top: 12px; border-radius: 0 0 8px 8px; font-weight: 600; color: #2c5282; }
.sn-drop .sn-all i { color: #2c5282; }
.sn-drop small { display: block; font-size: 12px; font-weight: 400; color: #5a6170; }

.sn-quote { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #1a2332; text-decoration: none; padding: 9px 14px; border: 1.5px solid rgba(26,35,50,0.15); border-radius: 8px; margin-left: 6px; white-space: nowrap; cursor: pointer; }
.sn-quote:hover { border-color: #1a2332; }
.sn-quote i { color: #b7791f; }
.sn-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #fff; background: #1a2332; padding: 10px 20px; border-radius: 8px; text-decoration: none; white-space: nowrap; transition: background 0.2s; }
.sn-cta:hover { background: #2c3e50; }
.sn-cta i { font-size: 16px; }
.sn-cta .short { display: none; }
.sn-right { display: flex; align-items: center; gap: 10px; }
.sn-burger { display: none; width: 42px; height: 42px; border: 1.5px solid rgba(26,35,50,0.15); border-radius: 8px; background: #fff; color: #1a2332; font-size: 17px; cursor: pointer; align-items: center; justify-content: center; }
.sn-burger .fa-xmark { display: none; }
.site-nav.sn-open .sn-burger .fa-bars { display: none; }
.site-nav.sn-open .sn-burger .fa-xmark { display: inline; }
.sn-mobile-only { display: none; }

/* Below ~1100px the full bar (about 1060px of content) no longer fits: links
   move into a panel under the bar, opened by the burger. */
@media (max-width: 1100px) {
  .sn-row { padding: 0 16px; }
  .sn-burger { display: inline-flex; }
  .sn-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid rgba(0,0,0,0.08); box-shadow: 0 18px 40px rgba(26,35,50,0.12); padding: 8px 16px 20px; max-height: calc(100vh - 56px); overflow-y: auto; }
  .site-nav.sn-open .sn-menu { display: flex; }
  .sn-link { font-size: 16px; font-weight: 600; color: #1a2332; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid rgba(0,0,0,0.06); justify-content: space-between; width: 100%; }
  .sn-link:hover, .sn-item:focus-within > .sn-link { background: none; }
  .sn-link .fa-chevron-down { display: none; }
  .sn-drop, .sn-drop.sn-wide { position: static; transform: none; opacity: 1; visibility: visible; min-width: 0; border: none; box-shadow: none; padding: 4px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .sn-item:hover > .sn-drop, .sn-item:focus-within > .sn-drop { transform: none; }
  .sn-drop::before { display: none; }
  .sn-drop a { padding: 9px 4px; font-size: 14px; }
  .sn-drop small { display: none; }
  .sn-quote { margin: 16px 0 0; justify-content: center; padding: 13px; font-size: 15px; }
  .sn-mobile-only { display: flex; }
}
@media (max-width: 600px) {
  .sn-row { height: 56px; }
  .sn-brand { gap: 8px; }
  .sn-brand img { width: 28px; height: 28px; }
  .sn-brand > span { font-size: 15px; }
  .sn-brand .rest { display: none; }
  .sn-cta { padding: 8px 12px; gap: 6px; }
  .sn-cta .full { display: none; }
  .sn-cta .short { display: inline; }
  .sn-burger { width: 38px; height: 38px; }
  .sn-drop, .sn-drop.sn-wide { grid-template-columns: 1fr; }
}
