/* CSS Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Verdana, Geneva, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #fff;
  color: #000;
}

/* Typography */
h1 {
  color: green;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0;
}

h2 {
  color: #cc0000;
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

p {
  margin: 1rem 0;
}

/* Links */
a {
  color: #000;
  text-decoration: underline;
}

a:visited {
  color: #000;
}

a:hover {
  color: #333;
}

/* Sticky Navigation */
.sticky-nav {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #228B22, #2E8B2E);
  padding: 0.75rem 1rem;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sticky-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.sticky-nav li {
  margin: 0;
}

.sticky-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  display: block;
}

.sticky-nav a:hover {
  background-color: rgba(255,255,255,0.2);
  color: #fff;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
header {
  text-align: center;
  padding: 2rem 1rem;
}

header img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Main Content */
main {
  padding: 1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
  }
}

/* Sections */
section {
  margin-bottom: 2rem;
}

/* Quote Image */
.quote-section {
  text-align: center;
  margin: 2rem 0;
}

.quote-section img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quote-section p {
  margin-top: 1rem;
}

/* Search Box */
.search-container {
  margin-bottom: 1.5rem;
}

.search-box {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.search-box:focus {
  outline: none;
  border-color: #228B22;
}

.search-box::placeholder {
  color: #999;
}

.no-results {
  padding: 2rem;
  text-align: center;
  color: #666;
  display: none;
}

/* Category Accordion */
.category {
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.category-header {
  background: #f5f5f5;
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.2s;
  user-select: none;
}

.category-header:hover {
  background: #ebebeb;
}

.category-header .count {
  background: #228B22;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.category-header .arrow {
  transition: transform 0.3s;
  font-size: 0.8rem;
}

.category.open .category-header .arrow {
  transform: rotate(180deg);
}

.category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.category.open .category-content {
  max-height: 5000px;
  transition: max-height 0.5s ease-in;
}

.category-articles {
  padding: 1rem;
}

/* Article Cards */
.article-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.article-card:last-child {
  margin-bottom: 0;
}

.article-card a {
  font-weight: bold;
  color: #1a5f1a;
  font-size: 1.05rem;
}

.article-card a:hover {
  color: #228B22;
}

.article-card p {
  margin: 0.5rem 0 0 0;
  color: #444;
  font-size: 0.95rem;
}

.article-card.hidden {
  display: none;
}

/* Highlight Text */
.highlight {
  color: #cc0000;
  font-weight: bold;
}

/* Politicians List */
.politicians-list {
  color: #0000cc;
  font-weight: bold;
  line-height: 2;
}

/* Sidebar */
.sidebar section {
  margin-bottom: 2rem;
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.sidebar h2 {
  margin-top: 0;
}

/* Call to Action */
.cta {
  color: #cc0000;
  font-weight: bold;
}

/* Expense List */
.expense-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0;
}

.expense-list li {
  margin-bottom: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #228B22;
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 999;
}

.back-to-top:hover {
  transform: scale(1.1);
  background: #1a6f1a;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  header {
    padding: 1rem;
  }

  .container {
    padding: 0.5rem;
  }

  .sticky-nav a {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
}

/* Print Styles */
@media print {
  body {
    font-size: 12pt;
  }

  a {
    text-decoration: none;
  }

  .content-grid {
    display: block;
  }

  .sticky-nav,
  .back-to-top,
  .search-container {
    display: none;
  }

  .category-content {
    max-height: none !important;
  }
}
