body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: #f4f4f4;
}

header, footer {
  background: #333;
  color: #fff;
  padding: 1rem 0;
  text-align: center;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  flex-wrap: wrap;
  min-height: 3rem; /* Ensure a minimum height */
}

header.expanded {
  flex-direction: column;
  align-items: flex-start;
}

main {
  padding: 2rem;
}

a {
  color: #3498db;
  text-decoration: none;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  text-decoration: none;
  color: inherit;
}

#nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5em;
  color: #fff;
}

@media (max-width: 600px) {
  nav {
    display: none;
  }

  header.expanded nav {
    display: block;
    width: 100%;
  }

  #nav-toggle {
    display: block;
  }
}

.section-one {
  background: #ff6347; /* Tomato */
  color: #fff;
  padding: 2rem;
  width: 100%;
}

.section-two {
  background: #4682b4; /* SteelBlue */
  color: #fff;
  padding: 2rem;
  width: 100%;
}

h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: normal;
  text-align: center;
  max-width: 80%;
}

header.expanded h1 {
  position: static;
  transform: none;
  margin-top: 1rem;
  max-width: 100%;
}
