/* ────────────────────────────────────────────────────────────────────────
   index.css — page-specific styles for a high-impact, voter-friendly homepage
   ──────────────────────────────────────────────────────────────────────── */

/* 1) Hero Section — Full-bleed background + gradient overlay */
#hero {
  position: relative;
  height: 90vh;
  background: url(../assets/hero.jpg) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--padding-side);
}
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 86, 166, 0.7),
    rgba(0, 0, 0, 0.3)
  );
}
.hero-content {
  position: relative;
  max-width: 700px;
  text-align: center;
  color: #fff;
}
/* ─── Hero ticker marquee ─────────────────────────────────────────── */

.ticker-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.hero-ticker {
  display: inline-block;
  white-space: nowrap;
  padding: 0.5rem 0;
  margin: 0;
  /* start the text off to the right */
  transform: translateX(100%);
  /* animate it moving left */
  animation: marquee 200s linear infinite;
  font-weight: 600;
  color: #fff;
  list-style: none;
}

.hero-ticker li {
  display: inline-block;
  font-size: 20px;
  margin: 0 8rem;
}

/* loop it */
@keyframes marquee {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color:#ffffff;
}
.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
  color:#ffffff;
}
.hero-buttons {
  margin-bottom: 20px;
}
.hero-buttons .btn {
  margin: 0 0.5rem;
  min-width: 140px;
}

/* ─── Video Section ───────────────────────────────────────────────────── */
.video-section {
  padding: var(--section-vertical) 0;
  background: var(--background-main);
  text-align: center;
}
.video-section video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* layout for video and events side by side */
.video-events {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}
.video-wrapper {
  flex: 1.2;
  margin-left: -1rem;
  display: flex;
}
.events-wrapper {
  flex: 1;
}
.events-grid {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.events-grid li {
  background: var(--background-main);
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.events-grid img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.5rem;
}
.events-grid li:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
.events-grid a {
  display: block;
  color: var(--text-main);
}
.more-events {
  padding-top: 20px;
  text-align: center;
  margin-bottom: 1rem;
}

/* ─── News Section ─────────────────────────────────────────────────────── */
.news-section {
  padding: var(--section-vertical) 0;
  background: var(--primary-color);
}
.news-section h2 {
  text-align: center;
  color:#ffffff;
}
.news-carousel {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}
.news-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.news-list li {
  flex: 0 0 30%;
  height: 200px;
  display: none;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  color: #fff;
  position: relative;
  overflow: hidden;
  order: 0;
}
.news-item {
  background-image: url(../assets/hero.jpg);
}
.news-list li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--radius);
}
.news-list li.active,
.news-list li.prev,
.news-list li.next {
  display: block;
}
.news-list li.prev {
  order: 1;
}
.news-list li.active {
  order: 2;
}
.news-list li.next {
  order: 3;
}
.news-list a {
  position: relative;
  z-index: 1;
  display: block;
  padding: 1rem;
  height: 100%;
  color: #fff;
}
.news-list h3 {
  margin-bottom: 0.5rem;
}
.news-list time {
  font-size: 0.85rem;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}
.news-prev {
  left: -2rem;
}
.news-next {
  right: -2rem;
}

/* ─── Issues Section — Use theme colors instead of images ─── */
.issues-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(325px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  /* ensure every row is exactly as tall as the tallest item */
  grid-auto-rows: 1fr;
}

.issues-container {
  max-width: 100%;
  margin: 0;
  padding: 0 1rem;
}

.issues-list li {
  background-image: none;
  background-color: var(--primary-color);
  border: 10px double var(--secondary-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  aspect-ratio: 1 / 1; /* perfect square */
}

/* disable the dark overlay */
.issues-list li::after {
  display: none;
}

/* if you have a separate .issue-card background-image rule, turn it off */
.issue-card {
  background-image: none;
}
.issues-list li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius);
  z-index: 0;
  pointer-events: none;
}
.issues-list li::before {
  content: "\f0a9";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--secondary-color);
  opacity: 0.2;
  z-index: 1;
  pointer-events: none;
}
.issues-list li:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.section.issues h2 {
  text-align: center;
  color: var(--text-main);
}
.issues-list li h3 {
  color: #fff;
  font-size: 1.65rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.issues-list li p {
  color: #fff;
  font-size: 1.4rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.issues-list li a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* 4) Get Involved — Accent-color banner */
.section.get-involved {
  background: var(--secondary-color);
  color: #fff;
  text-align: center;
  padding: var(--section-vertical) 0;
}
.section.get-involved h2 {
  margin-bottom: 1rem;
  color:#ffffff;;
}
.section.get-involved .btn-primary {
  background: #fff;
  color: var(--secondary-color);
}
.section.get-involved .btn-primary:hover {
  color: #fff;
  background: var(--primary-color);
}
.section.get-involved .btn-secondary {
  background: var(--primary-color);
  color: #fff;
}
.section.get-involved .btn-secondary:hover {
  background: #fff;
  color: var(--primary-color);
}

/* 6) Contact Section — Centered card */
.section.contact .container {
  display: flex;
  justify-content: center;
}
.section.contact p {
  max-width: 600px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
}

.btn-events {
  background: var(--secondary-color);
  width: 110%;
  height: 50px;
}

/* 7) Responsive tweaks */
@media (max-width: 768px) {
  #hero {
    height: 70vh;
  }
  .section.about .container {
    grid-template-columns: 1fr;
  }
  .video-events {
    display: flex;
    flex-direction: column;
  }

  /* withdraw the negative offset on the video */
  .video-wrapper {
    margin-left: 0;
  }

  /* force both panels to use full width */
  .video-wrapper,
  .events-wrapper {
    width: 100%;
  }

  /* give the events some breathing room under the video */
  .events-wrapper {
    margin-top: 2rem;
  }


  /* Mobile layout for news carousel */
  .news-carousel {
    overflow: visible;
    height: 220px;
  }
  .news-list {
    position: relative;
    display: block;
    height: 100%;
  }
  .news-list li {
    position: absolute;
    top: 0;
    left: 50%;
    width: 80%;
    transition: transform 0.3s;
  }
  .news-list li.prev {
    transform: translateX(-120%) scale(0.8);
    z-index: 1;
  }
  .news-list li.next {
    transform: translateX(20%) scale(0.8);
    z-index: 1;
  }
  .news-list li.active {
    transform: translateX(-50%) scale(1);
    z-index: 2;
  }
  .carousel-btn {
    z-index: 3;
  }
  .news-prev {
    left: 0;
  }
  .news-next {
    right: 0;
  }
}
