/* ============================================================
   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: center;
  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: 56px;
  height: 56px;
  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);
}
.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;
  gap: 4px;
  align-items: center;
}
.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 -------------------------------------- */
#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/logo.webp') center / contain no-repeat;
  opacity: 0.065;
  pointer-events: none;
  z-index: 0;
}
/* Keep all page chrome above the fixed watermark */
.top-bar, .site-header, .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; }
}
