@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
:root {

  /* === Цвета === */
  --color-text-main: #000;
  --color-text-title: #4D4F4E;
  --color-bg-main: #3F3F3F;
  --color-accent: #42A3EE;
  --color-accent-hover: #0090FF;


  /* === Контейнер === */
  --container-width: 1140px;

  /* === Шрифты === */
  --font-main: "Nunito", sans-serif;

  --border-radius: 16px;

  --shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  /* === Анимация === */
  --transition: 0.2s ease-in-out;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}


body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-bg-main);
  color: var(--color-text-main);
  overflow-x: hidden;
}


a {
  text-decoration: none;
  color: var(--color-accent);
  transition: var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 10px;
}

.header {
    padding: 28px 0;
    background-color: #fff;
    background-image: url("../img/bg_header.png");
    background-size: cover;
    box-shadow: var(--shadow) ;
}


.header__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.header__menu {
    display: flex;
    gap: 40px;
}

.header__menu {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__menu li {
    list-style: none;
}

.home .header__menu li:first-child > a {
    color: var(--color-accent);
}

.home .header__menu li:first-child > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 1px;
    background: var(--color-accent);
}

.header__menu li a {
    color: var(--color-text-title);
    font-size: 16px;
    font-weight: bold;
    position: relative;
    color: #fff;
    text-decoration: none;
}

.menu-home > a {
    display: flex;
    gap: 12px;
    align-items: center;
}
.home .header__menu li:first-child  > a::before {
    content: "";
    width: 16px;
    height: 16px;
    background: url('../img/icons/home.svg') no-repeat center;
    background-size: contain;
}

.header__menu .current-menu-item > a {
    color: var(--color-accent);
}

.header__menu .current-menu-item > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 1px;
    background: var(--color-accent);
    border-radius: 4px;
}

.header__link--active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  border-radius: 4px;
}

.header__actions {
    align-items: center;

}

.socials {
    display: flex;
    gap: 16px;
}

.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.header__burger span {
  width: 24px;
  height: 2px;
  background: #fff;
}


.main {
    flex: 1;
    padding: 80px 0;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
}



.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar,
.content {
  min-width: 0;
}
.card {
    background-color: #fff;
    border-radius: var(--border-radius) ;
    box-shadow: var(--shadow);
    padding: 20px 12px;
}

.sidebar__title {
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--color-text-title);
  font-weight: bold;
}

.sidebar__news {
  margin-bottom: var(--space-md);
}

.sidebar__news {
  margin-bottom: 16px;
}

.news-slider {
    margin-top: 10px;
}

.sidebar__news {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.sidebar__news:last-child {
    margin-bottom: 0;
}

.sidebar__news-title a {
  font-size: 16px;
  color: var(--color-text-title);
  margin-bottom: 4px;
}

.sidebar__news-date {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.search__form {
    background-color: #E6E6E6;
    padding:  9px 12px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
}
.search__input {
    width: 170px;
}
.search__input:focus {
    outline: none;
}

.search__button {
  width: 18px;
  height: 16px;
  flex: 0 0 16px;

  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar__news-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
}

.sidebar__news-title a {
  color: var(--color-text-main);
}
.sidebar__news-date {
    color: var(--color-text-title);
}

.content__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.content__title {
    font-size: 32px;
    color: var(--color-text-title);
    font-weight: bold;
}

.content__date {
    color: var(--color-text-title);
    font-size: 14px;
}

.news-card {
    display: flex;
    gap: 0 16px;
    align-items: stretch;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.news-card__title {
  margin-bottom: 12px;
}

.news-card__title a {
    color: var(--color-text-main);
    font-size: 24px;
    font-weight: bold;

}

.news-card__image {
    width: 300px;
    height: 250px;
    flex-shrink: 0;
    overflow: hidden;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card__image a {
    display: block;
    height: 100%;
}

.news-card__meta {
    display: flex;
    align-items: center;
    color: var(--color-text-title);
    gap: 0 8px;
    margin-bottom: 12px;
}



.news-card__body {
    display: flex;
    flex-direction: column;
}


.news-card__meta a {
    font-size: 14px;
    text-decoration: underline;
    color: var(--color-text-title);
}

.news-card__meta img{
  width: 10px;
  height: 13px;
}

.news-card__desc {
    font-size: 16px;
    line-height: 21px;
    margin-bottom: 40px;
}

.news-card__footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.news-card__date {
    color: var(--color-text-title);
    font-size: 14px;
}

.news-card__link {
    font-size: 14px;
    position: relative;
}

.news-card__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background: var(--color-accent);
    border-radius: 4px;
}

.pagination {
    display: flex;
    gap: 12px;
}

.pagination ul {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li a {
    font-size: 14px;
    color: var(--color-text-title);
}

.pagination li .current {
    padding: 8px 12px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 8px;
}

.pagination__prev--disabled {
    color: var(--color-text-secondary);
    pointer-events: none;
    opacity: 0.5;
    text-decoration: none;
    cursor: default;
}

.pagination__next-link {
  position: relative;
  font-size: 14px;
}

.pagination__next-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: var(--color-accent);
    border-radius: 4px;
}

.pagination__link--active {
  padding: 8px 12px;
  color: #fff;
  background-color: var(--color-accent);
  border-radius: 8px;
}

.footer {
  background-color: #fff;
  background-image: url('../img/bg_header.png');
  background-size: cover;
  padding: 28px 0;
}


.footer__wrapper {
  display: flex;
  justify-content: space-between;
}

.footer__left {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer__copyright {
  color: #fff ;
  font-size: 14px;
}

.footer__social-text {
  font-size: 14px;
  color: #fff ;
  margin-bottom: 12px;
}

.footer__socials {
  justify-content: end;
}

/* Single page styles */

.article__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.article__back {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article__back img {
  width: 11px;
  height: 11px;
}

.article__today {
  font-size: 14px;
  color: var(--color-text-title);
}


.article__title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
}

.article__category {
  color: var(--color-text-title);
  display: flex;
  align-items: center;
  font-size: 14px;
  gap: 8px;
  margin-bottom: 12px;
}

.article__date {
  font-size: 14px;
  color: var(--color-text-title);
  margin-bottom: 16px;
}

.article__image img {
  width: 100%;
  height: 375px;        /* фиксированная высота на мобиле */
  overflow: hidden;
  margin-bottom: 16px;
}

.article__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



@media (max-width: 992px) {

  .header__burger {
    margin-right: auto;
    display: flex;
  }


  .header__wrapper {
    justify-content: space-between;
    align-items: center;
  }
  .header__nav {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    background: var(--color-text-title);
    padding: 10px;
    box-shadow: var(--shadow);
    display: none;
  }

  .header__menu {
    flex-direction: column;
    gap: 20px;
  }

  .header__actions {
    margin-left: auto;
  }

  .header__nav--open {
    display: block;
  }

  .layout {
    grid-template-columns: 1fr;
  }


}

.article__content p {
   font-size: 18px;
   line-height: 24px;
   margin-bottom: 20px;
}

.article__content p:last-child {
   margin-bottom: 0px;
}


@media (min-width: 768px) {
  .article__image {
    height: auto;
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 576px) { 

  .header {
    width: 100%;
  }

  
  .sidebar {
    max-width: 100%;
  }
  .news-card {
    flex-direction: column;
  }
  .news-card__image {
      width:100%;
      height: 180px;
  }
  .news-card__image img {
    height: auto;
  }

  .content__header {
    flex-direction: column ;
  }

  .news-card__desc {
    margin-bottom: 10px;
  }

  .pagination {
    flex-direction: column;
    align-items: center;
  }

  .footer__wrapper {
    flex-direction: column;
    gap: 28px;
  }

  .footer__left {
    flex-direction: column;
  }

  .footer__social-text {
    text-align: center;
  }

  .footer__socials {
    justify-content: center;
  }
}