/* Styles.css */
:root{
--accent:#0d1b2a;
--muted:#555;
--main:#222;
--primary:#0d1b2a;
--bg:#ffffff;
--surface:#f7f7f7;
--max-width:1200px;
--font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}
*{box-sizing:border-box}
body{font-family:var(--font-sans);margin:0;background:var(--bg);color:#222}
.container{max-width:var(--max-width);margin:0 auto;padding:1rem}

.ad-slot-wide { position:relative; left:0; right:0; bottom:0; display:flex; justify-content:center; padding:8px; z-index:1000; }
.ad-box-wide { width:100%; max-width:980px; height:90px; background:#f4f4f4; border:1px solid #ddd; display:flex; align-items:center; justify-content:center; color:#666; }

/* Header */
.site-header{background:#fff;border-bottom:1px solid #eee;position:sticky;top:0;z-index:900}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:0.6rem 1rem}
.brand{display:flex;align-items:center;gap:12px}
.brand-logo{width:69px;height:auto;max-height:69px;object-fit:contain;}
.brand-text{display: flex;flex-direction: column;gap: 2px;}
.brand-text .site-title {margin: 0;font-size: 1.4rem;font-weight: 700;color:var(--text-main);}
.brand-text .tagline {margin: 0;font-size: 0.95rem;font-weight: 500;color: var(--primary);}
.brand-text .mission {margin: 0;font-size: 0.85rem;color: var(--muted);font-style: italic;}
.site-nav{display:flex;gap:12px}
.site-nav .nav-link{text-decoration:none;color:inherit;padding:8px;border-radius:6px}
.site-nav .nav-link:hover{background:var(--surface)}
.site-nav a.active,.site-nav .nav-link.active {color: var(--primary);font-weight: 600;border-bottom: 2px solid var(--primary);}


/* Footer */
.site-footer{background:#fff;border-top:1px solid #eee;padding:1rem 0;margin-top:2rem}
.footer-inner{display:flex;justify-content:space-between;align-items:center}
.site-nav-foot{display:flex;gap:12px}
.site-nav-foot .nav-link{text-decoration:none;color:inherit;padding:8px;border-radius:6px}
.site-nav-foot .nav-link:hover{background:var(--surface)}
.site-nav-foot a.active,.site-nav-foot .nav-link.active {color: var(--primary);font-weight: 600;border-top: 2px solid var(--primary);}


/* Map full-bleed container */
.map-wrap{position: relative;height:64vh;border-radius:8px;overflow:hidden}
#map{width:100%;height:100%}
.map-layers-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1100;
  }
.map-layers-toggle:hover { background: rgba(245,245,245,0.95); }
.map-layers-icon { width: 16px; height: 16px; }

.map-controls {
    position: absolute;
    top: 50px;            
    right: 10px;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    font-family: sans-serif;
    font-size: 13px;
    line-height: 1.4em;
    color: #222;
    width: auto;
    max-width: 260px;
    display: inline-block;
    box-sizing: border-box;
  }
.map-controls label { cursor: pointer; }
.map-controls.hidden { display: none; }
.map-collapsible-header { cursor: pointer; font-weight: bold; display: flex; align-items: center; user-select: none; }
.map-collapsible-header .map-arrow { margin-right: 6px; transition: transform 0.2s ease; }
.map-collapsible-header.active .map-arrow { transform: rotate(90deg); }
.map-collapsible-content { margin-left: 16px; margin-top: 4px; }
#map-closure-list .map-collapsible-header {
  font-size: 1.2rem;
  font-weight: 700; 
  padding: 12px 14px;
  background: #f0f0f0;
  border-bottom: 2px solid #ccc;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: background 0.2s ease;
}
#map-closure-list .map-collapsible-header:hover {
  background: #e2e2e2;
}
#map-closure-list .map-collapsible-header::after {
  content: "▶";
  position: absolute;
  right: 12px;
  font-size: 1rem;
  transition: transform 0.2s ease;
}
#map-closure-list .map-collapsible-header.open::after {
  transform: rotate(90deg);
}
#map-closure-list .map-collapsible-header .map-arrow {
  font-size: 1.2rem;
  margin-right: 6px;
}
#map-closure-list .map-collapsible-content {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.basemap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 4px 0;
}
.basemap-option {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.basemap-option.selected {
  border-color: #007bff;
}
.basemap-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.basemap-label {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  text-align: center;
  pointer-events: none;
}

#map-sidebar {
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  font-size: 13px;
  line-height: 1.4em;
  overflow: visible;
  }
#map-sidebar-header {
  padding: 14px 10px;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  background: #fff;
  border-bottom: 2px solid #ccc;
  color: var(--primary);
  cursor: default;
  justify-content: center;
}
#map-sidebar-disclaimer {
    font-size: 10px;
  color: #888;
  text-align: center;
  padding: 8px;
  line-height: 1.3em;
  border-top: 1px solid #ddd;
  background: rgba(255,255,255,0.97);
  }

#map-closure-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#map-closure-list li.closure-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
#map-closure-list li.closure-item:hover .map-list-card {
  background: #e3e3e3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
#map-closure-list li.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13,27,42,0.15);
}

.map-list-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 12px;
  background: #fefefe;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  font-size: 13px;
  line-height: 1.4em;
  box-sizing: border-box;
}
.map-list-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 4px;
  gap: 8px;
}
.map-list-card-header img {
  width: 28px;
  height: 28px;
  margin-right: 8px;
}
.map-list-card-header strong {
  color: #d9534f;
  font-weight: 700;
  font-size: 16px;
}
.map-list-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.map-list-card-textwrap {
  display: flex;
  flex-direction: column;
}
.map-list-road {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  line-height: 1.2;
}
.map-list-segment {
  font-size: 13px;
  font-weight: 400;
  color: #000;
  margin-top: 2px;
}
.map-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 12px;
  color: #555;
  gap: 2px;
  white-space: nowrap;
}
.map-list-updated,
.map-list-source {
  font-weight: 400;
}





.map-popup-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #fefefe;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  font-size: 13px;
  line-height: 1.4em;
  box-sizing: border-box;
}
.map-popup-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 4px;
}
.map-popup-card-header img {
  width: 28px;
  height: 28px;
  margin-right: 8px;
}
.map-popup-card-header strong {
  color: #d9534f;
  font-weight: 700;
  font-size: 16px;
}
.popup-row.grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.popup-field {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: 4px;
  background-color: #fff;
}
.popup-row .popup-field {
  background-color: #ebebeb;
}
.popup-field .label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: #555;
}
.popup-field .value {
  font-size: 13px;
  color: #222;
  word-wrap: break-word;
}
.full-width-row {
  grid-column: 1 / -1;
}
.popup-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.popup-tag {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.popup-disclaimer {
  margin-top: 6px;
  font-size: 10px;
  color: #888;
  text-align: center;
}

#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
  font-size: 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: none; /* hidden by default */
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background 0.2s ease, opacity 0.2s ease;
}

#scrollTopBtn:hover {
  background: #1a2d40; /* darker shade */
}
  



/* Banner */
.page-banner{display:grid;grid-template-columns:1fr;gap:1rem;align-items:center;padding:2rem 0}
.banner-hero {
  position: relative;
  background-image: url('../img/banners/road_closure_banner.jpeg');
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  padding: 4rem 2rem; /* more breathing room */
  color: #fff;
  min-height: 40vh; /* gives it presence */
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center; /* centers content nicely */
}
.banner-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6); /* dark overlay */
  border-radius: 12px;
}
.banner-hero:hover::before {
  background: rgba(0,0,0,0.8); /* dark overlay */
}
.banner-hero * {
  position: relative; /* keeps text above overlay */
}
.banner-hero h2 {
  font-size: 2rem;      /* larger headline */
  line-height: 1.3;     
  margin-bottom: 1rem;
}
.banner-hero p {
  font-size: 1.1rem;    /* more readable body */
  max-width: 600px;     /* keep it from stretching too wide */
  margin: 0 auto 1rem;  /* center + spacing */
}
.banner-cta a {
  display: inline-block;
  background: #ff6600; /* accent color */
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}
.banner-cta a:hover {
  background: #e65500;
}

/* Services grid */
.services-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem;padding-bottom:2rem 0}
.service-card {
  background: #fff;
  border: 1px solid #eee;
  padding: 1rem;
  border-radius: 10px;
  transition: transform .22s ease, box-shadow .22s ease;
  cursor: pointer;
  overflow: hidden;

  /* kill default link styles */
  text-decoration: none;
  color: inherit;
  display: block; /* so the <a> behaves like a card */
}
.service-card:hover{transform:translateY(-8px) scale(1.02);box-shadow:0 8px 30px rgba(0,0,0,0.08)}
.service-card .media{height:140px;border-radius:8px;background-size:cover;background-position:center;margin-bottom:0.75rem}
.service-card h3{margin:0 0 0.5rem 0;color: inherit;}
.service-card p{margin:0;color:var(--muted);color: inherit;}






/* small responsive tweaks */
@media (max-width: 700px) {
  .header-inner { padding: 0.4rem 0.8rem; min-height: 56px; }
  .site-title { font-size: 1rem; }
  .brand-logo { height: 42px; }
  .site-nav { display: none; } /* keep header compact — show hamburger later if required */
}