/* ==========================================================================
   Template
   ========================================================================== */
html {
  box-sizing: border-box;
  min-width: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

h1,
h2 {
  font-weight: 700;
}

p {
  line-height: 145%;
}

body {
  background-color: #f0f0f0;
  color: #000;
  display: flex;
  flex-direction: column;
  font-family: Lato, sans-serif;
  font-size: 14px;
  width: 100%;
}

body > footer {
  background-color: #000;
  color: #fff;
  height: 76px;
  left: 0;
  padding: 30px;
  text-align: center;
  width: 100%;
}

.content {
  align-self: center;
  background-color: #f0f0f0;
  display: flex;
  flex-direction: row-reverse;
  gap: 30px;
  max-width: 1000px;
  min-width: 0;
  padding: 30px;
}

body > header {
  /* green */
  background-color: #fff;
  border-bottom: 1px solid #e2e2e2;
  display: flex;
  min-height: 88px;
  padding: 20px 0;
  text-align: center;
}

body > header .container {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1000px;
  width: 100%;
}

body > header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-left: 25px;
}

a {
  color: #777;
  text-decoration: none;
}

a:hover {
  color: #000;
}

#nav-list {
  list-style-type: none;
  margin-right: 25px;
  white-space: nowrap;
}

#nav-list li {
  display: inline;
}

#nav-list a {
  margin-left: 25px;
}

#other-pages {
  display: flex;
  flex-direction: column;
  position: relative;
}

#other-pages-content {
  background-color: #fff;
  border: 1px solid #e2e2e2;
  display: none;
  padding: 0;
  position: absolute;
  right: 0;
  text-align: left;
  top: 100%;
  white-space: nowrap;
  width: fit-content;
  z-index: 9999;
}

#other-pages-content li {
  border-bottom: 1px solid #e2e2e2;
  margin: 0;
  padding: 0;
}

#other-pages-content li:last-child {
  border-bottom: none;
}

#other-pages-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#other-pages:hover #other-pages-content {
  display: block;
}

#other-pages-content a {
  background-color: #fff;
  color: #777;
  cursor: pointer;
  display: block;
  margin-left: 0;
  padding: 10px;
  text-decoration: none;
}

#other-pages-content a:hover {
  background-color: #f0f0f0;
  color: #000;
}

aside {
  align-self: flex-start;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  display: flex;
  flex: 0 0 20%;
  flex-direction: column;
  padding: 20px 20px 0;
  text-align: center;
}

aside img {
  border-radius: 50%;
  display: block;
  height: 160px;
  margin: 0 auto 20px;
  object-fit: contain;
  width: 160px;
}

aside h2 {
  font-size: 20px;
  margin-bottom: 10px;
  text-align: left;
}

aside hr {
  border: none;
  border-top: 1px solid #e2e2e2;
  margin: 10px 0;
}

aside p {
  margin: 0 0 10px;
  text-align: left;
}

.articles {
  display: flex;
  flex: 2;
  flex-direction: column;
  gap: 30px;
}

article {
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  display: flex;
  flex-direction: row;
  padding: 20px;
}

article img {
  flex: 0 0;
  height: 180px;
  object-fit: cover;
  padding-right: 20px;
  width: 180px;
}

.article-content {
  flex: 2;
}

.article-content h2 {
  color: black;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  text-align: left;
}

.article-content footer {
  align-self: flex-start;
}

span {
  color: #777;
}

span span {
  color: black;
}

/* Tablet */
@media (width <= 999px) and (width >= 769px) {
  body {
    height: 100%;
  }

  article {
    flex-direction: column;
  }

  article img {
    max-height: 180px;
    object-fit: cover;
    object-position: top;
    padding-bottom: 20px;
    padding-right: 0;
    width: 100%;
  }
}

/* Mobile landscape */
@media (width <= 768px) and (width >= 481px) {
  .content {
  flex-direction: column;
  }

  aside {
  flex-direction: row;
  padding: 20px;
  }

  aside img {
    align-self: center;
    margin: 0 20px 0 0;
    min-height: 160px;
    min-width: 160px;
    object-fit: contain;
  }

}

/* Mobile portrait */
@media (width <= 480px) {
  body > header .container {
    flex-direction: column;
    height: 100%;
  }

  article {
    flex-direction: column;
  }

  .content {
  flex-direction: column;
  }

  article img {
    max-height: 180px;
    object-fit: cover;
    object-position: top;
    padding-bottom: 20px;
    padding-right: 0;
    width: 100%;
  }
}
