/*
Theme Name: Commentary Light
Description: A light, responsive Bible commentary theme with a full-width header and site-wide search.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: commentary-light
*/

:root {
  color-scheme: light;
  --paper: #ffffff;
  --background: #f7f6f2;
  --ink: #292e2b;
  --muted: #646a63;
  --accent: #756037;
  --line: #e3e1d8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.8;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--ink); }
button, input { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
img { max-width: 100%; height: auto; }
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 8px 18px;
  background: white;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 300px;
  padding: 28px 24px;
  background: var(--paper);
  text-align: center;
}
.header-image { display: block; width: auto; max-width: 100%; height: auto; margin: auto; }
.header-placeholder { width: min(100%, 900px); padding: 20px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font: 600 12px/1.6 Arial, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.site-title { margin: 0; font-size: clamp(32px, 4vw, 52px); font-weight: 400; line-height: 1.2; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-description { margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.navigation-bar { background: var(--paper); border-block: 1px solid var(--line); }
.navigation-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1500px, calc(100% - 64px));
  min-height: 80px;
  margin: auto;
  padding-block: 14px;
}
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 14px/1.7 Arial, sans-serif;
}
.menu li { position: relative; }
.menu a { display: inline-block; padding-block: 8px; color: var(--ink); text-decoration: none; }
.menu a:hover, .menu .current-menu-item > a, .menu .current_page_item > a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 9px;
}
.search-form { display: flex; width: 300px; max-width: 100%; font: 14px/1.5 Arial, sans-serif; }
.search-field {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: #fcfcfa;
  color: var(--ink);
}
.search-submit {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  color: white;
}
.search-submit:hover { background: #5e4d2d; }
.site-main { width: min(1500px, calc(100% - 64px)); margin: 48px auto 64px; }
.section-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 22px;
  color: var(--muted);
  font: 12px/1.6 Arial, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.article-card { padding: clamp(24px, 5vw, 72px); border: 1px solid var(--line); background: var(--paper); }
.article-card + .article-card { margin-top: 24px; }
.article-inner { max-width: 900px; margin-inline: auto; }
.article-title { margin: 0 0 18px; font-size: clamp(30px, 3.2vw, 46px); font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.article-title a { color: inherit; text-decoration: none; }
.article-title a:hover { text-decoration: underline; }
.article-meta { margin: 0 0 32px; color: var(--muted); font: 13px/1.7 Arial, sans-serif; }
.article-content { overflow-wrap: anywhere; }
.article-content > :first-child { margin-top: 0; }
.article-content > :last-child { margin-bottom: 0; }
.article-content h2 { font-size: 28px; line-height: 1.4; font-weight: 400; }
.article-content blockquote { margin: 28px 0; padding: 6px 0 6px 24px; border-left: 3px solid #b5a37b; color: #555d51; font-style: italic; }
.article-content blockquote p { margin: 0; }
.article-content iframe, .article-content video { max-width: 100%; }
.article-content pre { overflow-x: auto; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; }
.article-content .alignwide, .article-content .alignfull { max-width: 100%; margin-inline: 0; }
.pagination { margin-top: 28px; }
.site-footer { padding: 32px; border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; max-width: 1500px; margin: auto; }
.footer-title { margin: 0; font-size: 19px; }
.footer-note { margin: 0; color: var(--muted); font: 13px/1.8 Arial, sans-serif; }

@media (max-width: 760px) {
  .navigation-inner { flex-direction: column; gap: 16px; padding-block: 18px; }
  .navigation-inner, .site-main { width: calc(100% - 32px); }
  .menu { justify-content: center; gap: 6px 22px; }
  .search-form { width: 100%; }
  .site-main { margin-block: 32px 40px; }
  .site-footer { padding: 24px 16px; }
  .footer-inner { flex-direction: column; }
}
