@import url("fonts.css");

/* ============ Tokens ============ */
:root {
  /* Forest palette — greens of the Northern Vosges, gold & red from the village emblem */
  --primary: #3f7d3a;        /* leaf green: buttons, accents */
  --primary-dark: #2c5f2d;   /* hover, links */
  --forest: #1f3d2b;         /* headings, dark surfaces */
  --forest-deep: #142a1d;    /* top bar */
  --gold: #e3b505;           /* emblem gold */
  --emblem-red: #c8102e;     /* emblem red */
  --ink: #23302a;
  --muted: #5f6b64;
  --line: #e2e7df;
  --bg: #ffffff;
  --bg-alt: #f3f5ef;
  --card: #ffffff;
  --blue: #3d7ea6;
  --red: #c8102e;
  --green: #4f9a45;
  --yellow: #d9a521;
  --cyan: #2a9d8f;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 34, 22, .06), 0 8px 24px rgba(16, 34, 22, .07);
  --shadow-lg: 0 12px 40px rgba(16, 34, 22, .16);
  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: 16px;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest); }
h1, h2, h3, h4, h5 { font-family: var(--head); color: var(--forest); line-height: 1.2; margin: 1.6em 0 .55em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.12rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--forest); color: #fff; padding: .6em 1em; }
.skip:focus { left: 8px; top: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px;
  background: var(--primary); color: #fff; font: 600 .95rem var(--head); text-decoration: none; border: 2px solid var(--primary);
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line); }
.btn-ghost:hover { background: var(--forest); border-color: var(--forest); color: #fff; }

/* ============ Top bar & header ============ */
.topbar { background: var(--forest-deep); color: rgba(255,255,255,.75); font-size: .82rem; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 38px; }
.topbar p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar a { color: rgba(255,255,255,.8); text-decoration: none; }
.topbar a:hover, .topbar a[aria-current] { color: #fff; }
.lang { display: flex; align-items: center; gap: .15rem; }
.lang .ico { margin-right: .35rem; opacity: .7; }
.lang a { padding: .15rem .45rem; border-radius: 5px; font-weight: 600; letter-spacing: .04em; font-size: .78rem; }
.lang a[aria-current] { background: var(--primary); color: #fff; }
.fb { display: inline-flex; }

.header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--forest); font: 700 1.35rem var(--head); letter-spacing: -.01em; }
.logo img { width: 40px; height: auto; }
.logo:hover { color: var(--primary-dark); }
.logo-light { color: #fff; }

.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 12px; color: var(--forest); cursor: pointer; font-size: 1.3rem; }
.menu-btn .when-open, .menu-btn[aria-expanded="true"] .when-closed { display: none; }
.menu-btn[aria-expanded="true"] .when-open { display: inline; }

/* mobile nav (drawer) */
.mainnav { position: fixed; inset: var(--nav-top, 110px) 0 0 0; z-index: 60; background: #fff; padding: 1rem var(--gutter) 2rem; overflow-y: auto; display: none; }
.mainnav.open { display: block; animation: navIn .22s ease; }
@keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mainnav > ul { list-style: none; margin: 0; padding: 0; }
.mainnav > ul > li { position: relative; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; }
.mainnav a { text-decoration: none; color: var(--forest); }
.nav-top, .mainnav > ul > li > a { flex: 1; padding: 1rem 0; font: 600 1.1rem var(--head); }
.mainnav > ul > li.is-active > a { color: var(--primary-dark); }
.nav-toggle-sub { width: 44px; height: 44px; border: 0; background: var(--bg-alt); border-radius: 10px; color: var(--forest); cursor: pointer; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; }
.nav-toggle-sub[aria-expanded="true"] .ico { transform: rotate(180deg); }
.nav-sub { list-style: none; margin: 0 0 .8rem; padding: 0; width: 100%; display: none; }
li.sub-open > .nav-sub { display: block; }
.nav-sub a { display: flex; gap: .7rem; align-items: center; padding: .6rem .5rem; border-radius: 8px; color: var(--ink); }
.nav-sub a .ico { color: var(--primary); }
.nav-sub a:hover { background: var(--bg-alt); }
.nav-search { display: inline-flex; gap: .6rem; align-items: center; margin-top: 1.2rem; padding: .8rem 1.2rem; border-radius: 999px; background: var(--bg-alt); font-weight: 600; }
body.nav-lock { overflow: hidden; }

@media (min-width: 1000px) {
  .menu-btn { display: none; }
  .mainnav { position: static; transform: none; padding: 0; overflow: visible; background: none; display: flex; align-items: center; gap: .5rem; }
  .mainnav > ul { display: flex; gap: .2rem; }
  .mainnav > ul > li { border: 0; }
  .nav-top, .mainnav > ul > li > a { padding: .6rem .9rem; font-size: 1rem; border-radius: 10px; }
  .mainnav > ul > li > a:hover, .mainnav > ul > li:focus-within > a { background: var(--bg-alt); }
  .mainnav > ul > li.is-active > a { color: var(--primary-dark); }
  .nav-toggle-sub { display: none; }
  .nav-sub {
    display: block; position: absolute; top: 100%; left: 0; min-width: 280px; padding: .5rem; margin: 0;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
  }
  /* open on: tap (.sub-open, set by main.js), keyboard focus, or hover — hover only on real mouse devices */
  li[data-dropdown].sub-open > .nav-sub, li[data-dropdown]:focus-within > .nav-sub { opacity: 1; visibility: visible; transform: none; }
  li[data-dropdown].sub-open > .nav-top { background: var(--bg-alt); }
  .nav-search { margin: 0 0 0 .4rem; padding: .55rem; width: 42px; height: 42px; justify-content: center; }
  .nav-search span { display: none; }
}

/* ============ Hero ============ */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--forest); }
.hero-bg, .masthead-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
/* light overlay: soft shade only behind the text, so the photos/video stay bright */
.hero-bg::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 60% 55% at 50% 52%, rgba(10,22,14,.38) 0%, rgba(10,22,14,.12) 65%, rgba(10,22,14,0) 100%),
  linear-gradient(180deg, rgba(10,22,14,.10) 0%, rgba(10,22,14,0) 35%, rgba(10,22,14,.28) 100%); }
.hero-in { position: relative; padding: clamp(80px, 16vw, 170px) var(--gutter) clamp(70px, 12vw, 140px); text-align: center; }
.hero h1 { color: #fff; margin: 0 0 .4em; font-size: clamp(2.2rem, 7vw, 4.4rem); text-shadow: 0 2px 4px rgba(0,0,0,.35), 0 4px 28px rgba(0,0,0,.45); }
.hero p { margin: 0 auto 2rem; font-size: clamp(1rem, 2.4vw, 1.25rem); font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 2px 16px rgba(0,0,0,.4); }

.search-form { display: flex; max-width: 640px; margin: 0 auto; background: #fff; border-radius: 999px; padding: 6px; box-shadow: var(--shadow-lg); }
.search-form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .7rem 1.1rem; font: 400 1rem var(--body); color: var(--ink); outline: none; }
.search-form button { display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px; background: var(--primary); color: #fff; padding: .7rem 1.3rem; font: 600 1rem var(--head); cursor: pointer; }
.search-form button:hover { background: var(--primary-dark); }
@media (max-width: 480px) { .search-form button span { display: none; } }
.search-form-page { margin: 0 0 2rem; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ============ Sections ============ */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.sec-head { position: relative; text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.sec-mask { display: block; font: 700 clamp(2.6rem, 9vw, 5.5rem)/1 var(--head); color: var(--forest); opacity: .06; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-head h2 { margin: -.85em 0 .4em; position: relative; }
.sec-head h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--primary); border-radius: 3px; margin: .5em auto 0; }
.sec-head p { color: var(--muted); margin: 0; }

/* ============ Cards ============ */
.grid { display: grid; gap: clamp(18px, 2.5vw, 28px); grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { display: block; aspect-ratio: 4 / 3; background: var(--bg-alt); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.05); }
.card .badge { position: absolute; top: 14px; left: 14px; }
.card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.12rem; }
.card h3 a { color: var(--forest); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--primary-dark); }
.card-loc { display: flex; gap: .45rem; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.card-loc .ico { color: var(--primary); margin-top: .1em; }
.card-intro { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }

.badge { display: inline-block; padding: .3em .8em; border-radius: 999px; background: var(--primary); color: #fff !important; font: 600 .74rem var(--head); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; z-index: 2; position: relative; }
.prose > .badge { margin-bottom: 1rem; }
.c-blue { --c: var(--blue); } .c-red { --c: var(--red); } .c-green { --c: var(--green); } .c-yellow { --c: var(--yellow); } .c-cyan { --c: var(--cyan); } .c-coral { --c: var(--primary); }
.badge[class*="c-"] { background: var(--c); }

/* ============ Category tiles ============ */
.tiles { display: grid; gap: clamp(14px, 2vw, 24px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(6, 1fr); } .tile-lg { grid-column: span 3; } .tile-md { grid-column: span 3; } }
@media (min-width: 900px) { .tile-md { grid-column: span 2; } }
.tile { position: relative; display: flex; align-items: flex-end; min-height: 230px; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; isolation: isolate; box-shadow: var(--shadow); }
.tile-lg { min-height: 280px; }
.tile-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform .6s; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,38,26,0) 25%, rgba(18,38,26,.85) 100%); }
.tile:hover .tile-bg { transform: scale(1.06); }
.tile:hover { color: #fff; }
.tile-icon { position: absolute; top: 18px; right: 18px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--primary)); font-size: 1.35rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.tile-text { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .25rem; }
.tile-text strong { font: 700 1.45rem/1.2 var(--head); }
.tile-count { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.tile-desc { font-size: .92rem; opacity: .9; line-height: 1.45; }

/* ============ Gallery strip ============ */
.strip { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.strip-item { display: block; aspect-ratio: 1; overflow: hidden; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, filter .5s; }
.strip-item:hover img { transform: scale(1.06); filter: brightness(1.05); }

/* ============ Masthead (inner pages) ============ */
.masthead { position: relative; color: #fff; background: var(--forest); overflow: hidden; }
.masthead-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,38,26,.45), rgba(18,38,26,.82)); }
.masthead-in { position: relative; padding: clamp(48px, 9vw, 110px) var(--gutter) clamp(34px, 5vw, 56px); }
.masthead h1 { color: #fff; margin: .25em 0 0; max-width: 900px; font-size: clamp(1.8rem, 4.6vw, 3rem); text-wrap: balance; }
.masthead-sub { display: flex; gap: .45rem; align-items: flex-start; margin: .8rem 0 0; opacity: .9; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .4rem; margin: 0; padding: 0; font-size: .86rem; }
.crumbs li + li::before { content: "›"; margin-right: .4rem; opacity: .6; }
.crumbs a { color: rgba(255,255,255,.82); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }

/* ============ Page body ============ */
.page { padding-top: clamp(32px, 5vw, 60px); padding-bottom: clamp(48px, 7vw, 90px); }
.narrow { max-width: 860px; }
.with-aside { display: grid; gap: 32px; }
@media (min-width: 900px) { .with-aside { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; } .with-aside .infobox { order: 2; position: sticky; top: 96px; } }
.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem; }

.prose { min-width: 0; overflow-wrap: anywhere; }
.prose > :first-child, .prose > .badge + * { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--primary); }
.prose img { border-radius: var(--radius-sm); margin: 1.2em 0; cursor: zoom-in; box-shadow: var(--shadow); }
.prose p > img:only-child { margin: .2em 0; }
.prose h3 { color: var(--forest); }
.prose h4, .prose h5 { color: var(--primary-dark); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: .5em .7em; }
.prose a[href$=".pdf"]::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .35em; vertical-align: -.15em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/svg%3E") center/contain no-repeat; }

/* content blocks (former bulletin panels) */
.prose .block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem .4rem; margin: 0 0 1.4rem; box-shadow: 0 1px 2px rgba(16,34,22,.04); }
.prose .block > h3:first-child { margin: 0 0 .8rem; font-size: 1.08rem; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: .6rem; }
.prose .block > h3:first-child::before { content: ""; width: 4px; height: 1.1em; background: var(--primary); border-radius: 2px; flex: none; }
.prose .block .block { background: var(--bg-alt); border: 0; box-shadow: none; }
.prose .block .block > h3:first-child { text-transform: none; font-size: 1rem; }
@media (max-width: 560px) { .prose .block { padding: 1.1rem 1rem .3rem; } }
.prose .gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin: 1em 0 1.4em; }
.prose .gallery img { margin: 0; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.video-link a { display: inline-flex; align-items: center; gap: .6rem; padding: .9rem 1.3rem; border-radius: var(--radius); background: var(--forest); color: #fff; text-decoration: none; font-weight: 600; }
.video-link a::before { content: "▶"; display: grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; background: var(--primary); font-size: .8em; }
.video-link a:hover { background: var(--primary-dark); color: #fff; }

/* info box (listings) */
.infobox { background: var(--bg-alt); border-radius: var(--radius); padding: 1.5rem; }
.infobox h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.infobox ul, .contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.infobox li, .contact-list li { display: flex; gap: .8rem; align-items: flex-start; line-height: 1.45; }
.infobox li > .ico, .contact-list li > .ico { color: var(--primary); font-size: 1.15rem; margin-top: .15em; }
.infobox a, .contact-list a { overflow-wrap: anywhere; }
.lbl { display: block; font: 600 .74rem var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .15rem; }
.maplink { display: flex; width: fit-content; align-items: center; gap: .3rem; margin-top: .4rem; font-weight: 600; font-size: .9rem; text-decoration: none; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.pager a { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--forest); font-weight: 600; line-height: 1.35; font-size: .95rem; transition: border-color .2s, box-shadow .2s; }
.pager a:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.pager small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.pager-next { justify-content: flex-end; text-align: right; }
.pager .ico { color: var(--primary); }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { justify-content: space-between; } }

/* contact */
.contact { display: grid; gap: 28px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.contact-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.contact-card > img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.contact-in { padding: 1.6rem; }
.prose .pager a { text-decoration: none; }
.contact-in h2 { margin: 0 0 1.2rem; }
.contact-hours { background: var(--forest); color: #fff; border-radius: var(--radius); padding: 1.8rem; }
.contact-hours h3 { color: #fff; margin-top: .6rem; }
.contact-hours .ico.big { font-size: 2.2rem; color: var(--primary); }

/* sitemap */
.sitemap ul { list-style: none; padding-left: 1.3rem; margin: .2rem 0; border-left: 2px solid var(--line); }
.sitemap > ul { border: 0; padding: 0; }
.sitemap li { margin: .35rem 0; }
.sitemap > ul > li > a { font: 600 1.1rem var(--head); }
.sitemap a { text-decoration: none; }
.sitemap a:hover { text-decoration: underline; }

/* search results */
.search-results ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.search-results li a { display: block; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.search-results li a:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.search-results strong { display: block; font: 600 1.1rem var(--head); color: var(--forest); }
.search-results small { color: var(--primary-dark); font-weight: 600; }
.search-results p { margin: .3rem 0 0; color: var(--muted); font-size: .93rem; }
.search-results mark { background: #f6e7b0; color: inherit; padding: 0 .1em; border-radius: 3px; }
.search-meta { color: var(--muted); margin-bottom: 1rem; }

/* ============ Footer ============ */
.footer { background: var(--forest); color: rgba(255,255,255,.72); font-size: .94rem; }
.foot-grid { display: grid; gap: 32px 24px; padding-top: 56px; padding-bottom: 40px; grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .foot-brand { grid-column: auto; } }
.footer h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.foot-brand p { margin: 1rem 0 0; line-height: 1.6; }
.social { display: inline-flex; align-items: center; gap: .6rem; }
.social .ico { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: #3b5998; color: #fff; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; padding-bottom: 22px; font-size: .85rem; }
.foot-bottom p { margin: 0; }
.footer .lang a[aria-current] { color: #fff; }

/* ============ Lightbox ============ */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12,24,16,.94); display: flex; align-items: center; justify-content: center; padding: 56px 12px; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); cursor: zoom-out; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; display: grid; place-items: center; }
.lightbox button:hover { background: var(--primary); }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .header, .footer, .pager, .search-form { display: none; } .masthead { background: none; color: #000; } .masthead h1 { color: #000; } .masthead-bg { display: none; } }

/* figures with captions & credits */
.prose figure { margin: 1.4em 0; }
.prose figure img { margin: 0; width: 100%; }
.prose figcaption { margin-top: .5rem; font-size: .88rem; color: var(--muted); font-style: italic; }
.prose .credits { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.prose .credits a { color: inherit; }

/* hero background video (starts via main.js; poster shown until then) */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-video.playing { opacity: 1; }
.hero-bg { z-index: 0; overflow: hidden; }
.hero-bg::after { z-index: 1; }
.hero-in { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }

/* dates */
.masthead-date { display: flex; align-items: center; gap: .45rem; margin: .7rem 0 0; font-size: .9rem; opacity: .9; }
.card-date { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .82rem; font-weight: 600; color: var(--primary-dark); }

/* contact map (static OpenStreetMap image) */
.contact-map { grid-column: 1 / -1; margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.contact-map img { width: 100%; height: auto; aspect-ratio: 12 / 5; object-fit: cover; object-position: center; transition: transform .4s; }
.contact-map a:hover img { transform: scale(1.02); }
.contact-map figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.1rem; font-size: .9rem; }
.contact-map figcaption > a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; }
.contact-map figcaption span { color: var(--muted); font-size: .78rem; }
.contact-map figcaption span a { color: inherit; }

/* legal links in footer */
.foot-legal { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.foot-legal a { color: rgba(255,255,255,.72); }
mark.todo { background: #ffe08a; color: #5a3b00; padding: 0 .25em; border-radius: 3px; font-weight: 600; }

/* walks & hikes */
.waymark { vertical-align: middle; flex: none; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.tfacts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; }
.masthead-sub .tfacts { font-weight: 600; }
.card-trail { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .88rem; font-weight: 600; color: var(--ink); }
.lvl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .2em .6em; border-radius: 999px; background: var(--bg-alt); color: var(--primary-dark); }
.lvl-medium { background: #fff3cf; color: #7a5a00; }
.lvl-hard { background: #fde2e2; color: #9b1c1c; }
.trailbox dl { margin: 0; display: grid; gap: .9rem; }
.trailbox dt { font: 600 .74rem var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .15rem; }
.trailbox dd { margin: 0; line-height: 1.45; }
.trailbox dd small { color: var(--muted); }
.trail-actions { display: grid; gap: .6rem; margin: 1.4rem 0 0; }
.trail-actions .btn { justify-content: center; }
.trail-map { margin: 2rem 0 0; }
.trail-map img { cursor: zoom-in; }

/* desktop dropdown on hover — mouse/trackpad devices only (touch uses tap, see main.js) */
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  li[data-dropdown]:hover > .nav-sub { opacity: 1; visibility: visible; transform: none; }
}
