/* QMRITools site theme: one plain CSS file, no build step.
   Change the look by editing the variables below. */
:root {
  --accent: #008cba;
  --accent-dark: #006687;
  --text: #222;
  --muted: #666;
  --bg: #fff;
  --bg-soft: #f4f6f8;
  --bar: #1f2933;
  --banner-from: #006687;
  --banner-to: #0b3a4d;
  --bar-hover: rgba(255, 255, 255, .15);
  --bar-active: rgba(255, 255, 255, .22);
  --footer-bg: var(--bar);
  --footer-text: #cbd2d9;
  --footer-link: #fff;
  --heading-font: var(--font);
  --banner-height: 22rem;
  --bar-text: #fff;
  --line: #d9dee3;
  --width: 62rem;
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Consolas, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; display: flex; flex-direction: column; min-height: 100vh; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--heading-font); line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { margin-top: 0; font-size: 2rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-soft); padding: .1em .3em; border-radius: 3px; }
pre { background: var(--bg-soft); padding: 1em; overflow-x: auto; border-radius: 4px; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; margin: 1em 0; }
th, td { border: 1px solid var(--line); padding: .4em .7em; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); }
blockquote { margin: 1em 0; padding: .1em 1em; border-left: 4px solid var(--line); color: var(--muted); }

/* layout */
.content, .widgets, .callforaction { max-width: var(--width); margin: 0 auto; padding: 0 1rem; }
main { flex: 1; padding: 2rem 0 3rem; }
.subheadline { margin: 0; color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .05em; }
article > header h1 { margin-bottom: .1em; }
.teaser { margin: 0 0 1.5rem; font-size: 1rem; font-style: italic; color: var(--muted); }

/* banner behind the logo, then the menu bar with dropdowns (CSS only, hover and keyboard focus) */
.brand { background: linear-gradient(120deg, var(--banner-from), var(--banner-to) 70%); padding: .75rem 1rem; }
.brand .logo { display: block; max-width: var(--width); margin: 0 auto; }
.brand .logo img { display: block; height: 3.2rem; width: auto; }
.topbar { background: var(--bar); padding: 0 1rem; }
.topbar .menu { max-width: var(--width); margin: 0 auto; }
.menu, .dropdown { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; gap: .25rem; }
.menu > li { position: relative; }
.menu a { display: block; padding: .5rem .8rem; color: var(--bar-text); text-decoration: none; }
.menu > li:hover > a, .menu > li:focus-within > a { background: var(--bar-hover); }
.dropdown { display: none; position: absolute; z-index: 10; left: 0; top: 100%; min-width: 17rem; background: var(--bar); box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.menu li:hover > .dropdown, .menu li:focus-within > .dropdown { display: block; }
.dropdown a:hover, .dropdown a:focus { background: var(--bar-hover); }

/* images and lists */
.page-image { margin: 1.5rem 0; text-align: center; }
.page-image img { max-width: 90%; }
.page-list { padding-left: 1.2rem; }

/* front page */
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; margin-top: 2rem; }
.widget h2 { margin-top: .5rem; font-size: 1.25rem; }
.widget h2 a { text-decoration: none; }
.callforaction { text-align: center; margin-top: 2rem; }
.button { display: inline-block; padding: .6em 1.4em; background: var(--accent); color: #fff; border-radius: 4px; text-decoration: none; }
.button:hover { background: var(--accent-dark); color: #fff; }

/* footer */
.footer { background: var(--footer-bg); color: var(--footer-text); font-size: .9rem; }
.footer a { color: var(--footer-link); }
.footer h5 { margin: 0 0 .5rem; color: var(--footer-link); font-size: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer-columns { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; max-width: var(--width); margin: 0 auto; padding: 2rem 1rem; }
.subfooter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; max-width: var(--width); margin: 0 auto; padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .2); }
.subfooter p { margin: 0; }
.social { display: flex; gap: 1rem; }

/* forms (contact page) */
.contact-form { max-width: 40rem; margin-top: 1.5rem; }
.form-row { margin: 0 0 1.2rem; }
.form-label { display: block; margin-bottom: .3rem; font-size: .9rem; color: var(--muted); }
.form-input, .form-textarea { display: block; width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text); background: #fff; border: 1px solid #b8c0c8; border-radius: 4px; }
.form-input:focus, .form-textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-textarea { min-height: 9rem; resize: vertical; }
button.button { border: 0; font: inherit; cursor: pointer; }
.hidden { display: none; }

/* menu: current section */
.menu > li.active > a { background: var(--bar-active); }

/* accessibility and small screens */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 20; padding: .5rem 1rem; background: #fff; color: var(--text); }
.skip-link:focus { left: 0; }
table { display: block; overflow-x: auto; max-width: 100%; }

/* site search box (404 page) */
#search input { display: block; width: 100%; max-width: 24rem; padding: .6rem .7rem; font: inherit; color: var(--text); background: #fff; border: 1px solid #b8c0c8; border-radius: 4px; }
#search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* header: menu above the banner when nav_first is set in _config.yml; dropdowns stay above the banner */
.site-header { display: flex; flex-direction: column; }
.site-header.nav-first .topbar { order: -1; }
.topbar { position: relative; z-index: 5; }

/* photo banner (header.image_fullwidth) with the logo laid over it, and text banner (header.title) */
.brand-image { display: flex; align-items: center; min-height: var(--banner-height); background-size: cover; background-position: center; }
.brand-image .logo { width: 100%; }
.brand-image .logo img { height: auto; max-height: 9rem; max-width: 100%; }
.brand-text { padding: 2.5rem 1rem; text-align: center; }
.brand-title { max-width: var(--width); margin: 0 auto; font: 700 2rem/1.2 var(--heading-font); color: #fff; }
.banner-caption { margin: 0; padding: .2rem 1rem; text-align: right; font-size: .75rem; color: var(--muted); }

/* front page cards */
.widget img { display: block; width: 100%; border-radius: 4px; }
.button.small { padding: .3em .9em; font-size: .85rem; }

/* gallery with a lightbox (no JavaScript) */
.gallery { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.gallery img { display: block; width: 100%; border-radius: 4px; }
.gallery-label { display: block; margin-top: .3rem; font-size: .85rem; }
.lightbox { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .88); align-items: center; justify-content: center; }
.lightbox:target { display: flex; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; }
.lightbox figcaption { margin-top: .6rem; color: #fff; }
.lightbox a { color: #fff; text-decoration: none; }
.lightbox-close { position: absolute; top: .5rem; right: 1.2rem; font-size: 2.5rem; line-height: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); padding: 1rem; font-size: 3rem; line-height: 1; }
.lightbox-prev { left: .5rem; }
.lightbox-next { right: .5rem; }
