/* ============================================================
   DC Trip 2026 — "America 250" patriotic theme
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Libre+Franklin:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,800;1,600&display=swap');

:root {
  --navy: #0a1f44;
  --navy-2: #0d2a5c;
  --navy-deep: #06152e;
  --red: #b22234;
  --red-bright: #d8324b;
  --white: #ffffff;
  --cream: #fdf6e8;
  --gold: #ffd34e;
  --gold-deep: #e0a92e;
  --ink: #14223d;
  --muted: #5b6b86;
  --line: rgba(10,31,68,.12);
  --shadow: 0 10px 30px rgba(6,21,46,.18);
  --shadow-sm: 0 3px 10px rgba(6,21,46,.12);
  --radius: 16px;
  --maxw: 1080px;
  --header-h: 60px;
  --sans: 'Libre Franklin', system-ui, -apple-system, sans-serif;
  --display: 'Anton', 'Libre Franklin', sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(178,34,52,.05), transparent 40%),
    radial-gradient(circle at 88% 8%, rgba(10,31,68,.06), transparent 45%);
  line-height: 1.55;
  padding-top: var(--header-h);
  overflow-x: hidden;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- top stripe + header ---------- */
.flag-stripe {
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--red) 0 28px, var(--white) 28px 56px);
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
}
header.site {
  position: fixed; top: 5px; left: 0; right: 0; height: var(--header-h); z-index: 55;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  box-shadow: 0 2px 14px rgba(6,21,46,.35);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--white); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand .seal { width: 34px; height: 34px; flex: 0 0 auto; }
.brand b { font-family: var(--display); font-size: 1.15rem; letter-spacing: .5px; line-height: 1; }
.brand span { display: block; font-size: .62rem; letter-spacing: 2px; color: var(--gold); font-weight: 700; }
.header-spacer { flex: 1; }
.hdr-btn {
  background: var(--red); color: #fff; border: none; border-radius: 999px;
  font-family: var(--sans); font-weight: 700; font-size: .82rem; padding: 8px 14px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.hdr-btn.gold { background: var(--gold); color: var(--navy); }
.hdr-btn:hover { filter: brightness(1.07); }
.hamburger {
  background: rgba(255,255,255,.12); border: none; color: #fff; width: 42px; height: 38px;
  border-radius: 10px; cursor: pointer; font-size: 1.2rem; display: grid; place-items: center;
}

/* ---------- nav drawer ---------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(6,21,46,.5); z-index: 70;
  opacity: 0; visibility: hidden; transition: opacity .25s;
}
.drawer-scrim.open { opacity: 1; visibility: visible; }
nav.drawer {
  position: fixed; top: 0; right: -340px; width: 320px; max-width: 86vw; height: 100%;
  background: var(--navy); color: #fff; z-index: 75; overflow-y: auto;
  transition: right .28s cubic-bezier(.4,0,.2,1); box-shadow: -8px 0 30px rgba(0,0,0,.4);
  padding-bottom: 40px;
}
nav.drawer.open { right: 0; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(90deg, var(--red), var(--red-bright));
}
.drawer-head b { font-family: var(--display); letter-spacing: .5px; }
.drawer-close { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.nav-group { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-group h4 {
  margin: 0; padding: 12px 18px 4px; font-size: .68rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
}
nav.drawer a {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px; color: #eaf0fb;
  font-weight: 600; font-size: .98rem;
}
nav.drawer a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
nav.drawer a.active { background: rgba(255,211,78,.16); color: #fff; box-shadow: inset 4px 0 0 var(--gold); }
nav.drawer a .ico { font-size: 1.15rem; width: 24px; text-align: center; }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 18px 16px 70px; }
.section-pad { padding: 22px 16px 60px; }
h1, h2, h3 { line-height: 1.15; color: var(--navy); }
h1.display { font-family: var(--display); font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: .5px; text-transform: uppercase; }
.eyebrow { font-size: .72rem; letter-spacing: 3px; text-transform: uppercase; color: var(--red); font-weight: 800; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 60ch; }

/* ---------- hero ---------- */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden; color: #fff;
  background: linear-gradient(140deg, var(--navy-deep) 0%, var(--navy) 45%, #122f63 100%);
  padding: 40px 24px 38px; box-shadow: var(--shadow); margin-bottom: 26px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent), radial-gradient(2px 2px at 70% 20%, #fff 50%, transparent), radial-gradient(1.6px 1.6px at 40% 70%, #fff 50%, transparent), radial-gradient(1.6px 1.6px at 85% 60%, #fff 50%, transparent), radial-gradient(1.4px 1.4px at 55% 45%, #fff 50%, transparent), radial-gradient(1.4px 1.4px at 10% 80%, #fff 50%, transparent);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(90deg, var(--red) 0 30px, #fff 30px 60px);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero .lead { color: #cfe; }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px; transition: transform .15s, box-shadow .15s;
}
.card.link:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin: 2px 0 6px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px 16px; position: relative; overflow: hidden;
}
.tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.tile .ico { font-size: 1.9rem; }
.tile b { font-size: 1.06rem; color: var(--navy); }
.tile small { color: var(--muted); }
.tile .corner { position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 38px 38px 0; border-color: transparent var(--red) transparent transparent; }

/* ---------- buttons / pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--red); color: #fff; border: none; border-radius: 999px;
  font-family: var(--sans); font-weight: 700; font-size: .95rem; padding: 11px 20px;
  box-shadow: var(--shadow-sm); transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.navy { background: var(--navy); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); box-shadow: none; }
.btn.block { display: flex; width: 100%; justify-content: center; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.pill.red { background: #fde8eb; color: var(--red); }
.pill.navy { background: #e7eefb; color: var(--navy); }
.pill.gold { background: #fff4cf; color: var(--gold-deep); }
.pill.green { background: #e3f6e8; color: #1b7a3d; }

.stars { color: var(--gold-deep); letter-spacing: 1px; }

/* ---------- forms ---------- */
input, textarea, select {
  font-family: var(--sans); font-size: 1rem; padding: 11px 13px; width: 100%;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(178,34,52,.12); }
label { font-weight: 600; font-size: .88rem; color: var(--navy); display: block; margin-bottom: 5px; }

/* ---------- footer ---------- */
footer.site {
  text-align: center; padding: 26px 16px 40px; color: var(--muted); font-size: .82rem;
  border-top: 4px solid transparent;
  border-image: repeating-linear-gradient(90deg, var(--red) 0 24px, var(--navy) 24px 48px) 4;
}

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(150deg, var(--navy-deep), var(--navy) 60%, #143568); }
.login-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); width: 100%; max-width: 380px; padding: 30px 26px; text-align: center; }
.login-card .seal { width: 70px; margin: 0 auto 10px; }
.login-card h1 { font-family: var(--display); color: var(--navy); margin: 4px 0; font-size: 1.7rem; }
.login-card p { color: var(--muted); margin: 0 0 18px; }
.login-card form { text-align: left; display: grid; gap: 12px; }
.err { background: #fde8eb; color: var(--red); border-radius: 10px; padding: 9px 12px; font-size: .88rem; font-weight: 600; }

/* ---------- AI chat widget ---------- */
#ai-fab {
  position: fixed; bottom: 18px; right: 16px; z-index: 80;
  background: var(--red); color: #fff; border: 3px solid var(--gold); border-radius: 999px;
  padding: 11px 16px; font-weight: 800; font-size: .9rem; cursor: pointer; box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 7px;
}
#ai-fab:hover { filter: brightness(1.08); }
#ai-panel {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 82; margin: auto; max-width: 440px;
  background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 40px rgba(6,21,46,.4);
  transform: translateY(110%); transition: transform .3s; display: flex; flex-direction: column;
  max-height: 78vh;
}
#ai-panel.open { transform: translateY(0); }
.ai-head { background: var(--navy); color: #fff; padding: 13px 16px; border-radius: 18px 18px 0 0; display: flex; align-items: center; gap: 9px; }
.ai-head b { font-family: var(--display); letter-spacing: .5px; }
.ai-head .close { margin-left: auto; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }
.ai-body { padding: 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; background: var(--cream); }
.ai-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.45; }
.ai-msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; white-space: pre-wrap; }
.ai-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.ai-input input { flex: 1; }
.ai-input button { flex: 0 0 auto; }

/* ---------- utility ---------- */
.center { text-align: center; }
.mt { margin-top: 18px; } .mt2 { margin-top: 30px; }
.muted { color: var(--muted); }
.hide { display: none !important; }
.coming { text-align: center; padding: 50px 20px; }
.coming .ico { font-size: 3rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (min-width: 700px) {
  .brand b { font-size: 1.3rem; }
}

/* ---------- place cards (museums/monuments/attractions) ---------- */
.toolbar { position: sticky; top: calc(var(--header-h) + 5px); z-index: 20; background: var(--cream); padding: 10px 0; margin-bottom: 6px; }
.toolbar input { font-size: 1rem; }
#count { color: var(--muted); font-size: .85rem; font-weight: 600; margin-left: 2px; }
.places { display: grid; gap: 14px; }
@media (min-width: 760px) { .places { grid-template-columns: 1fr 1fr; } }
.place { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 16px; scroll-margin-top: 120px; }
.place.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%,100% { box-shadow: var(--shadow-sm); } 30% { box-shadow: 0 0 0 3px var(--gold); } }
.pl-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pl-head h3 { margin: 0; font-size: 1.12rem; flex: 1; }
.pl-head .vmark { flex: 0 0 auto; }
.pl-meta { font-size: .8rem; color: var(--muted); }
.pl-meta .stars { color: var(--gold-deep); font-size: .95rem; }
.pl-pills { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.pl-blurb { margin: 8px 0; font-size: .94rem; }
.pl-hl { margin: 4px 0; }
.pl-hl > summary { cursor: pointer; font-weight: 700; color: var(--red); font-size: .88rem; list-style: none; }
.pl-hl > summary::-webkit-details-marker { display: none; }
.pl-hl ul { margin: 8px 0 4px; padding-left: 20px; font-size: .9rem; }
.pl-hl ul li { margin: 3px 0; }
.pl-fine { font-size: .85rem; color: var(--ink); margin: 6px 0 0; }
.pl-photos { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0 4px; }
.pl-photos img { height: 64px; width: 64px; object-fit: cover; border-radius: 8px; cursor: zoom-in; flex: 0 0 auto; border: 1px solid var(--line); }
.pl-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.btn.sm { padding: 7px 12px; font-size: .82rem; }

/* ---------- lessons ---------- */
.ls-sec { margin: 22px 0; }
.ls-sec h2 { font-size: 1.3rem; }
.ls-sec p { font-size: 1rem; }
.ls-img { margin: 12px 0; }
.ls-img img { border-radius: 12px; width: 100%; box-shadow: var(--shadow-sm); }
.ls-img figcaption { font-size: .78rem; color: var(--muted); margin-top: 4px; font-style: italic; }
.ls-hook { background: #eef3fc; border-left: 4px solid var(--navy); padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: .92rem; }
.ls-fact { background: #fff8e6; border-left: 4px solid var(--gold-deep); padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: .92rem; }
.ls-fine { font-size: .82rem; color: var(--muted); }
.ls-divider { border-top: 3px solid var(--line); padding-top: 14px; margin-top: 26px; }
.game { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; box-shadow: var(--shadow-sm); }
.game h4 { margin: 0 0 10px; color: var(--navy); }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fc { perspective: 800px; cursor: pointer; height: 110px; }
.fc-in { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.fc.flipped .fc-in { transform: rotateY(180deg); }
.fc-a, .fc-b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; display: grid; place-items: center; padding: 10px; text-align: center; box-shadow: var(--shadow-sm); }
.fc-a { background: var(--navy); color: #fff; font-weight: 700; }
.fc-b { background: #fff; border: 1px solid var(--line); transform: rotateY(180deg); font-size: .85rem; }
.matchrow { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.matchrow > span { flex: 1; font-weight: 600; font-size: .9rem; }
.matchrow select { flex: 1; }
.orderlist { list-style: decimal; padding-left: 24px; margin: 8px 0; }
.orderlist li { background: #f5f8ff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ord-btns button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 30px; height: 30px; cursor: pointer; margin-left: 4px; }
.g-res { font-weight: 700; color: var(--navy); margin-left: 8px; }
.quiz { margin-top: 24px; }
.q { margin: 14px 0; }
.q-text { margin: 0 0 6px; }
.opt { display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px; margin: 6px 0; cursor: pointer; font-size: .95rem; font-family: var(--sans); }
.opt.sel { border-color: var(--navy); background: #eef3fc; }
.opt.correct { border-color: #1b7a3d; background: #e3f6e8; }
.opt.wrong { border-color: var(--red); background: #fde8eb; }
.q-explain { font-size: .85rem; color: var(--ink); margin-top: 6px; background: #fff8e6; padding: 8px 10px; border-radius: 8px; }
.opt-tag { display: inline-block; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; white-space: nowrap; }
.opt-tag.ok { background: #1b7a3d; color: #fff; }
.opt-tag.bad { background: var(--red); color: #fff; }
.lesson-card { display: flex; align-items: center; gap: 14px; }
.lesson-card .lc-em { font-size: 2.2rem; }
.lesson-card .lc-min { font-size: .72rem; color: var(--muted); }

/* ---------- guest banner ---------- */
#guest-banner { background: var(--gold); color: var(--navy); text-align: center; padding: 9px 14px; font-size: .85rem; font-weight: 600; }

/* Trap Leaflet's internal z-index (panes/controls go up to ~800) inside the map,
   so the nav drawer, name prompt, lightbox, and toasts always sit above the map. */
.leaflet-container { isolation: isolate; }
