/* ================
   :ROOT & ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ
   ================ */

:root {
  /* Цвета */
  --color-bg-dark: #4b5157;
  --color-bg-darker: #262d33;
  --color-bg-light: #eef1f2ff;
  --color-text-light: #bcbfc2;
  --color-text-dark: #384551;
  --color-text-title-dark: #1c242b;
  --color-header-height: 75px;

  /* Дополнительные цвета */
  --color-category-blue: #5085b6;
  --color-hover-gray: #cccccc;
  --color-hover-text: #707d89;
  --color-border-shadow: #9f9f9f;
  --color-footer-bg: hwb(208 15% 80%);
  --color-link-dark: #384551;
}

/* ================
   ШРИФТЫ
   ================ */

@font-face {
  font-family: "Lato-regular";
  src: url("../fonts/lato-regular.woff2") format("woff2"),
    url("../fonts/lato-regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RobotoSlab-Bold";
  src: url("../fonts/RobotoSlab-Bold.woff2") format("woff2"),
    url("../fonts/RobotoSlab-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ================
   ГЛОБАЛЬНЫЕ СТИЛИ
   ================ */

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--color-text-light);
  background-color: var(--color-bg-dark);
  font-family: "Lato-regular", sans-serif;
  font-size: 1rem;
  margin: 0;
  padding: 0;
}

.content_card-preview-mobile {
  display: none;
}

.section_header {
  margin: 0;
  padding-top: 15px;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto 30px;
  max-width: 1440px;
  width: 100%;
  padding: 0 20px;
}

/* ================
   ТЕКСТОВЫЕ КЛАССЫ
   ================ */

.dark_text {
  color: var(--color-text-dark);
}

.posts_text p {
  color: var(--color-text-dark);
}

.dark_title {
  color: var(--color-text-title-dark);
}

/* ================
   HEADER
   ================ */

.logo_svg {
  height: var(--color-header-height);
}

.header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: var(--color-header-height);
  padding: 0 20px;
  background-image: radial-gradient(
      ellipse at center,
      transparent -50%,
      var(--color-bg-dark) 75%
    ),
    url("../img/cube.webp");
}

.header_logo-title {
  font-size: 55px;
  gap: 10px;
  display: flex;
  align-items: center;
}

.header_logo-partOne {
  color: var(--color-link-dark);
}

.header_logo-partTwo {
  color: var(--color-text-light);
}

.header_dateAndLog {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

/* ================
   НАВИГАЦИЯ
   ================ */

.section_nav {
  background-color: var(--color-bg-darker);
  min-height: 100px;
}

.nav {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  width: 100%;
}

.nav_list {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 20px;
}

/* ================
   MAIN CONTENT (PREVIEW)
   ================ */

.content {
  background: linear-gradient(
    var(--color-bg-darker) 10%,
    var(--color-bg-dark) 80%
  );
}

.card_preview {
  display: flex;
  max-width: 1440px;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-light);
  border-radius: 15px;
}

.content_preview-img {
  min-width: 75%;
  width: 100%;
}

.card_preview-img {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 50px 0 0 50px;
  object-fit: fill;
  /* background-size: cover; */
  transition: background-image 0.3s ease;
  border-radius: 15px 0 0 15px;
}

.card_preview-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to right,
    rgba(0, 13, 87, 0.5),
    rgba(0, 11, 94, 0.3)
  );
  z-index: 1;
  pointer-events: none;
  border-radius: 15px 0 0 15px;
}

.card_preview-author-card {
  position: relative;
  display: flex;
  max-width: 100%;
  min-height: 50px;
  gap: 5px;
  z-index: 2;
}

.card_preview-author-avatar {
  width: 50px;
  height: 50px;
  background-size: cover;
}

.card_preview-author-name,
.card_preview-author-category {
  color: var(--color-text-light);
}

.card_preview-author-category {
  font-size: 12px;
}

.card_preview-author-data {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.card-preview-news-title-link {
  display: block;
  height: 0px;
}

.card-preview-news-title {
  position: relative;
  top: 135px;
  padding-right: 15px;
  font-size: 32px;
  color: var(--color-text-light);
  z-index: 2;
}

.card-preview-news-title:hover {
  color: var(--color-hover-gray);
}

.content_preview-title {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  max-width: 100%;
  padding: 10px 10px 0 10px;
}

.content_preview-title > h3 {
  font-size: 14px;
  color: var(--color-bg-darker);
}

.card-preview_news-item {
  background-color: var(--color-bg-light);
  transition: background-color 0.3s ease;
}

.card-preview_news-category > h3 {
  margin-bottom: 15px;
  font-size: 12px;
  color: rgb(55, 64, 72);
}

.card-preview_news-item-link > h2 {
  font-size: 12px;
}

.content_preview-list {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  height: 100%;
  gap: 10px;
}

/* ================
   NEWS CARDS
   ================ */

.news-card_cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 30px;
}

.news-card_card-ctegory {
  color: var(--color-category-blue);
  transform: translateZ(0);
}

.news-card_card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  max-width: 100%;
  min-height: 23em;
  height: auto;
  background-color: var(--color-text-light);
  border-radius: 15px;
  background-size: cover;
}

.news-card_card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(252 254 255 / 90%);
  border-radius: 15px;
  transition: background-color 0.3s ease;
}

.news-card_card:hover::before {
  background-color: rgb(252 254 255 / 70%);
}

.news-card_card-title {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: var(--color-text-dark);
  transition: color 0.3s ease;
  transform: translateZ(0);
}

.news-card_card-title > a {
  display: block;
}

.news-card_card-title:hover {
  color: var(--color-hover-text);
}

.news-card_card-text-preview {
  color: black;
  max-width: 100%;
  margin-bottom: 30px;
  transform: translateZ(0);
}

.news-card_card-author {
  display: flex;
  align-items: center;
  transform: translateZ(0);
}

.news-card_card-author-avatar {
  width: 50px;
  height: 50px;
  background-size: cover;
}

.news-card_card-author-name {
  position: relative;
  color: black;
  padding-left: 15px;
}

/* ================
   BANNER
   ================ */

.section_banner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 10em;
}

.section_banner > .container {
  height: 100%;
}

.banner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      ellipse at center,
      transparent -50%,
      var(--color-bg-dark) 50%
    ),
    url("../img/cube.webp");
  background-repeat: no-repeat;
  background-size: cover;
}

.news_quote {
  color: var(--color-bg-light);
  font-family: "RobotoSlab-Bold", sans-serif;
  font-weight: bold;
}

/* ================
   POSTS
   ================ */

.posts_list {
  max-width: 1440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 30px;
  background-color: var(--color-bg-light);
  border-radius: 15px;
}

.posts_item {
  display: flex;
  flex-direction: row;
  min-height: 300px;
  height: 100%;
}

.posts_item:not(:last-child) {
  padding-bottom: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 0 var(--color-border-shadow);
}

.posts_preview-img {
  width: 45%;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 15px;
}

.posts_data {
  width: 50%;
  margin-left: 30px;
}

.posts_catigory {
  margin-bottom: 15px;
}

.posts_title {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--color-text-dark);
}

.posts_title:hover {
  color: var(--color-hover-text);
}

.posts_text {
  color: #7b7a7a;
}

/* ================
   FOOTER
   ================ */

.footer {
  display: flex;
  align-items: center;
  min-height: 100px;
  background-color: var(--color-footer-bg);
  padding: 0 20px;
}

.footer_info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 30px 0;
  width: 100%;
}

.footer_author {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer_logo {
  display: block;
  width: 50px;
  height: 50px;
  background-image: url("../img/logo.svg");
  background-size: cover;
}

.footer_contacts {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1vh;
}

.footer_darkBytes,
.footer_darkBytes-author {
  font-size: 0.9rem;
}

.quote_concept {
  font-size: 0.9rem;
  max-width: 50%;
}

.lecense_content {
  margin-top: 30px;
}

/* ================
   КОМПОНЕНТЫ
   ================ */

.home_back-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100px;
  height: 30px;
  border-radius: 5px;
  border: none;
  color: var(--color-text-light);
  background-color: var(--color-text-dark);
}

.go-to-home-and-back {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  width: 100%;
  background-color: var(--color-bg-light);
  border-radius: 15px;
}

.posts_info {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.posts_author {
  display: flex;
}

.author_data {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-left: 15px;
}

.author_data > span {
  color: var(--color-text-dark);
}

.author_avatar {
  width: 45px;
  height: 45px;
  background-size: cover;
}

/* ================
   АДАПТИВНЫЕ СТИЛИ
   ================ */

@media (max-width: 1366px) {
  .news-card_card {
    min-height: 25em;
  }
}

@media (max-width: 1200px) {
  .news-card_card {
    min-height: 22em;
  }

  .news-card_card-text-preview {
    margin-bottom: 2em;
  }
}

@media (max-width: 1024px) {
  .container {
    max-width: 768px;
  }

  .content_card-preview {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .news-card_card {
    min-height: 28em;
  }

  .banner {
    background-image: radial-gradient(
        ellipse at center,
        transparent -30%,
        var(--color-bg-dark) 60%
      ),
      url(../img/cube.webp);
  }
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    margin-bottom: 30px;
  }

  .card_preview {
    display: none;
  }

  .content_card-preview-mobile {
    display: flex;
  }

  .header {
    padding: 0 15px;
    flex-direction: column;
    align-items: center;
    height: auto;
    gap: 10px;
  }

  .header_logo-title {
    font-size: 36px;
    justify-content: center;
    text-align: center;
  }

  .header_dateAndLog {
    align-items: center;
    text-align: center;
  }

  .section_nav {
    width: 100%;
    min-height: auto;
    padding: 15px 0;
  }

  .nav {
    padding: 0;
  }

  .nav_list {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    align-items: center;
  }

  .news-card_cards {
    grid-template-columns: 1fr;
  }

  .news-card_card {
    min-height: 30em;
    padding: 20px;
  }

  .news-card_card-title {
    font-size: 1.25rem;
  }

  .news-card_card-text-preview {
    font-size: 0.9rem;
    margin-bottom: 1.5em;
  }

  .news-card_card-author {
    flex-wrap: wrap;
    gap: 10px;
  }

  .news-card_card-author-name {
    padding-left: 0;
  }

  .posts_list {
    padding: 20px 15px;
  }

  .posts_item {
    flex-direction: column;
    min-height: auto;
    gap: 15px;
  }

  .posts_preview-img {
    width: 100%;
    height: 200px;
  }

  .posts_data {
    width: 100%;
    margin-left: 0;
  }

  .posts_title {
    font-size: 1.2rem;
  }

  .posts_text {
    font-size: 0.9rem;
  }

  .section_banner {
    height: 8em;
  }

  .news_quote {
    font-size: 1rem;
    padding: 0 10px;
    text-align: center;
  }

  .footer {
    flex-direction: column;
    gap: 20px;
    padding: 20px 15px;
    text-align: center;
  }

  .footer_info {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .quote_concept {
    max-width: 100%;
    font-size: 0.85rem;
    text-align: center;
  }

  .footer_contacts {
    align-items: center;
    gap: 10px;
  }

  .go-to-home-and-back {
    flex-direction: row;
    padding: 15px;
    gap: 15px;
  }

  .home_back-button {
    width: 100%;
    max-width: 200px;
    height: 30px;
    padding: 0 5px;
    font-size: 0.8em;
  }

  .posts_info {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .posts_author {
    flex-wrap: wrap;
    gap: 10px;
  }

  .author_avatar {
    width: 40px;
    height: 40px;
  }

  .author_data {
    margin-left: 0;
    align-items: flex-start;
  }
}

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

  .header_logo-title {
    font-size: 28px;
  }

  .news-card_card {
    min-height: 28em;
    padding: 15px;
  }

  .news-card_card-title {
    font-size: 1.1rem;
  }

  .posts_list {
    padding: 15px 10px;
  }

  .posts_title {
    font-size: 1.1rem;
  }

  .footer {
    padding: 15px 10px;
  }

  .quote_concept {
    font-size: 0.8rem;
  }
}

@media (max-width: 320px) {
  .header_logo-title {
    font-size: 24px;
  }

  .news-card_card {
    min-height: 26em;
    padding: 10px;
  }

  .news-card_card-title {
    font-size: 1rem;
  }

  .posts_title {
    font-size: 1rem;
  }

  .home_back-button {
    height: 35px;
    font-size: 0.9rem;
  }
}
