body {
  display: flex;
  flex-direction: column;
  /* min-height: 100vh; */
}

.content_padding {
  padding: 30px 15px;
}

.user-panel-links {
  margin: 0;
  list-style: none url("");
  padding: 0;
  padding-bottom: 5px;
}

/* Тёмная тема: базовый цвет пунктов меню слева (неактивные) */
[data-theme="dark"] .user-panel-links > li > a { color: #c3c6d3; }

.user-panel-links > li.current-menu-item > a {
  text-decoration: none;
  color: #6441a4;
  position: relative;
  outline: none;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  cursor: pointer;
  display: block;
  margin-bottom: 10px;
}

.user-panel-links > li > a:hover,
.user-panel-links > li > a:focus{
  text-decoration: none;
  color: #6441a4;
  position: relative;
  outline: none;
}

.user-panel-links > li > a {
  font-size: 16px;
  color: #2d2f3a; /* усилен контраст для светлой темы */
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  position: relative;
  outline: none;
}

.block-cat-title {
  margin: 0;
  padding: 0;
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 500;
  margin-top: 3px;
  color: #2d2f3a; /* усилен контраст для светлой темы */
}

.archive-content {
  margin-bottom: 20px;
}

.page-content p:last-child {
  padding: 0px;
}

.archive-list {
  padding-bottom: 0px;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  color: inherit;
}

span.h1 {
  font-size: 22px;
  font-weight: 500;
  display: block;
  margin: 0px 0px 15px;
  padding: 0px;
}

article {
  padding-bottom: 20px;
}

.archive-list article {
  margin-bottom: 20px;
  border-bottom: 1px solid rgb(240, 240, 243);
}

a {
  text-decoration: none;
  color: rgb(100, 65, 164);
}

a:hover {
  text-decoration: underline;
  color: rgb(100, 65, 164);
}

dl,
ol,
ul {
  margin-top: 0;
  margin-bottom: 1rem;
}

article ol {
  font-size: 16px;
  line-height: 24px;
  color: rgb(57, 46, 92);
  padding-left: 40px;
}

article ol li {
  margin-bottom: 10px;
}

/* NEWS */

.shadow-box.white-box.new_article_block .archive-content,
.shadow-box.white-box.new_article_block2 .archive-content {
  /* margin-bottom: 10px; */
}

.shadow-box.white-box.new_article_block,
.shadow-box.white-box.new_article_block2 {
  padding: 15px 20px 5px 20px;
}

.shadow-box.white-box.new_article_block2 {
  padding: 10px 15px 5px;
}

.new_article_block2 {
  /* background: #e9e7ec; */
}

.kroshki_items {
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  font-size: clamp(0.25rem, 2.4vw, 0.95rem);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  padding: clamp(0.25rem, 1.2vw, 1rem) clamp(0.65rem, 2.3vw, 1.5rem);
  border-radius: 12px;
  border: 1px solid rgba(107, 70, 193, 0.1);
  box-shadow: 0 4px 15px rgba(107, 70, 193, 0.1);
  gap: clamp(0.5rem, 1.5vw, 0.75rem);

  & :is(a, span) {
    color: #718096;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
  }

  & a {
    color: #6b46c1;
    font-weight: 500;
  }

  & a:hover {
    color: #6b46c1;
    transform: translateY(-1px);
  }

  & span.separator {
    color: #cbd5e0;
    font-size: 1.2rem;
  }

  & span.current {
    color: #4a5568;
    font-weight: 500;
  }

  & svg {
    width: 16px;
    height: 16px;
    /* margin-right: 0.5rem; */
  }
}

/* .kroshki_items a::after,
  .kroshki_items a::before{
    content: "";
    position: absolute;
    top: 7px;
    margin-top: -24px;
    border-top: 24px solid transparent;
    border-bottom: 24px solid transparent;
    border-left: 1em solid;
    right: -1em;
  } */

/* .kroshki_items a::after {
    content: "";
    position: absolute;
    top: 1px;
    right: -6px;
    z-index: 1;
    width: 18px;
    height: 18px;
    background: white;
    box-shadow: rgb(100, 65, 164) 1px 1px 0px 0px;
    border-radius: 50px 0px 0px;
    transform: rotate(-45deg) scale(0.73);
    transition: all 0.1s;
  }
  
  .kroshki_items a::before {
    content: "";
    position: absolute;
    top: 1px;
    right: -7px;
    z-index: 1;
    width: 18px;
    height: 18px;
    background: white;
    box-shadow: rgb(100, 65, 164) 1px 1px 0px 0px;
    border-radius: 50px 0px 0px;
    transform: rotate(-45deg) scale(0.73);
    transition: all 0.1s;
  } */

/* .kroshki_items a::before{
    border-left-color: rgb(100, 65, 164);
    right: -1.1em;
    z-index: 1;
  } */

/* .kroshki_items a:hover::before {
    border-left-color: #000;
  } */

/* .kroshki_items > .kroshki_item {
    display: inline-block;
    margin-right: 20px;
  } */

.item__new {
  display: flex;
  gap: clamp(0.5rem, 1vw, 1rem);
  padding: clamp(0.5rem, 1vw, 1rem);
  align-items: flex-start;
  margin-bottom: clamp(0.5rem, 1vw, 1rem);
  background: white;
  border-radius: clamp(8px, 0.4vw, 12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(84, 105, 212, 0.1);

  &:hover {
    transform: translateX(5px) scale(99%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  }

  & > a {
    flex-shrink: 0;
    width: clamp(80px, 15vw, 120px);
    height: clamp(60px, 11.25vw, 90px);
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #6b46c1, #7c5cd6);
  }

  & > a > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  & .news-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(0.25rem, 0.5vw, 0.5rem);
  }

  & .news-card-content a {
    display: block;
  }

  & .news-card-content .block-cat-title {
    font-size: clamp(13px, 1.8vw, 24px);
    margin: 0;
    line-height: 1.4;
    /* background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; */
    transition: all 0.3s ease;
  }

  &:hover .block-cat-title {
    background: linear-gradient(135deg, #6b46c1 0%, #7c5cd6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  & .info_line {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 0.5vw, 0.5rem);
    margin: 0;
  }

  & .category-tag {
    display: inline-flex;
    align-items: center;
    padding: clamp(0.25rem, 0.35vw, 0.35rem) clamp(0.4rem, 0.65vw, 0.85rem);
    margin: 0;
    background: linear-gradient(
      135deg,
      rgba(84, 105, 212, 0.1) 0%,
      rgba(74, 144, 226, 0.1) 100%
    );
    border-radius: clamp(8px, 0.4vw, 12px);
    font-size: clamp(0.55rem, 1vw, 0.75rem);
    color: #6b46c1;
    margin-right: clamp(0.15rem, 0.5vw, 1rem);
    border: 1px solid rgba(84, 105, 212, 0.2);
    transition: all 0.3s ease;
    height: 23px;
  }

  & .category-tag svg {
    width: clamp(14px, 1vw, 16px);
    height: clamp(14px, 1vw, 16px);
    margin-right: clamp(0.35rem, 0.5vw, 0.5rem);
  }

  & .news-date {
    color: #718096;
    font-size: clamp(0.55rem, 0.75vw, 0.75rem);
    display: inline-flex;
    align-items: center;
    padding: clamp(0.25rem, 0.35vw, 0.35rem) clamp(0.4rem, 0.65vw, 0.85rem);
    background: rgba(113, 128, 150, 0.1);
    border-radius: clamp(8px, 0.4vw, 12px);
    border: 1px solid rgba(113, 128, 150, 0.2);
    transition: all 0.3s ease;
    height: 23px;
  }

  & .news-date svg {
    width: clamp(12px, 0.9vw, 14px);
    height: clamp(12px, 0.9vw, 14px);
    margin-right: clamp(4px, 0.4vw, 6px);
  }

  & .text {
    font-size: clamp(0.75rem, 0.875vw, 0.875rem);
    color: #718096;
    line-height: 1.5;
    margin: 0;
    margin-top: clamp(0.2rem, 0.25vw, 0.25rem);
  }

  & a:hover {
    text-decoration: none;
    /* color: #6441a4; */
  }
}

.img_post_main {
  width: 15%;
  vertical-align: top;
}

.text_short_post {
  width: 84%;
  vertical-align: top;
  padding: 0 0 10px 10px;
  margin-top: -5px;
}

.text_short_post,
.img_post_main {
  display: inline-block;
}

div.page-content.text_padding {
  overflow-wrap: anywhere;
}

.news_btns,
.articles_btns {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.old_news__btn,
.old_articles__btn {
  /* display: inline-block;
    background: #f6f6f6;
    padding: 10px;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    margin: 5px;
    outline: none; */
  margin: 0;
  padding: 1rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #6b46c1, #7c5cd6);
  border: none;
  color: white;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(107, 70, 193, 0.2);
}

.old_news__btn:hover {
  /* cursor: pointer;
    background: #e2e2e2; */
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(107, 70, 193, 0.3);
}

.old_news__btn:focus {
  border: 1px solid #e2e2e2;
  outline: none;
}

.old_news__btn.off {
  color: #d0ccdb;
}

.mc2{
  /* min-height: 100%;
  padding-bottom: 245px; */
  flex: 1 0 auto;
}

footer {
  background: #19171c;
  padding-top: 40px;
  padding-bottom: 20px;
  color: #898395;
  /* position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 214px; */
}

.menu_item_news > a::before {
  content: "\f1ea";
  font-family: FontAwesomeSolid;
  padding-right: 10px;
}

.menu_item_free > a::before {
  content: "\f06b";
  font-family: FontAwesomeSolid;
  padding-right: 10px;
}

.menu_item_articles > a::before {
  content: "\f02d";
  font-family: FontAwesomeSolid;
  padding-right: 10px;
}

.menu_item_faq > a::before {
  content: "\f30f";
  font-family: FontAwesomeSolid;
  padding-right: 10px;
}

.menu_item_support > a::before {
  content: "\f82d";
  font-family: FontAwesomeSolid;
  padding-right: 10px;
}

.menu_item_termsofuse > a::before {
  content: "\f573";
  font-family: FontAwesomeSolid;
  padding-right: 10px;
}

/* footer {
    overflow: hidden;
  } */

.left_menu_open_hide {
  display: none;
}
@media screen and (max-width: 925px) {
  .col__1_4 {
    flex: 0 0 56px;
    width: 56px;
    padding: 0 0 0 15px;
  }

  .menu_items_left {
    overflow: hidden;
    width: 41px;
    z-index: 10000;
    position: relative;
    transition: all 1s;
  }

  .left_menu_open_hide {
    display: block;
  }

  .col__3_4 {
    flex: 1 0 75%;
    max-width: none;
  }

  .menu_items_left > ul > li {
    white-space: nowrap;
    position: relative;
    left: 21px;
  }

  .menu-item > a::before {
    position: absolute;
    left: -28px;
  }

  .hide_text,
  .open_text {
    cursor: pointer;
    color: #ff9933;
  }

  .left_menu_open_hide.close_my > .hide_text {
    display: none;
  }

  .left_menu_open_hide.close_my > .hide_text:before {
    content: "\f070";
    font-family: FontAwesomeSolid;
    display: none;
    position: relative;
    right: 7px;
  }

  .left_menu_open_hide.open_my > .hide_text:before {
    content: "\f070";
    font-family: FontAwesomeSolid;
    position: relative;
    right: 7px;
  }

  .left_menu_open_hide.close_my > .open_text:before {
    content: "\f06e";
    font-family: FontAwesomeSolid;
    position: relative;
    right: 7px;
  }

  .left_menu_open_hide.open_my > .open_text {
    display: none;
  }

  .left_menu_open_hide.open_my > .open_text:before {
    content: "\f06e";
    font-family: FontAwesomeSolid;
    display: none;
    position: relative;
    right: 7px;
  }

  .fa-history:before,
  .fa-toolbox:before,
  .fa-briefcase:before {
    left: -9px;
  }
}

/* ===== Тёмная тема: блог/новости ===== */
[data-theme="dark"] .archive-list article { border-bottom: 1px solid var(--border); }
[data-theme="dark"] .block-cat-title { color: var(--text-main); }
[data-theme="dark"] .archive-content { color: var(--text-main); }
[data-theme="dark"] article ol { color: var(--text-main); }
[data-theme="dark"] a { color: var(--brand); }
[data-theme="dark"] a:hover { color: var(--brand-hover); }

/* Карточка списка новостей */
[data-theme="dark"] .item__new {
  background: var(--card-bg);
  border: 1px solid var(--border);
  /* box-shadow: 0 8px 22px rgba(0,0,0,0.35); */
}
[data-theme="dark"] .item__new .text { color: var(--text-muted); }
[data-theme="dark"] .item__new .news-date { color: var(--text-muted); background: rgba(113,128,150,0.12); border-color: rgba(113,128,150,0.25); }
[data-theme="dark"] .item__new .category-tag { color: var(--brand); background: rgba(125,91,190,0.12); border-color: rgba(125,91,190,0.25); }

/* Хлебные крошки */
[data-theme="dark"] .kroshki_items { background: var(--card-bg); border-color: var(--border); box-shadow: 0 4px 15px rgba(0,0,0,0.25); }
[data-theme="dark"] .kroshki_items a { color: var(--brand); }
[data-theme="dark"] .kroshki_items span.current { color: var(--text-main); }

@media screen and (max-width: 1020px) {
  .item__new .text {
    position: static;
  }

  .text_short_post {
    width: 100%;
    padding: 0 !important;
  }

  .item__new a {
    display: block;
  }
}

@media screen and (max-width: 780px) {
  .img_post_main {
    width: 120px;
  }
}

@media screen and (max-width: 450px) {
  .new_article_block2 img {
    max-width: 300px !important;
  }
}

@media screen and (max-width: 400px) {
  .new_article_block2 img {
    max-width: 250px !important;
  }
}

@media screen and (max-width: 380px) {
  .new_article_block2 img {
    max-width: 200px !important;
  }
}

@media screen and (max-width: 320px) {
  .new_article_block2 img {
    max-width: 130px !important;
  }
}
