html {
  overflow-y: scroll;
}

body {
  font-family: Georgia, serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-color: #ffffff;
}

/* ====== HEADER STYLES ====== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background-color: #ffffff;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px 40px 3px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.header-content .logo {
  font-size: 42px;
  font-weight: bold;
  color: #3E75B2;
  letter-spacing: 1px;
  font-family: 'Lexend', sans-serif;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: #3E75B2;
  font-weight: 600;
  font-size: 18px;
  transition: color 0.2s ease;
  font-family: 'Lexend', sans-serif;
}

nav a:hover {
  color: #2c5180;
}

/* ====== HAMBURGER BUTTON ====== */
.hamburger {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #3E75B2;
  margin: 5px 0;
  transition: all 0.3s ease;
  position: relative;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ====== HERO SECTION ====== */
.container {
  margin: 0 auto;
  box-sizing: border-box;
  padding: 180px 40px 60px;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
    url('https://www.lawreforminstitute.org/images/capitol.webp')
    no-repeat center center;
  background-size: cover;
}

/* ====== HERO TITLE SECTION ====== */
.title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 60px;
}

.title .left {
  width: auto;
  color: #3E75B2;
  font-size: 60px;
  font-weight: bold;
  line-height: 1.2;
  font-family: 'Lexend', sans-serif;
  text-align: left;
}

.title .left .indented {
  margin-left: 2em;
}

.section-link {
  color: #ffffff;
  text-decoration: underline;
}

/* ====== SECTION STYLES ====== */
.section {
  margin: 60px auto;
  max-width: 1200px;
  box-sizing: border-box;
  padding: 0 40px;
}

.section h2 {
  color: #3E75B2;
  font-size: 28px;
  margin-bottom: 20px;
  font-family: 'Lexend', sans-serif;
}

#mission h2,
#people h2 {
  background-color: rgba(255, 255, 255, 0.75);
  display: inline-block;
  padding: 10px;
  border-radius: 4px;
  position: relative;
  z-index: 1;
  color: #3E75B2;
}

.section p {
  font-size: 18px;
  color: #ffffff;
  line-height: 1.8;
  background-color: #3E75B2;
  padding: 20px;
  border-radius: 8px;
  max-width: 70%;
  margin-bottom: 20px;
  display: inline-block;
}

#work {
  background: url('https://www.lawreforminstitute.org/images/capitol3.jpg') no-repeat left top;
  background-size: 70%;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding-top: 60px;
  text-align: right;
}

#work h2 {
  background-color: rgba(255, 255, 255, 0.75);
  display: inline-block;
  padding: 10px;
  border-radius: 4px;
  position: relative;
  z-index: 1;
  color: #3E75B2;
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}

#work p {
  margin-left: auto;
  margin-right: 0;
  text-align: left;
}

#people {
  background: url('https://www.lawreforminstitute.org/images/Freedom3.jpg') no-repeat right top;
  background-size: 70%;
  position: relative;
  min-height: 600px;
  padding-top: 60px;
}

#people h2,
#people p {
  position: relative;
  z-index: 1;
}

#mission {
  background: url('https://www.lawreforminstitute.org/images/Washington.jpg') no-repeat right top;
  background-size: 70%;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding-top: 60px;
}

/* Force a line break between h2 and p elements */
#mission h2,
#work h2,
#people h2,
#fourth h2,
#fifth h2 {
  display: block !important;
  width: auto;
}

/* Ensure h2 background still fits text */
#mission h2,
#work h2,
#people h2,
#fourth h2,
#fifth h2 {
  display: table !important;
}

footer {
  background-color: #3E75B2;
  color: #ffffff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-family: Georgia, serif;
}

footer p {
  margin: 0;
  font-size: 16px;
}

#fourth {
  background: url('https://lawreforminstitute.org/images/whisper.webp') no-repeat left top;
  background-size: 70%;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding-top: 60px;
  text-align: right;
}

#fourth h2 {
  background-color: rgba(255, 255, 255, 0.75);
  display: inline-block;
  padding: 10px;
  border-radius: 4px;
  position: relative;
  z-index: 1;
  color: #3E75B2;
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}

#fourth p {
  margin-left: auto;
  margin-right: 0;
  text-align: left;
}

#fifth {
  background: url('https://lawreforminstitute.org/images/Freedom3.jpg') no-repeat right top;
  background-size: 70%;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding-top: 60px;
}

#fifth h2 {
  background-color: rgba(255, 255, 255, 0.75);
  display: inline-block;
  padding: 10px;
  border-radius: 4px;
  position: relative;
  z-index: 1;
  color: #3E75B2;
}

#fifth p {
  position: relative;
  z-index: 1;
}

/* ====== LEGISLATIVE PAGE SPECIFIC STYLES ====== */
.legislative-page .container {
  padding: 120px 40px 30px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
    url('https://lawreforminstitute.org/images/Democracy.png')
    no-repeat center center;
  background-size: cover;
}

.legislative-page .title {
  margin-bottom: 30px;
}

.legislative-page #mission {
  background: url('https://lawreforminstitute.org/images/statues.jpg') no-repeat right top;
  background-size: 70%;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding-top: 60px;
}

.legislative-page #work {
  background: url('https://lawreforminstitute.org/images/compass.jpg') no-repeat left top;
  background-size: 70%;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding-top: 60px;
  text-align: right;
}

.legislative-page #people {
  background: url('https://lawreforminstitute.org/images/constitution.jpg') no-repeat right top;
  background-size: 70%;
  position: relative;
  min-height: 600px;
  padding-top: 60px;
}

/* ====== REGULATORY PAGE SPECIFIC STYLES ====== */
.regulatory-page #mission {
  background: url('https://lawreforminstitute.org/images/dome.jpg') no-repeat right top;
  background-size: 70%;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding-top: 60px;
}

/* ====== PEOPLE GRID STYLES ====== */
.people-grid {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.person-bio {
  flex: 1;
  background-color: #3E75B2;
  padding: 20px;
  border-radius: 8px;
  color: #ffffff;
}

.person-bio img {
  width: 30%;
  float: left;
  margin-right: 15px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.person-bio h3 {
  color: #ffffff;
  font-size: 20px;
  margin: 0 0 10px 0;
  font-family: Georgia, serif;
}

.person-bio .contact-info {
  margin-bottom: 15px;
}

.person-bio .contact-info a {
  color: #ffffff;
  text-decoration: underline;
  margin-right: 10px;
}

.person-bio .contact-info img {
  width: auto;
  float: none;
  margin: 0;
  vertical-align: middle;
}

.person-bio p {
  margin: 0;
  padding: 0;
  background: none;
  display: block;
  max-width: 100%;
  clear: both;
  line-height: 1.6;
  font-size: 18px;
}

.person-bio .section-link {
  color: #ffffff;
  text-decoration: underline;
}

/* Mobile responsive for people grid */
@media (max-width: 768px) {
  .people-grid {
    flex-direction: column;
    gap: 20px;
  }
  
  .person-bio img {
    width: 40%;
  }
  
  .person-bio h3 {
    font-size: 18px;
  }
  
  .person-bio p {
    font-size: 16px;
  }
}

/* ====== ABOUT US PAGE SPECIFIC STYLES ====== */
/* Target the People section specifically on About Us page */
.about-us-page #people p {
  display: block;
  width: 70%;
  max-width: 70%;
}

/* Ensure flex containers inside use full width for proper spacing */
.about-us-page #people p span[style*="display: flex"] {
  width: 100%;
}

/* ====== RESPONSIVE DESIGN FOR MOBILE ====== */
@media (max-width: 768px) {
  /* Header adjustments - matching old mobile version */
  header {
    position: static;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
  }
  
  .header-content {
    flex-direction: row;
    padding: 20px;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    max-width: none;
    position: relative; /* Add positioning context for nav */
  }
  
  .header-content .logo {
    text-align: left;
    width: 100%;
  }
  
  .header-content .logo img {
    max-height: 60px;
  }
  
  nav {
    display: none; /* Hide by default on mobile */
    position: absolute;
    top: calc(100% - 20px); /* Adjust top position to account for header padding */
    right: 20px;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 20px;
    min-width: 200px;
    border-radius: 8px;
    margin-top: 10px;
    gap: 0;
    z-index: 1000; /* Ensure nav appears above other content */
  }
  
  /* Show nav when active */
  nav.active {
    display: flex;
  }
  
  nav a {
    padding: 12px 20px;
    width: 100%;
    text-align: left;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 18px;
    font-weight: 600;
    color: #3E75B2;
    text-decoration: none;
    font-family: 'Lexend', sans-serif;
  }
  
  nav a:hover {
    background-color: rgba(62, 117, 178, 0.1);
    color: #2c5180;
  }
  
  /* Show hamburger on mobile */
  .hamburger {
    display: block;
  }
  
  /* Hero section adjustments */
  .container {
    padding: 120px 20px 40px;
    margin-top: 0;
    background-size: cover;
    background-position: center;
  }
  
  .title .left {
    font-size: 32px;
    line-height: 1.3;
    text-align: left;
  }
  
  .title .left .indented {
    margin-left: 0;
    display: block;
    margin-top: 10px;
  }
  
  /* Section adjustments */
  .section {
    padding: 0;
    margin: 30px auto;
    max-width: 100%;
  }
  
  .section h2 {
    font-size: 22px;
    margin-bottom: 15px;
    margin-left: 15px;
    margin-right: 15px;
  }
  
  /* Background adjustments for mobile */
  #mission,
  #work,
  #people,
  #fourth,
  #fifth {
    background-size: cover !important;
    background-position: center;
    min-height: auto;
    padding-top: 40px;
  }
  
  #work h2 {
    margin-left: 15px;
    text-align: left;
  }
  
  /* Mobile paragraph styles */
  .section p,
  #mission p,
  #work p,
  #people p,
  #fourth p,
  #fifth p {
    max-width: 85% !important;
    width: 85% !important;
    margin: 0 auto 15px auto !important;
    padding: 15px;
    font-size: 16px;
    display: block;
    box-sizing: border-box;
    text-align: left !important;
  }
}