html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Helvetica, Arial, sans-serif;
}

#main-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: flex-start;
}

#sidebar {
  flex: 0 0 220px;
  box-sizing: border-box;
  border-right: 1px solid #eee;
  padding: 20px;
}

#sidebar img {
  max-width: 100%;
  height: auto;
}

#sidebar a {
  display: block;
  color: rgba(0, 0, 68, 0.7);
  margin: 20px 0 0 0;
  text-decoration: none;
}

#sidebar a:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: black;
}

#content {
  text-align: justify;
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 60px 50px 40px 50px;
}

#content img {
  max-width: 100%;
  height: auto;
}

/* Tablet and below: stack sidebar above content */
@media (max-width: 768px) {
  #main-container {
    flex-direction: column;
  }

  #sidebar {
    flex: 0 0 auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    text-align: center;
  }

  #sidebar img {
    max-width: 160px;
  }

  #content {
    padding: 30px 20px 30px 20px;
    text-align: left;
  }
}

/* Small phones: tighten spacing further */
@media (max-width: 420px) {
  #content {
    padding: 20px 15px;
  }
}
