/*
 * EJHK — what the CMS needs on top of the design.
 *
 * ejhk.css is generated from the designer's mockup and never edited by hand;
 * everything here exists because the site is assembled from editable sections
 * rather than written as static pages. Grouped by concern, one banner each.
 */

:root {
  /* The fixed header's height, for core's anchor markers (.pc-anchor). */
  --pc-header-offset: 96px;
}

/* ---- Header: a dropdown parent is one disclosure button ------------------ */
/* The mockup made each dropdown parent a Bootstrap toggle that navigated on
   click and opened on hover. Here the whole item, label and chevron, is one
   button that opens the submenu (see includes/navbar.php); it wears the
   design's .nav-link pill, so it looks like the links beside it. */
.navbar-ej .ej-has-sub { position: relative; }
.navbar-ej .ej-sub-toggle { display: inline-flex; align-items: center; gap: .35rem; }
.navbar-ej .ej-sub-toggle i { font-size: .7rem; transition: transform .2s ease; }
.navbar-ej .ej-sub-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
@media (min-width: 992px) {
  .navbar-ej .ej-has-sub > .dropdown-menu { position: absolute; top: 100%; left: 0; margin-top: .35rem; }
}
@media (max-width: 991.98px) {
  /* The whole row is the touch target on phones. */
  .navbar-ej .ej-sub-toggle { width: 100%; justify-content: space-between; }
  .navbar-ej .ej-sub-toggle i { font-size: .85rem; }
  .navbar-ej .ej-has-sub > .dropdown-menu { position: static; box-shadow: none; border: 0; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .navbar-ej .ej-sub-toggle i { transition: none; }
}

/* ---- Header: the accessibility toggle ----------------------------------- */
/* Core's panel is driven by #accessibility-toggle; core's own stylesheet
   styles that id with !important. This keeps the mockup's pill. */
.navbar-ej #accessibility-toggle.a11y-btn:hover,
.navbar-ej #accessibility-toggle.a11y-btn[aria-expanded="true"] { background: var(--ej-cream) !important; color: var(--ej-forest); }
.navbar-ej #accessibility-toggle.a11y-btn i { color: var(--ej-green); }
.navbar-ej #accessibility-toggle.a11y-btn span { font-size: 1rem !important; font-weight: 500 !important; color: var(--ej-ink) !important; }
.navbar-ej .brand-text { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; color: var(--ej-forest); font-size: 1.1rem; }

/* ---- Core's cookie banner (Silktide), in the design's colours ------------ */
/* consent.css declares the palette on #silktide-wrapper and every rule inside
   reads it, so re-declaring the values is the whole job. `html` in front of
   the id wins the specificity tie: consent.css loads after this file.
   Silktide's --focus is a box-shadow and is left as it is. */
html #silktide-wrapper {
  --fontFamily: var(--bs-body-font-family);
  --primaryColor: var(--ej-forest);
  --backgroundColor: #fff;
  --textColor: var(--ej-ink);
  --backdropBackgroundColor: rgba(14, 59, 46, .35);
  --cookieIconColor: var(--ej-forest);
  --cookieIconBackgroundColor: var(--ej-lime);
  --boxShadow: var(--ej-shadow);
}
/* The site's pill buttons and rounded cards; the radii are literals in
   consent.css, not properties. */
html #silktide-wrapper .st-button { border-radius: 999px; font-weight: 600; }
/* consent.css squares a focused button through two ids; the focus ring
   keeps the pill. */
html #silktide-wrapper #silktide-banner .st-button:focus,
html #silktide-wrapper #silktide-modal .st-button:focus { border-radius: 999px; }
html #silktide-wrapper #silktide-banner,
html #silktide-wrapper #silktide-modal { border-radius: 1rem; }
/* An OFF switch is painted in --textColor, which here is nearly the forest
   of an ON one; muted grey keeps the two apart (white on it is 5.6:1). */
html #silktide-wrapper #silktide-modal .switch__pill { background: var(--ej-muted); }
html #silktide-wrapper #silktide-modal .switch input:checked + .switch__pill { background: var(--primaryColor); }

/* ---- Core accessibility modes, in the design's colours ------------------ */
/* The mockup's own "higher contrast" switch set these; core's panel sets
   body.a11y-contrast-high instead. */
body.a11y-contrast-high { --ej-muted: #26352d; --ej-green: #1c7a43; }
body.a11y-contrast-high .text-muted-ej,
body.a11y-contrast-high .lead,
body.a11y-contrast-high p { color: #14231C; }
body.a11y-contrast-high .page-hero .lead,
body.a11y-contrast-high .hero .lead,
body.a11y-contrast-high .bg-forest p,
body.a11y-contrast-high .footer p { color: #fff !important; }

/* ---- Footer -------------------------------------------------------------- */
/* Column headings are h2 for a sensible heading order; they look like the
   mockup's h4. */
.footer .footer-heading { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1.2rem; font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: -.02em; }
.footer address { font-style: normal; }
.back-to-top:focus-visible { outline: 3px solid var(--ej-lime); outline-offset: 3px; }

/* ---- Page body: blocks between and inside the white card ------------------ */
/* page.php puts body sections and card runs in one column; the mockup spaced
   them with mt-4/mt-5 utilities written into each block. */
.ej-flow > * + *:not(.pc-anchor) { margin-top: 3rem; }
.ej-flow > .pc-anchor:first-child + * { margin-top: 0; }
/* The first text section in a card has no rule above it even when an anchor
   marker precedes it. */
.prose > .pc-anchor:first-child + .doc-section { border-top: 0; padding-top: 0; }
.pc-anchor { display: block; height: 0; }

/* ---- Text section ----------------------------------------------------------- */
/* A text section without a heading continues the one above it. */
.doc-section.doc-continued { border-top: 0; padding-top: 0; }
.doc-section > :last-child { margin-bottom: 0; }

/* ---- Callout ------------------------------------------------------------------ */
/* The mockup's callout holds one <p>; the CMS allows several paragraphs. */
.callout-body > p { margin: 0; }
.callout-body > p + p { margin-top: .6rem; }

/* ---- Script-only controls ------------------------------------------------ */
/* Filters, search boxes and pagers work only with JavaScript; without it every
   item is listed, so the controls would be buttons that do nothing. */
html:not(.js) .ej-js-only { display: none !important; }

/* ---- News --------------------------------------------------------------------- */
/* A post with no image gets an icon in the picture's place. */
.news-thumb > .bi, .news-row-img > .bi, .rel-img > .bi { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2rem; color: var(--ej-green); }
.news-thumb:has(> .bi) { display: grid; place-items: center; min-height: 180px; }
img.avatar { object-fit: cover; padding: 0; }
.article-prose img { max-width: 100%; height: auto; border-radius: .75rem; }

/* ---- Homepage hero ------------------------------------------------------ */
/* A second hero on one page is demoted to h2 (ejhk_claim_h1()); it keeps the
   look of the design's `.hero h1`. */
.hero h2.hero-heading { color: #fff; font-weight: 800; font-size: clamp(2.05rem, 5.2vw, 4.2rem); line-height: 1.05; }
.hero h2.hero-heading .hl { color: var(--ej-lime); position: relative; white-space: nowrap; }

/* ---- Call-to-action band -------------------------------------------------- */
/* The mockup set these two with inline style attributes. */
.ej-cta-row { position: relative; z-index: 1; }
.ej-cta-text { color: #1d4a37; }
/* The text is rich text now: paragraphs, bold, links. The last paragraph keeps
   no margin, as the design's single line had none; a link stays readable on
   the lime gradient (the forest green, underlined). */
.ej-cta-text p { margin-bottom: .5rem; }
.ej-cta-text > :last-child { margin-bottom: 0; }
.ej-cta-text a { color: var(--ej-forest); text-decoration: underline; font-weight: 600; }
.ej-cta-text a:hover { color: #000; }
/* In the design the band sits inside the partners band, 3rem under it; as a
   band of its own it drops its top padding when it follows another white band. */
.section:not(.page-body):not(.bg-cream):not(.bg-forest) + .ej-cta-section,
.section:not(.page-body):not(.bg-cream):not(.bg-forest) + .pc-anchor + .ej-cta-section { padding-top: 0; }

/* ---- Summary box ----------------------------------------------------------- */
/* The design's heading is an h3 inside a text section; as a section of its own
   it is an h2 (heading levels never skip), sized like the h3. */
.summary-box .summary-title { color: #fff; margin: 0 0 .75rem; font-size: 1.15rem; font-weight: 700; }
.summary-box .summary-title i { color: var(--ej-lime); }
.summary-box > :last-child { margin-bottom: 0; }

/* ---- Project summary banner -------------------------------------------------- */
/* The design has one paragraph; the CMS allows several. */
.project-head p + p { margin-top: .6rem; }

/* ---- Button row ---------------------------------------------------------------- */
.ej-button-row { margin-top: 1.5rem; }
.prose > .ej-button-row:first-child,
.prose > .pc-anchor:first-child + .ej-button-row { margin-top: 0; }

/* ---- Statute footnotes ------------------------------------------------------------ */
/* Clear the fixed header when a reference or a note is jumped to. */
.statute sup a[id], .footnote p[id] { scroll-margin-top: 110px; }
.footnote-back { margin-left: .25rem; text-decoration: none; }

/* ---- Cards and lists ------------------------------------------------------ */
/* A card title is one level below whatever heading the section has, so it is
   not always the tag the design styled. */
.feature-card h2 { font-size: 1.2rem; font-weight: 700; }
.value-card .value-title { font-size: 1.02rem; font-weight: 700; margin: .5rem 0 .4rem; }
.cycle-step h2 { font-size: 1.1rem; font-weight: 700; }
/* A partner without a logo shows its name in the logo's place. */
.pl-img strong { color: var(--ej-forest); font-family: "Plus Jakarta Sans", sans-serif; font-size: .95rem; text-align: center; }

/* ---- Sorting guide cards -------------------------------------------------- */
/* The mockup made each card's name an h2 under the guide's own h2; the CMS
   keeps a valid heading order (intro h2, card h3, list heading h4) and styles
   them as the design's h2 and h3. */
.sort-card header h3 { color: var(--t); font-size: 1.35rem; font-weight: 800; margin: 0; }
.sort-body h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ej-muted); font-weight: 700; margin-bottom: .6rem; }
.sort-body p:last-child { margin-bottom: 0; }

/* ---- Numbered option cards ------------------------------------------------ */
/* The mockup cut its illustrations from a sprite; the CMS uploads each one. */
.compost-opt .opt-art img { display: block; width: 100%; height: auto; }

/* ---- Key figures ---------------------------------------------------------- */
.stat-row.stat-row-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 767.98px) { .stat-row.stat-row-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .stat-row.stat-row-4 { grid-template-columns: 1fr; } }

/* ---- Bar chart ------------------------------------------------------------ */
.bar-chart-caption { font-size: .85rem; color: var(--ej-muted); margin: -.75rem 0 1.5rem; }

/* ---- Click-to-load video ------------------------------------------------------ */
/* The video area is a link until the visitor presses play; ejhk.js replaces
   the link with the player. */
.ej-embed-load {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; padding: 1.25rem; text-align: center; text-decoration: none;
  background: linear-gradient(135deg, var(--ej-forest), var(--ej-forest-2)); color: #fff;
}
.ej-embed-load:hover, .ej-embed-load:focus-visible { color: #fff; }
.ej-embed-load:focus-visible { outline: 3px solid var(--ej-lime); outline-offset: -6px; }
.ej-video-play {
  display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.5rem .7rem 1.1rem; border-radius: 999px;
  background: var(--ej-lime); color: var(--ej-forest); font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; font-size: 1.05rem;
  transition: transform .2s;
}
.ej-video-play .bi { font-size: 1.9rem; line-height: 1; }
.ej-embed-load:hover .ej-video-play { transform: scale(1.06); }
/* The video's thumbnail fills the frame, with only the play button over it. */
.ej-video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ej-video-poster > .ej-video-play { position: relative; z-index: 1; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.map-frame iframe, .video-frame iframe { width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .ej-video-play { transition: none; } }

/* ---- Team cards ------------------------------------------------------------- */
/* A card whose section has no heading uses h2 for the name, styled like the
   design's h3. */
.team-head h2 { font-size: 1.1rem; margin: 0; color: var(--ej-forest); }

/* ---- Contact form ------------------------------------------------------------ */
.ej-contact-form .form-status:empty { display: none; }
.ej-contact-form .form-status.is-error { color: var(--ej-ohtlik) !important; font-weight: 600; }
.ej-contact-form .form-status.is-success { color: var(--ej-green) !important; font-weight: 600; }

/* ---- Logo downloads and usage examples ------------------------------------- */
/* Adapted from the design's standalone logo page (example/logo.html). */
.logo-download-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.logo-showcase-head { max-width: 820px; margin-bottom: 1.25rem; }
.logo-tag {
  display: inline-block; background: var(--ej-forest); color: var(--ej-lime); font-weight: 800; font-size: .75rem;
  letter-spacing: .08em; text-transform: uppercase; padding: .25rem .65rem; border-radius: 99px;
}
.logo-showcase-head h2 { margin: .65rem 0 .4rem; }
.logo-font-note { font-size: .9rem; }
.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.logo-tile {
  position: relative; min-width: 0; min-height: 170px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 1.5rem 1.5rem 2.4rem; border-radius: 1rem; border: 1px solid rgba(14,59,46,.08);
}
.logo-tile.wide { grid-column: span 3; }
.logo-tile img { max-width: min(100%, 560px); max-height: 150px; height: auto; object-fit: contain; }
.logo-tile-light { background: #fff; }
.logo-tile-dark { background: var(--ej-forest); }
.logo-tile-lime { background: var(--ej-cream); }
.logo-tile-nav { background: #E9EEE5; }
.logo-navbar { width: 100%; display: flex; align-items: center; padding: .9rem 1.4rem; background: #fff; border-radius: .75rem; box-shadow: 0 8px 20px -16px rgba(0,0,0,.4); }
.logo-navbar img { max-height: 46px; }
.logo-tile-cap { position: absolute; left: .9rem; bottom: .6rem; font-size: .78rem; color: var(--ej-muted); }
.logo-tile-dark .logo-tile-cap { color: rgba(255,255,255,.7); }
@media (max-width: 899.98px) { .logo-grid { grid-template-columns: 1fr 1fr; } .logo-tile.wide { grid-column: span 2; } }
@media (max-width: 559.98px) { .logo-grid { grid-template-columns: 1fr; } .logo-tile.wide { grid-column: span 1; } }

/* ---- Members map ------------------------------------------------------------ */
/* The card's name is a paragraph rather than the design's h3, so opening it
   never puts a heading where the page's outline cannot have one. */
.kov-pop-head .kov-pop-title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; font-size: 1.02rem; margin: 0; color: var(--ej-forest); }
.kov-pop:focus { outline: none; }
.kov-hint { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ej-muted); margin: .5rem 0 0; }
.kov-hint i { color: var(--ej-green); }
/* A member pin without a website is a button once the script runs. */
.pin[role="button"] { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .kov-pop { animation: none; } .kov { transition: none; } }

/* ---- Member directory ------------------------------------------------------- */
/* A member without an uploaded coat of arms, and a card named by an h2 when the
   section has no heading. */
.crest > .bi { font-size: 3rem; color: var(--ej-green); opacity: .35; }
.member-card h2 { font-size: 1.02rem; font-weight: 700; margin-bottom: .6rem; }

/* ---- Events ------------------------------------------------------------------- */
/* Card titles are h2 when the section has no heading; the subscribe card's
   heading is an h2 sized like the design's h3. */
.event-body h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; }
.event-body h2 a { color: var(--ej-forest); text-decoration: none; }
.event-body h2 a:hover { color: var(--ej-green); }
.subscribe .subscribe-title { font-size: 1.1rem; font-weight: 700; margin: .5rem 0 .4rem; }
.past-events .empty-state { padding: 1rem 0 0; }
/* The design's foot always has a note on the left; without one the link stays right. */
.event-foot .link-arrow { margin-left: auto; }
.cal-days a.has-event:focus-visible { outline: 3px solid var(--ej-forest); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .event-card.flash { animation: none; } }

/* ---- Event article -------------------------------------------------------------- */
.event-page .art-head .tag { display: inline-block; }
