/* ============================================================
   Style sheet for Holtz pages (WCAG 2.1–aligned rewrite)
   - New palette, same general look (light page, blue accents, red shadow motif)
   - Better contrast, focus visibility, and link affordances
   ============================================================ */

:root {
  /* Typography */
  --font-body: Palatino, "Palatino Linotype", Georgia, serif;
  --font-ui: Futura, "Franklin Gothic Medium", "Franklin Gothic", Verdana, Arial, sans-serif;

  /* Core colors (accessible) */
  --bg: #ffffff;
  --text: #111827;          /* near-black */
  --muted: #374151;

  /* Brand-ish accents */
  --nav-accent: #0b4a8b;    /* deep blue */

  /* Links */
  --link: #0000EE;          /* standard blue */
  --link-hover: #bb1122;
  --link-visited: #884488;  /* accessible purple */

  /* Surfaces / boxes */
  --box-border: #111827;
  --textbox-bg: #e7f6ff;    /* light cyan (higher comfort than #e0ffff) */
  --aside-bg: #fff1cc;      /* warm light yellow (higher comfort than #fff8dc) */

  /* Focus ring */
  --focus: #f59e0b;         /* amber */
}

/* Base */
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  margin: 10px;
  background: var(--bg);
}

/* General selector values */.wrapper {
  width: 100%;
  overflow: hidden;
}.container {
  width: 100%;
  margin: 0 auto;
}.banner-img {
  width: 100%;
  height: auto;
}

/* Captioned images */.wp-caption {
  position: relative;
  padding: 0;
  margin: 0;
}.wp-caption img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Keep overlay but ensure caption text remains readable */.wp-caption:after {
  content: "";
  position: absolute;
  display: block;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  /* Slightly stronger bottom darkening for consistent caption contrast */
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.65) 100%
    );
  z-index: 1;
  pointer-events: none;
}.wp-caption-text {
  display: block;
  position: absolute;
  width: 100%;
  color: #ffffff;
  left: 0;
  bottom: 0;
  padding: 1em;
  font-weight: 700;
  z-index: 2;
  box-sizing: border-box;
  /* Improve readability over complex images */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Highlight boxes */.textbox {
  padding: 2px 6px 4px 6px;
  margin-left: 25px;
  width: 75%;
  color: var(--text);
  background-color: var(--textbox-bg);
  border: 2px solid var(--box-border);
}.asidebox {
  padding: 2px 6px 4px 6px;
  margin-left: 25px;
  width: 85%;
  color: var(--text);
  background-color: var(--aside-bg);
  border: 2px solid var(--box-border);
}

/* Text */
p {
  line-height: 1.6; /* increased for readability */
}

/* Headings: keep centered + shadow motif, but reduce harshness */
h1 {
  font-size: 3em;
  margin: 0;
  padding: 0.25em;
  text-align: center;
  font-weight: 800;
  text-shadow: 1px 1px 0 var(--shadow-red);
}

h2 {
  font-size: 2em;
  margin: 0;
  padding: 0.1em 0.25em;
  padding-left: 1em;
  text-align: center;
  font-weight: 700; /* “plain” is invalid; use numeric weight */
  text-shadow: 1px 1px 0 var(--shadow-red);
}

h3 {
  font-size: 1.5em;
  text-align: center;
  font-weight: 800;
  text-shadow: 1px 1px 0 var(--shadow-red);
}

h5, h6 {
  font-family: var(--font-ui);
}

/* Banner caption */
#bannercaption {
  font-size: 0.95rem;
  font-family: var(--font-ui);
  font-weight: 700;
  text-align: left;
  text-shadow: 1px 1px 0 var(--shadow-red);
  background: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
  padding: 10px;
}

/* Lists / text blocks */
#keypoints-txt {
  font-size: 1rem;
  font-style: italic;
  font-family: var(--font-ui);
  list-style-type: disc;
}

#textbox-txt {
  font-size: 1rem;
  font-family: var(--font-body);
}

/* Images */
img {
  /* Don’t force border-width:0; allow linked images to remain distinguishable if styled elsewhere */
  border: 0;
}

/* Content images */
#content img {
  padding: 5px;
}

/* If your layout depends on floating images to the right */
#content img {
  float: right;
  margin: 0 0 1em 1em;
}

/* Links: restore underline so links are not color-only (WCAG 1.4.1) */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 0.16em;
}

a:visited {
  color: var(--link-visited);
}

/* Keyboard focus visibility (WCAG 2.4.7 / 2.4.11) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

/* Emphasis */
strong {
  font-style: italic;
}

css

/* ============================================================
   Responsive reflow layout (replaces absolute positioning)
   Desktop: left sidebar + main content
   Mobile/Zoom: stacks cleanly
   ============================================================ */

/* If your pages already have a wrapper/container around header+nav+content,
   you can target it instead. This uses body as the layout root to work
   with existing HTML. */
body {
  /* Keep your existing margin: 10px; from earlier */
  display: grid;
  grid-template-columns: 18rem 1fr;
  grid-template-areas:
    "header header"
    "nav    main"
    "footer footer";
  gap: 1rem 1.25rem;
  align-items: start;
}

/* Header spans full width */
#header {
  position: static;     /* override absolute */
  grid-area: header;
  margin: 0;
}

/* Sidebar */
#navigation {
  position: static;     /* override absolute */
  grid-area: nav;

  margin: 0;            /* override old margin-based placement */
  width: auto;          /* allow grid to size it */
  max-width: 18rem;

  padding: 0.75rem;

  /* Keep the same general look: right border accent */
  border-right: 10px solid var(--nav-accent);

  /* Optional: make sidebar visually distinct */
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 0.75rem;
}

/* Main content area */
#content {
  grid-area: main;

  margin: 0;            /* override old margin-based placement */
  min-width: 0;         /* prevents overflow in grid layouts */
}

/* Footer spans full width */
#footer {
  grid-area: footer;
}

/* Ensure floated images in content don't cause horizontal scroll */
#content img {
  max-width: 100%;
  height: auto;
}

/* Optional: contain floats so sidebars/sections don't collapse */
#content::after,
#navigation::after {
  content: "";
  display: block;
  clear: both;
}

/* -----------------------
   Responsive stacking
   Triggers on small screens and also helps at high zoom.
   ----------------------- */
@media (max-width: 52rem) {
  body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "nav"
      "main"
      "footer";
  }

  #navigation {
    max-width: none;
    border-right: 0;
    border-left: 0;
    border-radius: 0.75rem;
    border-top: 10px solid var(--nav-accent); /* keeps the accent in stacked mode */
  }

  /* On small/zoomed layouts, avoid forced right-floating images */
  #content img {
    float: none;
    display: block;
    margin: 0.75rem auto;
  }
}

/* -----------------------
   Extra safety for very narrow screens / very high zoom
   ----------------------- */
@media (max-width: 30rem) {
  body {
    gap: 0.75rem;
  }

  #navigation {
    padding: 0.6rem;
  }
}

#content {
  margin: 250px 0 0 0;
}

#picture {
  padding: 1px;
  float: right;
  text-align: center;
  font-size: 0.9rem; /* avoid tiny 8pt; improves readability */
  color: var(--muted);
  margin: 0 0 1em 1em;
}

#footer {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#footer img {
  padding: 10px;
}

/* Reduced motion support (safe baseline) */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link: hidden until focused (keyboard users) */.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: #ffffff;
  color: #000000;
  border: 2px solid #f59e0b; /* visible focus color */
  border-radius: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;

  transform: translateY(-200%);
  transition: transform 0.15s ease-in-out;
  z-index: 9999;
}.skip-link:focus,.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

/* Responsive video embed with preserved aspect ratio */.video-embed {
  max-width: 100%;
}.video-embed iframe {
  display: block;
  width: 100%;
  max-width: 56rem;        /* optional: keeps it from becoming too wide */
  aspect-ratio: 16 / 9;    /* modern responsive sizing */
  height: auto;
  border: 0;
}

/* Fallback for older browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {.video-embed {
    position: relative;
    max-width: 56rem; /* optional */
  }.video-embed::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 */
  }.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {.skip-link {
    transition: none;
  }
}
