/* Christ First Vote - Central Styles */
/* Color Palette: Deep Navy, Colonial Red, Gold */

:root {
  --navy: #001F3F;
  --navy-dark: #00142a;
  --navy-light: #002d5e;
  --red: #9B1B30;
  --red-bright: #c4203d;
  --gold: #FFD700;
  --gold-dim: #bfa500;
  --white: #ffffff;
  --off-white: #f5f5f5;
  --gray-light: #d0d0d0;
  --gray: #707070;
  --black: #0d0d0d;
  --font-serif: 'Playfair Display', 'EB Garamond', 'Georgia', serif;
  --font-sans: 'Source Sans Pro', 'Helvetica Neue', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--off-white);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--white);
}

p { margin: 0 0 1rem; }

/* Navigation - Mobile First */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: bold;
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy-dark);
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--gray);
}

.nav-menu.active {
  display: block;
}

.nav-menu li {
  border-bottom: 1px solid var(--gray);
}

.nav-menu a {
  display: block;
  padding: 1rem;
  color: var(--off-white);
}

.nav-menu a:hover {
  background: var(--red);
  color: var(--white);
}

/* Main Content */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem 1rem;
  border-bottom: 2px solid var(--red);
  margin-bottom: 2rem;
}

.hero h1 {
  color: var(--gold);
  font-size: 2.25rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--gray-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Logo Styles */
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: bold;
  text-decoration: none;
}

.site-title:hover {
  color: var(--white);
}


/* State Selection */
.state-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.state-card {
  background: var(--navy);
  border: 1px solid var(--gray);
  border-radius: 4px;
  padding: 1.25rem;
  text-align: center;
}

.state-card h3 {
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.state-card p {
  font-size: 0.875rem;
  color: var(--gray-light);
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.btn:hover {
  background: var(--red-bright);
  color: var(--white);
}

/* Branch Navigation */
.branch-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--navy);
  border-radius: 4px;
}

.branch-nav a {
  flex: 1 1 calc(33.333% - 0.5rem);
  padding: 0.75rem;
  background: var(--navy-dark);
  border: 1px solid var(--gray);
  border-radius: 4px;
  text-align: center;
  color: var(--off-white);
  font-size: 0.875rem;
  text-decoration: none;
}

.branch-nav a:hover,
.branch-nav a.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Office Section */
.office-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--navy);
  border-radius: 4px;
  border-left: 4px solid var(--gold);
}

.office-section h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray);
  color: var(--gold);
}

/* Candidate Table - Div Based */
.candidate-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray);
  border-radius: 4px;
  overflow: hidden;
}

.table-header {
  display: flex;
  background: var(--navy-dark);
  border-bottom: 2px solid var(--gold);
  font-weight: bold;
  font-size: 0.8125rem;
}

.table-header .cell-topic {
  background: var(--navy-light);
  justify-content: center;
  padding: 0.75rem 0.25rem;
}

.table-row {
  display: flex;
  

  border-bottom: 1px solid var(--gray);
  transition: background 0.2s;
  cursor: pointer;
}

.table-row:hover {
  background: rgba(155, 27, 48, 0.15);
  box-shadow: inset 4px 0 0 var(--gold);
}

.table-row.incumbent {
  border-left: 3px solid var(--gold);
}

/* Table Cells */
.cell-candidate {
  flex: 0 0 35%;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cell-party {
  flex: 0 0 12%;
  padding: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.cell-total {
  flex: 0 0 12%;
  padding: 0.75rem;
  display: flex;
  align-items: center;
}

.cell-topic {
  flex: 0 0 8.333%;
  padding: 0.75rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-left: 1px solid var(--gray);
}

.cell-topic i {
  font-size: 1rem;
  color: var(--gold);
}

/* Topic Scores */
.topic-score {
  font-weight: bold;
  font-size: 1rem;
}

.topic-score.perfect {
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold);
}

.cell-topic.perfect-score {
  background: linear-gradient(135deg, rgba(155,27,48,0.4) 0%, rgba(255,215,0,0.2) 100%);
  border: 1px solid var(--red);
  box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Score Colors */
.total-high { color: #2ecc71; }
.total-med { color: var(--gold); }
.total-low { color: var(--red-bright); }

/* Party Colors */
.party-republican { color: var(--red-bright); }
.party-democrat { color: #3498db; }
.party-independent { color: #9b59b6; }

/* Badges */
.incumbent-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  font-weight: bold;
  text-transform: uppercase;
}

/* Details Section */
.table-details {
  display: none;
  background: var(--black);
  border-bottom: 2px solid var(--red);
}

.table-details.visible {
  display: block;
}

.details-content {
  padding: 1rem;
}

/* Score Card Component */
.score-card {
  background: var(--navy-dark);
  border: 1px solid var(--gray);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  padding: 1rem;
  margin: 0.5rem 0;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray);
}

.score-label {
  color: var(--gray);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-value {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: bold;
}

.score-value.high { color: #2ecc71; }
.score-value.med { color: var(--gold); }
.score-value.low { color: var(--red-bright); }

.topic-scores {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.topic-row {
  display: grid;
  grid-template-columns: 100px 1fr 45px;
  align-items: center;
  gap: 0.75rem;
}

.topic-row.perfect {
  background: linear-gradient(90deg, rgba(155,27,48,0.2) 0%, transparent 100%);
  margin: 0 -0.5rem;
  padding: 0.25rem 0.5rem;
  border-left: 2px solid var(--red);
}

.topic-name {
  color: var(--off-white);
  font-size: 0.8125rem;
  font-weight: 600;
}

.topic-bar {
  background: var(--gray);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.topic-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-bright) 100%);
  transition: width 0.3s ease;
}

.topic-row.perfect .topic-fill {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-dim) 100%);
}

.topic-val {
  font-weight: bold;
  font-size: 0.875rem;
  text-align: right;
}

.topic-row.perfect .topic-val {
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold);
}

/* Notes & Sources */
.notes-section,
.sources-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray);
  font-size: 0.8125rem;
  color: var(--gray);
}

.notes-section h4,
.sources-section h4 {
  color: var(--gold);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem;
}

.notes-section p,
.sources-section p {
  line-height: 1.5;
  margin: 0;
}

.ext-link {
  margin-top: 1rem;
}

.ext-link a {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.ext-link a:hover {
  background: var(--red-bright);
}

/* No Data */
.no-data {
  padding: 2rem;
  text-align: center;
  color: var(--gray);
  background: var(--navy);
  border-radius: 4px;
}

/* About Page */
.about-section {
  margin-bottom: 2.5rem;
}

.about-section h2 {
  color: var(--gold);
  border-bottom: 1px solid var(--gray);
  padding-bottom: 0.5rem;
}

.bible-quote {
  background: var(--navy);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.bible-quote p {
  margin: 0;
  font-style: italic;
  font-size: 1.0625rem;
}

.bible-quote cite {
  display: block;
  margin-top: 0.75rem;
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

.verse-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.verse-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray);
}

.verse-list strong {
  color: var(--gold);
}

/* Footer */
.site-footer {
  background: var(--navy);
  border-top: 3px solid var(--red);
  padding: 2rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--gray);
  font-size: 0.875rem;
}

/* Responsive - Desktop */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  
  .nav-menu {
    display: flex;
    position: static;
    background: none;
    border: none;
    gap: 0;
  }
  
  .nav-menu li {
    border: none;
  }
  
  .nav-menu a {
    padding: 0.5rem 1rem;
    border-left: 1px solid var(--gray);
  }
  
  .state-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .branch-nav a {
    flex: 0 0 auto;
    min-width: 140px;
  }
  
  h1 { font-size: 2.5rem; }
  .hero h1 { font-size: 3rem; }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .branch-nav a {
    flex: 1 1 calc(50% - 0.25rem);
  }
  
  .table-header {
    display: none;
  }
  
  .table-row {
    flex-wrap: wrap;
  }
  
  .cell-candidate {
    flex: 1 1 65%;
  }
  
  .cell-party {
    flex: 0 0 30%;
  }
  
  .cell-total {
    flex: 1 1 100%;
    padding-top: 0;
    border-top: 1px solid var(--gray);
  }
  
  .cell-topic {
    flex: 0 0 16.66%;
    padding: 0.5rem 0.125rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .topic-row {
    grid-template-columns: 80px 1fr 40px;
    gap: 0.5rem;
  }
  
  .topic-name {
    font-size: 0.75rem;
  }
  
  .topic-val {
    font-size: 0.8125rem;
  }
}
@reference './app.css';