/* =========================
   Base Styles & Reset
   ========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Lato', sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background-color: #000000;
  overflow-x: hidden;
}

/* Ensure all images never overflow their containers */
img { max-width: 100%; height: auto; display: block; }

body.theme-dark {
  background-color: #000000 !important;
  color: #ffffff !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* =========================
   Typography
   ========================= */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: #ffffff;
  text-decoration: none;
}

a:hover {
  color: #cccccc;
}

/* =========================
   Main Layout
   ========================= */

main {
  min-height: calc(100vh - var(--header-height));
  padding: 2rem 0;
}

/* =========================
   Buttons & CTAs
   ========================= */

.button {
  display: inline-block;
  padding: 0.72rem 1.15rem;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: #fff;
  transition: all .18s ease-in-out;
}
.button:hover,
.button:focus-visible {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.42);
  transform: translateY(-1px);
}
.button-primary {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}
.button-primary:hover,
.button-primary:focus-visible {
  background: #e02e5c;
  border-color: #e02e5c;
}
.hero-ctas { display: flex; gap: .8rem; justify-content: center; margin-top: 1rem; }

/* Visible link color inside white countdown */
.voting-box a { color: #0057cc; font-weight: 800; text-decoration: underline; }
.voting-box a:hover { color: #003ea1; }

/* =========================
   Hero Section
   ========================= */

.hero-section {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 3rem;
}

.hero-logo {
  margin: 0 auto 2rem;
  display: block;
}

.white-fade-banner {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.95) 100%
  );
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
}

/* =========================
   Cards and Grid Layout
   ========================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.card h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.card p {
  color: #cccccc;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* =========================
   Candidate Cards
   ========================= */

.candidate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.candidate-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.candidate-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.candidate-card h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.candidate-card .role {
  color: #cccccc;
  font-size: 0.9rem;
  font-style: italic;
}

/* =========================
   Section Headings
   ========================= */

.section-heading, .section-title {
  text-align: center;
  margin: 3rem 0 2rem;
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.section-heading h2, .section-title {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: #cccccc;
  font-size: 1.1rem;
}

/* =========================
   Policy Section
   ========================= */

.policy-section {
  padding: 3rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.policy-scroller {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 0 1rem;
}

.policy-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.policy-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.policy-card h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.policy-card p {
  color: #cccccc;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* =========================
   Team Section
   ========================= */

.team-section {
  padding: 3rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* Voting info box styles */
.voting-box {
  display: inline-block;
  width: 100%;
  max-width: 540px;
  margin: 0 auto 2.2rem auto;
  text-align: center;
  padding: 1.1rem 1.5rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  color: #111;
  font-size: 1.08rem;
  font-family: 'Lato',sans-serif;
  font-weight: 600;
  letter-spacing: .2px;
}
.voting-title {
  font-size: 1.13rem;
  font-weight: 700;
  margin-bottom: .2rem;
  color: #111;
}
.voting-desc {
  color: #333;
  font-size: .97rem;
  margin-bottom: .7rem;
}
.voting-countdown {
  margin-bottom: -.2rem;
  color: #111;
}
#countdown-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #111 !important;
  margin-bottom: 0.3rem;
}
#countdown-timer {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #d32f2f !important;
  background: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}



/* =========================
   Header + Navigation
   ========================= */

:root {
  --header-height: 64px;   /* overall header height */
  --logo-max-h: 40px;      /* desktop logo max height */
  --logo-max-h-sm: 32px;   /* mobile logo max height */
  --nav-gap: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.1) blur(8px);
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.2));
  border-bottom: 1px solid rgba(255,255,255,.12);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
}

/* Logo link wrapper */
.ticket-name {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 0; /* hides fallback text */
  text-decoration: none;
  color: inherit;
}

/* Actual logo image */
.site-logo {
  height: auto;
  max-height: var(--logo-max-h);
  width: auto;
  max-width: 300px;
  object-fit: contain;
  display: block;
}

/* Resize on smaller screens */
@media (max-width: 800px) {
  .site-logo {
    max-height: var(--logo-max-h-sm);
    max-width: 140px;
  }
}

/* Top navigation */
.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--nav-gap);
  align-items: center;
}

.top-nav a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  padding: .4rem .6rem;
  border-radius: 6px;
}

.top-nav a:hover {
  background: rgba(255,255,255,.08);
}

/* Dropdowns */
.top-nav .dropdown { position: relative; }
.top-nav .dropbtn { display: inline-block; }
.top-nav .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0,0,0,0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  min-width: 220px;
  padding: .4rem;
  box-shadow: var(--shadow-2);
  z-index: 99;
}
.top-nav .dropdown-content a {
  display: block;
  padding: .45rem .6rem;
  border-radius: 8px;
  color: var(--secondary-color);
}
.top-nav .dropdown-content a:hover {
  background: rgba(255,255,255,.08);
}
.top-nav .dropdown:hover .dropdown-content { display: block; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  padding: .55rem .7rem;
  border-radius: 10px;
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex }
  .top-nav { display: none }
  .top-nav.open { display: block }
  .top-nav ul { 
    flex-direction: column; 
    align-items: stretch; 
    gap: .4rem; 
    padding-top: .6rem 
  }
}

/* =========================
   Grid and cards used in team section
   ========================= */

.role-group { margin: 2.5rem 0; }
.role-title { font-size: 1.6rem; margin-bottom: .25rem; }
.lede { color: #cfcfcf; margin: 0 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card-media { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { height: 200px; background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.14)); }
.card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.card-title { margin: 0; font-size: 1.05rem; }
.card-title a { color: #fff; text-decoration: none; }
.muted { color: #c4c4c4; font-size: .9rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .4rem; }
.badge { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: .15rem .45rem; border-radius: 999px; font-size: .78rem; }

/* =========================
   Candidate single page layout
   ========================= */

.candidate-single .candidate-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

.candidate-single .candidate-aside {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  align-self: start;
}

.candidate-single .candidate-photo {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.candidate-single .candidate-aside .badges {
  margin-top: .75rem;
}

@media (max-width: 900px) {
  .candidate-single .candidate-layout {
    grid-template-columns: 1fr;
  }
  .candidate-single .candidate-aside {
    position: static;
  }
}
