/* ============================================================
   Indiana Law Enforcement Memorial – Officer Search
   Modern stylesheet (drop-in for officersearch.inlem.org)
   Matches professional tone of inlem.org
   Full-width layout for easier reading and typing
   ============================================================ */

:root {
  --navy: #0a1628;
  --navy-mid: #12253f;
  --navy-light: #1a3355;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --white: #ffffff;
  --off-white: #f7f8fa;
  --gray-50: #f8fafc;
  --gray-100: #eef1f5;
  --gray-200: #d8dee8;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --text: #1e293b;
  --accent: #1e3a5f;
  --danger: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(10, 22, 40, 0.1);
  --shadow-lg: 0 12px 40px rgba(10, 22, 40, 0.15);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --content: min(1180px, 100%);
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--off-white);
  margin: 0;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

#wrap {
  flex: 1;
  width: 100%;
  min-width: 0;
}

img { max-width: 100%; height: auto; }
iframe, video { max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
button, a, input, select, textarea { touch-action: manipulation; }

/* ========== HEADER ========== */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,.35);
  overflow: visible;
}

.header-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: .85rem 2rem;
  padding-left: max(2rem, env(safe-area-inset-left));
  padding-right: max(2rem, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--white);
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 30% 30%, #1e4a7a, var(--navy));
  display: grid;
  place-items: center;
  font-size: .6rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: .02em;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--navy);
}

.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.15;
}

.brand-text small {
  display: block;
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--gold);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .55rem .9rem;
  border-radius: 6px;
  transition: all .2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,.08);
}

.main-nav a.active { color: var(--gold-light); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.3);
  color: white;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.25rem;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

/* ========== PAGE HERO ========== */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
  color: white;
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
}

.page-hero h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0 0 .5rem;
}

.page-hero p {
  color: rgba(255,255,255,.75);
  margin: 0 auto;
  max-width: 720px;
  font-size: 1.15rem;
}

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  margin-top: 1.6rem;
}

.stat-item .num {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
}

.stat-item .label {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.6);
}

/* ========== MAIN ========== */
.main-content {
  flex: 1;
  max-width: var(--content);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  width: 100%;
}

.memorial-classic.container,
.container.memorial-classic {
  max-width: 1170px;
  width: 100%;
  margin: 18px auto 32px;
  background: #fff;
  padding: 18px 22px 34px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10, 22, 40, 0.08);
}

.memorial-classic .col-md-3.text-center {
  text-align: center;
}

.memorial-classic .memorial-photo,
.memorial-classic .col-md-3 img {
  display: inline-block;
  margin: 15px auto 0;
  max-height: 200px;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  float: none;
}

.memorial-classic .panel {
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(10, 22, 40, 0.04);
  background: #fff;
}

.memorial-classic .panel-body { padding: 16px; }

.memorial-classic .memorial-id-head { margin-bottom: 14px; }

.memorial-classic .memorial-rank {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #c9a227;
}

.memorial-classic .memorial-name {
  font-size: 22px;
  font-weight: 700;
  color: #0a1628;
  line-height: 1.25;
  margin: 4px 0 6px;
}

.memorial-classic .memorial-agency {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.memorial-classic .memorial-eow {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0a1628;
}

.memorial-classic .memorial-id-meta {
  padding-top: 12px;
  border-top: 1px solid #eef1f5;
  font-size: 14px;
  color: #1e293b;
}

.memorial-classic .memorial-narrative {
  padding-top: 4px;
}

.memorial-classic .memorial-narrative,
.memorial-classic .memorial-narrative p {
  font-size: 15px;
  line-height: 1.7;
  color: #334155;
}

.memorial-classic #map {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e6eaf0;
}

.memorial-classic .memorial-agency-foot {
  font-size: 13px;
  color: #334155;
}

.memorial-classic .memorial-agency-foot hr {
  border: 0;
  border-top: 1px solid #eef1f5;
  margin: 14px 0;
}

.memorial-classic .memorial-agency-foot img {
  display: block;
  margin: 12px auto 0;
  max-height: 100px;
}

.memorial-classic .incident-panel {
  border: 1px solid #e6eadf;
  border-radius: 10px;
  overflow: hidden;
}

.memorial-classic .incident-panel .panel-body { padding: 0; }

.memorial-classic .incident-title {
  margin: 0;
  padding: 12px 14px;
  background: #0a1628;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}

.memorial-classic .incident-list {
  margin: 0;
  padding: 4px 0;
}

.memorial-classic .incident-list > div {
  padding: 9px 14px;
  border-bottom: 1px solid #eef1f5;
  text-align: center;
}

.memorial-classic .incident-list dt {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}

.memorial-classic .incident-list dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #0a1628;
}

.memorial-classic .incident-actions {
  padding: 12px 14px 16px;
  text-align: center;
  background: #f8fafc;
  border-top: 1px solid #eef1f5;
}

.memorial-classic .incident-actions input {
  background: #0a1628;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.memorial-classic .incident-share {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}

.memorial-classic .incident-share a {
  display: inline-block;
  margin: 6px 4px 0;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.memorial-classic .incident-share .fa-facebook { color: #3b5998; }
.memorial-classic .incident-share .fa-whatsapp { color: #34af23; }
.memorial-classic .incident-share .fa-twitter { color: #0084b4; }

.memorial-classic .memorial-narrative,
.memorial-classic .memorial-narrative p {
  font-size: 14px;
  line-height: 1.55;
  color: #222;
}

.memorial-classic .memorial-narrative img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
}

/* ========== SEARCH CARD ========== */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 3rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 5;
}

.search-card h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}

.search-card h2::before {
  content: "";
  width: 4px;
  height: 1.25em;
  background: var(--gold);
  border-radius: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.35rem 1.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group label {
  font-size: .95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-500);
}

.form-group input,
.form-group select {
  padding: .95rem 1.1rem;
  min-height: 52px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  width: 100%;
  max-width: 100%;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 8 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.4rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}

.form-group .form-control {
  height: auto;
  box-shadow: none;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .55rem;
  align-items: end;
}

.range-row .to {
  font-size: 1rem;
  color: var(--gray-500);
  padding-bottom: .9rem;
  text-align: center;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.85rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .95rem 1.85rem;
  min-height: 52px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.btn-primary {
  background: var(--navy);
  color: white;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10,22,40,.25);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray-200);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.map-link {
  margin-left: auto;
  font-size: 1.05rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* Autocomplete (agency + last name) */
.ui-widget { position: relative; overflow: visible; }
.search-card, .form-grid, .form-group { overflow: visible; }

#suggesstion-box,
#lname-suggestion-box {
  position: absolute;
  z-index: 4000;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  max-height: 260px;
  overflow-y: auto;
  left: 0;
  right: 0;
  top: 100%;
  width: 100%;
  margin-top: 2px;
}

#country-list,
#lname-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: white;
}

#country-list,
#lname-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#country-list li,
#lname-list li {
  padding: .8rem 1.05rem;
  cursor: pointer;
  font-size: 1.08rem;
  border-bottom: 1px solid var(--gray-100);
}

#country-list li:hover,
#lname-list li:hover { background: var(--gray-50); }

.ui-widget { position: relative; }

/* Alert */
.alert {
  padding: .95rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}

.alert-danger {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

/* ========== RESULTS / DIRECTORY TABLE ========== */
.results-card, .directory-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
  overflow-x: auto;
}

.results-card h2, .directory-card h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin: 0 0 1.15rem;
}

table.dataTable,
.results-table,
.officer-table {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 1.05rem;
}

table.dataTable thead th,
.results-table thead th,
.officer-table thead th {
  text-align: left;
  padding: .85rem 1rem;
  background: var(--navy);
  color: white;
  font-size: .88rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

table.dataTable tbody td,
.results-table tbody td,
.officer-table tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}

table.dataTable tbody tr:hover,
.results-table tbody tr:hover,
.officer-table tbody tr:hover {
  background: var(--gray-50);
}

.county-badge,
.badge-county {
  display: inline-block;
  background: var(--gray-100);
  color: var(--navy);
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, var(--navy-mid), var(--navy));
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 2.5rem;
}

.officer-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.directory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.directory-toolbar input[type="search"],
.directory-toolbar input {
  padding: .75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  min-width: min(280px, 100%);
  width: 100%;
  max-width: 420px;
  font-size: 1rem;
  min-height: 48px;
  font-family: inherit;
}

.table-wrap,
.table-card,
.table-responsive {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.memo-icons img {
  height: 18px;
  width: auto;
  vertical-align: middle;
}

/* ========== OFFICER MEMORIAL (matches live officersearch layout) ========== */
.memorial-page {
  max-width: 1170px;
  margin: 0 auto 2rem;
  padding: 8px 20px 36px;
  background: #fff;
}

.officer-layout {
  display: grid;
  grid-template-columns: 25% 50% 25%;
  gap: 0;
  align-items: start;
}

.officer-sidebar,
.officer-aside,
.officer-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 15px;
  min-width: 0;
}

.photo-card,
.patch-card,
.map-card {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 15px 0 0;
  text-align: center;
  overflow: visible;
}

.photo-card img,
.officer-photo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 200px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.patch-card .agency-patch {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 200px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.photo-placeholder {
  width: 140px;
  height: 180px;
  margin: 0 auto;
  background: #eee;
  display: grid;
  place-items: center;
  color: #666;
  font-size: 2rem;
}

.header-card,
.details-card,
.side-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: none;
}

.header-card {
  padding: 15px;
  text-align: center;
}

.header-card .rank,
.header-card h1,
.header-card .agency,
.header-card .eow {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
  line-height: 1.35;
}

.header-card h1 { margin: 2px 0; }

.header-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  margin-top: 18px;
  font-size: 14px;
  color: #000;
}

.header-meta-left,
.header-meta-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-meta img {
  height: 30px;
  width: 30px;
  vertical-align: middle;
  margin-right: 6px;
}

.details-card {
  padding: 15px 12px;
  text-align: center;
}

.details-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #000;
  border: 0;
  text-decoration: underline;
  text-align: center;
}

.detail-row {
  display: block;
  padding: 6px 0;
  border: 0;
  font-size: 14px;
  text-align: center;
  line-height: 1.35;
}

.detail-label {
  display: block;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.detail-value {
  display: block;
  text-align: center;
  font-weight: 400;
  color: #000;
}

.narrative-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 8px 4px 0;
  overflow: visible;
}

.narrative-card h2 { display: none; }

.narrative-card p,
.narrative-card li,
.narrative-card td {
  font-size: 14px;
  line-height: 1.55;
  color: #222;
}

.narrative-card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
}

.narrative-missing {
  color: #666;
  font-style: italic;
}

.map-card #map,
#map {
  height: 300px;
  width: 100%;
}

.side-card {
  padding: 12px 10px 16px;
  text-align: center;
  font-size: 14px;
}

.side-card img,
.side-card img.side-patch {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100px;
  height: auto;
  object-fit: contain;
  margin: 10px auto;
}

.side-card hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 12px 0;
}

@media (max-width: 991px) {
  .officer-layout { grid-template-columns: 1fr; }
  .officer-sidebar,
  .officer-aside,
  .officer-main { padding: 0; }
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.8);
  padding: 2.5rem 2rem 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding-left: max(2rem, env(safe-area-inset-left));
  padding-right: max(2rem, env(safe-area-inset-right));
  margin-top: auto;
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 1.25rem;
}

.footer-brand { max-width: 340px; }

.footer-brand .brand-text {
  color: white;
  margin-bottom: .6rem;
}

.footer-brand p {
  font-size: .95rem;
  color: rgba(255,255,255,.6);
  margin: 0;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
}

.footer-col h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  margin: 0 0 .7rem;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin-bottom: .4rem;
  padding: .2rem 0;
  min-height: 32px;
}

.footer-col a:hover { color: var(--gold-light); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: .88rem;
  color: rgba(255,255,255,.45);
}

.footer-social {
  display: flex;
  gap: .6rem;
}

.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  color: white;
  font-size: .95rem;
  transition: background .2s;
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--navy);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
}

.footer-badges img {
  height: auto;
  max-height: 32px;
}

/* ========== TABLET ========== */
@media (max-width: 1100px) {
  .officer-layout { grid-template-columns: 1fr; }
  .header-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
  .main-content { padding-left: 1.25rem; padding-right: 1.25rem; }
  .search-card { padding: 2rem 1.75rem; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: var(--navy-mid);
    flex-direction: column;
    align-items: stretch;
    padding: .5rem;
    box-shadow: 0 12px 28px rgba(0,0,0,.35);
    border-radius: 0 0 10px 10px;
    z-index: 1001;
  }
  .main-nav.open { display: flex; }
  .main-nav li { width: 100%; }
  .main-nav a {
    width: 100%;
    display: block;
    text-align: center;
    padding: .9rem 1rem;
    min-height: 44px;
    font-size: 1rem;
  }
}

/* ========== PHONE ========== */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .header-inner,
  .main-content,
  .page-hero,
  .site-footer {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .header-inner { padding-top: .65rem; padding-bottom: .65rem; }
  .brand-logo-img,
  .brand-logo { width: 42px; height: 42px; }
  .brand-text { font-size: .82rem; letter-spacing: .02em; }
  .page-hero { padding-top: 1.75rem; padding-bottom: 2.25rem; }
  .page-hero h1 { font-size: 1.45rem; letter-spacing: .03em; }
  .page-hero p { font-size: 1rem; }
  .stats-bar { gap: 1.1rem 1.5rem; margin-top: 1.1rem; }
  .stat-item .num { font-size: 1.4rem; }
  .stat-item .label { font-size: .72rem; }
  .search-card {
    padding: 1.25rem 1rem;
    margin-top: -1.5rem;
    border-radius: 10px;
  }
  .search-card h2 { font-size: 1.2rem; margin-bottom: 1.1rem; }
  .form-grid { grid-template-columns: 1fr; gap: 1rem; }
  .form-group label { font-size: .8rem; }
  .form-group input,
  .form-group select {
    font-size: 16px; /* prevent iOS zoom on focus */
    min-height: 48px;
    padding: .8rem .95rem;
  }
  .range-row { grid-template-columns: 1fr 1fr; }
  .range-row .to { display: none; }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.25rem;
  }
  .form-actions .btn,
  .form-actions .map-link {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
  .map-link { margin-left: 0; }
  .results-card,
  .directory-card,
  .table-card {
    padding: 1rem .75rem;
  }
  .directory-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .directory-toolbar input {
    max-width: 100%;
    min-width: 0;
  }
  table.dataTable,
  .results-table,
  .officer-table {
    font-size: .92rem;
  }
  table.dataTable thead th,
  .results-table thead th,
  .officer-table thead th,
  table.dataTable tbody td,
  .results-table tbody td,
  .officer-table tbody td {
    padding: .7rem .65rem;
    white-space: nowrap;
  }
  .memorial-page { padding: 8px 12px 24px; }
  .photo-card img,
  .officer-photo,
  .patch-card .agency-patch {
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  .footer-top { flex-direction: column; gap: 1.5rem; }
  .footer-brand { max-width: none; }
  .footer-links { flex-direction: column; gap: 1.25rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }
}

@media (max-width: 480px) {
  .brand-text small,
  .brand-text span { display: none; }
  .brand-text { max-width: 11.5rem; }
  .page-hero h1 { font-size: 1.28rem; }
  .stat-item { flex: 1 1 40%; }
  .search-card { padding: 1rem .85rem; }
}

@media (hover: none) {
  .btn-primary:hover { transform: none; }
  a:hover { color: var(--accent); }
  .main-nav a:hover { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Print */
@media print {
  .site-footer, .nav-toggle, .btn, .form-actions { display: none !important; }
  .main-content { padding: 0; max-width: 100%; }
  body { background: white; }
}
