/* ==========================================================
   PVUK theme – colours on top of Quark 2
   Change a colour in the first block and it updates everywhere.
   ========================================================== */

:root {
  --pv-bg:        #faf6f2;  /* page background (warm off-white) */
  --pv-text:      #304c53;  /* body text, header & footer bands */
  --pv-heading:   #5a2f25;  /* headings */
  --pv-accent:    #bc6c50;  /* buttons, small accents */
  --pv-link:      #9e563e;  /* links (darker terracotta, readable) */
  --pv-highlight: #afe0e7;  /* highlight panels */
  --pv-soft:      #ddad9c;  /* borders, dividers, hover */
}

/* Map the palette onto Quark 2's design tokens (light and dark, so the
   site always looks the same whatever the visitor's system setting) */
:root:root,
:root:root[data-theme="light"],
:root:root[data-theme="dark"] {
  color-scheme: light;
  --q2-bg: var(--pv-bg);
  --q2-bg-elev: #ffffff;
  --q2-bg-muted: #f3ebe6;
  --q2-text: var(--pv-text);
  --q2-text-strong: var(--pv-heading);
  --q2-text-muted: #5f7479;
  --q2-text-inverse: #ffffff;
  --q2-divider: rgba(221, 173, 156, 0.5);
  --q2-nav-bg: var(--pv-text);
  --q2-nav-border: transparent;
  --q2-accent: var(--pv-accent);
  --q2-accent-contrast: #ffffff;
  --q2-link: var(--pv-link);

  --pico-background-color: var(--pv-bg);
  --pico-color: var(--pv-text);
  --pico-h1-color: var(--pv-heading);
  --pico-h2-color: var(--pv-heading);
  --pico-h3-color: var(--pv-heading);
  --pico-h4-color: var(--pv-heading);
  --pico-h5-color: var(--pv-heading);
  --pico-h6-color: var(--pv-heading);
  --pico-primary: var(--pv-link);
  --pico-primary-hover: var(--pv-heading);
  --pico-card-background-color: #ffffff;
  --pico-form-element-background-color: #ffffff;
  --pico-form-element-color: var(--pv-text);
}

/* No light/dark switch – the palette is designed for one look */
.theme-toggle { display: none !important; }

/* ---------- Text ---------- */
body {
  font-size: 1.0625rem; /* ~17px */
  line-height: 1.75;
}
h1, h2, h3, h4, h5, h6 { color: var(--pv-heading); }

a { color: var(--pv-link); text-decoration-color: var(--pv-soft); }
a:hover { color: var(--pv-heading); text-decoration-color: currentColor; }

blockquote {
  border-left: 3px solid var(--pv-soft);
  color: var(--pv-text);
}
hr { border-color: var(--pv-soft); }

/* ---------- Reading column ---------- */
#body-wrapper > .container > .content-item {
  max-width: 800px;
  box-shadow: 0 0 0 1px rgba(221, 173, 156, 0.35);
}

/* ---------- Header (deep teal band) ---------- */
#header,
body.scrolled #header {
  background: var(--pv-text);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
}
#header,
#header .navbar-brand,
#header .login-status-wrapper,
body #header .dropmenu > ul > li > a,
body.scrolled #header .dropmenu > ul > li > a {
  color: rgba(255, 255, 255, 0.88);
}
#header .navbar-brand svg path,
body.scrolled #header .navbar-brand svg path { fill: #ffffff; }

body #header .dropmenu > ul > li > a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
body #header .dropmenu > ul > li > a.active,
body #header .dropmenu > ul > li > a.active:hover {
  background: var(--pv-bg);
  color: var(--pv-text);
}

/* Submenus sit on a light panel */
#header .dropmenu ul ul a { color: var(--pv-text) !important; }
#header .dropmenu ul ul a:hover { color: var(--pv-link) !important; }

/* Mobile menu button and slide-out menu */
#header .button_container span,
.button_container span { background: #ffffff; }
.button_container.active span { background: var(--pv-text); }
.overlay .overlay-menu a { color: var(--pv-text); }
.overlay .overlay-menu a:hover { color: var(--pv-link); }

/* ---------- Footer (deep teal band) ---------- */
#footer {
  background: var(--pv-text);
  color: rgba(255, 255, 255, 0.88);
  border-top: 0;
}
#footer a { color: #ffffff; }

/* ---------- Buttons ----------
   <a class="btn" href="...">Filled button</a>
   <a class="btn btn-outline" href="...">Outlined button</a> */
.btn.btn-outline,
.btn.btn-ghost {
  background: transparent;
  color: var(--pv-link);
  box-shadow: inset 0 0 0 2px var(--pv-accent);
}
.btn.btn-outline:hover,
.btn.btn-ghost:hover {
  background: var(--pv-accent);
  color: #ffffff;
}

/* ---------- Highlight panel ----------
   <div class="highlight" markdown="1">
   ### Heading
   Text and [links](...)
   </div>                                   */
.highlight {
  background: var(--pv-highlight);
  color: var(--pv-text);
  padding: 1.5rem 1.75rem;
  border-radius: 10px;
  margin: 2rem 0;
}
.highlight h2, .highlight h3, .highlight h4 { color: var(--pv-text); margin-top: 0; }
.highlight h2::before { display: none; }
.highlight a { color: var(--pv-text); text-decoration-color: currentColor; }
.highlight > :last-child { margin-bottom: 0; }

/* ---------- News listing cards ---------- */
.card { box-shadow: 0 0 0 1px rgba(221, 173, 156, 0.45); }
.card h1 a, .card h2 a, .card h3 a, .card .card-title a {
  color: var(--pv-heading);
  text-decoration: none;
}

/* ---------- Fixes for Quark 2 specifics ---------- */
#footer p { color: inherit; }

body #header .dropmenu > ul > li > a.active,
body.header-dark:not(.scrolled) #header .dropmenu > ul > li > a.active {
  background: var(--pv-bg) !important;
  color: var(--pv-text) !important;
}

button.button_container,
.button_container,
button.button_container:hover {
  background: transparent;
  box-shadow: none;
}

/* News page: one column of cards, same width as the reading column */
.blog-listing .container { max-width: 800px; }
.blog-listing .blog-grid { grid-template-columns: minmax(0, 1fr) !important; }
.blog-listing #sidebar { display: none; }
.blog-listing .columns.has-sidebar { grid-template-columns: minmax(0, 1fr) !important; }

/* ---------- Page hero image ---------- */
#page-hero .image-overlay {
  background: linear-gradient(180deg, rgba(48, 76, 83, 0.25) 0%, rgba(48, 76, 83, 0.5) 100%);
}
#page-hero:not(.hero-large):not(.hero-medium):not(.hero-small):not(.hero-tiny):not(.hero-fullscreen) {
  min-height: clamp(18rem, 40vh, 26rem);
}
#page-hero #to-start { display: none; }
/* Image only (no text): drop the overlay so the photo shows true colours */
#page-hero:has(.container:empty) .image-overlay { display: none; }
