.main-header {
  position: relative;
  z-index: 2;
  --headerWidth: calc(100% - 102px);
  --innerWidth: 392px;
}

.main-header-wrapper {
  background-color: #16374e;
  color: #fff;
  width: var(--headerWidth);
  margin-left: auto;
  justify-content: flex-end;
  display: grid;
  grid-template-columns: 1fr auto var(--innerWidth);
}

.main-header-wrapper .logo {
  margin-right: auto;
  grid-column: 1 / 2;
  font-size: 91px;
  line-height: 1;
  align-self: end;
  padding: 0 0 39px 47px;
  position: relative;
  font-family: "Ubuntu Condensed", sans-serif;
  font-weight: 400;
}

.main-header-wrapper .logo::after {
  content: "";
  width: 23px;
  height: 25px;
  background-color: #cc0000;
  position: absolute;
  bottom: 51px;
  right: -29px;
}

.main-header-wrapper nav {
  grid-column: 2 / 3;
}

.main-nav {
  height: 100%;
}

.nav-item {
  padding-inline: 27px;
  font-size: 23px;
  line-height: 28px;
  border-left: 1px solid #fff;
  display: flex;
  align-items: end;
  padding-bottom: 42px;
  position: relative;
  opacity: 1;
  transition: all 0.3s;
  font-family: "Ubuntu Condensed", sans-serif;
  font-weight: 400;
}

.nav-item::after {
  content: "";
  width: 100%;
  height: 0;
  background-color: #cb2329;
  left: 0;
  bottom: 0;
  position: absolute;
  transition: height 0.3s;
}
.menu-on .nav-item {
  opacity: 0;
  pointer-events: all;
}

.nav-item.active::after,
.nav-item:hover::after {
  height: 9px;
}

.header-sec {
  background-color: var(--colorTxt);
  display: grid;
  grid-template-columns: 1fr 165px;
  grid-template-rows: auto 1fr;
  width: var(--innerWidth);
  height: 187px;
  --leftSpace: 31px;
  grid-column: 3/4;
}

.header--info {
  grid-column: 1/-1;
  grid-row: 1/2;
  display: grid;
  grid-template-columns: subgrid;
  border-bottom: 1px solid #fff;
  padding: 27px var(--leftSpace) 17px;
  font-family: "Ubuntu Condensed", sans-serif;
  font-weight: 400;
}
.weather-icon {
  width: 20px;
  filter: brightness(0) invert(1);
  margin-right: 1ch;
}
.header--search {
  grid-column: 1/2;
  padding-left: var(--leftSpace);
  opacity: 1;
  transition: opacity 0.3s;
}
.menu-on .header--search {
  opacity: 0;
  pointer-events: none;
}
.header--menu {
  grid-column: 2/3;
  padding-left: 30px;
  border-left: 1px solid #fff;
}
.header--search,
.header--menu {
  grid-row: 2/3;
  place-content: center;
  height: 100%;
}

.menu-btn {
  gap: 9px;
  align-items: center;
  cursor: pointer;
  font-family: "Ubuntu Condensed", sans-serif;
  font-weight: 400;
}

.menu-btn .menu-icon {
  width: 25px;
  height: 15px;
  position: relative;
}
.menu-btn .menu-icon .line {
  width: 100%;
  position: absolute;
  border-top: 2px solid #fff;
  left: 0;
}

.menu-btn .menu-icon > span {
  transition: all 0.3s;
}

.menu-btn .menu-icon > span:nth-of-type(1) {
  top: 0;
}
.menu-btn .menu-icon > span:nth-of-type(2) {
  opacity: 1;
  top: 50%;
}
.menu-btn .menu-icon > span:nth-of-type(3) {
  top: 100%;
}

.menu-on .menu-btn .menu-icon > span:nth-of-type(1) {
  top: 50%;
  transform: rotate(45deg);
}
.menu-on .menu-btn .menu-icon > span:nth-of-type(2) {
  opacity: 0;
}
.menu-on .menu-btn .menu-icon > span:nth-of-type(3) {
  top: 50%;
  transform: rotate(-45deg);
}

.menu-btn > span:last-of-type {
  display: none;
}
.menu-on .menu-btn > span:first-of-type {
  display: none;
}
.menu-on .menu-btn > span:last-of-type {
  display: block;
}

.search-btn {
  filter: brightness(0) invert(1);
}
/* menu */

.menu {
  width: var(--headerWidth);
  height: 0;
  margin-left: auto;
  background-color: #16374e;
  color: #fff;
  border-top: 1px solid #fff;
  transition: height 0.3s;
  overflow: hidden;
}

.menu-on .menu {
  height: calc(100dvh - 187px);
}

.menu-grid {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.menu-grid > div {
  padding-block: 40px 50px;
  height: 100%;
}

.menu-nav {
  padding-left: clamp(47px, 15vw, 278px);
  height: 100%;
}
.menu-nav ul {
  padding-right: 2rem;
  height: 100%;
  opacity: 0;
  transition: all 0.3s;
}
.menu.on .menu-nav ul {
  opacity: 1;
  border-right: 1px solid #fff;
}

.menu-nav-item {
  font-size: 30px;
  line-height: 45px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  transition-delay: var(--delay);
  font-family: "Ubuntu Condensed", sans-serif;
  font-weight: 400;
}
.menu-nav-item:hover,
.menu-nav-item.active {
  color: #cb2329;
}
.menu.on .menu-nav-item {
  transform: translateY(0);
  opacity: 1;
}

.menu-articles {
  padding-inline: 56px 18px;
}
.menu-articles-wrapper {
  gap: 60px;
}
.menu-articles-wrapper > div {
  opacity: 0;
  transform: translateY(50%);
  transition: all 0.3s ease-in;
  transition-delay: 0.5s;
}
.menu-on .menu-articles-wrapper > div {
  opacity: 1;
  transform: translateY(0);
}
.menu-articles-wrapper > div {
  opacity: 0;
  transform: translateY(50%);
}
.menu-articles-wrapper > div:first-of-type {
  position: relative;
}
.menu-articles-wrapper > div:first-of-type::after {
  content: "";
  position: absolute;
  right: -24px;
  top: 0;
  height: 100%;
  border-left: 1px solid #fff;
}

.menu-articles-wrapper .comment-icon {
  filter: brightness(0) invert(1);
}
.menu-footer {
  width: var(--innerWidth);
  flex-shrink: 0;
  background-color: var(--colorTxt);
  justify-content: space-between;
}

.menu-articles .card .card--info {
  color: #fff;
  min-height: 190px;
  margin-bottom: 0;
}

.menu-articles .card--details {
  margin-top: auto;
}

.menu-footer .social {
  padding: 10px 30px;
}
.menu-footer .social > h3 {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 16px;
  font-family: "Ubuntu Condensed", sans-serif;
  font-weight: 400;
}
.menu-footer .social li {
  width: 22px;
  margin-right: 20px;
  filter: brightness(0) invert(1);
}

.menu-footer .footer-search {
  height: 120px;
  padding: 0 40px 45px;
  display: grid;
  place-content: center end;
  align-self: end;
  border-bottom: 1px solid #fff;
  width: 100%;
}

.search-form {
  width: 100%;
  position: absolute;
  right: 0;
  top: 188px;
  width: 676px;
  background-color: var(--colorTxt);
  color: #fff;
  height: 0;
  overflow: hidden;
  transition: height 0.3s;
  z-index: 2;
}

.search-on .search-form {
  height: 53px;
}

.search-form form {
  padding: 1rem var(--padding) 1rem;
  width: 100%;
}
.search-form form input {
  width: 100%;
}
.menu-on.search-on .search-form {
  width: var(--innerWidth);
  top: 188px;
  background-color: #16374e;
  height: 160px;
}
.menu-on.search-on .search-form form {
  padding: 1rem 75px 1rem 30px;
}

.menu .search-close {
  position: relative;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  display: none;
}
.menu .search-close span {
  position: absolute;
  left: 0;
  top: 50%;
  border-top: 1px solid #fff;
  transform-origin: center;
  transform: rotate(45deg);
  width: 100%;
}
.menu .search-close span:last-of-type {
  transform: rotate(-45deg);
}

.search-on .search-close {
  display: block;
}
.search-on .menu .search-btn {
  position: relative;
  z-index: 10;
}
.search-on .menu .search-icon {
  display: none;
}

@media screen and (max-width: 1820px) {
  .main-header-wrapper .logo {
    font-size: 71px;
    padding: 0 0 39px 47px;
  }

  .main-header-wrapper .logo::after {
    bottom: 44px;
  }
}
@media screen and (max-width: 1760px) {
  .main-header {
    --headerWidth: calc(100% - var(--padding));
  }
}
@media screen and (max-width: 1640px) {
  .main-header-wrapper {
    grid-template-columns: 1fr auto;
  }
  .main-header-wrapper .logo {
    grid-row: 1 / 3;
    padding-left: 2rem;
  }
  .main-header-wrapper .logo::after {
    width: 20px;
    height: 20px;
  }
  .main-header-wrapper nav {
    grid-row: 2 / 3;
  }
  .header-sec {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    height: 60px;
    border-bottom: 1px solid;
    transition: height 0.3s;
  }
  .header--info {
    display: flex;
    border-bottom: none;
    gap: 1rem;
  }

  .nav-item {
    padding-top: 3rem;
    padding-inline: 31px;
  }
  .header--search,
  .header--menu {
    padding-right: 2rem;
  }
  .header--menu {
    padding-left: 36px;
  }
  .header--search {
    border-left: 1px solid #fff;
  }
  .menu-on .header-sec {
    height: 180px;
  }
  .menu-on .main-header-wrapper nav {
    height: 0;
  }
  .menu-footer {
    width: 300px;
  }
  .menu-nav {
    padding-left: 100px;
  }
  .menu-articles-wrapper {
    gap: 3rem;
  }
  .menu-articles {
    padding-left: 2rem;
  }
  .search-form {
    width: 955px;
    left: unset;
    right: 0;
    top: 60px;
  }
  .menu-on.search-on .search-form {
    width: 300px;
    top: 180px;
  }
}
@media screen and (max-width: 1420px) {
  .nav-item {
    font-size: 20px;
    line-height: 25px;
    padding-inline: 20px;
  }
  .search-form {
    width: 790px;
  }
}

@media screen and (max-width: 1380px) {
  .menu-articles-wrapper {
    flex-direction: column;
    gap: 0;
  }
  .menu-articles-wrapper .card {
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }
  .menu-articles-wrapper .card--image {
    width: 125px;
    height: 100px;
    flex-shrink: 0;
  }
  .menu-articles-wrapper .card .card--info {
    margin-top: 0;
    min-height: unset;
  }
  .menu-articles-wrapper .card--details {
    margin-top: 0;
  }
  .menu-articles-wrapper > div:not(:last-of-type) {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #fff;
  }
  .menu-articles-wrapper > div:first-of-type::after {
    display: none;
  }
}
@media screen and (max-width: 1220px) {
  .menu-nav {
    padding-left: 2rem;
  }
  .menu-articles-wrapper .card .title {
    font-size: 20px;
    line-height: 25px;
  }
}
@media screen and (max-width: 1080px) {
  .main-header-wrapper .logo {
    font-size: 51px;
  }
  .main-header-wrapper nav {
    display: none;
  }
  .main-header-wrapper .logo {
    padding-bottom: 11px;
  }
  .main-header-wrapper .logo::after {
    bottom: 15px;
  }
  .search-form {
    width: calc(100% - var(--padding));
    margin-left: var(--padding);
  }
  .header-sec {
    border-bottom: none;
    height: 73px;
  }
  .menu-on .header-sec {
    height: 73px;
  }
  .menu-footer .footer-search {
    display: none;
  }
  .menu-grid {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .menu-grid .menu-nav {
    grid-column: 1 /2;
    grid-row: 1 / 2;
  }
  .menu-grid .menu-articles {
    grid-column: 2 /3;
    grid-row: 1 / 2;
  }
  .menu-grid .menu-footer {
    grid-column: 1 /3;
    grid-row: 2 / 3;
    width: 100%;
    padding-block: 1rem;
    height: fit-content;
    margin-top: auto;
    text-align: right;
  }
  .menu-grid .menu-footer ul {
    justify-content: flex-end;
  }
  .menu-on .menu {
    height: calc(100dvh - 73px);
  }
  .menu-on .header--search {
    opacity: 1;
    pointer-events: all;
  }
  .header--menu .menu-btn {
    width: 100px;
  }
  .menu-on.search-on .search-form {
    width: 100%;
    max-width: 500px;
    top: 74px;
    background-color: var(--colorTxt);
    height: 80px;
  }
}

@media screen and (max-width: 920px) {
  .header--info {
    display: none;
  }
  .header--search {
    border-left: none;
  }
}
@media screen and (max-width: 820px) {
  .menu-grid {
    overflow: auto;
  }
  .menu-grid .menu-nav {
    grid-column: 1 /3;
  }
  .menu-grid .menu-articles {
    grid-column: 1 /3;
    grid-row: 2 /3;
    margin-bottom: 35px;
  }
  .menu-grid .menu-footer {
    grid-row: 3/4;
  }
  .menu-articles-wrapper {
    flex-direction: row;
    gap: 20px;
  }
  .menu-articles-wrapper .card {
    flex-direction: column;
  }
  .menu-articles-wrapper .card--image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  .menu-articles-wrapper .card .card--info {
    margin-top: 1rem;
  }
  .menu-articles-wrapper .card--details {
    margin-top: 0;
  }
  .menu-articles-wrapper > div:not(:last-of-type) {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  .menu-grid .menu-footer {
    padding-block: 0 44px;
    background-color: transparent;
  }
  .menu.on .menu-nav ul {
    border-right: none;
  }
  .menu-nav-item {
    font-size: 30px;
    line-height: 60px;
  }
}
@media screen and (max-width: 720px) {
  .search-form {
    width: 100%;
  }
  .menu,
  .main-header-wrapper {
    width: 100%;
  }
  .menu-nav,
  .menu-articles,
  .menu-footer .social {
    padding-inline: var(--padding);
  }
  .menu.on .menu-nav ul {
    padding-right: 0;
    text-align: right;
  }
}
@media screen and (max-width: 620px) {
  .main-header-wrapper .logo {
    font-size: 33px;
  }
  .main-header-wrapper .logo::after {
    width: 8px;
    height: 8px;
    right: -10px;
    bottom: 14px;
  }
}
@media screen and (max-width: 520px) {
  .header--menu .menu-btn {
    width: fit-content;
  }
  .menu-on .menu-btn > span:last-of-type,
  .header--menu .menu-btn > span {
    display: none;
  }
  .header--menu,
  .header--search {
    padding-inline: 20px;
  }
  .menu-on .menu-btn .menu-icon > span:nth-of-type(1) {
    top: 50%;
    transform: rotate(0deg);
  }
  .menu-on .menu-btn .menu-icon > span:nth-of-type(2) {
    opacity: 0;
  }
  .menu-on .menu-btn .menu-icon > span:nth-of-type(3) {
    top: 50%;
    transform: rotate(-0deg);
  }
}
