body {
  font-family: roboto;
}
.post-1 {
  background: #9d27b0;
}
.post-2 {
  background: #9bb800;
}
.post-3 {
  background: #ed5120;
}
.post-4 {
  background: #9d27b0;
}
.post-5 {
  background: #2d95bb;
}

html {
  line-height: 1.15;
  background-color: #0b192f;
}
body {
  margin: 0;
  font-size: 16px;
  color: #fff;
}
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

.container {
  max-width: 853px;
  margin: 0 auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
  background-color: #024161;
}
.logo {
  margin: 0 16px;
}
.logo-text {
  font-size: 28px;
  font-weight: normal;
  font-weight: 300;
  letter-spacing: -1px;
}
.logo-text span {
  color: #9d27b0;
  font-weight: 100;
}
.navigation {
  display: flex;
  margin-right: 40px;
}
.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 28px 16px;
  display: block;
  font-size: 13px;
}
.nav-link:hover {
  background-color: #1f52a4;
}
.burger-btn {
  display: none;
}

.header-img {
  height: 300px;
  margin-bottom: 13px;
  position: relative;
  background-image: url('/FL-12/FL12_HW5/homework/img/post0.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.header-img-wrap {
  position: absolute;
  left: 30px;
  right: 29%;
  bottom: 37px;
}
.header-img-title {
  margin: 0;
  font-weight: 100;
  font-size: 41px;
  line-height: 41px;
  margin-bottom: 16px;
}
.header-img-description {
  margin: 0;
  font-size: 12px;
  line-height: 20px;
  opacity: 0.6;
}

.content {
  display: flex;
  align-items: flex-start;
}
.content .main {
  width: 74.6%;
  margin-right: 1.8%;
}
.content .aside {
  width: 23.6%;
}

.post {
  display: flex;
}
.post a {
  color: #ffffff;
  text-decoration: none;
}
.post:nth-child(even) {
  flex-direction: row-reverse;
}
.post-img {
  width: 49.5%;
  height: 215px;
  position: relative;
}
.post-img:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}
.post-1 .post-img:hover:after {
  background: rgba(157, 39, 176, 0.4);
}
.post-2 .post-img:hover:after {
  background: rgba(155, 184, 0, 0.4);
}
.post-3 .post-img:hover:after {
  background: rgba(237, 81, 32, 0.4);
}
.post-4 .post-img:hover:after {
  background: rgba(157, 39, 176, 0.4);
}
.post-description {
  width: 50.5%;
  padding-top: 4.5%;
  padding-bottom: 2%;
  position: relative;
}
.post-description:hover .post-title {
  opacity: 0.6;
}
.post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-title {
  margin: 0;
  margin-bottom: 15px;
  font-weight: 200;
  font-size: 35px;
  line-height: 35px;
  padding-left: 9%;
  padding-right: 10%;
}
.post-entry {
  margin: 0;
  font-size: 11px;
  line-height: 17px;
  opacity: 0.6;
  padding-left: 9%;
  padding-right: 10%;
}
.post-time {
  position: absolute;
  top: 14px;
  color: #ffffff;
  font-weight: 100;
  text-align: center;
  font-size: 36px;
  opacity: 0.3;
}
.post-time span {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  text-transform: lowercase;
}
.no-img .post-description {
  width: 100%;
  padding-top: 4.3%;
  padding-bottom: 4.7%;
}
.no-img .post-title {
  padding-left: 4.3%;
  padding-right: 14%;
}
.no-img .post-entry {
  padding-left: 4.3%;
  padding-right: 14%;
}
.post:nth-child(odd) {
  text-align: left;
}
.post:nth-child(even) {
  text-align: right;
}
.post:nth-child(odd) .post-time {
  right: 4.8%;
}
.post:nth-child(even) .post-time {
  left: 3%;
}
.post:nth-child(odd).no-img .post-time,
.post:nth-child(even).no-img .post-time {
  right: 2.4%;
}

.news {
  background-color: #ffffff;
  color: black;
  margin-bottom: 7%;
}
.news-img img {
  max-width: 100%;
  display: block;
}
.news-description {
  padding: 13% 12%;
}
.news-title {
  margin: 0;
  margin-bottom: 4.6%;
  font-weight: 300;
  font-size: 20px;
  line-height: 21px;
}
.news-entry {
  margin: 0;
  font-size: 10px;
  line-height: 16px;
  color: #6c7482;
}

.footer {
  display: flex;
  justify-content: space-between;
  background-color: #024161;
  margin-top: 17px;
  padding: 25px 30px 21px 30px;
  font-size: 12px;
  line-height: 17px;
}
.footer p {
  margin: 0;
  color: #637693;
  opacity: 0.8;
}
.footer-author {
  line-height: 17px;
}

@media screen and (max-width: 768px) {
  .header {
    flex-direction: column;
    padding-top: 23px;
    padding-bottom: 25px;
  }
  .logo-text {
    font-size: 32px;
    font-weight: 300;
  }
  .navigation {
    display: none;
  }
  .burger-btn {
    display: block;
    font-size: 24px;
    opacity: 0.8;
    margin-bottom: 26px;
    cursor: pointer;
  }
  .burger-btn:hover {
    opacity: 1;
  }
  .header-img-wrap {
    right: 10%;
  }
  .container {
    max-width: 616px;
    margin: 0 auto;
  }
  .content .main {
    width: 66%;
    margin-right: 2.7%;
  }
  .content .aside {
    width: 31.3%;
  }
  .post,
  .post:nth-child(even) {
    flex-direction: column;
    text-align: left;
  }
  .post-img {
    width: 100%;
    height: 241px;
  }
  .post-description {
    width: 100%;
    padding-top: 7.7%;
    padding-bottom: 7.7%;
  }
  .post-title {
    font-weight: 200;
    font-size: 41px;
    line-height: 40px;
    padding-left: 7.5%;
    padding-right: 20%;
    letter-spacing: -1px;
    margin-bottom: 19px;
  }
  .post-entry {
    font-size: 12px;
    line-height: 19px;
    padding-left: 8%;
    padding-right: 9%;
  }
  .post-time {
    top: 15px;
    font-size: 41px;
  }
  .post-time span {
    margin-top: 4px;
    font-size: 22px;
  }
  .post:nth-child(odd) .post-time,
  .post:nth-child(even) .post-time {
    right: 3.2%;
    left: auto;
  }
  .no-img .post-description {
    padding-top: 7.4%;
    padding-bottom: 33.5%;
  }
  .no-img .post-description .post-title {
    padding-left: 7.5%;
    padding-right: 16%;
  }
  .no-img .post-description .post-entry {
    padding-left: 8%;
    padding-right: 9%;
  }
  .post:nth-child(odd).no-img .post-time,
  .post:nth-child(even).no-img .post-time {
    top: auto;
    left: 0;
    right: 0;
    bottom: 5.5%;
  }
  .news {
    margin-bottom: 8%;
  }
  .news-description {
    padding: 14%;
  }
  .news-title {
    margin-bottom: 5%;
    font-size: 22px;
    line-height: 24px;
    opacity: 0.7;
  }
  .news-entry {
    font-size: 12px;
    line-height: 18px;
  }
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 5px;
    line-height: 19px;
  }
}

@media screen and (max-width: 480px) {
  .container {
    max-width: 358px;
    margin: 0 auto;
  }
  .logo-text span {
    color: #d12767;
  }
  .header-img-wrap {
    right: 15%;
  }
  .content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }
  .content .main {
    width: 100%;
    margin-right: 0;
  }
  .content .aside {
    width: 100%;
  }
  .post-description {
    padding-top: 8.6%;
    padding-bottom: 8.6%;
  }
  .post-title {
    padding-left: 9%;
    padding-right: 19%;
    margin-bottom: 19px;
  }
  .post-entry {
    padding-left: 9%;
    padding-right: 9%;
    line-height: 19px;
  }
  .no-img .post-description {
    padding-top: 8.2%;
    padding-bottom: 33.5%;
  }
  .no-img .post-description .post-title {
    padding-left: 8.9%;
    padding-right: 8.9%;
  }
  .no-img .post-description .post-entry {
    padding-left: 8.7%;
    padding-right: 8.7%;
  }
  .news {
    margin-bottom: 4.3%;
  }
  .news-description {
    padding: 8% 8% 7.5% 8%;
  }
  .news-title {
    margin-bottom: 2.8%;
    font-size: 22px;
    line-height: 24px;
  }
  .news-entry {
    font-size: 12px;
    line-height: 18px;
  }
}
