/* Global reset and root styles */
html, body {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  margin: 0;
  padding: 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Replaces -moz-box-sizing for broader compatibility */
}

/* Body styles from HTML, with fonts and colors */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* From HTML */
  line-height: 1.6;
  color: #333; /* From HTML */
  background-color: #ededed; /* From previous CSS */
  font-size: 14px; /* From previous CSS */
}

/* Heading styles from previous CSS, updated with HTML colors */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Updated to HTML font */
  font-weight: normal;
  line-height: 1.1;
  color: #333; /* From previous CSS */
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word; /* Prevent text cutoff */
  text-align: center;
  box-sizing: border-box;
  padding: 0 10px; /* Prevent edge clipping */
}

h1 small, h2 small, h3 small, h4 small, h5 small, h6 small,
.h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small {
  font-weight: normal;
  line-height: 1;
}

h1, .h1 { font-size: 48px; line-height: 48px; }
h2, .h2 { font-size: 36px; line-height: 42px; }
h3, .h3 { font-size: 28px; line-height: 36px; }
h4, .h4 { font-size: 24px; line-height: 25px; }
h5, .h5 { font-size: 20px; line-height: 24px; }
h6, .h6 { font-size: 18px; line-height: 24px; }

/* Hero section from HTML */
.hero {
  background: linear-gradient(135deg, #E31E24 0%, #C41E3A 100%); /* From HTML */
  color: white;
  padding: 100px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: 0; /* Fixed to avoid overflow */
  width: 50%; /* Reduced to prevent overflow */
  height: 200%;
  background: #00A9E0; /* From HTML */
  transform: rotate(15deg);
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px; /* Reduced from 50px */
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  padding: 0 10px;
}

.hero-image {
  flex: 0 0 auto;
  max-width: 300px;
  width: 100%;
}

.hero-text {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

.headshot {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 8px solid white;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  object-fit: cover;
  background: white;
}

.hero h1 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* From HTML */
  font-size: 4em;
  font-weight: 700; /* From HTML */
  color: white; /* From HTML */
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
  padding: 0 10px;
}

.hero .subtitle {
  font-size: 1.5em;
  margin-bottom: 15px;
  font-weight: 300;
}

.credentials {
  font-size: 1.2em;
  margin-bottom: 30px;
  opacity: 0.95;
}

.vote-date {
  background: white;
  color: #E31E24; /* From HTML */
  display: inline-block;
  padding: 15px 40px;
  font-size: 1.8em;
  font-weight: bold;
  border-radius: 50px;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Top bar from previous CSS */
.top-bar {
  height: 20px;
  background: #71a100;
  background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzcxYTEwMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM2ZmExMDAiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
  background: -moz-linear-gradient(top, #71a100 0%, #6fa100 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #71a100), color-stop(100%, #6fa100));
  background: -webkit-linear-gradient(top, #71a100 0%, #6fa100 100%);
  background: -o-linear-gradient(top, #71a100 0%, #6fa100 100%);
  background: -ms-linear-gradient(top, #71a100 0%, #6fa100 100%);
  background: linear-gradient(to bottom, #71a100 0%, #6fa100 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#71a100', endColorstr='#6fa100', GradientType=0);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

:root .top-bar {
  filter: none \0/IE9;
}

/* Welcome container from previous CSS, made responsive */
.welcome-container {
  width: 100%;
  max-width: 1200px; /* Matches .container from HTML */
  margin: 0 auto;
  padding: 0 10px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.coming-soon-wrap {
  margin-top: 90px;
}

.frowny-face {
  text-align: center;
  font-size: 130px;
  color: #919191;
  line-height: 1.1;
  margin-top: 90px;
  margin-bottom: 70px;
}

/* Navigation from HTML */
nav {
  background: #00A9E0; /* From HTML */
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

nav li {
  margin: 0 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

/* Container from HTML */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

/* Section and heading styles from HTML */
section {
  margin-bottom: 60px;
}

h2 {
  color: #E31E24; /* From HTML */
  font-size: 2.5em;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: #00A9E0; /* From HTML */
}

h3 {
  color: #00A9E0; /* From HTML */
  font-size: 1.8em;
  margin: 30px 0 15px;
}

p {
  margin-bottom: 20px;
  font-size: 1.1em;
  line-height: 1.8;
}

/* About grid from HTML */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.about-card {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 10px;
  border-left: 5px solid #00A9E0;
}

/* Platform grid from HTML */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.platform-card {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 5px solid #E31E24;
}

.platform-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.platform-card h3 {
  margin-top: 0;
}

/* Values list from HTML */
.values-list {
  list-style: none;
  margin-top: 30px;
}

.values-list li {
  padding: 20px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #00A9E0 0%, #0088B8 100%);
  color: white;
  border-radius: 8px;
  font-size: 1.1em;
  box-shadow: 0 3px 10px rgba(0,169,224,0.3);
}

.values-list li strong {
  font-size: 1.2em;
  display: block;
  margin-bottom: 5px;
}

/* CTA section from HTML */
.cta-section {
  background: linear-gradient(135deg, #00A9E0 0%, #0088B8 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
  margin-top: 80px;
}

.cta-section h2 {
  color: white;
}

.cta-section h2::after {
  background: white;
}

/* Footer from HTML and previous CSS */
.footer {
  background: #1a1a1a; /* From HTML */
  color: white;
  text-align: center;
  padding: 30px 20px;
  position: relative;
  margin-top: -60px;
  height: 60px;
  clear: both;
}

/* Button styles from previous CSS */
.btn {
  -moz-border-bottom-colors: none;
  -moz-border-left-colors: none;
  -moz-border-right-colors: none;
  -moz-border-top-colors: none;
  border-color: transparent;
  border-image: none;
  border-radius: 0 0 0 0;
  border-style: solid;
  border-width: 0 0 3px;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.42857;
  margin-bottom: 0;
  padding: 8px 20px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background-color: #7FB141;
  border-color: #648C33;
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #729E3A;
  border-color: #496626;
  color: #fff;
}

.btn:hover,
.btn:focus {
  text-decoration: none;
}

.login-container {
  text-align: right;
  margin: 20px;
}

/* Media query for small screens */
@media only screen and (max-width: 768px) {
  .welcome-container, .container {
    width: 100%;
    padding: 0 10px;
    overflow-x: hidden;
  }
  .hero h1 {
    font-size: 2em; /* Your updated size */
    padding: 0 15px;
  }
  .hero .subtitle {
    font-size: 1.1em;
    padding: 0 15px;
  }
  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 0 10px;
    gap: 15px;
  }
  .hero-image {
    max-width: 250px;
    width: 100%;
  }
  .headshot {
    width: 250px;
    height: 250px;
  }
  .hero-text {
    min-width: 0;
    max-width: 100%;
    padding: 0 10px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  nav li {
    margin: 10px 0;
  }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
  .hero, .welcome-container, .container {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    margin: 0 auto;
    overflow-x: hidden;
    -webkit-box-sizing: border-box;
  }
  .hero h1, .h1, .header, #header {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    margin: 0 auto;
    overflow-wrap: break-word;
    -webkit-text-size-adjust: 100%;
    text-align: center;
  }
  body {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
  }
}