/* LocalNoggins.com — modernized take on the 2014 theme */
:root {
  --sky: #d6ebf8;
  --navy: #0d4f9e;
  --navy-dark: #0a3f80;
  --blue: #0a78c2;
  --red: #d52b1e;
  --green: #3e9b3a;
  --green-text: #2f8a2b;
  --ink: #1f2933;
  --muted: #5b6b7a;
  --line: #d9e6f2;
  --radius: 10px;
  --font: "Segoe UI", Ubuntu, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky) url(../img/background.jpg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; }

/* ---------- header (original banner with live controls laid over it) ---------- */
.site-header { max-width: 1000px; margin: 0 auto; }
.banner { position: relative; }
.banner-home img { display: block; width: 100%; height: auto; }
.banner-tag { position: absolute; left: 76.5%; top: 0; width: 16.5%; height: 70%; }
.top-links { position: absolute; left: 42%; top: 27%; display: flex; gap: 4px; font-size: 14px; }
.top-links a { color: #4a5560; padding: 2px 7px; border-right: 1px solid #9fb0bf; }
.top-links a:last-child { border-right: 0; }
.account-links { position: absolute; left: 58%; top: 13%; display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 700; }
.account-links a, .linklike { color: #4a5560; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.account-links form { margin: 0; }
.search-bar { position: absolute; left: 4.5%; right: 4.5%; bottom: 5%; height: 15%; display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.search-bar label { color: #fff; font-weight: 700; font-size: 14px; }
.search-bar input, .search-bar select { height: 32px; border: 0; border-radius: 6px; padding: 0 10px; font: inherit; font-size: 14px; }
.search-bar input { flex: 1 1 220px; min-width: 0; }
.search-bar select { flex: 0 1 180px; }
.search-bar button, .btn { height: 34px; border: 0; border-radius: 6px; padding: 0 16px; background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.search-bar button:hover, .btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn { display: inline-flex; align-items: center; height: auto; padding: 9px 18px; }
.btn-green { background: var(--green); }
.btn-ghost { background: #eef4fa; color: var(--navy); }

@media (max-width: 820px) {
  .top-links, .account-links, .search-bar { position: static; }
  .top-links { flex-wrap: wrap; justify-content: center; background: var(--navy); padding: 8px; }
  .top-links a { color: #fff; border-color: rgba(255,255,255,.35); }
  .account-links { justify-content: center; background: var(--navy-dark); padding: 6px; }
  .account-links a, .account-links .linklike { color: #fff; }
  .search-bar { flex-wrap: wrap; height: auto; background: var(--navy); padding: 12px 16px; border-radius: 0 0 var(--radius) var(--radius); }
  .search-bar label { display: none; }
  .search-bar input, .search-bar select { flex: 1 1 100%; height: 40px; }
  .search-bar button { flex: 1 1 100%; height: 40px; }
}

/* ---------- main frame ---------- */
.frame { max-width: 952px; margin: 12px auto 0; background: var(--navy); padding: 10px; border-radius: var(--radius) var(--radius) 0 0; }
.panel { background: #fff; border-radius: 8px; padding: 22px 26px; }
.panel + .panel { margin-top: 10px; }
.with-sidebar { display: grid; grid-template-columns: 220px 1fr; gap: 10px; align-items: start; }
.with-sidebar > *, .listing-row > *, .profile > *, .callouts > * { min-width: 0; }
body { overflow-wrap: anywhere; }
.sidebar { background: #fff; border-radius: 8px; padding: 16px 18px; }
.sidebar h2 { color: var(--green-text); font-size: 18px; font-weight: 500; margin: 0 0 8px; }
.sidebar ul { list-style: none; margin: 0; padding: 0 0 0 10px; font-size: 15px; }
.sidebar li { padding: 2px 0; }
.sidebar li.active > a { font-weight: 700; color: var(--red); }
@media (max-width: 760px) {
  .frame { padding: 6px; border-radius: 0; }
  .panel { padding: 18px 16px; }
  .with-sidebar { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

.flash { background: #fff; border-left: 6px solid var(--green); border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; }
.flash-error { border-color: var(--red); }

.crumbs { font-size: 13px; color: var(--muted); margin: -6px 0 6px; }
.crumbs a { color: var(--ink); }

/* red ribbon page title (from the 2014 theme) */
.ribbon { position: relative; margin: 0 0 22px -40px; padding: 12px 52px 12px 40px; max-width: 520px; color: #fff; font-size: 24px; font-weight: 400;
  background: var(--red) linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.08)); border-radius: 0 6px 6px 0; box-shadow: 0 4px 6px rgba(0,0,0,.25); }
.ribbon::after { content: ""; position: absolute; right: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #f5d9a8; box-shadow: inset 0 0 0 3px #e9b86a; }
@media (max-width: 760px) { .ribbon { margin-left: -22px; font-size: 21px; padding-left: 24px; } }

.lead { color: var(--green-text); font-size: 20px; margin: 4px 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- home ---------- */
.map-wrap { position: relative; max-width: 844px; margin: 0 auto; }
.map-wrap img { display: block; width: 100%; height: auto; }
.state-grid { columns: 4 160px; column-gap: 20px; list-style: none; padding: 0; margin: 18px 0 0; font-size: 15px; }
.state-grid li { padding: 2px 0; break-inside: avoid; }
.callouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.callout { background: #fff; border-radius: 8px; overflow: hidden; }
.callout h2 { margin: 0; background: var(--red); color: #fff; font-size: 18px; font-weight: 400; padding: 10px 14px; text-transform: uppercase; letter-spacing: .3px; }
.callout .body { padding: 12px 14px; font-size: 14px; }
.callout .feature { display: flex; gap: 12px; }
.callout .feature img { width: 84px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; flex: none; }
.callout .advert { display: block; height: 92px; padding: 0; background: #fff url(../img/callout-back-target.png) right bottom no-repeat; }
.callout .advert img { display: block; width: 120px; max-width: 45%; height: auto; margin: 14px 0 0 16px; }
@media (max-width: 760px) { .callouts { grid-template-columns: 1fr; } }

/* ---------- region / city ---------- */
.city-list { columns: 4 140px; column-gap: 16px; list-style: none; padding: 0; margin: 0 0 18px; font-size: 14px; }
.city-list li { padding: 1px 0 1px 12px; position: relative; break-inside: avoid; }
.city-list li::before { content: ""; position: absolute; left: 0; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.section-h { color: var(--green-text); font-size: 19px; font-weight: 500; margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }

.listings { list-style: none; margin: 0; padding: 0; counter-reset: lst; }
.listing-row { display: grid; grid-template-columns: 44px 1fr 1.15fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.listing-row .num { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.listing-row h3 { margin: 0 0 2px; font-size: 15px; }
.listing-row address { font-style: normal; }
.listing-row .blurb p { margin: 0 0 4px; }
.listing-row .site { font-weight: 600; word-break: break-all; }
@media (max-width: 640px) { .listing-row { grid-template-columns: 40px 1fr; } .listing-row .blurb { grid-column: 2; } }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 4px; }
.pager a, .pager span { min-width: 34px; padding: 5px 10px; border-radius: 6px; text-align: center; font-weight: 600; }
.pager a { background: #eef4fa; }
.pager .cur { background: var(--green); color: #fff; }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: 1fr 210px; gap: 26px; }
.profile h2 { color: var(--green-text); font-size: 19px; font-weight: 500; border-bottom: 2px solid var(--line); padding-bottom: 5px; margin: 0 0 10px; }
.profile .block { margin-bottom: 22px; }
.profile .desc { white-space: pre-line; }
.contact-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.socials { display: flex; gap: 8px; align-items: flex-start; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 14px; }
.s-facebook { background: #1877f2; } .s-twitter { background: #111; } .s-linkedin { background: #e6a817; }
.s-youtube { background: #d52b1e; } .s-pinterest { background: #3e9b3a; } .s-blog { background: #6a5acd; }
.pay-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-icons img { height: 30px; width: auto; border-radius: 3px; }
.side-logo { text-align: center; margin-bottom: 18px; }
.side-logo img { max-height: 160px; }
.side-box h3 { margin: 0 0 6px; background: var(--green); color: #fff; font-size: 15px; font-weight: 500; padding: 6px 10px; border-radius: 3px; }
.side-box { margin-bottom: 18px; }
.gallery { display: grid; gap: 8px; }
.gallery img { width: 100%; border-radius: 6px; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; max-width: 640px; }
.form .row2 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.form label { display: block; font-weight: 600; color: var(--navy); font-size: 14px; margin-bottom: 4px; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=url], .form input[type=tel], .form select, .form textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #b9c9d8; border-radius: 6px; font: inherit; background: #fff; }
.form textarea { min-height: 140px; }
.form .hint { font-size: 13px; color: var(--muted); margin-top: 3px; }
.form .req { color: var(--red); }
.form .checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 400; }
.form .checks label { font-weight: 400; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.hp { position: absolute; left: -9999px; }
.errors { background: #fdecea; border: 1px solid #f5c2bd; color: #8a1c13; border-radius: 6px; padding: 10px 14px; }
@media (max-width: 640px) { .form .row2 { grid-template-columns: 1fr; } }

.prose h3 { color: var(--green-text); margin: 20px 0 6px; font-weight: 500; }

/* ---------- tables, badges, admin ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); padding: 6px 8px; }
.tbl td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: middle; }
.tbl tr:hover td { background: #f7fbff; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e8eef4; color: var(--muted); }
.b-active { background: #e2f3e1; color: #276e24; } .b-pending { background: #fff3d6; color: #8a5a00; }
.b-hidden { background: #e8eef4; color: #4a5560; } .b-spam { background: #fde4e1; color: #a1241a; }
.admin h1 { font-size: 24px; margin: 6px 0 14px; color: var(--navy); font-weight: 600; }
.admin h2 { font-size: 18px; margin: 24px 0 8px; color: var(--green-text); font-weight: 600; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.admin-nav a { padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.admin-nav a.on { background: var(--navy); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { display: block; background: #f3f8fc; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; color: var(--ink); }
.stat strong { display: block; font-size: 26px; color: var(--navy); }
.stat span { font-size: 13px; color: var(--muted); }
.stat:hover { text-decoration: none; border-color: var(--blue); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters input, .filters select { padding: 7px 10px; border: 1px solid #b9c9d8; border-radius: 6px; font: inherit; font-size: 14px; }
.filters input[type=search] { flex: 1 1 260px; }
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; margin-bottom: 6px; }
.bulk .btn { padding: 5px 12px; font-size: 13px; }
form.inline { display: inline; margin: 0; }
form.inline input[type=text] { padding: 4px 8px; border: 1px solid #b9c9d8; border-radius: 5px; font: inherit; font-size: 14px; }
.cat-group { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.cat-group summary { cursor: pointer; }
@media (max-width: 760px) { .tbl { display: block; overflow-x: auto; white-space: nowrap; } }

/* ---------- footer ---------- */
.site-footer { background: var(--green) linear-gradient(180deg, #4caf45, #3a9136); color: #fff; }
.site-footer::before { content: ""; display: block; height: 30px; max-width: 1000px; margin: 0 auto;
  background: repeating-linear-gradient(90deg, #7c1f2c 0 40px, #94283a 40px 42px), #7c1f2c;
  border-top: 3px solid #5d1520; }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 24px 20px 36px; display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1fr; gap: 20px; font-size: 15px; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; }
.footer-inner a { color: #fff; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
