/* Teeterville Pioneer Museum: static replacement for the WordPress Weaver II "Shadows" theme.
   Colours and sizes are taken from the live theme's computed styles so the site looks the same. */

:root {
  --page-bg: #d1d1d1;
  --panel: #f7f7f7;
  --text: #333333;
  --heading: #445566;
  --link: #3467bf;
  --link-hover: #5695ff;
  --menu-bg: #444444;
  --menu-text: #d0d0d0;
  --menu-current: #fffffe;
  --menu-hover-bg: #222222;
  --menu-hover-text: #9e9e9e;
  --submenu-bg: #4f4f4f;
  --footer-link: #555555;
  --footer-link-hover: #bf0000;
  --img-frame: #333333;
  --focus: #2d4a9e;
  --focus-on-dark: #e6c031;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--page-bg) url("/wp-content/uploads/2014/09/websitebackground2014.jpg") center top repeat-y;
  color: var(--text);
  font: 12px/1.5 Arial, Helvetica, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 8px 12px;
  font-size: 16px;
  z-index: 10;
}
.skip-link:focus { left: 16px; }

/* Visible keyboard focus (the old theme had none) */
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#access a:focus-visible { outline-color: var(--focus-on-dark); outline-offset: -3px; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

#wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px;
  background: var(--panel);
  border-radius: 10px;
}

#branding img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px 10px 0 0;
}

/* ---- Main menu ---- */

#access {
  position: relative;
  background: var(--menu-bg) url("/wp-content/uploads/2012/05/menubar.jpg");
  border-radius: 0 0 7px 7px;
  font: 14.4px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#access ul { list-style: none; margin: 0; padding: 0; }

#access .menu { display: flex; flex-wrap: wrap; }
#access .menu > li { position: relative; }

#access a {
  display: block;
  padding: 0 10px;
  line-height: 38px;
  color: var(--menu-text);
  font-weight: bold;
  text-decoration: none;
}
#access li:hover > a, #access a:focus {
  background: var(--menu-hover-bg);
  color: var(--menu-hover-text);
}
#access .current > a { color: var(--menu-current); }

#access .menu ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  min-width: 190px;
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
}
#access .menu li:hover > ul, #access .menu li:focus-within > ul { display: block; }
#access .menu ul a {
  padding: 10px;
  line-height: 18px;
  background: var(--submenu-bg);
  font-weight: normal;
}
#access .menu ul li:hover > a, #access .menu ul a:focus { background: var(--menu-hover-bg); color: #888888; }

.menu-toggle, .menu-toggle-label { display: none; }

/* ---- Content ---- */

#content {
  padding: 20px 25px 10px;
  font-size: 15.96px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 { color: var(--heading); margin: 0 0 0.8em; line-height: 1.5; }

#content .entry-title {
  font: bold 23.94px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
  border-bottom: 1px solid var(--heading);
  text-shadow: 1px 1px 1px #999;
  padding-bottom: 2px;
  margin-bottom: 24px;
}

.entry-content h1 { font-size: 1.9em; }
.entry-content h2 { font-size: 1.5em; }
.entry-content h3 { font-size: 1.17em; }
.entry-content p { margin: 0 0 1.5em; }

hr {
  border: 0;
  height: 1px;
  background: var(--menu-bg);
  margin: 0.5em 0 1.5em;
}

.entry-content::after { content: ""; display: table; clear: both; }

.entry-content img {
  max-width: 100%;
  height: auto;
  padding: 6px;
  background: var(--img-frame);
  box-shadow: 0 1px 2px #bbbbbb;
  vertical-align: middle;
}

.aligncenter { display: block; margin: 0 auto 1em; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }

figure { margin: 0 0 1em; max-width: 100%; }
figcaption { text-align: center; font-size: 0.9em; margin-top: 4px; }

/* Features page photo gallery (was the WordPress [gallery] shortcode). */
.gallery {
  list-style: none;
  margin: 0 0 1.5em;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  text-align: center;
}
.gallery figure { margin: 0; }
.gallery img { padding: 0; border: 2px solid #cfcfcf; background: none; box-shadow: none; }

/* ---- Footer ---- */

#colophon {
  margin-top: 10px;
  padding: 12px 28px 10px;
  border-top: 1px solid #e0e0e0;
  font-size: 14.4px;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-right { text-align: right; }
.footer-links a { color: var(--footer-link); display: inline-block; padding: 3px 0; }
.footer-links a:hover, .footer-links a:focus { color: var(--footer-link-hover); }
.footer-logo img { display: block; }

#site-info { font-size: 14px; margin: 16px 0 0; }
#site-info a { display: inline-block; padding: 6px 0; }
figure > a { display: inline-block; }

/* ---- Small screens ---- */

@media (max-width: 640px) {
  body { padding: 0; }
  #wrapper { border-radius: 0; padding: 0; }
  #branding img { border-radius: 0; }

  /* menubar.jpg is a single 50px strip; its edge lines would cut through stacked rows. */
  #access { border-radius: 0; background: #0a48a2; }
  .menu-toggle-label {
    display: block;
    padding: 0 16px;
    line-height: 42px;
    color: var(--menu-text);
    font-weight: bold;
    cursor: pointer;
  }
  .menu-toggle-label::after { content: " \2193"; }
  .menu-toggle:checked + .menu-toggle-label::after { content: " \2191"; }
  .menu-toggle {
    display: block;
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
  }
  .menu-toggle:focus-visible + .menu-toggle-label { outline: 2px solid #fff; outline-offset: -4px; }
  #access .menu { display: none; flex-direction: column; border-top: 1px solid var(--menu-text); }
  #access .menu-toggle:checked ~ .menu { display: flex; }
  #access a { padding: 0 16px; line-height: 42px; }
  #access .menu ul { display: block; position: static; box-shadow: none; }
  #access .menu ul a { padding: 10px 16px 10px 32px; }

  #content { padding: 16px; }
  #content a { text-decoration: underline; }
  /* Justified text leaves wide gaps between words on a narrow screen */
  .entry-content [style*="justify"] { text-align: left !important; }
  /* Lists of links (Sitemap): finger-sized rows */
  .entry-content li { margin: 0.25em 0; }
  .entry-content li > a { display: inline-block; padding: 6px 0; }
  /* Features gallery: two photos per row instead of one small one */
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gallery a { display: block; }
  .gallery img { width: 100%; height: auto; }
  .alignleft, .alignright { float: none; margin: 0 auto 1em; display: block; }
  figure.alignleft, figure.alignright { width: auto !important; text-align: center; }

  #colophon { padding: 16px; }
  .footer-links { grid-template-columns: 1fr; text-align: center; }
  .footer-links a { padding: 10px 4px; }
  .footer-right { text-align: center; }
  .footer-logo img { margin: 0 auto; }
  #site-info { text-align: center; }
}
