/* ============================================
   TheBillRoom.org — Shared Design System
   ============================================ */

:root {
  --navy: #1a2e44;
  --navy-light: #2c4a6e;
  --red-accent: #b71c1c;
  --gold: #c9a227;
  --gold-light: #f0e6c0;
  --off-white: #f7f8fa;
  --border-color: #d4d9e0;
  --text-primary: #1a2e44;
  --text-secondary: #4a5568;
}

* { box-sizing: border-box; }

body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  background-color: var(--off-white);
  color: var(--text-primary);
  margin: 0;
}

/* === TOP ACCENT BAR === */
.top-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--red-accent) 50%, var(--navy) 100%);
}

/* === HEADER / NAV === */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding: 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: .6rem;
}
.site-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 900;
  font-family: 'Merriweather', serif;
  line-height: 1;
}
.site-logo .logo-text {
  color: #fff;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}
.site-logo .logo-text .dot-org {
  color: var(--gold);
  font-weight: 400;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.header-nav a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: color .2s;
}
.header-nav a:hover { color: var(--gold); }
.header-nav .active { color: var(--gold); }
.header-nav .btn-donate {
  background: var(--red-accent);
  color: #fff;
  border: none;
  padding: .4rem 1rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background .2s;
}
.header-nav .btn-donate:hover { background: #d32f2f; color: #fff; }

/* === PAGE BANNER (reusable hero-style top section) === */
.page-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 2.5rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-banner h1 {
  font-family: 'Merriweather', serif;
  font-weight: 900;
  font-size: 2rem;
  color: #fff;
  margin-bottom: .5rem;
  position: relative;
}
.page-banner p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.page-banner .seal-line {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1.25rem auto 0;
  border-radius: 2px;
}

/* === SEARCH BAR === */
.search-section {
  margin-top: -1.75rem;
  position: relative;
  z-index: 10;
  margin-bottom: 2rem;
}
.search-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.search-card .input-group {
  max-width: 700px;
  margin: 0 auto;
}
.search-card input {
  border: 2px solid var(--border-color);
  border-right: none;
  padding: .65rem 1rem;
  font-size: 1rem;
  border-radius: 4px 0 0 4px;
}
.search-card input:focus {
  border-color: var(--navy);
  box-shadow: none;
}
.search-card .btn-search {
  background: var(--navy);
  color: #fff;
  border: 2px solid var(--navy);
  padding: .65rem 1.5rem;
  font-weight: 700;
  font-size: .9rem;
  border-radius: 0 4px 4px 0;
  letter-spacing: .02em;
}
.search-card .btn-search:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
}

/* === SECTION HEADERS === */
.section-header {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-header i {
  color: var(--red-accent);
  font-size: 1.1rem;
}

/* === BILL CARDS === */
.bill-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  transition: box-shadow .2s, border-color .2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.bill-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: var(--navy-light);
}
.bill-card .bill-number {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  color: var(--red-accent);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .25rem;
}
.bill-card .bill-title {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: .5rem;
  line-height: 1.4;
}
.bill-card .bill-title a {
  color: inherit;
  text-decoration: none;
}
.bill-card .bill-title a:hover {
  color: var(--navy-light);
}
.bill-card .bill-summary-text {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bill-card .bill-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #edf0f3;
  font-size: .8rem;
  color: var(--text-secondary);
}
.badge-status {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .2rem .5rem;
  border-radius: 3px;
  background: var(--gold-light);
  color: #6b5a00;
}
.badge-party-D {
  background: #dbeafe;
  color: #1e40af;
}
.badge-party-R {
  background: #fee2e2;
  color: #991b1b;
}

/* === TRENDING SIDEBAR === */
.trending-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}
.trending-card .trending-header {
  background: var(--navy);
  color: #fff;
  padding: .75rem 1.25rem;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.trending-card .trending-header i { color: var(--gold); }
.trending-item {
  display: flex;
  align-items: flex-start;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid #edf0f3;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
  gap: .75rem;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: #f8f9fb; }
.trending-item .rank {
  font-family: 'Merriweather', serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--gold);
  min-width: 1.5rem;
  text-align: center;
  line-height: 1.4;
}
.trending-item .trending-info {
  flex: 1;
  min-width: 0;
}
.trending-item .trending-bill-num {
  font-weight: 700;
  font-size: .78rem;
  color: var(--red-accent);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.trending-item .trending-title {
  font-size: .85rem;
  color: var(--text-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === INFO CARD === */
.info-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 6px;
  padding: 1.25rem;
  color: #fff;
  margin-top: 1rem;
}
.info-card h6 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--gold);
  margin-bottom: .5rem;
}
.info-card p {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  margin: 0;
  line-height: 1.5;
}

/* === ANALYSIS CARDS (bill detail page) === */
.analysis-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.analysis-card .card-header-custom {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.25rem;
  background: #f8f9fb;
  border-bottom: 1px solid #edf0f3;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--navy);
}
.analysis-card .card-header-custom i {
  font-size: .85rem;
  width: 1.25rem;
  text-align: center;
}
.analysis-card .card-header-custom .icon-plain { color: var(--navy); }
.analysis-card .card-header-custom .icon-positive { color: #16a34a; }
.analysis-card .card-header-custom .icon-negative { color: var(--red-accent); }
.analysis-card .card-header-custom .icon-conflict { color: #d97706; }
.analysis-card .card-body-custom {
  padding: 1.25rem;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.analysis-card .card-body-custom p { margin: 0; }
.empty-state {
  color: #9ca3af;
  font-style: italic;
}

/* === STATUS TIMELINE === */
.status-timeline {
  position: relative;
  padding-left: 1.25rem;
}
.status-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
  padding-bottom: .85rem;
  padding-left: .75rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -1.25rem;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  border: 2px solid var(--off-white);
}
.timeline-current .timeline-dot {
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-light);
}
.timeline-status {
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-primary);
}
.timeline-current .timeline-status {
  color: var(--navy);
}
.timeline-date {
  font-size: .78rem;
  color: var(--text-secondary);
}
.timeline-from {
  font-size: .72rem;
  color: #9ca3af;
  font-style: italic;
}

/* === CONFLICT METER === */
.conflict-meter {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.conflict-meter .meter-bar {
  flex: 1;
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
}
.conflict-meter .meter-fill {
  height: 100%;
  border-radius: 5px;
  transition: width .5s ease;
}
.meter-low { background: #16a34a; }
.meter-medium { background: #d97706; }
.meter-high { background: var(--red-accent); }
.conflict-meter .meter-label {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 3rem;
  text-align: right;
}
.conflict-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .75rem;
}
.conflict-detail .detail-item {
  background: #f8f9fb;
  padding: .65rem .85rem;
  border-radius: 4px;
  border: 1px solid #edf0f3;
}
.conflict-detail .detail-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  font-weight: 600;
}
.conflict-detail .detail-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* === SIDEBAR CARDS === */
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.sidebar-card h6 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gold);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: .4rem 0;
  font-size: .88rem;
  border-bottom: 1px solid #f3f4f6;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .label {
  color: var(--text-secondary);
  font-weight: 600;
}
.detail-row .value {
  color: var(--text-primary);
  font-weight: 700;
  text-align: right;
}
.share-buttons {
  display: flex;
  gap: .5rem;
}
.share-buttons a {
  flex: 1;
  text-align: center;
  padding: .5rem;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  transition: opacity .2s;
}
.share-buttons a:hover { opacity: .85; color: #fff; }
.share-twitter { background: #1da1f2; }
.share-facebook { background: #4267b2; }
.share-copy { background: var(--navy); }

/* === BILL BANNER (bill detail page) === */
.bill-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 2rem 0 1.75rem;
  position: relative;
  overflow: hidden;
}
.bill-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.bill-banner .breadcrumb-nav {
  position: relative;
  margin-bottom: 1rem;
}
.bill-banner .breadcrumb-nav a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: color .2s;
}
.bill-banner .breadcrumb-nav a:hover { color: var(--gold); }
.bill-banner .bill-number-lg {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .35rem;
  position: relative;
}
.bill-banner h1 {
  font-family: 'Merriweather', serif;
  font-weight: 900;
  font-size: 1.75rem;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.3;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 800px;
}
.bill-banner .bill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  position: relative;
}
.bill-banner .badge-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  border-radius: 3px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-status-bill {
  background: var(--gold-light);
  color: #6b5a00;
}
.badge-sponsor {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.party-dem .badge-sponsor { background: rgba(37, 99, 235, .25); }
.party-rep .badge-sponsor { background: rgba(220, 38, 38, .25); }

/* === ABOUT PAGE === */
.about-section {
  padding: 2.5rem 0;
}
.about-content h2 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gold);
}
.about-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.about-content .lead-text {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-primary);
}
.value-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  height: 100%;
  transition: box-shadow .2s;
}
.value-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.value-card .value-icon {
  width: 56px;
  height: 56px;
  background: var(--gold-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .85rem;
  font-size: 1.35rem;
  color: var(--navy);
}
.value-card h5 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: .5rem;
}
.value-card p {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: .5rem 1rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.source-badge i { color: var(--navy); }

/* === PAGINATION === */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.pagination .page-link {
  color: var(--navy);
  border-color: var(--border-color);
  font-weight: 600;
  font-size: .9rem;
}
.pagination .page-item.active .page-link {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.pagination .page-link:hover {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--navy);
}

/* === FILTER BAR === */
.filter-bar {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
.filter-bar .filter-label {
  font-weight: 700;
  font-size: .85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-bar select {
  border: 2px solid var(--border-color);
  border-radius: 4px;
  padding: .35rem .75rem;
  font-size: .88rem;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text-primary);
}
.filter-bar select:focus {
  border-color: var(--navy);
  outline: none;
}

/* === SEARCH RESULTS === */
.result-count {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.result-count strong {
  color: var(--text-primary);
}
.search-highlight {
  background: var(--gold-light);
  padding: .1rem .2rem;
  border-radius: 2px;
}

/* === FOOTER === */
.site-footer {
  background: var(--navy);
  border-top: 3px solid var(--gold);
  color: rgba(255,255,255,.6);
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: .85rem;
}
.site-footer a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
}
.site-footer a:hover { color: var(--gold); }
.site-footer .footer-brand {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
}
.site-footer .footer-brand .dot-org { color: var(--gold); }
.footer-tagline {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  margin-top: .25rem;
}

/* === RESPONSIVE === */
@media (max-width: 767px) {
  .page-banner h1 { font-size: 1.5rem; }
  .page-banner p { font-size: .95rem; }
  .bill-banner h1 { font-size: 1.35rem; }
  .conflict-detail { grid-template-columns: 1fr; }
  .header-nav a:not(.btn-donate) { display: none; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}
