body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  color: var(--body-text-color);
  background: var(--body-bg);
}

svg,
button {
  outline: 0;
}

/* Предотвращение скролла body когда модальное окно открыто */
body.modal-open {
  overflow: hidden;
}

.muted {
  color: var(--gray-500);
}

.dark .muted {
  color: var(--gray-400);
}

.donate-icon {
  color: var(--donate-btn);
}

.hover-animation-rise {
  transition: all 0.2s ease-in-out;
}

.hover-animation-rise:hover {
  transform: translateY(-2px);
}

.VPSwitchAppearance {
  cursor: pointer;
}

/**** Card item */
.card-item {
  display: block;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.005);
  border: 2px solid var(--gray-200);
  border-radius: 0.6rem;
  line-height: 1.4;
  font-weight: 400;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  /* Анимация для hover эффекта */
  transition: all 0.3s ease-in-out;
}

.dark .card-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--gray-800);
}

.card-item:hover {
  filter: brightness(92%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.dark .card-item:hover {
  filter: brightness(107%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card-item-header {
  font-weight: bold;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  line-height: 2rem;
  letter-spacing: -0.025em;
}

.card-item:visited .card-item-header {
  color: var(--link-a-visited);
}

.card-item-author-date {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.card-item-img {
  width: 100%;
  height: auto;
  border-radius: 0.3125rem;
}

.card-item-img-col {
  width: var(--list-item-thumb-width);
  flex-shrink: 0;
  margin-right: 1rem;
}

/* На мобильных устройствах (max-md) */
@media (max-width: 767px) {
  .card-item-img-col {
    width: 100% !important; /* max-md:w-full! */
  }
}

.card-item-img-col img {
  object-fit: cover;
  display: block;
  max-width: 100%;
}

/* На экранах меньше 766px изображение занимает всю ширину */
@media (max-width: 766px) {
  .card-item-img-col {
    width: 100%;
  }

  .card-item-img-col img {
    width: 100%;
    /* Высота будет установлена через атрибут height */
  }
}

/* На экранах больше 766px изображение имеет фиксированную ширину */
@media (min-width: 767px) {
  .card-item-img-col img {
    width: var(--list-item-thumb-width);
    /* Высота будет установлена через атрибут height */
  }
}

/**** Sidebar item icon fix */
.sidebar-link .btn-base__icon-container {
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/**** Content page */
.content-page {
  min-height: calc(100vh - 400px);
}

/**** Lightbox */
.lightbox img {
  transition:
    transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

.lightbox img:hover {
  transform: scale(1.02);
  cursor: pointer;
  box-shadow: 0 4px 10px -1px rgba(0, 0, 0, 0.3);
}

.dark .lightbox img:hover {
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.5);
}

/* Стили для figure элементов, созданных плагином mdImage */
.content-page figure {
  /* margin-top: 1.5rem;
  margin-bottom: 1.7rem; */
  display: block;
  margin: 1.5rem auto;
  text-align: center;
}

.content-page figure figcaption {
  /* margin-top: 0.3rem;
  font-size: 1rem;
  color: var(--gray-500); */
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--gray-500);
  font-style: italic;
}

.dark .content-page figure figcaption {
  color: var(--gray-400);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  .content-page figure {
    margin: 1rem auto;
  }

  .content-page figure figcaption {
    font-size: 0.8rem;
    margin-top: 0.375rem;
  }
}

/**** Simple page */
.simple-page {
  margin-top: 1rem;
}

.simple-page h1 {
  font-weight: bold;
  font-size: 1.15rem;
  line-height: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--util-page-header-color);
}

/**** Search input button */
/* .dark .search-input-btn {
  border-color: var(--gray-500);
} */

/******* Doc page overwrite */
.vp-doc {
  font-weight: 400;
  line-height: 1.25;
  font-size: 1.25rem;
}

.vp-doc h2,
.vp-doc h3,
.vp-doc h4 {
  border: 0;
  padding-top: 0;
}

.vp-doc h2 .header-anchor,
.vp-doc h3 .header-anchor,
.vp-doc h4 .header-anchor {
  top: 0;
}

.vp-doc a {
  color: var(--link-a-text);
}

.vp-doc a:visited {
  color: var(--link-a-visited);
}

.vp-doc a:hover {
  filter: brightness(130%);
}

.vp-doc blockquote,
.vp-doc blockquote * {
  font-size: inherit !important;
}

.vp-doc blockquote p {
  margin-bottom: 0.75rem;
}

.vp-doc .vp-adaptive-theme {
  display: grid;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* MOBILE text */
@media (max-width: 1023px) {
  .vp-doc {
    font-size: var(--font-size-mobile);
    line-height: var(--line-height-mobile);
  }
}
