﻿/* =========================
   RESET & BASE
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #222;
  line-height: 1.5;
  padding-top: 56px; /* fixed header offset */
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1.alert-address {
  text-transform: uppercase;
  font-size: 1.8rem;       /* adjust as needed */
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  color: #222;             /* or your preferred color */
}
/* =========================
   FIXED TOP HEADER
   ========================= */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #111;
  border-bottom: 4px solid #a80906;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
}

.brand-logo {
  height: 28px;
  width: auto;
}

.brand-text {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* =========================
   HERO AD
   ========================= */
.ad {
  background: #e9ecf1;
  border: 2px dashed #b0b6c3;
  color: #555;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ad span {
  padding: 1rem;
}

.ad-hero {
  max-width: 1200px;
  height: 90px;
  margin: 1.5rem auto;
}

/* =========================
   LAYOUT CONTAINER
   ========================= */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
/*
@media (min-width: 900px) {
  .grid {
    grid-template-columns: 2fr 1fr;
  }
}
*/

/* =========================
   MAIN CONTENT
   ========================= */
.ad-inline {
  height: 250px;
  margin-bottom: 2rem;
}

/* =========================
   LISTINGS
   ========================= */
.listings h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.listing-grid {
  display: grid;
  gap: 1rem;
}

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

.listing-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;

  box-sizing: border-box;   /* include padding/border in width */
  width: 100%;              /* full width of parent container */
  max-width: 100%;          /* never exceed container */
  overflow-x: hidden;       /* prevent any horizontal overflow */
  word-wrap: break-word;    /* break long words/URLs in content */
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.listing-card .listing-info {
  display: flex;
  flex-wrap: wrap;           /* allow items to wrap to next line */
  gap: 0.5rem 1rem;
  word-wrap: break-word;     /* break long words/addresses */
  overflow-wrap: anywhere;   /* modern browsers */
}

.listing-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* =========================
   SIDEBAR
   ========================= */
.sidebar {
  display: flex;
  flex-direction: column;
}

/* Full-width background bar */
.map-placeholder {
  width: 100%;
  background: #dfe3ea;
  border: 2px dashed #a0a6b3;
  padding: 0.1rem 0;          /* vertical spacing */
  box-sizing: border-box;
}
/* Inner container = controls map width */
.map-inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 640 / 600; /* preserve map ratio */
  position: relative;
}
/* Map image */
.map-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Desktop: map = 75% of viewport */
@media (min-width: 901px) {
  .map-inner {
    width: 75vw;
    max-width: 640px; /* safety cap */
  }
}

/* Adjust for mobile */
@media (max-width: 425px) {
  /*
  .map-placeholder {
    padding-top: 100%;  make it more square on phones 
  }
  */
}
.ad-sidebar {
  height: 600px;
}

/* Compact sidebar ad placeholder on mobile */
@media (max-width: 700px) {
  .ad-sidebar {
    height: 100px;             /* smaller than desktop */
    font-size: 0.8rem;
    margin: 0.5rem 0;
    background: #f0f2f5;
    border: 1px dashed #ccc;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background: #111;
  color: #bbb;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 4px solid #a80906;

}

.footer-nav {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* Footer links */
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: #bbb;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Footer toggle (mobile) */
.footer-toggle {
  display: none;
  background: none;
  border: 1px solid #444;
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Hamburger icon */
.footer-toggle .bars {
  width: 16px;
  height: 2px;
  background: #fff;
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}

.footer-toggle .bars::before,
.footer-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: #fff;
}

.footer-toggle .bars::before {
  top: -5px;
}

.footer-toggle .bars::after {
  top: 5px;
}

/* Mobile footer collapse */
@media (max-width: 700px) {
  .footer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .footer-links {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Show when open */
  .footer-nav.is-open .footer-links {
    display: flex;
  }
}


/* Desktop: always visible */
@media (min-width: 701px) {

  .footer-links {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
  }

  .footer-toggle {
    display: none;
  }
}


/* Footer copyright */
.footer-copy {
  font-size: 0.8rem;
  color: #777;
  text-align: center;
}

/* Inline map spacing */
.map-inline {
  margin-bottom: 2rem;
}

/* Listing label */
.listing-card h2.listing-label {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

/* Red circle badge for letter/label */
.listing-card .label-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #c40000; /* red circle */
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  text-align: center;
}

/* Crime type text */
.listing-card .crime-type {
  color: #c40000;   /* red to match header/footer */
  font-weight: 600;
}



/* Listing card paragraph */
.listing-card .listing-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem; /* row/column spacing */
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
  margin-top: 0.5rem;
}

/* Each span style */
.listing-card .listing-info span {
  display: inline-block;
}

/* Optional: add subtle colors to separate info types */
.listing-card .listing-date {
  font-weight: 600;
  /* color: #c40000; */ /* red accent for date/time */
}

.listing-card .listing-address {
  font-weight: 500;
  color: #333;
}

.listing-card .listing-desc {
  color: #555;
  flex: 1 1 100%; /* wrap description full width if needed */
}

.listing-card .listing-source {
  font-style: italic;
  color: #777;
}

/*
.listing-info span::after {
  content: "•";
  margin: 0 0.2rem;
  color: #aaa;
}
.listing-info span:last-child::after {
  content: "";
}
*/

/* Details link styling */
.listing-card .details-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #c40000;           /* red accent to match header/footer */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.listing-card .details-link:hover {
  color: #900000;
  text-decoration: underline;
}

/* Optional: align link to right on desktop */
@media (min-width: 600px) {
  .listing-card .details-link {
    float: right;
  }
}


/* Raw data section */
.listing-card .raw-data {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #555;
}

/* Summary styling */
.listing-card .raw-data summary {
  cursor: pointer;
  font-weight: 600;
  color: #c40000;       /* matches header/footer / crime type */
  list-style: none;
}

/* Optional: remove default triangle in Firefox */
.listing-card .raw-data summary::-webkit-details-marker {
  display: none;
}

/* Optional: style pre block */
.listing-card .raw-data pre {
  background: #f0f2f5;
  padding: 0.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-top: 0.25rem;
}

/* Mobile readability tweaks */
/* Small phones: ~iPhone 11 and smaller */
@media (max-width: 425px) {
  body {
    font-size: 1.775rem; /* ~130% of 17px */
  }

  /* Adjust listing card content proportionally */
  .listing-card {
    font-size: 1.5rem;      /* slightly larger than before */
  }

  .listing-card .listing-info {
    font-size: 1.35rem;   /* slightly larger for readability */
  }

  .details-link {
    font-size: 1.35rem;
  }
  .listing-source {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 2rem;       /* slightly bigger headings */
  }

  h2.listing-label {
    font-size: 1.35rem;    /* slightly bigger badge/type label */
  }
}


.ad-hero {
  max-width: 100%;
  height: 90px; /* standard leaderboard height */
  margin: 1.5rem auto;
  background: #f0f2f5; /* light neutral background */
  color: #888;
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

/* Mobile tweak */
@media (max-width: 700px) {
  .ad-hero {
    height: 60px;
    font-size: 0.8rem;
  }
}

/* END */


