/* ==========================================================================
   County Active Warrants (countyactivewarrants.com) - Design System
   Color Palette: Official Law Enforcement Navy / Crisp White / Light Slate
   Mobile-First, Accessible, High Performance
   ========================================================================== */

:root {
  /* Color Palette (Light Theme Only) */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --brand-navy: #0f244a;
  --brand-navy-light: #1e3a8a;
  --brand-blue: #1d4ed8;
  --brand-blue-hover: #1e40af;
  --brand-blue-light: #eff6ff;

  --badge-warrant-bg: #fef2f2;
  --badge-warrant-text: #991b1b;
  --badge-warrant-border: #fee2e2;

  --badge-bond-bg: #fffbeb;
  --badge-bond-text: #92400e;
  --badge-bond-border: #fef3c7;

  --badge-active-bg: #ecfdf5;
  --badge-active-text: #065f46;
  --badge-active-border: #d1fae5;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Sizing */
  --touch-target: 44px;
  --max-width: 1200px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px; /* Prevents auto-zoom on iOS inputs */
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-body);
  color: var(--text-primary);
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-blue-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.main-content {
  flex: 1 0 auto;
  padding-bottom: 3rem;
}

/* Site Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--brand-navy);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-title span {
  color: var(--brand-blue);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--brand-navy);
  background: var(--bg-subtle);
  text-decoration: none;
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .header-nav.desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-body) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.5rem 0 3rem;
  text-align: center;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 1.75rem;
  line-height: 1.5;
}

/* Search Bar (Mobile-First Touch Target) */
.search-container {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .search-form {
    flex-direction: row;
  }
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-btn {
  height: 52px;
  padding: 0 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--brand-navy-light);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--brand-navy);
}

/* Trust / Stats Banner */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Legal Notice Banner */
.notice-box {
  background: #f8fafc;
  border-left: 4px solid var(--brand-navy-light);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.notice-box strong {
  color: var(--text-primary);
}

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Warrant Card Grid */
.warrants-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .warrants-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .warrants-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Warrant Card (Clean, Purpose-Fitted, High Scannability) */
.warrant-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.warrant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.card-top {
  display: flex;
  gap: 1rem;
}

.card-mugshot {
  width: 76px;
  height: 96px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-mugshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mugshot-placeholder {
  color: var(--text-muted);
  font-size: 1.75rem;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}

.badge-warrant {
  background: var(--badge-warrant-bg);
  color: var(--badge-warrant-text);
  border: 1px solid var(--badge-warrant-border);
}

.badge-bond {
  background: var(--badge-bond-bg);
  color: var(--badge-bond-text);
  border: 1px solid var(--badge-bond-border);
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.3;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-name a {
  color: inherit;
}

.card-name a:hover {
  color: var(--brand-blue);
  text-decoration: none;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.card-charges {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-height: 4.2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-charges strong {
  color: var(--text-primary);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.2rem;
}

.card-action {
  margin-top: auto;
  padding-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--touch-target);
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  border: 1px solid rgba(29, 78, 216, 0.2);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-card:hover {
  background: var(--brand-blue);
  color: #ffffff;
  text-decoration: none;
}

/* Detail Profile View */
.profile-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 840px) {
  .profile-container {
    grid-template-columns: 320px 1fr;
  }
}

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

.profile-mugshot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.profile-mugshot-wrapper {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 3/4;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin: 0 auto 0.75rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-mugshot-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.profile-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.profile-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.2;
}

.profile-subhead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .specs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.spec-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
}

.spec-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.spec-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.charges-detail-box {
  background: #fff8f8;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.charges-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--badge-warrant-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.charges-content {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 600;
}

/* Breadcrumbs (Mobile Friendly Scrollable) */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--brand-blue);
}

.breadcrumbs .sep {
  color: var(--border-medium);
}

/* State Directory Grid */
.states-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .states-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .states-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.state-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--touch-target);
  transition: all 0.15s ease;
}

.state-card:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue-light);
  text-decoration: none;
}

.state-card-name {
  font-weight: 600;
  color: var(--text-primary);
}

.state-card-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* County List Grid */
.counties-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .counties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .counties-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.county-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.county-item-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.county-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.county-item-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  min-height: var(--touch-target);
}

.page-btn:hover {
  background: var(--bg-subtle);
  text-decoration: none;
}

.page-btn.active {
  background: var(--brand-navy);
  color: #fff;
  border-color: var(--brand-navy);
}

/* Forms & Compliance Views */
.form-card {
  max-width: 680px;
  margin: 2rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.85rem;
  font-size: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
}

.form-control:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  min-height: 110px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--brand-navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background: var(--brand-navy-light);
  color: #fff;
  text-decoration: none;
}

/* Site Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--text-secondary);
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
}

.footer-links a:hover {
  color: var(--brand-blue);
}

.footer-disclaimer {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-size: 0.78rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}
