/*
Theme Name: CraneMap Lite
Theme URI: https://cranemap.com/
Description: Fast, minimal directory theme for CraneMap. No search bars, no page builder, almost no JavaScript.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: cranemap-lite
*/

:root {
  --ink: #14202e;
  --muted: #5b6b7c;
  --line: #e3e8ee;
  --bg: #ffffff;
  --soft: #f4f6f9;
  --brand: #1f5fbf;
  --brand-ink: #ffffff;
  --gold: #b7791f;
  --gold-soft: #fdf6e7;
  --radius: 10px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.5em; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--soft); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--ink); letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.logo:hover { text-decoration: none; }
.logo-img { display: block; padding: 6px 0; line-height: 0; }
.logo-img img { height: 72px; width: auto; display: block; }
@media (max-width: 760px) {
  .site-header .wrap { gap: 0 12px; min-height: 0; }
  .logo-img { padding: 4px 0; }
  .logo-img img { height: 44px; }
  .site-header .nav { gap: 0 16px; font-size: .88rem; width: 100%; padding-bottom: 4px; }
  .nav a { white-space: nowrap; padding: 3px 0; }
}
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-weight: 600; font-size: .95rem; }
.nav a { color: var(--ink); padding: 6px 0; }
.nav a.cta { color: var(--gold); }
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; gap: 12px 28px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer .footer-states { display: block; font-size: .82rem; line-height: 1.9; border-bottom: 1px solid var(--line); }
.site-footer .footer-states a { margin-right: 10px; white-space: nowrap; }
.state-group h2 a { color: var(--ink); }

/* generic blocks */
.section { padding: 40px 0; }
.section + .section { padding-top: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.hero { padding: 56px 0 32px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 700; background: var(--brand); color: var(--brand-ink); border: 2px solid var(--brand); }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.grid { display: grid; gap: 12px; }
.grid-states { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.tile:hover { border-color: var(--brand); text-decoration: none; }
.tile small { color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: .9rem; font-weight: 600; }
.chip:hover { background: #e8edf4; text-decoration: none; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.panel-gold { background: var(--gold-soft); border-color: #f0dcb0; }
.muted { color: var(--muted); }
.crumbs { font-size: .9rem; color: var(--muted); margin: 20px 0 8px; }

/* company list */
.state-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.state-jump a { padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: .85rem; font-weight: 700; }
.state-group { margin: 0 0 28px; scroll-margin-top: 16px; }
.state-group h2 { font-size: 1.2rem; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.co-list { list-style: none; margin: 0; padding: 0; }
.co { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.co-name { font-weight: 700; color: var(--ink); }
.co-meta { font-size: .9rem; color: var(--muted); }
.co-cranes { font-size: .85rem; font-weight: 600; color: var(--ink); }
.co-actions { display: flex; gap: 8px; flex-shrink: 0; }
.co-actions a { font-size: .85rem; font-weight: 700; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); }
.co-actions a.call { background: var(--brand); color: #fff; border-color: var(--brand); }
.co.featured { background: var(--gold-soft); border-left: 4px solid var(--gold); padding-left: 12px; }
.badge { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--gold); color: #fff; padding: 2px 7px; border-radius: 4px; vertical-align: middle; margin-left: 6px; }
.co-rep { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .85rem; font-weight: 600; }
.co-rep img, .rep-card img { border-radius: 50%; object-fit: cover; flex: none; }
.rep-card { display: flex; align-items: center; gap: 14px; max-width: 520px; padding: 14px 16px; background: var(--gold-soft); border: 1px solid #f0dcb0; border-radius: var(--radius); }
.rep-card .btn-row { margin: 8px 0 0; }
.rep-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }

/* single company */
.company-head { padding: 8px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.company-cols { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.facts { margin: 0; }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-top: 14px; }
.facts dd { margin: 2px 0 0; }
.fleet td:nth-child(2), .fleet td:nth-child(3), .fleet thead th:nth-child(2), .fleet thead th:nth-child(3) { white-space: nowrap; text-align: right; }
.fleet .fleet-type th { background: #fff; border-left: 0; border-right: 0; padding-top: 16px; font-size: 1.02rem; }
.co-fleet { color: var(--ink); }

/* photo hero + search */
.hero-photo { position: relative; padding: 96px 0 88px; background: #1d3b5c center 72% / cover no-repeat; color: #fff; }
.hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 22, 38, .55), rgba(10, 22, 38, .72)); }
.hero-photo .wrap { position: relative; text-align: center; }
.hero-photo h1 { font-size: clamp(2rem, 5vw, 3.2rem); text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-photo .lede { color: #e6edf5; margin: 0 auto 24px; }
.cm-search { display: flex; flex-wrap: wrap; gap: 8px; max-width: 920px; margin: 0 auto; background: #fff; padding: 8px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.cm-search input, .cm-search select { font: inherit; padding: 12px 14px; border: 1px solid #d5dce4; border-radius: 8px; color: var(--ink); background: #fff; min-width: 0; }
.cm-search input { flex: 1 1 200px; }
.cm-search select { flex: 0 0 180px; }
.cm-search select[name="lo"] { flex-basis: 140px; }
@media (min-width: 900px) { .cm-search { flex-wrap: nowrap; } }
.cm-search .cm-near { padding: 12px 16px; }
.cm-search button { cursor: pointer; font: inherit; font-weight: 700; padding: 12px 22px; }
/* sidebar filters (directory, search, state, city and crane-type pages) */
.cm-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
.cm-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cm-panel-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.cm-panel-wrap > summary { cursor: pointer; padding: 12px 16px; font-weight: 800; list-style: none; display: flex; align-items: baseline; gap: 8px; }
.cm-panel-wrap > summary::-webkit-details-marker { display: none; }
.cm-panel-wrap[open] > summary { border-bottom: 1px solid var(--line); }
.cm-applied { font-weight: 600; color: var(--brand); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-panel-wrap > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.cm-panel-wrap[open] > summary::after { content: "▴"; }
.cm-panel-wrap[open] .cm-applied { visibility: hidden; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.cm-chip { font-size: .85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #e8f0fb; color: #174a96; }
.cm-chip span { margin-left: 2px; color: var(--muted); }
.cm-chip:hover { background: #d6e4f7; text-decoration: none; }
.company-fleet { margin-top: 6px; font-size: .95rem; }
.cm-panel { padding: 14px 16px 16px; display: grid; gap: 18px; }
.cm-field { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.cm-panel input[type=text], .cm-panel select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid #c9d2dc; border-radius: 8px; width: 100%; background: #fff; color: var(--ink); }
.cm-panel .cm-near { padding: 7px 12px; font-size: .9rem; cursor: pointer; justify-self: start; margin-top: -10px; }
.cm-panel fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cm-panel legend { font-weight: 700; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.cm-range-out { font-weight: 800; color: var(--brand); }
.cm-dual { position: relative; height: 30px; }
.cm-dual::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 2px; background: #dbe3ec; }
.cm-dual input[type=range] { position: absolute; left: 0; top: 5px; width: 100%; height: 20px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.cm-dual input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 20px; }
.cm-dual input[type=range]::-moz-range-track { background: transparent; }
.cm-dual input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand); cursor: pointer; }
.cm-dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand); cursor: pointer; }
.cm-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cm-presets a { font-size: .8rem; font-weight: 700; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.cm-presets a:hover { border-color: var(--brand); text-decoration: none; }
.cm-presets a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cm-sizes label { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 5px 0; font-size: .92rem; cursor: pointer; }
.cm-sizes input { margin-top: 4px; }
.cm-sizes small { display: block; color: var(--muted); font-size: .8rem; }
.cm-sizes em { font-style: normal; color: var(--muted); font-size: .85rem; }
.cm-panel-actions { display: flex; gap: 12px; align-items: center; }
.cm-panel-actions .btn { cursor: pointer; font: inherit; font-weight: 700; }
.cm-head { margin: 0 0 2px; font-weight: 600; }
.size { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
/* .size.size-* — WordPress also puts size-medium / size-large on images (it tinted the logo) */
.size.size-large { background: var(--brand); color: #fff; }
.size.size-medium { background: #dbe8fb; color: #174a96; }
.size.size-small { background: #eef1f4; color: #3c4a59; }
@media (max-width: 899px) {
  .cm-layout { grid-template-columns: 1fr; gap: 12px; }
  .cm-side { position: static; max-height: none; overflow: visible; }
}
.quick { margin: 16px auto 0; max-width: 860px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: .9rem; }
.quick span { color: #e6edf5; padding: 5px 0; }
.quick a { color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.quick a:hover { background: rgba(255,255,255,.26); text-decoration: none; }
.call-bar { display: none; }
@media (max-width: 760px) {
  .call-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 14px 16px; background: var(--brand); color: #fff; font-weight: 700; text-align: center; box-shadow: 0 -4px 16px rgba(0,0,0,.18); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .single-job_listing .site-footer { padding-bottom: 56px; }
}
@media (max-width: 760px) {
  .hero-photo { padding: 56px 0 48px; }
  .cm-search { flex-direction: column; }
  .cm-search input, .cm-search select, .cm-search select[name="lo"] { flex: none; }
}

/* maps */
.cm-map { height: 360px; border-radius: var(--radius); border: 1px solid var(--line); margin: 8px 0 24px; z-index: 0; background: #e8eef3; }
.cm-map-lg { height: 520px; }
.cm-map .leaflet-popup-content { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin: 10px 14px; }
.cm-map .cm-pop-call { font-weight: 700; }
@media (max-width: 760px) { .cm-map { height: 260px; } .cm-map-lg { height: 300px; } }

/* contact form */
.cm-form { display: grid; gap: 14px; max-width: 560px; }
.cm-form label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.cm-form input, .cm-form select, .cm-form textarea { font: inherit; padding: 10px 12px; border: 1px solid #c9d2dc; border-radius: 8px; background: #fff; color: var(--ink); }
.cm-form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; }

/* crane market page ([cm_market], built by data/rates/build_market.py) */
.mk h2 { margin-top: 1.8em; scroll-margin-top: 16px; }
.mk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.mk-kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.mk-kpi span { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.mk-kpi strong { font-size: 1.4rem; line-height: 1.2; }
.mk-kpi strong small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.mk-kpi em { font-style: normal; font-size: .88rem; color: var(--muted); }
.mk-kpi em.mk-up { color: var(--ink); font-weight: 700; }
.mk-pick { font-weight: 700; }
.mk-pick select { font: inherit; padding: 9px 10px; border: 1px solid #c9d2dc; border-radius: 8px; background: #fff; color: var(--ink); margin-left: 6px; }
.mk-state { scroll-margin-top: 16px; }
.mk-basis { color: var(--muted); font-size: .92rem; }
.mk-scroll { overflow-x: auto; margin: 0 0 1.5em; }
.mk-table { margin: 0; font-variant-numeric: tabular-nums; }
.mk-table th, .mk-table td { border-width: 0 0 1px; }
.mk-table .n { text-align: right; white-space: nowrap; }
.mk-table .mk-fam th { background: #fff; padding-top: 16px; font-size: 1.02rem; }
.mk-table .mk-us td { font-weight: 700; background: var(--soft); }
.mk-all td:first-child { white-space: nowrap; }
.mk-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 36px; }
.mk-bars { list-style: none; margin: 0 0 1.5em; padding: 0; display: grid; gap: 8px; }
.mk-bars li { display: grid; grid-template-columns: 150px 1fr 76px; gap: 10px; align-items: center; font-size: .92rem; }
.mk-bar-label { font-weight: 600; line-height: 1.25; }
.mk-bar-label small { display: block; color: var(--muted); font-weight: 400; }
.mk-bar-track { display: block; }
.mk-bar { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--brand); min-width: 2px; }
.mk-bar-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.mk-bar-val small { color: var(--muted); font-weight: 400; }
.mk-fig { margin: 0 0 1.5em; max-width: 760px; }
.mk-fig figcaption { font-weight: 700; margin-bottom: 4px; }
.mk-chart { width: 100%; height: auto; display: block; }
.mk-grid { stroke: var(--line); stroke-width: 1; }
.mk-tick { fill: var(--muted); font-size: 12px; }
.mk-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.mk-dot { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.mk-hit { fill: transparent; }
.mk-pt { fill: var(--ink); font-size: 13px; font-weight: 700; }
@media (max-width: 760px) {
  .mk-table td:nth-child(2).muted, .mk-table thead th:nth-child(2):not(.n) { display: none; }
  .mk-bars li { grid-template-columns: 118px 1fr 70px; }
}

/* article */
.entry { padding: 8px 0; }
.entry h2 { margin-top: 1.4em; }
.post-list article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { font-size: 1.25rem; margin: 0 0 4px; }

@media (max-width: 760px) {
  .company-cols { grid-template-columns: 1fr; }
  .co { flex-direction: column; align-items: flex-start; }
  .hero { padding: 36px 0 20px; }
}
