@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
  --primary: #1d4ed8;
  --primary-hover: #2563eb;
  --accent: #22d3ee;
  --bg-dark: #0f172a;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

p {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 1rem 5%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links .nav-item {
  color: var(--text-main);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
}

.nav-links a.nav-item:hover, .nav-links .dropdown:hover span {
  color: var(--accent);
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.4);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--bg-dark);
  text-decoration: none;
}

/* Layout Elements */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

header.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Dynamic Shapes */
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  opacity: 0.6;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  right: -100px;
  animation: float 10s infinite alternate;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -50px;
  left: -100px;
  animation: float 12s infinite alternate-reverse;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Sections */
section {
  padding: 6rem 0;
  position: relative;
  z-index: 2;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2.5rem;
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.icon-wrap {
  width: 60px;
  height: 60px;
  background: rgba(34, 211, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* Fade Elements */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-col p, .footer-col a {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .mobile-menu-btn { display: block; }
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-dark);
    flex-direction: column;
    padding: 3rem 5%;
    transition: var(--transition);
    overflow-y: auto;
  }
  .nav-links.active {
    left: 0;
  }
  .dropdown {
    width: 100%;
  }
  .dropdown > span {
    display: block;
    width: 100%;
    padding: 10px 0;
  }
  .dropdown-content {
    position: relative;
    top: 0;
    width: 100%;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.05);
    margin-top: 10px;
  }
  .dropdown.active .dropdown-content {
    display: block;
  }
  .dropdown.active > span {
    color: var(--accent);
  }
}

/* Utility Pages */
.page-header {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 100px;
}

/* Leaflet Map Migration Styles */
.leaflet-container {
    background-color: var(--glass-bg);
    font-family: 'Inter', sans-serif;
}

.custom-polling-icon {
    background: transparent;
    border: none;
    font-size: 24px;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.5);
}

.early-voting-icon {
    filter: drop-shadow(0 0 5px #facc15);
}

.election-day-icon {
    filter: drop-shadow(0 0 5px #60a5fa);
}

/* Dropdown Menu Styles */
.dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  min-width: 180px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  z-index: 100;
  top: 100%;
  left: 0;
  overflow: hidden;
}

.dropdown-content a {
  color: #e2e8f0;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: rgba(255,255,255,0.05);
  color: var(--accent);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover > span {
  color: var(--accent);
}

/* News Carousel Styles */
.carousel-wrapper {
  overflow: hidden;
  width: 100%;
  padding: 10px 0;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 350px;
  max-width: 350px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.carousel-controls {
  display: flex;
  gap: 10px;
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-dark);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .carousel-slide {
    min-width: 280px;
    max-width: 280px;
  }
}
