/*
Theme Name: Officer Records
Theme URI: https://dwstack.com/theme
Author: DW McEwing
Author URI: https://dwstack.com/theme
Description: A clean, mobile-first WordPress theme built for OfficerRecords.com, public records, accountability databases, and law enforcement transparency projects.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: officerrecords
Tags: custom-logo, custom-menu, responsive-layout, accessibility-ready, one-column, two-columns
*/

:root {
  --or-bg: #f6f7f9;
  --or-surface: #ffffff;
  --or-ink: #172033;
  --or-muted: #657083;
  --or-border: #d9dee8;
  --or-primary: #163a5f;
  --or-primary-dark: #0d2742;
  --or-accent: #b4873b;
  --or-danger: #8d1f1f;
  --or-radius: 14px;
  --or-shadow: 0 12px 30px rgba(13, 39, 66, 0.08);
  --or-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--or-ink);
  background: var(--or-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--or-primary); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--or-primary-dark); }
img { max-width: 100%; height: auto; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto !important; clip-path: none; display: block; height: auto; left: 12px; top: 12px; width: auto; z-index: 100000; background: #fff; padding: 10px 14px; border: 2px solid var(--or-primary);
}
.or-container { width: min(calc(100% - 32px), var(--or-max)); margin: 0 auto; }
.site-header {
  background: var(--or-surface);
  border-bottom: 1px solid var(--or-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }
.custom-logo { max-height: 52px; width: auto; }
.site-title { font-size: 1.28rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.site-title a { color: var(--or-ink); text-decoration: none; }
.site-description { margin: 0; color: var(--or-muted); font-size: 0.88rem; }
.nav-area { display: flex; align-items: center; gap: 14px; }
.menu-toggle {
  display: none;
  border: 1px solid var(--or-border);
  background: var(--or-surface);
  color: var(--or-ink);
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.primary-menu,
.footer-menu { list-style: none; padding: 0; margin: 0; }
.primary-menu { display: flex; align-items: center; gap: 4px; }
.primary-menu a {
  display: block;
  color: var(--or-ink);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a { background: #eef3f8; color: var(--or-primary-dark); }
.auth-links { display: flex; align-items: center; gap: 8px; }
.auth-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.auth-login { border: 1px solid var(--or-border); color: var(--or-primary); background: #fff; }
.auth-register { background: var(--or-primary); color: #fff; }
.auth-register:hover { color: #fff; background: var(--or-primary-dark); }
.hero {
  background: linear-gradient(135deg, var(--or-primary-dark), var(--or-primary));
  color: #fff;
  padding: clamp(46px, 7vw, 92px) 0;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
.hero h1 { margin: 0 0 14px; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -0.045em; }
.hero p { color: rgba(255,255,255,0.84); font-size: clamp(1rem, 2vw, 1.2rem); margin: 0 0 24px; }
.hero-card { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--or-radius); padding: 24px; backdrop-filter: blur(6px); }
.hero-card h2 { margin-top: 0; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.or-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 0;
}
.or-button.primary { background: var(--or-accent); color: #111827; }
.or-button.secondary { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.site-main { padding: 42px 0; }
.content-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.card,
.post,
.page,
.search-panel {
  background: var(--or-surface);
  border: 1px solid var(--or-border);
  border-radius: var(--or-radius);
  box-shadow: var(--or-shadow);
  padding: clamp(20px, 3vw, 34px);
}
.entry-title { margin-top: 0; line-height: 1.15; letter-spacing: -0.025em; }
.entry-title a { color: var(--or-ink); text-decoration: none; }
.entry-meta, .entry-footer { color: var(--or-muted); font-size: 0.92rem; }
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.stat-card { background: var(--or-surface); border: 1px solid var(--or-border); border-radius: var(--or-radius); padding: 22px; box-shadow: var(--or-shadow); }
.stat-card strong { display: block; font-size: 1.8rem; color: var(--or-primary); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--or-border);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}
button, input[type="submit"] {
  cursor: pointer;
  border: 0;
  background: var(--or-primary);
  color: #fff;
  font-weight: 800;
  border-radius: 10px;
  padding: 11px 16px;
}
.site-footer {
  background: #101827;
  color: rgba(255,255,255,0.82);
  padding: 36px 0;
  margin-top: 40px;
}
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.footer-menu { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.footer-menu a { color: rgba(255,255,255,0.88); text-decoration: none; font-weight: 700; }
.footer-menu a:hover { color: #fff; text-decoration: underline; }
.footer-brand strong { color: #fff; }

@media (max-width: 860px) {
  .header-inner { min-height: 66px; flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; }
  .nav-area { width: 100%; display: none; flex-direction: column; align-items: stretch; padding-bottom: 16px; }
  .nav-area.is-open { display: flex; }
  .primary-menu { flex-direction: column; align-items: stretch; width: 100%; }
  .primary-menu a { padding: 12px; }
  .auth-links { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-menu { justify-content: center; }
}

@media (max-width: 480px) {
  .or-container { width: min(calc(100% - 22px), var(--or-max)); }
  .site-description { display: none; }
  .auth-links { grid-template-columns: 1fr; }
  .card, .post, .page, .search-panel { padding: 18px; }
}


/* Officer Records Core plugin layout support. The plugin owns data/output; the theme owns visual presentation. */
.bar-wrap,
.bar-profile-section,
.bar-stats > div,
.bar-item {
  border-color: var(--or-border) !important;
  border-radius: var(--or-radius) !important;
  background: var(--or-surface) !important;
}

.bar-wrap {
  box-shadow: none;
  margin: 0 0 24px !important;
}

.single-bar_officer .site-main,
.single-bar_agency .site-main,
.single-bar_complaint .site-main,
.single-bar_lawsuit .site-main,
.single-bar_investigation .site-main,
.single-bar_document .site-main {
  padding-top: 28px;
}

.single-bar_officer .content-wrap,
.single-bar_agency .content-wrap,
.single-bar_complaint .content-wrap,
.single-bar_lawsuit .content-wrap,
.single-bar_investigation .content-wrap,
.single-bar_document .content-wrap {
  max-width: 1120px;
}

.single-bar_officer .record-shell,
.single-bar_agency .record-shell,
.single-bar_complaint .record-shell,
.single-bar_lawsuit .record-shell,
.single-bar_investigation .record-shell,
.single-bar_document .record-shell {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.single-bar_officer .entry-header.record-screen-reader-header {
  margin: 0;
}

.bar-officer-profile {
  max-width: 1120px !important;
}

.bar-profile-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid var(--or-border);
  border-radius: 22px;
  padding: clamp(18px, 3vw, 30px);
  box-shadow: var(--or-shadow);
}

.bar-profile-image,
.bar-profile-placeholder {
  box-shadow: 0 12px 24px rgba(13, 39, 66, 0.14);
}

.bar-eyebrow {
  color: var(--or-primary) !important;
}

.bar-profile-title h2 {
  color: var(--or-ink);
  letter-spacing: -0.04em;
}

.bar-profile-sub {
  font-size: 1rem;
}

.bar-profile-badges span {
  background: #eef3f8 !important;
  color: var(--or-primary-dark);
  border: 1px solid #d7e2ef;
  font-weight: 700;
}

.bar-profile-section {
  padding: clamp(18px, 2.5vw, 26px) !important;
  box-shadow: 0 8px 24px rgba(13, 39, 66, 0.05);
}

.bar-profile-section h3 {
  margin: 0 0 16px !important;
  color: var(--or-ink);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.bar-profile-grid {
  align-items: start;
}

.bar-facts div,
.bar-related li {
  background: #fbfcfe !important;
  border-color: #e9edf4 !important;
}

.bar-facts dt {
  color: var(--or-muted) !important;
}

.bar-facts dd {
  font-weight: 700;
}

.bar-table-wrap {
  border: 1px solid #e9edf4;
  border-radius: 14px;
}

.bar-table {
  margin: 0;
}

.bar-table th {
  background: #f8fafc;
  color: var(--or-muted) !important;
}

.bar-table th,
.bar-table td {
  vertical-align: top;
}

.bar-timeline li {
  border-left-color: var(--or-accent) !important;
  background: #fbfcfe !important;
  border: 1px solid #e9edf4;
  border-left-width: 5px;
}

.bar-timeline time {
  color: var(--or-primary-dark);
}

.bar-submit-panel details {
  border: 1px dashed #c8d3e2;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f8fafc;
}

.bar-submit-panel summary {
  color: var(--or-primary-dark);
}

.bar-submit-form button,
.bar-search button {
  background: var(--or-primary) !important;
  color: #fff !important;
  border-radius: 999px !important;
  transition: transform .15s ease, background .15s ease;
}

.bar-submit-form button:hover,
.bar-search button:hover {
  background: var(--or-primary-dark) !important;
  transform: translateY(-1px);
}

.bar-notice {
  border-radius: 12px !important;
}

.bar-disclaimer {
  border-left-color: var(--or-accent) !important;
}

.bar-stats {
  gap: 16px !important;
}

.bar-stats > div {
  box-shadow: var(--or-shadow);
}

.bar-list {
  gap: 16px !important;
}

.bar-item {
  box-shadow: 0 8px 22px rgba(13, 39, 66, 0.05);
}

.bar-item h3 a {
  color: var(--or-ink);
  text-decoration: none;
}

.bar-item h3 a:hover {
  color: var(--or-primary);
  text-decoration: underline;
}

input[type="file"] {
  background: #fff;
}

@media (max-width: 760px) {
  .bar-profile-hero {
    text-align: center;
    justify-items: center;
  }
  .bar-profile-badges {
    justify-content: center;
  }
  .bar-profile-title h2 {
    font-size: 2rem;
  }
  .bar-table-wrap {
    margin-left: -4px;
    margin-right: -4px;
  }
  .bar-submit-panel details {
    padding: 12px;
  }
}

@media (max-width: 520px) {
  .bar-profile-section,
  .bar-profile-hero {
    border-radius: 16px;
  }
  .bar-profile-image,
  .bar-profile-placeholder {
    width: 112px !important;
    height: 112px !important;
  }
  .bar-search {
    display: grid !important;
    grid-template-columns: 1fr;
  }
}
