:root {
  --accent-color: #2AD18A;
  --text-color: #000000;
  --accent-text-color: #ffffff;
  --secondaty-text-color: #9da3ae;
  --buble-color: #e8eaed;
}

@font-face {
  font-family: "League Gothic";
  src: url("../assets/fonts/LeagueGothic-Regular-VariableFont_wdth.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 15px 24px 14px;
}

.header__logo {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 24px;
  color: var(--accent-color);
  padding-left: 8px;
}

.header__links {
  list-style: none;
  display: flex;
  gap: 16px;
  justify-self: center;
}

.link {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--text-color);
  text-decoration: none;
  padding: 0 8px;
}

.header__burger-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 100;
}

.header__burger-btn span {
  position: absolute;
  width: 30px;
  height: 3px;
  background-color: #000;
  left: 5px;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s;
}

.header__burger-btn span:nth-child(1) {
  top: 10px;
}
.header__burger-btn span:nth-child(2) {
  top: 18px;
}
.header__burger-btn span:nth-child(3) {
  top: 26px;
}

.header__button {
  padding: 10px 24px;
  height: 40px;
  background: var(--accent-color);
  color: var(--accent-text-color);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  outline: none;
  border: 0;
  cursor: pointer;
  justify-self: end;
}

.section {
  margin-top: 40px;
  margin-bottom: 80px;
}

.articles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.main-article__img {
  width: 100%;
  max-width: 620px;
  height: auto;
  display: block;
  margin-bottom: 24px;
}

.main-article__title {
  font-family: "League Gothic", sans-serif;
  font-weight: 400;
  font-size: 4.5rem;
  line-height: 1.1;
}

.main-article__subtitle {
  margin-top: 24px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.6;
}

.top-articles__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.top-articles__title {
  padding-left: 48px;
  margin-bottom: 16px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  text-transform: capitalize;
  color: var(--accent-color);
}

.article {
  display: flex;
  gap: 16px;
  /* align-items: flex-start; */
}

.article__number {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent-color);
  width: 32px;
  height: 32px;
  background: var(--buble-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.article__content {
  max-width: 355px;
}

.article__title {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--text-color);
  margin-bottom: 8px;
}

.article__author {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.article__info {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--secondaty-text-color);
}

.article__comments {
  display: flex;
  align-items: center;
}

.vertical-line {
  display: block;
  width: 1px;
  height: 1.5rem;
  background: var(--secondaty-text-color);
}

.article_img {
  display: block;
}

.comment__img {
  margin-right: 10px;
  object-fit: cover;
}

.article__img {
  width: 100%;
  max-width: 200px;
  object-fit: cover;
  height: auto;
}

.stories {
  padding-bottom: 80px;
}

.stories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.story-card {
  /* width: 100%; */
  max-width: 18.125rem;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.story-card__img {
  max-width: 100%;
  height: auto;
}

.story-card__title {
  font-family: Inter;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 140%;
  color: var(--text-color);
}

.story-card__subtitle {
  font-family: Inter;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 160%;
  color: var(--text-color);
}

.footer {
  padding: 80px;
  border-top: 1px solid var(--secondaty-text-color);
}

.footer__logo {
  font-family: Poppins;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 100%;
  color: var(--text-color);

  margin-bottom: 24px;
}

.footer__links {
  display: flex;
  list-style: none;
}

.footer__link {
  margin-right: 5px;
  font-family: Inter;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 160%;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-color);
}

.footer__link::after {
  content: "/";
  margin-left: 5px;
  color: var(--text-color);
}

@media (max-width: 1300px) {
  .container {
    padding: 0 40px;
  }
}

/* width 1024 */

@media (max-width: 1024px) {
  html {
    font-size: 12px;
  }

  .container {
    padding: 0 64px;
  }

  .articles {
    grid-template-columns: 1fr;
  }

  .main-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    column-gap: 15px;
  }

  .main-article__img {
    grid-row: span 2;
    max-width: 350px;
    justify-self: end;
    align-self: center;
  }

  .main-article__title {
    align-self: flex-end;
  }

  .top-articles__title {
    padding-left: 9.125rem;
  }

  .top-articles__container {
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .article {
    justify-content: center;
  }

  .article__content {
    width: 60%;
  }

  .article__img {
    justify-self: end;
  }

  .stories__grid {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }

  .story-card {
    align-self: center;
  }

  .footer {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 10px;
  }

  .container {
    padding: 0 10px;
  }

  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .header__burger-btn {
    display: block;
  }

  .header__nav {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background-color: #fff;
    padding: 80px 20px 40px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);

    visibility: hidden;
    transform: translateY(-100%);
    opacity: 0;
    transition: 0.4s;
    z-index: 10;
  }

  .header__links {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    font-size: 20px;
  }

  .header__button {
    display: none;
  }

  .header.open .header__nav {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }

  .header.open .header__burger-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .header.open .header__burger-btn span:nth-child(2) {
    opacity: 0;
  }
  .header.open .header__burger-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .main-article {
    display: flex;
    align-items: center;
    flex-direction: column;
    max-width: 450px;
    margin: auto;
    /* padding: 0 50px; */
  }

  .main-article__img {
    justify-self: unset;
    align-self: unset;
  }

  .main-article__title {
    align-self: unset;
  }

  .main-article__subtitle {
    display: none;
  }

  .footer__links {
    flex-direction: column;
  }
}

@media (max-width: 425px) {
  .main-article__img {
    max-width: 300px;
  }
  .article__img {
    max-width: 150px;
  }
}

@media (max-width: 375px) {
  .main-article__img {
    max-width: 300px;
  }

  .article {
    height: 85px;
  }

  .top-articles__container {
    gap: 50px
  }
  .article__img {
    max-width: 100px;
  }
}
