/* ── 1. Global Reset & Theme Variables ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}
/* ── Global Utility Images ── */
/* Base setting for crisp rendering on badges and vector icons */
.img-utility {
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
}
/* Define the file paths in the CSS once */
/* Update the file extensions to .svg in one single place */
.asset-city-logo       { background-image: url('/City-Logo.svg'); }
.asset-city-round      { background-image: url('/City-Logo-Round.svg'); }
.asset-city-crest      { background-image: url('/City-Crest.svg'); }
.asset-slps-crest      { background-image: url('/SLSP-Crest.svg'); }
.asset-slps-patch      { background-image: url('/SLPS-Patch.svg'); }
.asset-slps-badge      { background-image: url('/SLPS-badge.svg'); }
.asset-slfr-logo       { background-image: url('/SLFR-logo.svg'); }
.asset-slfr-patch      { background-image: url('/SLFR-patch.svg'); }
.asset-favicon         { background-image: url('/City-Logo-Round.svg'); }

/* Updated asset engine for responsive, crisp vector sizing */
.site-asset {
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent !important; /* Forces out browser default injection colors */
  vertical-align: middle;
  width: 100%;  /* Allows the asset to dynamically adapt to its parent dimensions */
  height: 100%;
}

/* Fictional City / Municipality Branding Assets */
.logo-city { 
  width: 410px; 
  height: 190px; 
  display: block; 
  margin: 0 auto; 
  
  /* The Magic Lines: Force a perfect circle mask */
  border-radius: 50% !important; 
  overflow: hidden !important;   
}
.logo-city-round  { width: 45px;  height: 45px;     border-radius: 50%; }
.crest-city { width: 28px;  height: 28px; border-radius: 50%; /* Automatically clips off the blocky black corners */overflow: hidden;   /* Ensures the corners stay hidden */}
.logo-city-crest { width: 180px; height: 180px;border-radius: 50%;overflow: hidden;margin: 0 auto; display: block;}

/* St. Lawrence Police Service (SLPS) Assets */
.crest-slps       { width: 32px;  height: 32px; }
.patch-slps       { width: 80px;  height: 100px; } /* Proportional to standard police arm patches */
.badge-slps       { width: 65px;  height: 80px; }  /* Standard multi-point star/shield badge ratio */

/* St. Lawrence Fire & Rescue (SLFR) Assets */
.logo-slfr        { width: 140px; height: auto; }
.patch-slfr       { width: 85px;  height: 85px; }  /* Typically Maltese-cross or circular shape */


/* ── Global Public Footer Structural Layout ── */
.public-footer {
  background: var(--bg-dark); 
  border-top: 1px solid var(--border);
  padding: 24px 20px; 
  text-align: center;
  font-size: 13px; 
  color: rgba(240,240,242,0.4);
}

.public-footer-copyright::after {
  content: " St. Lawrence, Ontario 2026. All rights reserved.";
}

:root {
  --bg:        #1a1b1f;    /* Deep charcoal background */
  --bg-dark:   #14151a;    /* Even darker tone for about section & footer */
  --bg-card:   #22232a;    /* Card body color */
  --bg-card2:  #1e1f26;    /* Dark variant for gallery cards */
  --border:    rgba(255,255,255,0.08); /* Soft semi-transparent borders */
  --red:       #eb2525;    /* Vibrant accent red */
  --gold:      #BFA169;    /* Clean Canadian trim gold */
  --white:     #ffffff;    /* High contrast text */
  --muted:     rgba(255,255,255,0.7); /* Readable secondary text */
  --font:      "Inter", sans-serif;
}

html { 
  scroll-behavior: smooth; 
}

body { 
  background: var(--bg); 
  color: var(--white); 
  font-family: var(--font); 
  font-size: 16px; 
  line-height: 1.6; 
  overflow-x: hidden; 
}

/* ── 2. Floating Navbar ── */
.nav-wrap {
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 100;
  display: flex; 
  justify-content: center; 
  padding: 16px 20px;
}

.nav { 
  display: flex; 
  align-items: center;
  background: rgba(20,21,26,0.92);
  backdrop-filter: blur(16px);
  border-radius: 50px;
  border: 1px solid var(--border);
  padding: 6px 18px 6px 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.nav-divider { 
  width: 1px; 
  height: 20px; 
  background: var(--border); 
  margin: 0 16px; 
}

.nav-links { 
  display: flex; 
  align-items: center; 
  gap: 4px; 
}

.nav-link {
  padding: 7px 16px; 
  border-radius: 50px;
  font-size: 14px; 
  font-weight: 500; 
  color: var(--muted);
  text-decoration: none; 
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { 
  color: var(--white); 
}

.nav-link.active { 
  background: var(--red); 
  color: #ffffff; 
}

/* ── 3. Screen-Sized Hero Section ── */
.hero {
  position: relative; 
  min-height: 100vh;
  display: flex; 
  align-items: center; 
  justify-content: center;
  text-align: center; 
  overflow: hidden;
}

.hero-bg {
  position: absolute; 
  inset: 0; 
  z-index: 0;
  background:
    linear-gradient(to bottom, rgba(20,21,26,0.2) 0%, rgba(20,21,26,0.55) 60%, var(--bg) 100%),
    url('/public-landing-st-lawrence-background-1.png');
  background-size: cover;
  background-position: center;
}

.hero-content { 
  position: relative; 
  z-index: 1; 
  padding: 120px 20px 80px; 
  max-width: 800px; 
}

.hero-logo {
  display: block;
  margin: 0 auto 24px auto;
  max-width: 180px;          
  width: 100%;               
  height: auto;              
  object-fit: contain;
}

.hero-eyebrow {
  display: inline-block; 
  font-size: 12px; 
  font-weight: 600;
  letter-spacing: 0.12em; 
  text-transform: uppercase;
  color: var(--gold); 
  margin-bottom: 20px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

.hero-title {
  font-size: clamp(44px, 7vw, 86px); 
  font-weight: 700;
  line-height: 1.05; 
  letter-spacing: -0.03em;
  margin-bottom: 20px; 
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}

.hero-sub {
  font-size: 18px; 
  color: #ffffff;
  max-width: 500px; 
  margin: 0 auto; 
  line-height: 1.65; 
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

/* ── 4. Main Body Content Sections ── */
.about { 
  background: var(--bg-dark); 
  padding: 96px 20px; 
  text-align: center; 
}

.about-inner { 
  max-width: 780px; 
  margin: 0 auto; 
}

.section-title { 
  font-size: clamp(28px, 4vw, 40px); 
  font-weight: 700; 
  letter-spacing: -0.02em; 
  margin-bottom: 28px; 
}

.about p { 
  font-size: 15px; 
  color: rgba(240,240,242,0.7); 
  line-height: 1.8; 
  margin-bottom: 16px; 
}

.about-tagline { 
  font-size: 17px; 
  font-weight: 600; 
  color: var(--gold); 
  margin-top: 28px; 
  font-style: italic; 
}

/* ── 5. Grid Layouts & Cards ── */
.depts { 
  padding: 96px 20px; 
  background: var(--bg); 
}

.section-wrap { 
  max-width: 1080px; 
  margin: 0 auto; 
}

.section-header { 
  margin-bottom: 36px; 
}

.section-header h2 { 
  font-size: clamp(26px, 4vw, 38px); 
  font-weight: 700; 
  letter-spacing: -0.02em; 
}

.depts-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 16px; 
}

.dept-card {
  background: var(--bg-card); 
  border: 1px solid var(--border);
  border-radius: 12px; 
  padding: 32px 28px;
}

.dept-card h3 { 
  font-size: 19px; 
  font-weight: 700; 
  margin-bottom: 12px; 
  color: var(--gold); 
}

.dept-card h3.white { 
  color: var(--white); 
}

.dept-card p { 
  font-size: 14px; 
  color: rgba(240,240,242,0.65); 
  line-height: 1.75; 
  margin-bottom: 10px; 
}

.dept-card p:last-child { 
  margin-bottom: 0; 
}

.dept-coming { 
  display: inline-block; 
  font-size: 11px; 
  font-weight: 600; 
  letter-spacing: 0.08em; 
  text-transform: uppercase; 
  color: #ffd700; 
  background: rgba(255,215,0,0.05); 
  border: 1px solid rgba(255,215,0,0.2); 
  border-radius: 4px; 
  padding: 3px 10px; 
  margin-top: 12px; 
}

/* ── 6. Media Gallery Display ── */
.gallery { 
  padding: 96px 20px; 
  background: var(--bg); 
}

.gallery-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 16px; 
  margin-top: 36px; 
}

.gallery-card {
  background: var(--bg-card); 
  border: 1px solid var(--border);
  border-radius: 12px; 
  overflow: hidden;
}

.gallery-card-img {
  height: 260px; 
  background: var(--bg-card2);
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 36px; 
  border-bottom: 1px solid var(--border);
}

.gallery-card-body { 
  padding: 18px 20px; 
}

.gallery-card-body h4 { 
  font-size: 15px; 
  font-weight: 600; 
  margin-bottom: 6px; 
}

.gallery-card-body p { 
  font-size: 13px; 
  color: rgba(240,240,242,0.6); 
  line-height: 1.65; 
}

/* ── 7. Footer ── */
footer {
  background: var(--bg-dark); 
  border-top: 1px solid var(--border);
  padding: 24px 20px; 
  text-align: center;
  font-size: 13px; 
  color: rgba(240,240,242,0.4);
}

/* ── 8. Mobile Responsiveness ── */
@media (max-width: 700px) {
  .depts-grid, .gallery-grid { 
    grid-template-columns: 1fr; 
  }
  .nav-links { 
    display: none; 
  }
}

/* ── 9. Server Status Page Elements ── */
.page { 
  max-width: 900px; 
  margin: 0 auto; 
  padding: 120px 20px 80px; /* Shifted down so it doesn't hide behind fixed nav */
}

.page-header { 
  text-align: center; 
  margin-bottom: 48px; 
}

.page-header h1 { 
  font-size: 38px; 
  font-weight: 700; 
  letter-spacing: -0.02em; 
  margin-bottom: 10px; 
}

.page-header p { 
  font-size: 15px; 
  color: var(--muted); 
}

/* Status hero container box */
.status-hero {
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 16px;
  padding: 36px 32px; 
  margin-bottom: 24px; 
  display: flex; 
  align-items: center;
  justify-content: space-between; 
  gap: 24px; 
  flex-wrap: wrap;
}

.status-hero-left { 
  display: flex; 
  align-items: center; 
  gap: 20px; 
}

.status-indicator { 
  width: 16px; 
  height: 16px; 
  border-radius: 50%; 
  flex-shrink: 0; 
}

.status-indicator.online { 
  background: #22c55e; 
  box-shadow: 0 0 12px #22c55e; 
  animation: statusPulse 2s infinite; 
}

.status-indicator.offline { 
  background: var(--red); 
}

@keyframes statusPulse { 
  0%, 100% { opacity: 1; } 
  50% { opacity: 0.5; } 
}

.status-text h2 { 
  font-size: 22px; 
  font-weight: 700; 
  margin-bottom: 4px; 
}

.status-text p { 
  font-size: 14px; 
  color: var(--muted); 
}

.status-hero-right { 
  text-align: right; 
}

.player-count { 
  font-size: 48px; 
  font-weight: 700; 
  line-height: 1; 
  color: var(--white); 
}

.player-label { 
  font-size: 13px; 
  color: var(--muted); 
  margin-top: 4px; 
}

/* Connect / Command wrapper console block */
.connect-box {
  background: var(--bg-dark); 
  border: 1px solid var(--border); 
  border-radius: 12px;
  padding: 20px 24px; 
  margin-bottom: 24px; 
  display: flex;
  align-items: center; 
  justify-content: space-between; 
  gap: 16px; 
  flex-wrap: wrap;
}

.connect-label { 
  font-size: 12px; 
  font-weight: 600; 
  letter-spacing: 0.08em; 
  text-transform: uppercase; 
  color: var(--muted); 
  margin-bottom: 4px; 
}

.connect-value { 
  font-family: "Consolas", monospace; 
  font-size: 14px; 
  color: #1f2937; /* Clean fallback text contrast color for copy container */
}

.btn-connect {
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  padding: 10px 24px; 
  background: var(--red); 
  color: #fff;
  border-radius: 50px; 
  font-size: 14px; 
  font-weight: 600;
  text-decoration: none; 
  transition: background 0.2s; 
  white-space: nowrap;
}

.btn-connect:hover { 
  background: #c91e1e; 
}

.copy-btn {
  background-color: var(--red);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.copy-btn:hover {
  background-color: #c91e1e;
}

/* Three column metric grids */
.stats-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 12px; 
  margin-bottom: 24px; 
}

.stat-card { 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 10px; 
  padding: 20px; 
}

.stat-card-label { 
  font-size: 11px; 
  font-weight: 600; 
  letter-spacing: 0.1em; 
  text-transform: uppercase; 
  color: var(--muted); 
  margin-bottom: 6px; 
}

.stat-card-value { 
  font-size: 22px; 
  font-weight: 700; 
}

.stat-card-value.green { color: #22c55e; }
.stat-card-value.red { color: var(--red); }

/* Online active player directory tracking index data rows */
.players-section { 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  overflow: hidden; 
}

.players-header { 
  padding: 16px 20px; 
  border-bottom: 1px solid var(--border); 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
}

.players-header h3 { 
  font-size: 15px; 
  font-weight: 600; 
}

.players-count { 
  font-size: 12px; 
  color: var(--muted); 
}

.players-table { 
  width: 100%; 
  border-collapse: collapse; 
  font-size: 13px; 
}

.players-table th { 
  padding: 12px 16px; 
  text-align: left; 
  font-size: 11px; 
  font-weight: 600; 
  letter-spacing: 0.08em; 
  text-transform: uppercase; 
  color: var(--muted); 
  border-bottom: 1px solid var(--border); 
}

.players-table td { 
  padding: 12px 16px; 
  border-bottom: 1px solid rgba(255,255,255,0.04); 
}

.players-table tr:last-child td { 
  border-bottom: none; 
}

.players-table tr:hover td { 
  background: rgba(255,255,255,0.02); 
}

.no-players { 
  padding: 40px; 
  text-align: center; 
  color: var(--muted); 
  font-size: 13px; 
}

.refresh-info { 
  text-align: center; 
  font-size: 12px; 
  color: var(--muted); 
  margin-top: 16px; 
}

/* ── 10. Staff Directory Grid Rules ── */
.team-section { 
  margin-bottom: 52px; 
}

.team-title { 
  font-size: 13px; 
  font-weight: 600; 
  letter-spacing: 0.1em; 
  text-transform: uppercase; 
  color: var(--gold); 
  margin-bottom: 20px; 
  padding-bottom: 10px; 
  border-bottom: 1px solid var(--border); 
}

.team-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
  gap: 16px; 
}

.member-card {
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 12px;
  padding: 24px 16px; 
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.member-card:hover { 
  border-color: rgba(255,255,255,0.18); 
  transform: translateY(-2px); 
}

.member-avatar { 
  width: 72px; 
  height: 72px; 
  border-radius: 50%; 
  object-fit: cover; 
  margin: 0 auto 12px; 
  border: 2px solid var(--border); 
  display: block; 
}

.member-name { 
  font-size: 14px; 
  font-weight: 600; 
  margin-bottom: 4px; 
}

.loading { 
  text-align: center; 
  padding: 60px; 
  color: var(--muted); 
  font-size: 14px; 
}

@media (max-width: 700px) {
  .stats-grid { 
    grid-template-columns: 1fr; 
  }
}