/* CSS Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* Variables */
:root {
  --color-purple: #4b006e;
  --color-yellow: #fff433;
  --color-text: #1a1b1f;
  --color-text-light: #4a4a4a;
  --color-white: #ffffff;
  --color-gray-light: #f5f5f5;
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --container-max: 1200px;
  --container-padding: 1.5rem;
  --header-height: 80px;
}

/* Base */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; font-weight: 600; }
@media (min-width: 768px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--color-purple);
  color: var(--color-white);
  border-color: var(--color-purple);
}
.btn-primary:hover { background: #380052; border-color: #380052; }
.btn-secondary {
  background: var(--color-yellow);
  color: var(--color-text);
  border-color: var(--color-yellow);
}
.btn-secondary:hover { background: #e6dc2e; border-color: #e6dc2e; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--color-purple);
  z-index: 1000;
}
.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.logo img { height: 50px; width: auto; }
.nav-links {
  display: none;
  list-style: none;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--color-white);
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--color-yellow); }
.nav-links a[aria-current="page"] {
  color: var(--color-yellow);
  border-bottom: 2px solid var(--color-yellow);
  padding-bottom: 2px;
}
.nav-links .btn { padding: 0.625rem 1.25rem; }
.btn-donate {
  background: var(--color-yellow);
  color: var(--color-text) !important;
  border-color: var(--color-yellow);
  border-bottom: none !important;
}
.btn-donate:hover {
  background: #e6dc2e;
  border-color: #e6dc2e;
  color: var(--color-text) !important;
}
/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  width: 30px;
  height: 3px;
  background: var(--color-yellow);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Desktop nav */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-links {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-purple);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links .btn { width: 100%; display: block; }
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
  background: linear-gradient(135deg, var(--color-gray-light) 0%, var(--color-white) 100%);
}
.hero-content {
  padding: 3rem var(--container-padding);
  text-align: center;
}
.hero h1 { color: var(--color-purple); margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.25rem; color: var(--color-text-light); margin-bottom: 2rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-image { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.hero-image img { max-height: 60vh; width: auto; object-fit: contain; }
@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    align-items: center;
    padding: 0 var(--container-padding);
    max-width: var(--container-max);
    margin: 0 auto;
  }
  .hero-content { flex: 1; text-align: left; padding: 2rem; }
  .hero-buttons { justify-content: flex-start; }
  .hero-image { flex: 1; }
  .hero-image img { max-height: 80vh; }
}

/* Page Header */
.page-header {
  background: var(--color-purple);
  color: var(--color-white);
  padding: 3rem 0;
  text-align: center;
}
.page-header h1 { color: var(--color-yellow); }

/* Page Content */
.page-content { padding: 3rem 0; }

/* Bio Sections */
.bio-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-gray-light);
}
.bio-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.bio-text { flex: 1; }
.bio-text h2 {
  color: var(--color-purple);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-yellow);
  display: inline-block;
}
.bio-text p { margin-bottom: 1.5rem; font-size: 1.1rem; line-height: 1.8; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-image img { border-radius: 8px; width: 100%; height: auto; }
@media (min-width: 768px) {
  .bio-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .bio-section.reverse .bio-text { order: 2; }
  .bio-section.reverse .bio-image { order: 1; }
  .bio-image {
    position: relative;
  }
  .bio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Issues */
.issues-toc {
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}
.issues-toc h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--color-purple); }
.issues-toc ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.issues-toc a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-purple);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.issues-toc a:hover { background: var(--color-yellow); color: var(--color-text); }

.issue-section { margin-bottom: 4rem; padding-top: 1rem; }
.issue-section h2 {
  color: var(--color-purple);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-yellow);
}
.issue-section > p { font-size: 1.1rem; margin-bottom: 2rem; color: var(--color-text-light); }
.issue-section h3 { color: var(--color-text); margin: 1.5rem 0 1rem; font-size: 1.25rem; }
.issue-section ul { margin-left: 1.5rem; margin-bottom: 1.5rem; }
.issue-section li { margin-bottom: 0.75rem; line-height: 1.7; }

/* Issues Content (markdown-generated) */
.issues-content h2 {
  color: var(--color-purple);
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-yellow);
  scroll-margin-top: calc(var(--header-height) + 1rem);
}
.issues-content h2:first-child { margin-top: 0; }
.issues-content > p { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--color-text-light); }
.issues-content h3 { color: var(--color-text); margin: 1.5rem 0 1rem; font-size: 1.25rem; }
.issues-content ul { margin-left: 1.5rem; margin-bottom: 1.5rem; }
.issues-content li { margin-bottom: 0.75rem; line-height: 1.7; }

/* Homepage: Hero Split */
.hero-split {
  display: flex;
  flex-direction: column;
}
.hero-split-image {
  line-height: 0;
}
.hero-split-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  min-height: 60vh;
}
.hero-split-signup {
  background: var(--color-purple);
  color: var(--color-white);
  padding: 3rem var(--container-padding);
  text-align: center;
}
.signup-content h2 {
  color: var(--color-yellow);
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .signup-content h2 {
    margin-bottom: 0.5rem;
  }
}
.signup-content > p {
  display: none;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
@media (min-width: 768px) {
  .signup-content > p {
    display: block;
  }
}
@media (min-width: 768px) {
  .hero-split {
    flex-direction: row;
    min-height: 500px;
  }
  .hero-split-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    order: 2;
  }
  .hero-split-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% center;
    aspect-ratio: auto;
  }
  .hero-split-signup {
    display: flex;
    flex: 0 0 40%;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 3rem;
    order: 1;
  }
  .hero-split-signup::after {
    content: '';
    position: absolute;
    top: 0;
    right: -180px;
    width: 180px;
    height: 100%;
    background: linear-gradient(to left,
      transparent 0%,
      rgba(75, 0, 110, 0.2) 5%,
      rgba(75, 0, 110, 0.5) 15%,
      rgba(75, 0, 110, 0.75) 30%,
      rgba(75, 0, 110, 0.9) 50%,
      rgba(75, 0, 110, 0.97) 70%,
      var(--color-purple) 100%);
    z-index: 1;
  }
}
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}
.signup-form input[type="email"],
.signup-form input[type="text"] {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
}
.signup-form .btn {
  width: 100%;
}
.signup-form .btn-primary:hover {
  background: var(--color-yellow);
  border-color: var(--color-yellow);
  color: var(--color-text);
}

/* Homepage: Meet David Section */
.meet-david-section {
  padding: 4rem 0;
  background: var(--color-white);
}
.meet-david-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}
.meet-david-image {
  flex-shrink: 0;
}
.meet-david-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-purple);
}
.meet-david-content h2 {
  color: var(--color-purple);
  margin-bottom: 1rem;
}
.meet-david-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  max-width: 600px;
}
@media (min-width: 768px) {
  .meet-david-grid {
    flex-direction: row;
    text-align: left;
    gap: 3rem;
    align-items: center;
  }
  .meet-david-content {
    flex: 1;
  }
  .meet-david-image {
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .meet-david-image img {
    width: 330px;
    height: 330px;
    margin-right: 90px;
    margin-bottom: 25px;
  }
}

/* Homepage: District Section */
.district-section {
  padding: 4rem 0;
  background: var(--color-white);
}
.district-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.district-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-light);
}
.district-text h2 {
  color: var(--color-purple);
  margin-bottom: 1.5rem;
}
.district-text p {
  margin-bottom: 1rem;
}
.district-map {
  position: relative;
  min-height: 300px;
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
}
.district-map iframe {
  border: none;
  border-radius: 8px;
}
.map-overlay {
  display: none;
}
@media (min-width: 768px) {
  .map-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1;
    border-radius: 8px;
  }
  .map-overlay span {
    background: var(--color-white);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .map-overlay:hover {
    background: rgba(0, 0, 0, 0.15);
  }
  .map-overlay:hover span {
    opacity: 1;
  }
}
@media (min-width: 768px) {
  .district-grid {
    flex-direction: row;
    align-items: center;
  }
  .district-text {
    flex: 1;
  }
  .district-map {
    flex: 1;
    min-height: 400px;
  }
}

/* Homepage: Platform Section */
.platform-section {
  padding: 4rem 0;
  background: var(--color-yellow);
}
.platform-section h2 {
  color: var(--color-purple);
  text-align: center;
  margin-bottom: 2rem;
}
.platform-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.platform-item {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--color-purple);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.platform-item h3 {
  color: var(--color-purple);
  margin-bottom: 1rem;
}
.platform-item p {
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  flex: 1;
}
.platform-item .btn {
  align-self: flex-start;
}
.platform-cta {
  text-align: center;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .platform-grid {
    flex-direction: row;
    gap: 2rem;
  }
  .platform-item {
    flex: 1;
  }
}

/* Homepage: Donate Section */
.donate-section {
  background: var(--color-purple);
  color: var(--color-white);
  padding: 4rem 0;
  text-align: center;
}
.donate-section h2 {
  color: var(--color-yellow);
  margin-bottom: 1rem;
}
.donate-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.donate-section p {
  font-size: 1.1rem;
  margin: 0;
  max-width: 600px;
}
.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.25rem;
}
.donate-section .btn-primary:hover {
  background: var(--color-yellow);
  border-color: var(--color-yellow);
  color: var(--color-text);
}
@media (min-width: 768px) {
  .donate-grid {
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
  }
  .donate-section p {
    text-align: left;
  }
}

/* Placeholder text styling */
.placeholder-text {
  font-style: italic;
  opacity: 0.6;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: var(--color-white);
  padding: 3rem 0;
  text-align: center;
}
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.footer-logo img {
  height: 50px;
  width: auto;
}
.footer-cta-text {
  color: var(--color-white);
}
.footer-social {
  display: flex;
  gap: 1.5rem;
}
.footer-social svg {
  width: 28px;
  height: 28px;
}
.footer-social a {
  color: var(--color-white);
  transition: color 0.2s ease;
}
.footer-social a:hover {
  color: var(--color-yellow);
}
.footer-contact a {
  color: var(--color-yellow);
  text-decoration: none;
}
.footer-contact a:hover {
  text-decoration: underline;
}
.disclaimer {
  color: var(--color-white);
}
@media (min-width: 768px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem 2rem;
    align-items: center;
  }
  .footer-column {
    display: contents;
  }
  .footer-logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
  }
  .disclaimer {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }
  .footer-center .btn {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
  }
  .footer-cta-text {
    grid-column: 2;
    grid-row: 2;
    justify-self: center;
  }
  .footer-social {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  .footer-contact {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    text-align: right;
  }
}
