/*
 * Блог IntegrAMP. Общие стили (шапка, кнопки, .page, .pagin, левая колонка,
 * цвета --cheme-color) — из css/insale.min.css темы сайта; здесь только блог.
 */

/* ---------- Заголовок ленты ---------- */
.blg__title-page {
  color: #999;
  font-weight: normal;
}

/* ---------- Лента ---------- */
.blg-stream {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.blg-stream_classic,
.blg-stream_full_width,
.blg-stream_search {
  grid-template-columns: minmax(0, 1fr);
}
.blg-stream > .pageless-wrapper,
.blg-stream > .blg-stream__empty {
  grid-column: 1 / -1;
}
.blg-stream__empty {
  color: #808080;
  padding: 20px 0;
}

/* ---------- Карточка записи ---------- */
.blg-post {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.blg-post_card:hover,
.blg-post_feature:hover,
.blg-post_full:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}
.blg-post__img {
  aspect-ratio: 16 / 10;
  background: #f7f7f7;
  display: block;
  flex: none;
  overflow: hidden;
}
.blg-post__img img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
  width: 100%;
}
.blg-post:hover .blg-post__img img {
  transform: scale(1.04);
}
.blg-post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  position: relative;
  z-index: 1;
}
.blg-post__meta {
  align-items: center;
  color: #808080;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-size: 0.8125rem;
  gap: 6px 16px;
}
.blg-post__meta a {
  color: inherit;
  position: relative;
  text-decoration: none;
  z-index: 2;
}
.blg-post__meta a:hover {
  color: var(--cheme-color);
}
.blg-post__meta .blg-post__blog {
  color: var(--cheme-color);
  font-weight: var(--font-weight);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.blg-post__author,
.blg-post__comments {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}
.blg-post__author-img {
  border-radius: 50%;
  height: 22px;
  object-fit: cover;
  width: 22px;
}
.blg-post__comments svg {
  fill: currentColor;
}
.blg-post__title {
  font-size: 18px;
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 12px 0 0;
}
.blg-post__title a {
  color: #222;
  text-decoration: none;
  transition: color 0.2s ease-out;
}
.blg-post__title a:hover {
  color: var(--cheme-color);
}
/* вся карточка кликабельна — кроме ссылок в мете (у них z-index выше) */
.blg-post_card .blg-post__title a:after,
.blg-post_feature .blg-post__title a:after,
.blg-post_full .blg-post__title a:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}
.blg-post_card .blg-post__body,
.blg-post_feature .blg-post__body,
.blg-post_full .blg-post__body {
  position: static;
}
.blg-post_card .blg-post__meta,
.blg-post_feature .blg-post__meta,
.blg-post_full .blg-post__meta {
  position: relative;
  z-index: 2;
}
.blg-post__excerpt {
  color: #666;
  line-height: 1.6;
  margin-top: 10px;
}
.blg-post__plugins {
  margin-top: 15px;
}

/* --- картинка фоном: columns_bg=1, первая запись «Колонок с фоном», img_bg* --- */
.blg-post_bg {
  background-color: #555;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 0;
  justify-content: flex-end;
  min-height: 320px;
}
.blg-post_bg:before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.8) 100%);
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* под текстом: .blg-post изолирован, так что затемнение остаётся над фоном карточки */
  z-index: -1;
}
.blg-post_bg .blg-post__body {
  flex: none;
}
.blg-post_bg .blg-post__meta,
.blg-post_bg .blg-post__meta .blg-post__blog {
  color: rgba(255, 255, 255, 0.85);
}
.blg-post_bg .blg-post__meta a:hover {
  color: #fff;
}
.blg-post_bg .blg-post__title a,
.blg-post_bg .blg-post__title a:hover {
  color: #fff;
}
.blg-post_bg .blg-post__excerpt {
  color: rgba(255, 255, 255, 0.85);
}

/* --- широкая первая запись --- */
.blg-post_feature {
  grid-column: span 2;
  min-height: 380px;
}
.blg-post_feature .blg-post__body {
  padding: 30px;
}
.blg-post_feature .blg-post__title {
  font-size: 26px;
  font-size: 1.625rem;
}

/* --- классический список --- */
.blg-post_classic {
  flex-direction: row;
}
.blg-post_classic .blg-post__img {
  aspect-ratio: auto;
  min-height: 220px;
  width: 36%;
}
.blg-post_classic .blg-post__body {
  padding: 25px 30px;
}
.blg-post_classic .blg-post__title {
  font-size: 22px;
  font-size: 1.375rem;
}
.blg-post__text {
  margin-top: 15px;
  overflow: visible;
}
.blg-post__more {
  align-self: flex-start;
  margin-top: 20px;
}
.blg-post__album {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}
.blg-post__album img {
  border-radius: 4px;
  display: block;
}

/* --- во всю ширину --- */
.blg-post_full {
  grid-column: 1 / -1;
  flex-direction: row;
}
.blg-post_full .blg-post__title {
  font-size: 24px;
  font-size: 1.5rem;
}
.blg-post_full .blg-post__body {
  justify-content: center;
  padding: 30px 40px;
}
.blg-post_full .blg-post__img {
  aspect-ratio: 16 / 10;
  width: 50%;
}
.blg-post_img_right {
  flex-direction: row-reverse;
}
.blg-post_img_top {
  flex-direction: column;
}
.blg-post_img_top .blg-post__img {
  aspect-ratio: 21 / 9;
  width: 100%;
}
.blg-post_img_top .blg-post__body {
  align-items: center;
  text-align: center;
}
.blg-post_img_top .blg-post__meta {
  justify-content: center;
}
.blg-post_full.blg-post_bg {
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
}
.blg-post_img_bg_left,
.blg-post_img_bg_right {
  justify-content: center;
}
.blg-post_img_bg_left {
  align-items: flex-start;
}
.blg-post_img_bg_right {
  align-items: flex-end;
}
.blg-post_img_bg_left .blg-post__body,
.blg-post_img_bg_right .blg-post__body {
  max-width: 60%;
}
.blg-post_img_bg_left:before {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.05) 100%);
}
.blg-post_img_bg_right:before {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.05) 100%);
}
/* запись без картинки в варианте «картинка сбоку/сверху» */
.blg-post_noimg.blg-post_full .blg-post__body {
  padding: 30px;
}

/* ---------- Показать ещё ---------- */
.blg-more {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  text-align: center;
}
.blg-more__count {
  color: #999;
  font-size: 13px;
  font-size: 0.8125rem;
}
.blg-more__progress {
  align-items: center;
  color: #808080;
  display: flex;
  gap: 8px;
}
.blg-more__progress svg {
  animation: fa-spin 1.5s infinite linear;
}
.blg-more_auto .blg-more__button {
  display: none;
}
.blg-paging {
  flex-wrap: wrap;
  margin-top: 30px;
}
.blg-paging .selected {
  color: var(--cheme-color);
}

/* ---------- Результаты поиска ---------- */
.blg-found {
  border-bottom: 1px solid #eee;
  padding-bottom: 25px;
}
.blg-found__title {
  font-size: 20px;
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 8px;
}
.blg-found__title a {
  color: #222;
  text-decoration: none;
}
.blg-found__title a:hover {
  color: var(--cheme-color);
}
.blg-found__text {
  color: #666;
  line-height: 1.6;
  margin-top: 10px;
}
.highlighted {
  background: #fff1a8;
  border-radius: 2px;
}

/* ---------- Страница записи ---------- */
.blg-single__title {
  line-height: 1.25;
  margin-bottom: 15px;
}
.blg-single__meta {
  margin-bottom: 25px;
}
.blg-single__meta .blg-post__author-img {
  height: 28px;
  width: 28px;
}
.blg-single__img {
  border-radius: 6px;
  margin-bottom: 30px;
  overflow: hidden;
}
.blg-single__img img {
  display: block;
  max-height: 520px;
  object-fit: cover;
  width: 100%;
}
.blg-single__text {
  font-size: 15px;
  font-size: 0.9375rem;
}
.blg-single__text h2,
.blg-single__text h3 {
  margin: 30px 0 15px;
}
.blg-single__text p {
  margin-bottom: 15px;
}
.blg-single__text img {
  border-radius: 6px;
  height: auto;
}
.blg-single__text blockquote {
  border-left: 3px solid var(--cheme-color);
  color: #555;
  font-style: italic;
  margin: 25px 0;
  padding: 5px 0 5px 20px;
}

/* фотоальбом записи */
.blg-album {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}
.blg-album__photo {
  margin: 0;
}
.blg-album__photo img {
  border-radius: 6px;
  display: block;
  height: auto;
  max-width: 100%;
}
.blg-album__caption {
  color: #666;
  font-size: 13px;
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-top: 8px;
}

/* другие записи */
.blg-related {
  border-top: 1px solid #eee;
  margin-top: 50px;
  padding-top: 40px;
}
.blg-related__title,
.blg-comments__title {
  color: #222;
  font-size: 24px;
  font-size: 1.5rem;
  font-weight: var(--font-weight);
  line-height: 1.2;
}
.blg-related__title {
  margin-bottom: 25px;
}

/* ---------- Комментарии ---------- */
.blg-comments {
  border-top: 1px solid #eee;
  margin-top: 50px;
  padding-top: 40px;
}
.blg-comments__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.blg-comments__add {
  color: var(--cheme-color);
  text-decoration: none;
}
.blg-comments__add:hover {
  text-decoration: underline;
}
.blg-comments ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.blg-comments ul ul {
  border-left: 2px solid #eee;
  margin-left: 20px;
  padding-left: 20px;
}
.blg-comments__off {
  color: #808080;
  margin-top: 30px;
}
.blg-comment {
  border-bottom: 1px solid #f2f2f2;
  padding: 20px 0;
  transition: background-color 0.3s ease-out;
}
.blg-comment.in-reply-to {
  background: #f7f9ff;
  border-radius: 6px;
  padding-left: 15px;
  padding-right: 15px;
}
.blg-comment.new {
  animation: blg-new 2s ease-out;
}
@keyframes blg-new {
  from { background-color: #fff6c8; }
  to { background-color: transparent; }
}
.blg-comment__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.blg-comment__userpic {
  border-radius: 50%;
  height: 36px;
  object-fit: cover;
  width: 36px;
}
.blg-comment__userpic_social {
  border-radius: 0;
  height: 16px;
  width: 16px;
}
.blg-comment__name {
  color: #222;
  font-weight: var(--font-weight);
  text-decoration: none;
}
a.blg-comment__name:hover {
  color: var(--cheme-color);
}
.blg-comment__staff {
  background: var(--cheme-color);
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-size: 0.6875rem;
  padding: 2px 6px;
}
.blg-comment__date {
  color: #999;
  font-size: 12px;
  font-size: 0.75rem;
}
.blg-comment__text {
  line-height: 1.6;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.blg-comment__actions {
  margin-top: 8px;
}
.blg-comment__reply {
  align-items: center;
  color: #808080;
  display: inline-flex;
  font-size: 13px;
  font-size: 0.8125rem;
  gap: 5px;
  text-decoration: none;
}
.blg-comment__reply svg {
  fill: currentColor;
}
.blg-comment__reply:hover {
  color: var(--cheme-color);
}

/* форма комментария */
.blg-comment-form {
  background: #f7f7f7;
  border-radius: 6px;
  margin-top: 30px;
  padding: 25px;
}
.blg-comment .blg-comment-form,
.blg-comment + .blg-comment-form {
  margin-top: 15px;
}
.blg-comment-form__title {
  font-size: 20px;
  font-size: 1.25rem;
  font-weight: var(--font-weight);
  margin-bottom: 20px;
}
.blg-comment-form__auth {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.blg-comment-form__auth a {
  align-items: center;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  color: #222;
  display: inline-flex;
  gap: 6px;
  padding: 6px 14px;
  text-decoration: none;
}
.blg-comment-form__auth a img {
  height: 16px;
  width: 16px;
}
.blg-comment-form__auth .selected a {
  border-color: var(--cheme-color);
  color: var(--cheme-color);
}
.blg-comment-form__guest {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 15px;
}
.blg-comment-form__user {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.blg-comment-form__user a {
  color: #808080;
  font-size: 13px;
  font-size: 0.8125rem;
}
.blg-field {
  display: block;
}
.blg-field__name {
  color: #666;
  display: block;
  font-size: 13px;
  font-size: 0.8125rem;
  margin-bottom: 6px;
}
.blg-field input,
.blg-field textarea {
  background: #fff;
  box-sizing: border-box;
  width: 100%;
}
.blg-field textarea {
  min-height: 130px;
  resize: vertical;
}
.blg-comment-form .error {
  border-color: #e53935;
}
.blg-comment-form .errormsg {
  color: #e53935;
  display: block;
  font-size: 12px;
  font-size: 0.75rem;
  font-style: normal;
  margin-top: 5px;
}
.blg-comment-form__submit {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}
.blg-comment-form__loading svg {
  animation: fa-spin 1.5s infinite linear;
}

/* ---------- Поиск (левая колонка и мобильная панель) ---------- */
.in-search form,
form.in-search {
  position: relative;
}
.in-search input[type="text"] {
  box-sizing: border-box;
  padding-right: 48px;
  width: 100%;
}
.in-search__button {
  align-items: center;
  background: none;
  border: 0;
  color: #808080;
  cursor: pointer;
  display: flex;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 44px;
}
.in-search__button:hover {
  color: var(--cheme-color);
}
.in-search__button svg {
  fill: currentColor;
}

/* ---------- Мобильная панель блога ---------- */
.blg-mobile {
  margin-bottom: 20px;
}
.blg-mobile__blogs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.blg-chip {
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  color: #222;
  flex: none;
  font-size: 13px;
  font-size: 0.8125rem;
  padding: 6px 14px;
  text-decoration: none;
  white-space: nowrap;
}
.blg-chip_active {
  background: var(--cheme-color);
  border-color: var(--cheme-color);
  color: #fff;
}

/* ---------- Прочее ---------- */
.blg-empty {
  padding: 20px 0 40px;
}
.blg-aside {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

/* ---------- Адаптив ---------- */
@media screen and (max-width: 1280px) {
  .in-left + .in-right .blg-stream_columns,
  .in-left + .in-right .blg-stream_columns_bg,
  .in-left + .in-right .blg-stream_mixed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media screen and (max-width: 1080px) {
  .blg-stream_columns,
  .blg-stream_columns_bg,
  .blg-stream_mixed,
  .in-left + .in-right .blg-stream_columns,
  .in-left + .in-right .blg-stream_columns_bg,
  .in-left + .in-right .blg-stream_mixed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media screen and (max-width: 767px) {
  .blg-stream,
  .in-left + .in-right .blg-stream {
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .blg-stream_classic,
  .blg-stream_full_width,
  .blg-stream_search,
  .in-left + .in-right .blg-stream_classic,
  .in-left + .in-right .blg-stream_full_width,
  .in-left + .in-right .blg-stream_search {
    grid-template-columns: minmax(0, 1fr);
  }
  .blg-post_classic,
  .blg-post_full,
  .blg-post_img_right {
    flex-direction: column;
  }
  .blg-post_classic .blg-post__img,
  .blg-post_full .blg-post__img {
    aspect-ratio: 16 / 9;
    min-height: 0;
    width: 100%;
  }
  .blg-post_classic .blg-post__body,
  .blg-post_full .blg-post__body,
  .blg-post_feature .blg-post__body {
    padding: 20px;
  }
  .blg-post_feature .blg-post__title,
  .blg-post_full .blg-post__title {
    font-size: 20px;
    font-size: 1.25rem;
  }
  .blg-post_img_bg_left,
  .blg-post_img_bg_right {
    align-items: stretch;
    justify-content: flex-end;
  }
  .blg-post_img_bg_left .blg-post__body,
  .blg-post_img_bg_right .blg-post__body {
    max-width: none;
  }
  .blg-post_img_bg_left:before,
  .blg-post_img_bg_right:before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
  }
  .blg-comment-form__guest {
    grid-template-columns: minmax(0, 1fr);
  }
  .blg-comment-form {
    padding: 20px 15px;
  }
  .blg-comments ul ul {
    margin-left: 8px;
    padding-left: 12px;
  }
}
@media screen and (max-width: 480px) {
  .blg-stream,
  .in-left + .in-right .blg-stream {
    grid-template-columns: minmax(0, 1fr);
  }
  .blg-post_feature {
    grid-column: auto;
    min-height: 300px;
  }
  .blg-post_bg {
    min-height: 280px;
  }
}
