@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-VariableFont_slnt\,wght.ttf");
}

:root {
  /* Colors */
  --Soft-orange: hsl(35, 77%, 62%);
  --Soft-red: hsl(5, 85%, 63%);
  --Off-white: hsl(36, 100%, 99%);
  --Grayish-blue: hsl(233, 8%, 79%);
  --Dark-grayish-blue: hsl(236, 13%, 42%);
  --Very-dark-blue: hsl(240, 100%, 5%);
  /* Sizes */
  --font-regular: 400;
  --font-bold: 700;
  --font-extra-bold: 800;
  --sm: 0.8125rem;
  --md: 1rem;
  --la: 1.25rem;
  --xl: 1.5rem;
  --2xl: 1.75rem;
  --3xl: 2rem;
  --4xl: 2.5rem;
  --5xl: 4rem;
}

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

ul {
  list-style: none;
}

a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

html {
  font-size: 14px;
  font-family: "Inter";
}

body {
  position: relative;
  z-index: 0;
  background-color: var(--Off-white);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0%);
  z-index: -1;
  transition: 0.3s;
}

body.inactive::before {
  background-color: rgba(0, 0, 0, 25%);
  z-index: 0;
}

.container {
  width: min(90%, 1110px);
  margin: 0 auto;
  padding: var(--xl) 0;
}

.container__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  max-width: 45px;
}

.icon {
  display: block;
}

.icon img {
  cursor: pointer;
}

.header__nav .nav__menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  transform: translateX(100%);
  padding: var(--2xl);
  background-color: var(--Off-white);
  color: var(--Dark-grayish-blue);
  font-size: var(--xl);
  z-index: 1;
  transition: 0.3s;
}

.header__nav .nav__menu.active {
  transform: translateX(0);
}

.nav__close-icon {
  text-align: right;
}

.nav__menu .menu__item {
  padding: var(--2xl) 0;
}

.nav__menu .menu__item {
  padding: var(--2xl) 0;
}

.nav__menu .menu__item a {
  position: relative;
  transition: 0.3s;
}

.nav__menu .menu__item a::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--Soft-orange);
  transition: 0.3s;
}

.nav__menu .menu__item a:hover::before {
  width: 100%;
}

.container__body {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--5xl);
  padding: var(--3xl) 0;
}

.container__article {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--xl);
}

.article__title {
  color: var(--Very-dark-blue);
  font-size: var(--4xl);
  font-weight: var(--font-extra-bold);
}

.article__text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--xl);
  color: var(--Dark-grayish-blue);
  line-height: 1.5;
  font-weight: var(--font-regular);
}

.article__button {
  display: block;
  width: fit-content;
  padding: var(--md) var(--2xl);
  background-color: var(--Soft-red);
  color: var(--Very-dark-blue);
  font-weight: var(--font-bold);
  letter-spacing: 4px;
  text-transform: uppercase;
  transition: 0.3s;
}

.article__button:hover {
  background-color: var(--Very-dark-blue);
  color: var(--Off-white);
}

.container__new-articles {
  padding: var(--xl) var(--la);
  background-color: var(--Very-dark-blue);
}

.new-articles__title {
  color: var(--Soft-orange);
}

.new-articles__list .list__item {
  padding: var(--xl) 0;
  line-height: 1.5;
}

.new-articles__list li:nth-child(2) {
  border: 1px solid var(--Dark-grayish-blue);
  border-width: 1px 0 1px;
}

.new-articles__list .item__title {
  color: var(--Off-white);
  font-weight: var(--font-bold);
  margin-bottom: var(--md);
  transition: 0.3s;
}

.new-articles__list .item__title:hover {
  color: var(--Soft-orange);
}

.new-articles__list .item__text {
  color: var(--Grayish-blue);
  font-weight: var(--font-regular);
}

.container__other-articles .item__link {
  width: fit-content;
  display: flex;
  justify-content: flex-start;
  gap: var(--la);
  margin-bottom: var(--xl);
  transition: 0.3s;
}

.container__other-articles .list__item img {
  width: 100px;
  height: 130px;
}

.container__other-articles .wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: flex-start;
}

.container__other-articles .item__count {
  color: var(--Soft-red);
}

.container__other-articles .item__title {
  color: var(--Very-dark-blue);
  transition: 0.3s;
}

.other-articles__list .item__title:hover {
  color: var(--Soft-red);
}

.container__other-articles .item__text {
  color: var(--Dark-grayish-blue);
  font-weight: var(--font-regular);
}

@media (min-width: 1200px) {
  html {
    font-size: 15px;
  }
  body::before {
    display: none;
  }
  .header__nav .nav__menu-icon {
    display: none;
  }
  .nav__close-icon {
    display: none;
  }
  .header__nav .nav__menu {
    position: static;
    transform: translateX(0);
    width: fit-content;
    height: fit-content;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--la);
    padding: 0;
  }
  .container__body {
    grid-template-columns: repeat(3, minmax(315px, 1fr));
  }
  .container__article {
    grid-template-columns: 0.75fr 1fr;
  }
  .container__article {
    grid-area: 1/1/2/3;
  }
  .container__new-articles {
    grid-area: 1/3/2/4;
  }
  .container__other-articles {
    grid-area: 2/1/3/4;
  }
  .other-articles__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(315px, 1fr));
    gap: var(--5xl);
  }
  .article__image {
    grid-area: 1/1/2/3;
  }
  .article__title {
    grid-row: 2/3;
  }
  .article__text {
    height: 100%;
  }
}
