/* Shared header, menu and footer for every page.
   Written into each page by tools/build-nav.py - edit the menu there, not in the pages. */

.fd-header {
  --fd-bg: #1a1a18;
  --fd-ink: #f7f5ef;
  --fd-soft: rgba(247,245,239,0.72);
  --fd-accent: #c8500a;
  --fd-accent-dark: #8f3506;
  --fd-accent-bright: #e8a060;
  --fd-panel: #ffffff;
  --fd-panel-ink: #1a1a18;
  --fd-panel-soft: #4a4a44;
  --fd-line: rgba(26,26,24,0.12);
  position: sticky; top: 0; z-index: 1000;
  background: var(--fd-bg); color: var(--fd-ink);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.4;
}
.fd-header *, .fd-footer * { box-sizing: border-box; }
.fd-bar { position: relative; display: flex; align-items: center; gap: 1.25rem; padding: 0.85rem 2rem; max-width: 1400px; margin: 0 auto; }
.fd-logo { font-family: 'Fraunces', Georgia, serif; font-size: 1.35rem; font-weight: 700; color: var(--fd-ink) !important; text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; margin-right: auto; }
.fd-logo span { color: var(--fd-accent-bright); }

.fd-menu { list-style: none; display: flex; align-items: center; gap: 0.25rem; margin: 0; padding: 0; }
.fd-item { position: relative; list-style: none; }
.fd-top { display: inline-flex; align-items: center; gap: 0.3rem; background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.92rem; color: var(--fd-soft) !important; text-decoration: none; padding: 0.55rem 0.7rem; border-radius: 6px; }
.fd-top:hover, .fd-item.fd-open > .fd-top, .fd-top[aria-current="page"] { color: var(--fd-ink) !important; background: rgba(255,255,255,0.07); }
.fd-top svg { width: 12px; height: 12px; transition: transform 0.2s; }
.fd-item.fd-open > .fd-top svg { transform: rotate(180deg); }

.fd-drop { display: none; position: absolute; top: calc(100% + 0.5rem); left: 0; background: var(--fd-panel); color: var(--fd-panel-ink); border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,0.25); padding: 1.25rem 1.4rem; min-width: 260px; }
.fd-drop::before { content: ''; position: absolute; top: -0.9rem; left: 0; right: 0; height: 0.9rem; }
@media (hover: hover) and (min-width: 1081px) {
  .fd-item:hover > .fd-drop, .fd-item:focus-within > .fd-drop { display: block; }
  .fd-item:hover > .fd-mega, .fd-item:focus-within > .fd-mega { display: grid; }
}
.fd-item-mega { position: static; }
.fd-mega { top: calc(100% - 0.35rem); left: 50%; transform: translateX(-50%); width: min(920px, calc(100vw - 3rem)); display: none; grid-template-columns: repeat(4, 1fr); gap: 1.25rem 1.75rem; }
.fd-item.fd-open > .fd-drop { display: block; }
.fd-item.fd-open > .fd-mega { display: grid; }
.fd-two { min-width: 420px; }
.fd-item.fd-open > .fd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.75rem; }
@media (hover: hover) and (min-width: 1081px) { .fd-item:hover > .fd-two, .fd-item:focus-within > .fd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.75rem; } }
.fd-col-title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fd-accent); margin: 0 0 0.5rem; }
.fd-links { list-style: none; margin: 0; padding: 0; }
.fd-links li { list-style: none; margin: 0; padding: 0; }
.fd-links a { display: block; padding: 0.32rem 0; font-size: 0.9rem; color: var(--fd-panel-ink) !important; text-decoration: none; }
.fd-links a:hover { color: var(--fd-accent) !important; }
.fd-all { grid-column: 1 / -1; border-top: 1px solid var(--fd-line); padding-top: 0.85rem; margin-top: 0.25rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.fd-all a { font-size: 0.88rem; font-weight: 600; color: var(--fd-accent) !important; text-decoration: none; }
.fd-all a:hover { text-decoration: underline; }

.fd-actions { display: flex; align-items: center; gap: 0.6rem; }
.fd-btn { display: inline-block; background: var(--fd-accent); color: #fff !important; padding: 0.55rem 1.1rem; border-radius: 6px; font-size: 0.88rem; font-weight: 500; text-decoration: none; white-space: nowrap; border: 1px solid var(--fd-accent); }
.fd-btn:hover { background: var(--fd-accent-dark); border-color: var(--fd-accent-dark); }
.fd-btn-ghost { background: transparent; border-color: rgba(247,245,239,0.35); color: var(--fd-ink) !important; }
.fd-btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--fd-accent-bright); }
.fd-burger { display: none; background: transparent; border: 1px solid rgba(247,245,239,0.35); color: var(--fd-ink); border-radius: 6px; padding: 0.5rem 0.7rem; cursor: pointer; font: inherit; font-size: 0.88rem; align-items: center; gap: 0.45rem; }
.fd-burger svg { width: 18px; height: 18px; }
.fd-short { display: none; }

.fd-header a:focus-visible, .fd-header button:focus-visible, .fd-footer a:focus-visible { outline: 2px solid var(--fd-accent-bright); outline-offset: 2px; }

/* Town bar under the header on town pages */
.fd-city { background: rgba(0,0,0,0.22); border-top: 1px solid rgba(255,255,255,0.08); }
.fd-city-inner { max-width: 1400px; margin: 0 auto; padding: 0.5rem 2rem; display: flex; gap: 0.35rem 1.25rem; flex-wrap: wrap; align-items: center; font-size: 0.82rem; }
.fd-city-name { color: var(--fd-accent-bright); font-weight: 600; }
.fd-city a { color: var(--fd-soft) !important; text-decoration: none; }
.fd-city a:hover, .fd-city a[aria-current="page"] { color: var(--fd-ink) !important; text-decoration: underline; }

/* Phones and small tablets: hamburger menu */
@media (max-width: 1080px) {
  .fd-bar { padding: 0.7rem 1rem; gap: 0.6rem; flex-wrap: wrap; }
  .fd-burger { display: inline-flex; }
  .fd-actions .fd-btn-ghost { display: none; }
  .fd-nav { display: none; order: 10; width: 100%; max-height: calc(100vh - 64px); overflow-y: auto; padding: 0.5rem 0 1rem; }
  .fd-header.fd-menu-open .fd-nav { display: block; }
  .fd-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .fd-item { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .fd-top { width: 100%; justify-content: space-between; font-size: 1rem; padding: 0.85rem 0.25rem; color: var(--fd-ink) !important; }
  .fd-drop, .fd-mega { position: static; transform: none; width: auto; box-shadow: none; background: transparent; color: var(--fd-ink); padding: 0 0.25rem 0.9rem; min-width: 0; left: auto; }
  .fd-item.fd-open > .fd-mega, .fd-item.fd-open > .fd-two { display: block; }
  .fd-two { min-width: 0; }
  .fd-two > div { margin-bottom: 0.9rem; }
  .fd-mega > div { margin-bottom: 0.9rem; }
  .fd-col-title { color: var(--fd-accent-bright); }
  .fd-links a { color: var(--fd-soft) !important; padding: 0.45rem 0; font-size: 0.95rem; }
  .fd-all { border-top-color: rgba(255,255,255,0.1); }
  .fd-all a { color: var(--fd-accent-bright) !important; }
  .fd-mobile-only { display: block; }
  .fd-city-inner { padding: 0.45rem 1rem; }
}
@media (min-width: 1081px) { .fd-mobile-only { display: none; } }
@media (max-width: 420px) {
  .fd-logo { font-size: 1.15rem; }
  .fd-long { display: none; }
  .fd-short { display: inline; }
  .fd-btn { padding: 0.5rem 0.75rem; }
}

/* Footer */
.fd-footer { background: #111110; color: rgba(247,245,239,0.6); font-family: 'DM Sans', system-ui, -apple-system, sans-serif; font-size: 0.88rem; line-height: 1.6; padding: 3.5rem 2rem 2rem; }
.fd-foot-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; }
.fd-foot-grid h2 { font-family: 'Fraunces', Georgia, serif; font-size: 1rem; font-weight: 600; color: #f7f5ef; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.fd-foot-grid ul { list-style: none; margin: 0; padding: 0; }
.fd-foot-grid li { list-style: none; margin: 0 0 0.35rem; padding: 0; }
.fd-footer a { color: rgba(247,245,239,0.65) !important; text-decoration: none; }
.fd-footer a:hover { color: #f7f5ef !important; text-decoration: underline; }
.fd-foot-logo { font-family: 'Fraunces', Georgia, serif; font-size: 1.25rem; font-weight: 700; color: #f7f5ef !important; }
.fd-foot-logo span { color: #e8a060; }
.fd-foot-contact p { margin: 0 0 0.4rem; }
.fd-foot-base { max-width: 1200px; margin: 2.5rem auto 0; padding-top: 1.25rem; border-top: 1px solid rgba(247,245,239,0.1); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.8rem; color: rgba(247,245,239,0.45); }
.fd-foot-base p { margin: 0; }
@media (max-width: 960px) { .fd-foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .fd-footer { padding: 2.5rem 1.25rem 1.5rem; } .fd-foot-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
