/* ============================================================
   Southern Park County Fire Protection District
   Main Stylesheet
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #c0392b;
  --red-dark:   #922b21;
  --red-light:  #e74c3c;
  --charcoal:   #1c1c1c;
  --dark-gray:  #2d2d2d;
  --mid-gray:   #5a5a5a;
  --light-gray: #f4f4f4;
  --border:     #ddd;
  --white:      #ffffff;
  --gold:       #d4a017;
  --max-w:      1100px;
  --font-main:  'Segoe UI', Arial, sans-serif;
  --radius:     4px;
  --shadow:     0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg:  0 4px 20px rgba(0,0,0,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dark-gray);
  background: var(--white);
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--red-dark); }

img { max-width: 100%; display: block; }

ul { list-style: none; }

/* --- Layout helpers --------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 60px 0; }
.section-alt { background: var(--light-gray); }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 12px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 50px; height: 3px;
  background: var(--red);
}

.section-subtitle {
  color: var(--mid-gray);
  margin-bottom: 32px;
  font-size: 1rem;
}

/* --- Top Bar --------------------------------------------- */
.top-bar {
  background: var(--charcoal);
  color: #ccc;
  font-size: 0.8rem;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.top-bar a { color: #ccc; }
.top-bar a:hover { color: var(--white); }
.top-bar .emergency { color: var(--gold); font-weight: 700; letter-spacing: 0.5px; }

/* --- Header / Navbar ------------------------------------- */
.site-header {
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}
.logo-badge {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}
.logo-text .district-name {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap;
}
.logo-text .district-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Primary Nav */
.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}
.primary-nav a {
  color: var(--white);
  padding: 8px 13px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a.active {
  background: rgba(0,0,0,0.2);
  text-decoration: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  color: var(--white);
  font-size: 1.2rem;
}

/* --- Hero Banner ----------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, #3d0000 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '🔥';
  position: absolute;
  font-size: 18rem;
  opacity: 0.04;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 620px;
  margin: 0 auto 28px;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* --- Alert Bar ------------------------------------------- */
.alert-bar {
  background: var(--gold);
  color: var(--charcoal);
  padding: 10px 20px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}
.alert-bar a { color: var(--charcoal); text-decoration: underline; }

/* --- Quick Links Grid ------------------------------------ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 12px;
}
.quick-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.quick-card .icon { font-size: 2rem; margin-bottom: 10px; }
.quick-card h3 { font-size: 1rem; font-weight: 700; color: var(--charcoal); margin-bottom: 6px; }
.quick-card p { font-size: 0.85rem; color: var(--mid-gray); line-height: 1.4; }

/* --- Info Cards ------------------------------------------ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.info-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card p, .info-card li {
  font-size: 0.9rem;
  color: var(--mid-gray);
  line-height: 1.6;
}
.info-card ul { padding-left: 18px; list-style: disc; }
.info-card ul li { margin-bottom: 4px; }

/* --- Stat Boxes ------------------------------------------ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.stat-box {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
}
.stat-box .number { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-box .label { font-size: 0.8rem; opacity: 0.85; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* --- Board Table ----------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table thead { background: var(--red); color: var(--white); }
.data-table th { padding: 12px 16px; text-align: left; font-weight: 700; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fef9f9; }
.data-table tbody tr:nth-child(even) { background: var(--light-gray); }
.data-table tbody tr:nth-child(even):hover { background: #fef9f9; }

/* --- Statute Callout ------------------------------------- */
.statute-box {
  background: #fff8e1;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.88rem;
  color: #5a4000;
}
.statute-box strong { display: block; margin-bottom: 4px; color: #3d2b00; font-size: 0.9rem; }

/* --- Notice List ----------------------------------------- */
.notice-list { display: flex; flex-direction: column; gap: 16px; }
.notice-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.notice-date {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  padding: 8px 12px;
  text-align: center;
  min-width: 56px;
  flex-shrink: 0;
}
.notice-date .month { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }
.notice-date .day { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.notice-body h4 { font-size: 1rem; font-weight: 700; color: var(--charcoal); margin-bottom: 4px; }
.notice-body p { font-size: 0.87rem; color: var(--mid-gray); }
.notice-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 6px;
}
.tag-meeting { background: #dbeafe; color: #1e40af; }
.tag-budget  { background: #d1fae5; color: #065f46; }
.tag-election { background: #ede9fe; color: #5b21b6; }
.tag-notice  { background: #fee2e2; color: #991b1b; }
.tag-audit   { background: #fef3c7; color: #92400e; }

/* --- Document List --------------------------------------- */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.1s;
}
.doc-item:hover { background: var(--light-gray); }
.doc-icon { font-size: 1.4rem; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-info h4 { font-size: 0.95rem; font-weight: 700; color: var(--charcoal); }
.doc-info p { font-size: 0.8rem; color: var(--mid-gray); }
.doc-link { font-size: 0.82rem; font-weight: 700; color: var(--red); white-space: nowrap; }

/* --- Accordion ------------------------------------------- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  background: var(--light-gray);
  border: none;
  padding: 14px 18px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}
.accordion-trigger:hover { background: #e8e8e8; }
.accordion-trigger.open { background: var(--red); color: var(--white); }
.accordion-arrow { transition: transform 0.2s; }
.accordion-trigger.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body {
  display: none;
  padding: 18px;
  font-size: 0.9rem;
  color: var(--mid-gray);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}
.accordion-body.open { display: block; }
.accordion-body ul { padding-left: 20px; list-style: disc; }
.accordion-body ul li { margin-bottom: 6px; }

/* --- Page Header ----------------------------------------- */
.page-header {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  color: var(--white);
  padding: 50px 20px;
}
.page-header .container { max-width: var(--max-w); margin: 0 auto; }
.breadcrumb { font-size: 0.8rem; opacity: 0.75; margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb span { margin: 0 6px; }
.page-header h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; margin-bottom: 8px; }
.page-header p { opacity: 0.85; max-width: 600px; font-size: 1rem; }

/* --- Two-column layout ----------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  align-items: start;
}
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* --- Sidebar --------------------------------------------- */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.sidebar-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-card ul { padding-left: 16px; list-style: disc; }
.sidebar-card li { font-size: 0.88rem; color: var(--mid-gray); margin-bottom: 6px; line-height: 1.5; }
.sidebar-card a:not(.btn) { color: var(--red); }
.sidebar-card p { font-size: 0.88rem; color: var(--mid-gray); line-height: 1.6; }

/* --- CORA Box -------------------------------------------- */
.cora-box {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0;
}
.cora-box h3 { color: var(--red); font-size: 1.1rem; margin-bottom: 10px; }
.cora-box p { font-size: 0.9rem; color: var(--mid-gray); margin-bottom: 12px; }
.cora-box address { font-style: normal; font-size: 0.9rem; color: var(--dark-gray); line-height: 1.8; }

/* --- Mill Levy Box --------------------------------------- */
.levy-display {
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin: 24px 0;
}
.levy-display .levy-num { font-size: 3rem; font-weight: 800; color: var(--gold); line-height: 1; }
.levy-display .levy-label { font-size: 0.85rem; opacity: 0.75; margin-top: 6px; text-transform: uppercase; letter-spacing: 1px; }

/* --- Footer ---------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: #bbb;
  padding: 50px 0 24px;
  font-size: 0.875rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.footer-col p { line-height: 1.7; }
.footer-col ul { }
.footer-col ul li { margin-bottom: 7px; }
.footer-col a { color: #bbb; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid #3a3a3a;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: #888;
}
.footer-disclaimer {
  border-top: 1px solid #3a3a3a;
  padding: 16px 0 0;
  font-size: 0.78rem;
  color: #777;
  line-height: 1.6;
  margin-top: 16px;
}

/* --- Responsive ------------------------------------------ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .primary-nav { display: none; }
  .primary-nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--red-dark);
    padding: 10px;
    z-index: 999;
  }
  .primary-nav.open ul { flex-direction: column; }
  .primary-nav.open a { display: block; padding: 10px 14px; }
  .nav-toggle { display: block; }
  .site-header { position: relative; }
  .notice-item { flex-direction: column; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .quick-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* --- Documents Search Page ------------------------------- */
.search-bar-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 220px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}
.search-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 11px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-main);
  transition: background 0.15s;
}
.search-btn:hover { background: var(--red-dark); }
.search-btn-clear {
  background: var(--light-gray);
  color: var(--mid-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-main);
  transition: background 0.15s;
}
.search-btn-clear:hover { background: #e0e0e0; }

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-bar label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mid-gray);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.filter-select {
  padding: 7px 32px 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: var(--font-main);
  background: var(--white);
  color: var(--dark-gray);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--red); }
.filter-divider { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--mid-gray);
  flex-wrap: wrap;
  gap: 8px;
}
.results-count strong { color: var(--charcoal); }
.results-sort { display: flex; align-items: center; gap: 8px; }

/* Document rows */
.doc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.doc-row:hover { box-shadow: var(--shadow); border-color: #ccc; }
.doc-row.hidden { display: none; }

.doc-row-type {
  width: 6px;
  flex-shrink: 0;
}
.doc-row-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.doc-row-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-row-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--mid-gray);
}
.doc-row-desc {
  font-size: 0.82rem;
  color: var(--mid-gray);
  margin-top: 2px;
  line-height: 1.4;
}
.doc-row-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-left: 1px solid var(--border);
  background: #fafafa;
  min-width: 110px;
  align-items: center;
}
.doc-action-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s;
  width: 100%;
}
.doc-action-view {
  background: var(--red);
  color: var(--white);
}
.doc-action-view:hover { background: var(--red-dark); color: var(--white); text-decoration: none; }
.doc-action-dl {
  background: var(--light-gray);
  color: var(--dark-gray);
  border: 1px solid var(--border);
}
.doc-action-dl:hover { background: #e0e0e0; color: var(--dark-gray); text-decoration: none; }

/* Category color accent bars */
.type-agenda     { background: #3b82f6; }
.type-minutes    { background: #10b981; }
.type-notice     { background: #f59e0b; }
.type-resolution { background: #8b5cf6; }
.type-policy     { background: #ec4899; }
.type-sog        { background: #c0392b; }
.type-budget     { background: #059669; }
.type-audit      { background: #d97706; }
.type-financial  { background: #0891b2; }
.type-election   { background: #7c3aed; }
.type-legal      { background: #374151; }
.type-service    { background: #b45309; }
.type-incident   { background: #ea580c; }
.type-aar        { background: #0f766e; }

/* Category tag colors */
.tag-type-agenda     { background: #dbeafe; color: #1e40af; }
.tag-type-minutes    { background: #d1fae5; color: #065f46; }
.tag-type-notice     { background: #fef3c7; color: #92400e; }
.tag-type-resolution { background: #ede9fe; color: #5b21b6; }
.tag-type-policy     { background: #fce7f3; color: #9d174d; }
.tag-type-sog        { background: #fee2e2; color: #991b1b; }
.tag-type-budget     { background: #d1fae5; color: #065f46; }
.tag-type-audit      { background: #fef3c7; color: #92400e; }
.tag-type-financial  { background: #cffafe; color: #155e75; }
.tag-type-election   { background: #ede9fe; color: #5b21b6; }
.tag-type-legal      { background: #f3f4f6; color: #374151; }
.tag-type-service    { background: #fef3c7; color: #92400e; }
.tag-type-incident   { background: #fff7ed; color: #9a3412; }
.tag-type-aar        { background: #f0fdfa; color: #115e59; }

/* No-results state */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--mid-gray);
  display: none;
}
.no-results .icon { font-size: 3rem; margin-bottom: 12px; }
.no-results h3 { font-size: 1.1rem; color: var(--charcoal); margin-bottom: 8px; }
.no-results p { font-size: 0.9rem; }

/* Category browse chips */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  background: var(--light-gray);
  color: var(--mid-gray);
}
.category-chip:hover, .category-chip.active {
  border-color: var(--red);
  background: var(--white);
  color: var(--red);
}
.category-chip .chip-count {
  background: var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.72rem;
}
.category-chip.active .chip-count {
  background: var(--red);
  color: var(--white);
}

@media (max-width: 600px) {
  .doc-row { grid-template-columns: auto 1fr; }
  .doc-row-actions {
    grid-column: 2;
    flex-direction: row;
    justify-content: flex-start;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 10px 18px;
    min-width: unset;
  }
  .doc-action-btn { width: auto; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .filter-divider { display: none; }
}

/* --- Page watermark -------------------------------------- */
/* SVG source for vector sharpness at every size and pixel
   density. Gzip/brotli on the server will compress the on-wire
   payload ~5–10x versus the raw file size. */
#page-watermark {
  position: fixed;
  top: 50%;
  left: 70%;
  transform: translate(-50%, -50%);
  width: clamp(260px, 42vw, 580px);
  height: clamp(260px, 42vw, 580px);
  background: url('../assets/img/spcfpd_logo.svg') center / contain no-repeat;
  opacity: 0.065;
  pointer-events: none;
  z-index: 0;
}
/* Keep all page chrome above the fixed watermark */
.top-bar, .alert-bar, main, .site-footer { position: relative; z-index: 1; }
@media (max-width: 600px) {
  #page-watermark { width: clamp(180px, 70vw, 280px); height: clamp(180px, 70vw, 280px); left: 50%; }
}

/* --- Notify Me / Stay Informed --------------------------- */
.notify-section { background: #f0f4f8; }

.codered-notice {
  background: #fff8e1;
  border: 2px solid #f59e0b;
  border-left: 5px solid #f59e0b;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.codered-notice-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}
.codered-notice-body { font-size: 0.9rem; line-height: 1.6; color: var(--dark-gray); }
.codered-notice-body strong { color: #92400e; display: block; margin-bottom: 4px; font-size: 0.95rem; }
.codered-notice-body a { color: #92400e; font-weight: 700; }

.notify-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.notify-form h3 { font-size: 1.1rem; color: var(--dark-gray); margin-bottom: 6px; }
.notify-form p.sub { font-size: 0.87rem; color: var(--mid-gray); margin-bottom: 20px; }

.notify-field { margin-bottom: 16px; }
.notify-field label { display: block; font-weight: 700; font-size: 0.83rem; color: #374151; margin-bottom: 5px; }
.notify-field input[type="text"],
.notify-field input[type="email"] {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-main); font-size: 0.93rem; color: var(--dark-gray);
  box-sizing: border-box; transition: border-color 0.15s;
}
.notify-field input:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.notify-topics { margin-bottom: 20px; }
.notify-topics label.topic-head { display: block; font-weight: 700; font-size: 0.83rem; color: #374151; margin-bottom: 8px; }
.topic-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 6px; margin-bottom: 6px;
  border: 1.5px solid var(--border); background: #fafafa; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.topic-option:hover { border-color: var(--red); background: #fff; }
.topic-option input { margin-top: 2px; accent-color: var(--red); flex-shrink: 0; }
.topic-option-body strong { display: block; font-size: 0.88rem; color: var(--dark-gray); }
.topic-option-body span { font-size: 0.8rem; color: var(--mid-gray); }

.notify-success {
  display: none; text-align: center; padding: 32px 20px;
  background: #d1fae5; border: 1px solid #a7f3d0; border-radius: var(--radius);
}
.notify-success .check { font-size: 2.5rem; margin-bottom: 10px; }
.notify-success strong { display: block; font-size: 1.1rem; color: #065f46; margin-bottom: 6px; }
.notify-success p { font-size: 0.88rem; color: #047857; }

.notify-info-list { list-style: none; padding: 0; }
.notify-info-list li {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; color: var(--dark-gray); display: flex; gap: 10px;
}
.notify-info-list li:last-child { border-bottom: none; }
.notify-info-list .ni-icon { font-size: 1.2rem; flex-shrink: 0; }

/* --- Print ----------------------------------------------- */
@media print {
  .site-header, .top-bar, .site-footer, .hero-btns, .btn { display: none; }
  .page-header { background: none; color: var(--charcoal); padding: 20px 0; }
  body { font-size: 12pt; }
}

/* ============================================================
   Welcome Modal & Feedback Panel
   ============================================================ */

@keyframes wm-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wm-slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Welcome overlay ---- */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.52);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: wm-fade-in 0.22s ease;
}
.welcome-overlay[hidden] { display: none; }

/* ---- Welcome modal ---- */
.welcome-modal {
  background: var(--white); border-radius: 8px; overflow: hidden;
  max-width: 460px; width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.24), 0 0 0 1px rgba(0,0,0,0.06);
  animation: wm-slide-up 0.28s ease;
}
.welcome-modal-header {
  background: var(--red); color: var(--white);
  padding: 18px 22px; display: flex; align-items: center; gap: 14px;
}
.welcome-modal-header img {
  width: 46px; height: 46px; flex-shrink: 0;
  filter: brightness(0) invert(1); opacity: 0.9;
}
.welcome-modal-header h2 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.welcome-modal-body { padding: 20px 22px 6px; }
.welcome-modal-body p {
  font-size: 0.9rem; color: var(--dark-gray);
  line-height: 1.65; margin-bottom: 10px;
}
.welcome-email-link {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 14px 0; padding: 10px 16px;
  background: var(--light-gray); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--red);
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
}
.welcome-email-link:hover { background: #ebebeb; text-decoration: none; color: var(--red-dark); }
.welcome-modal-footer {
  padding: 10px 22px 20px;
  display: flex; gap: 10px; justify-content: flex-end;
}
.btn-wm-close {
  padding: 8px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: none; color: var(--mid-gray); font-size: 0.88rem;
  cursor: pointer; font-family: var(--font-main);
}
.btn-wm-close:hover { background: var(--light-gray); }
.btn-wm-feedback {
  padding: 8px 18px; border: none; border-radius: var(--radius);
  background: var(--red); color: var(--white);
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; font-family: var(--font-main);
}
.btn-wm-feedback:hover { background: var(--red-dark); }

/* ---- Persistent feedback tab (right edge) ---- */
.feedback-tab-btn {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 8000;
  background: var(--red); color: var(--white);
  border: none; border-radius: 6px 0 0 6px;
  padding: 14px 9px;
  writing-mode: vertical-lr; text-orientation: mixed;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; font-family: var(--font-main);
  box-shadow: -2px 2px 10px rgba(0,0,0,0.18);
  transition: background 0.15s, right 0.15s;
}
.feedback-tab-btn:hover { background: var(--red-dark); right: 1px; }

/* ---- Backdrop ---- */
.feedback-backdrop {
  position: fixed; inset: 0; z-index: 8400;
  background: rgba(0,0,0,0.32);
  animation: wm-fade-in 0.2s ease;
}
.feedback-backdrop[hidden] { display: none; }

/* ---- Feedback slide panel ---- */
.feedback-panel {
  position: fixed; top: 0; right: -420px; bottom: 0;
  width: 380px; max-width: 100vw;
  background: var(--white); z-index: 8500;
  box-shadow: -4px 0 28px rgba(0,0,0,0.16);
  display: flex; flex-direction: column;
  transition: right 0.28s cubic-bezier(0.4,0,0.2,1);
}
.feedback-panel[hidden] { display: none; }
.feedback-panel.fp-open { right: 0; display: flex; }

.feedback-panel-header {
  background: var(--red); color: var(--white);
  padding: 15px 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.feedback-panel-header h2 { font-size: 1rem; font-weight: 700; }
.feedback-panel-close {
  background: none; border: none; color: rgba(255,255,255,0.8);
  font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 3px;
  font-family: var(--font-main);
}
.feedback-panel-close:hover { color: var(--white); }

.feedback-panel-body { flex: 1; overflow-y: auto; padding: 20px 20px 32px; }
.feedback-panel-body > p.fp-intro {
  font-size: 0.87rem; color: var(--mid-gray); line-height: 1.6; margin-bottom: 20px;
}

.feedback-field { margin-bottom: 14px; }
.feedback-field label {
  display: block; font-weight: 700; font-size: 0.82rem; color: #374151; margin-bottom: 5px;
}
.feedback-field .fp-opt { font-weight: 400; color: var(--mid-gray); font-size: 0.78rem; }
.feedback-field .fp-req { color: var(--red); }
.feedback-field input,
.feedback-field textarea {
  width: 100%; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-main); font-size: 0.9rem; color: var(--dark-gray);
  box-sizing: border-box; background: #fff; transition: border-color 0.15s;
}
.feedback-field input:focus,
.feedback-field textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.feedback-field textarea { resize: vertical; min-height: 110px; line-height: 1.55; }

.feedback-error {
  padding: 9px 12px; border-radius: var(--radius); margin-bottom: 12px;
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 0.85rem;
}
.feedback-error[hidden] { display: none; }

.feedback-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.feedback-actions button {
  padding: 9px 22px; background: var(--red); color: var(--white);
  border: none; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 700; cursor: pointer; font-family: var(--font-main);
}
.feedback-actions button:hover { background: var(--red-dark); }
.feedback-actions button:disabled { opacity: 0.6; cursor: not-allowed; }
.fp-email-alt { font-size: 0.82rem; color: var(--mid-gray); }
.fp-email-alt:hover { color: var(--red); }

.feedback-success {
  text-align: center; padding: 28px 16px; margin-bottom: 16px;
  background: #d1fae5; border: 1px solid #a7f3d0; border-radius: var(--radius);
}
.feedback-success[hidden] { display: none; }
.feedback-success-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: #059669; color: #fff; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.feedback-success p { font-size: 0.9rem; color: #065f46; margin-bottom: 4px; }
.feedback-success p strong { color: #064e3b; }

.feedback-note {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--mid-gray);
}
.feedback-note a { color: var(--red); }

@media (max-width: 480px) {
  .feedback-panel { width: 100vw; }
  .feedback-tab-btn { padding: 10px 7px; font-size: 0.7rem; }
}

/* ============================================================
   Navigation Dock Preference
   ============================================================ */

/* --- Dock picker control (injected into .primary-nav ul) --- */
.ndp-item {
  display: flex;
  align-items: center;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.22);
}
.nav-dock-picker {
  display: flex;
  align-items: center;
  gap: 3px;
}
.ndp-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.55);
  margin-right: 5px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ndp-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 5px;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ndp-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.ndp-btn.ndp-active {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}
.ndp-btn svg { display: block; }

/* Hide dock picker on mobile (feature is desktop-only) */
@media (max-width: 640px) {
  .ndp-item { display: none; }
}

/* --- Left / Right sidebar modes ---------------------------- */
body.nav-left .site-header,
body.nav-right .site-header {
  position: fixed !important;
  top: 0;
  width: 220px;
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
}
body.nav-left .site-header  { left: 0; right: auto; box-shadow: 2px 0 12px rgba(0,0,0,0.3); }
body.nav-right .site-header { right: 0; left: auto;  box-shadow: -2px 0 12px rgba(0,0,0,0.3); }

body.nav-left .header-inner,
body.nav-right .header-inner {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 16px 14px 20px;
  gap: 12px;
  min-height: 100%;
  box-sizing: border-box;
}

/* Logo stacks vertically with centered image at top of sidebar */
body.nav-left .site-logo,
body.nav-right .site-logo {
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

body.nav-left .logo-badge,
body.nav-right .logo-badge { width: 76px; height: 76px; }

body.nav-left .logo-text,
body.nav-right .logo-text { text-align: center; }

body.nav-left .logo-text .district-name,
body.nav-right .logo-text .district-name { font-size: 0.82rem; white-space: normal; line-height: 1.3; }

body.nav-left .logo-text .district-sub,
body.nav-right .logo-text .district-sub { font-size: 0.6rem; }

body.nav-left .primary-nav,
body.nav-right .primary-nav { width: 100%; }

body.nav-left .primary-nav ul,
body.nav-right .primary-nav ul {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
}

body.nav-left .primary-nav a,
body.nav-right .primary-nav a {
  display: block;
  padding: 7px 10px;
  font-size: 0.85rem;
  white-space: normal;
}

body.nav-left .ndp-item,
body.nav-right .ndp-item {
  flex-direction: column;
  align-items: flex-start;
  border-left: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-left: 0;
  padding-top: 10px;
  margin-left: 0;
  margin-top: 4px;
  width: 100%;
}

body.nav-left .nav-dock-picker,
body.nav-right .nav-dock-picker { flex-direction: row; }

body.nav-left .ndp-label,
body.nav-right .ndp-label { margin-right: 0; margin-bottom: 5px; }

/* Hide hamburger in side modes — all links are always visible */
body.nav-left .nav-toggle,
body.nav-right .nav-toggle { display: none !important; }

/* Shift page content to clear the fixed sidebar */
body.nav-left  .alert-bar, body.nav-left  main, body.nav-left  .site-footer { margin-left: 220px; }
body.nav-right .alert-bar, body.nav-right main, body.nav-right .site-footer { margin-right: 220px; }

/* Top bar: fixed at top of content area, clear of the sidebar column */
body.nav-left .top-bar {
  position: fixed !important;
  top: 0; left: 220px; right: 0; margin: 0;
  z-index: 900;
}
body.nav-right .top-bar {
  position: fixed !important;
  top: 0; left: 0; right: 220px; margin: 0;
  z-index: 900;
}
/* Push main content below the fixed top bar */
body.nav-left  main, body.nav-left  .alert-bar,
body.nav-right main, body.nav-right .alert-bar { margin-top: 33px; }

/* Move feedback tab to left side when nav is on the right */
body.nav-right .feedback-tab-btn {
  right: auto;
  left: 0;
  border-radius: 0 6px 6px 0;
  writing-mode: vertical-rl;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.18);
}
body.nav-right .feedback-tab-btn:hover { left: 1px; right: auto; }

/* Collapse side modes to top-sticky on small screens */
@media (max-width: 640px) {
  body.nav-left .site-header,
  body.nav-right .site-header {
    position: sticky !important;
    top: 0; left: auto; right: auto;
    width: 100%; height: auto; overflow: visible;
    box-shadow: var(--shadow);
  }
  body.nav-left .header-inner,
  body.nav-right .header-inner {
    flex-direction: row; align-items: center;
    justify-content: space-between; padding: 14px 20px;
    min-height: auto; gap: 16px;
  }
  body.nav-left .site-logo,
  body.nav-right .site-logo {
    flex-direction: row; align-items: center; width: auto;
    gap: 14px; padding-bottom: 0; border-bottom: none;
  }
  body.nav-left .logo-text,
  body.nav-right .logo-text { text-align: left; }
  body.nav-left .logo-badge,
  body.nav-right .logo-badge { width: 112px; height: 112px; }
  body.nav-left .logo-text .district-name,
  body.nav-right .logo-text .district-name { font-size: 1.1rem; white-space: nowrap; }
  body.nav-left .nav-toggle,
  body.nav-right .nav-toggle { display: block !important; }
  body.nav-left .primary-nav ul,
  body.nav-right .primary-nav ul { flex-direction: row; align-items: center; gap: 4px; }
  body.nav-left .primary-nav a,
  body.nav-right .primary-nav a { font-size: 0.9rem; padding: 8px 13px; white-space: nowrap; }
  body.nav-left .top-bar,
  body.nav-right .top-bar { position: relative !important; left: auto; right: auto; margin: 0; }
  body.nav-left .alert-bar,  body.nav-left main,  body.nav-left .site-footer,
  body.nav-right .alert-bar, body.nav-right main, body.nav-right .site-footer { margin-left: 0; margin-right: 0; }
  body.nav-left main,  body.nav-left .alert-bar,
  body.nav-right main, body.nav-right .alert-bar { margin-top: 0; }
  body.nav-right .feedback-tab-btn {
    right: 0; left: auto;
    border-radius: 6px 0 0 6px;
    writing-mode: vertical-lr;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.18);
  }
  body.nav-right .feedback-tab-btn:hover { left: auto; right: 1px; }
}
