@font-face {
  font-family: "Georgia";
  src: url("../fonts/georgia.woff2") format("woff2"),
    url("../fonts/Georgia.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Georgia";
  src: url("../fonts/Georgia-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Palantino LT";
  src: url("../fonts/PalatinoLTStd-Medium.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Palantino LT";
  src: url("../fonts/PalatinoLTStd-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-regular-webfont.woff2") format("woff2"),
    url("../fonts/poppins-regular-webfont.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-bold-webfont.woff2") format("woff2"),
    url("../fonts/poppins-regular-webfont.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
html {
  height: 100%;
}

body {
  min-width: 1440px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: "Georgia", serif;
  font-size: 14px;
  line-height: 22.4px;
  color: #45525b;
  background-color: #fff;
}

img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

/* Header Navigation */
.navigation {
  width: 1200px;
  margin: 0 auto;
}
.navigation-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 20px 136px;
  padding: 0;
  color: #353732;
  background-color: #fff;
}
.navigation-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 16px;
  color: #353732;
  list-style-type: none;
}
.navigation-item {
  margin: 0;
}
.navigation-item-link {
  position: relative;
  display: block;
  padding: 10px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.navigation-item-link::after {
  position: absolute;
  content: "";
  bottom: 0;
  left: 25%;
  width: 50%;
  border-radius: 5%;
  height: 0px;
  background-color: rgba(53, 55, 50, 0.8);
  transition: height 0.1s ease-in-out;
}

.navigation-item-link:hover::after,
.navigation-item-link:active::after {
  height: 1px;
}
.navigation-item-link:focus {
  outline: 1px solid rgba(53, 55, 50, 0.5);
}

.main-index {
  color: #45525b;
  background-color: #fff;
}
.page-container-welcome {
  width: 100%;
  margin: 0 auto;
  color: #353732;
  background-color: #fff;
}
.popularposts-container {
  width: 100%;
  color: #353732;
  background-color: #fafafa;
}
/* Welcome */
.welcome-container {
  width: 768px;
  margin: 0 auto;
  padding: 100px 320px;
  color: #353732;
  background-color: #fff;
}
.welcome-logo {
  margin: 0 0 20px 16px;
}
.welcome-text {
  font-family: "Palantino LT", serif;
  margin: 0;
  margin-left: 16px;
  padding: 0;
  font-size: 36px;
  line-height: 40px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

/* Populat posts */
.popularposts {
  padding-top: 106px;
  padding-bottom: 95px;
  display: flex;
  flex-direction: column;
  width: 768px;
  margin: 0 auto;
  color: #45525b;
  background-color: #fafafa;
}
.popularposts-top,
.popularposts-middle,
.popularposts-bottom {
  margin-bottom: 16px;
}

.popularposts-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style-type: none;
  gap: 16px;
}
.popularposts-top-list {
  grid-template-columns: 507px 245px;
}
.popularposts-middle-list {
  grid-template-columns: repeat(2, 376px);
}
.popularposts-bottom-list {
  grid-template-columns: repeat(3, 245px);
}
.popularposts-item {
  margin: 0;
  padding: 0;
  background-color: #fff;
}
.popularposts-top-item:first-child {
  grid-row: 1/3;
}
.popularposts-text-container {
  margin: 0;
  padding: 20px 20px 30px 20px;
}
.popularposts-bottom-item:nth-child(2) .posts-link {
  margin-right: 81px;
}
.popularposts-bottom-item:first-child .posts-link {
  margin-bottom: 40px;
}
.popularposts-tag {
  display: block;
  padding: 0;
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.posts-link {
  display: block;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.posts-link:hover,
.posts-link:active {
  text-decoration: underline;
}
.posts-link:focus {
  outline: 1px solid #353732;
}
.popularposts-title {
  margin: 0;
  padding: 0;
  margin-bottom: 10px;
  margin-top: 10px;
  font-family: "Palantino LF", serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 21.6px;
}
.popularposts-main-title {
  font-size: 25px;
  line-height: 33.5px;
}
.popularposts-middle-title {
  font-size: 17px;
  line-height: 24px;
}
.popularposts-bottom-title {
  font-size: 18px;
  line-height: 22px;
}
.popularposts-item-text {
  margin: 0;
  padding: 0;
}
.popularposts-main-item-text {
  margin-bottom: 59px;
}
.date {
  display: block;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 17px;
}
/* Sign-up */
.signup-container {
  width: 100%;
  color: #353732;
  background-color: #fff;
}
.signup {
  display: grid;
  grid-template-columns: repeat(2, 376px);
  gap: 16px;
  margin: 0 auto;
  padding: 100px 0;
  width: 768px;
}
.signup-description-container {
}
.signup-title {
  margin: 20px 0 11px 0;
  font-family: "Palantino LF", serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 38.5px;
}
.signup-text {
  margin: 0;
  margin-bottom: 49px;
  font-size: 16px;
  line-height: 22.5px;
}
.signup-form {
  margin: 0;
}
.signup-form-text {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.signup-label {
  font-size: 12px;
  line-height: 20px;
}
.field {
  margin-bottom: 10px;
  border: 1px solid #e5e7eb;
}
.signup-button {
  display: inline-block;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: 82px;
  height: 38px;
  border: none;
  border-radius: 6px;
  color: #fff;
  background-color: #353732;
  cursor: pointer;
}
.signup-button:hover,
.signup-button:active {
  color: #353732;
  border: 2px solid #353732;
  background-color: #fafafa;
}
.signup-button:focus {
  outline: 1px solid #353732;
  border: 2px solid #fff;
}
/* All posts */
.allposts-container {
  width: 100%;
  color: #353732;
  background-color: #fafafa;
}
.allposts {
  padding: 102px 0 100px 0;
  display: flex;
  flex-direction: column;
  width: 768px;
  margin: 0 auto;
  color: #45525b;
  background-color: #fafafa;
}
.allposts-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
}
.allposts-item {
  margin: 0;
  padding: 0;
}
.allposts-title {
  align-self: center;
  margin: 3px 0 3px 0;
  padding: 0;
  font-family: "Palantino LT", serif;
  font-size: 18px;
  line-height: 24px;
  color: #45525b;
  font-weight: 400;
}
.allposts-title-noimg {
  margin-bottom: 2px;
  font-size: 17px;
}
.allposts-text-container {
  display: grid;
  grid-template-rows: 27px auto 17px;
  margin-left: 20px;
  margin-bottom: 40px;
  padding: 0;
}
.allposts-text-container-noimg {
  display: grid;
  grid-template-rows: 27px auto 17px;
  margin-bottom: 40px;
}
.allposts-text-container-noimg-1line {
  display: grid;
  grid-template-rows: 27px auto 17px;
  margin-bottom: 40px;
}
.allposts-text {
  margin: 0;
  padding-top: 2px;
  padding: 0;
  font-size: 16px;
  line-height: 22.5px;
  color: #45525b;
}
.allposts-item:nth-last-child(2) .allposts-text {
  font-size: 15px;
}
.allposts-image {
  border: 1px solid #fbfbfb;
  border-radius: 10px;
  object-fit: cover;
}
.allposts-item-link {
  display: flex;
  margin-top: 10px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.allposts-item-link:hover,
.allposts-item-link:active {
  text-decoration: underline;
}
.allposts-item-link:focus {
  outline: 1px solid #353732;
}
.allposts-item-link-noimg {
  margin-top: 0;
}
.allposts-link-container {
  position: relative;
  margin: 0 auto;
}

.allposts-link {
  display: flex;
  color: #575445;
  text-decoration: none;
}
.allposts-link::after {
  position: absolute;
  content: "";
  bottom: 0;
  width: 95%;
  border-radius: 5%;
  height: 0px;
  background-color: rgba(53, 55, 50, 0.8);
  transition: height 0.1s ease-in-out;
}
.allposts-link:hover::after,
.allposts-link:active::after {
  height: 1px;
}
.allposts-link:focus {
  outline: 1px solid rgba(53, 55, 50, 0.5);
}
.allposts-link-text {
  font-size: 15px;
  line-height: 22.5px;
}
.allposts-link-icon {
  width: 20px;
  height: 20px;
  margin-left: 3px;
  background-image: url("../img/arrow-right.svg");
  background-repeat: no-repeat;
  background-position: center;
}
/* Footer */
.page-footer {
  display: flex;
  flex-direction: column;
  margin: 100px auto;
  width: 768px;
}
.footer-logo {
  margin-left: 16px;
  margin-bottom: 9px;
}
.footer-text {
  margin: 0;
  margin-left: 16px;
  margin-bottom: 20px;
}
.footer-navigation {
  margin: 0;
  padding: 0;
  margin-left: 16px;
}
.footer-navigation-list {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style-type: none;
}
.footer-navigation-item {
  position: relative;
  margin: 0;
  padding: 0;
}
.footer-link {
  color: #45525b;
  text-decoration: none;
}
.footer-link::after {
  position: absolute;
  content: "";
  bottom: 0;
  left: 25%;
  width: 50%;
  border-radius: 5%;
  height: 0px;
  background-color: rgba(53, 55, 50, 0.8);
  transition: height 0.1s ease-in-out;
}

.footer-link:hover::after,
.footer-link:active::after {
  height: 1px;
}
.footer-link:focus {
  outline: 1px solid rgba(53, 55, 50, 0.5);
}
