
    .mwrapper {
      max-width: 1350px;
      width: 100%;
      margin: 0 auto;
    }

    .mcontainer {
      display: flex;
      gap: 30px;
      justify-content: space-between;
      align-items: flex-start;
    }

.matrix {
    display: flex;
    /* grid-template-columns: 1fr 1fr; */
    width: 330px !important;
    height: 328px !important;
    border-radius: 0;
    overflow: hidden;
    /* border: 2px solid #ccc; */
    flex-direction: row;
    flex-wrap: wrap;
    background-image: url(../img/matrix-backgr.gif);
    background-position: 0 0;
    background-repeat: no-repeat;
    padding-top: 55px;
    padding-left: 22px;
    gap: 3px;
    /* align-content: space-between; */
    justify-content: space-evenly;
}

.q-header-main {
    color: #3a5384;
    font-size: 39px;
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 1px solid #b2bed2;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.matrix-header-main {
    color: #3a5384;
    font-size: 39px;
    margin-bottom: 40px;
    border-bottom: 1px solid #b2bed2;
    width: fit-content;
    /*margin-left: auto;*/
    margin-right: auto;    
}

    .matrix div {
      cursor: pointer;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .matrix div:hover,
    .matrix div:focus {
      outline: 2px dashed #000;
      outline-offset: -2px;
    }

    .matrix div.active {
      box-shadow: inset 0 0 0 5px white, 0 0 15px rgba(0,0,0,0.2);
      transform: scale(1.05);
      z-index: 1;
    }

    .red    { background: #e74c3c; }
    .green  { background: #27ae60; }
    .blue   { background: #2980b9; }
    .yellow { background: #f1c40f; }

    .q-list {
      flex: 1;
      max-width: 1100px;
    }

    .q-header {
      margin-bottom: 15px;
      font-weight: bold;
      font-size: 16px;
      display: none;
    }

    .grid {
      display: block;
    }

.question {
    /* background: white; */
    /* border-radius: 6px; */
    padding: 1px 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
    transition: all 0.4s ease;
    line-height: 1.5;
    margin-bottom: 14px;
    width: 100%;
    font-style: italic;
    /* border: 2px solid transparent; */
}

    .question.fade {
      opacity: 0.4;
    }


.question a {
    text-decoration: underline dotted;
    text-underline-offset: 5px;
    transition: all 0.6s ease;
    font-style: italic;
    font-size: 22px;
}

    .question a:hover,
    .question a:focus {
      text-decoration: none;
      outline: none;
    }




    .dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      margin-top: 4px;
      flex-shrink: 0;
    }

.details-section {
    margin-top: 40px;
    padding: 0;
    border-radius: 8px;
}

    .details-section h3 {
      margin-bottom: 15px;
      font-size: 18px;
    }

    .details-section ul {
      margin-bottom: 20px;
      padding-left: 20px;
    }

    .details-section li {
      margin-bottom: 6px;
    }

.shuffle-item.fade {
  opacity: 0.4;
  pointer-events: none;
}
.shuffle-item--hidden {
  opacity: 0.4;
  pointer-events: none;
  visibility: visible !important; 
  transform: none !important;
  position: static !important;
}

/* ====== Questions animation ====== */
.question {
  transition: opacity .22s ease, transform .22s ease, border-color .2s ease, background-color .2s ease;
  will-change: transform, opacity;
}
.question.anim-in {
  animation: fadeSlideIn .24s ease both;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Dimmed (inactive) items */
.shuffle-item.fade {
  opacity: .38;
  pointer-events: none;
  filter: grayscale(.05) contrast(.98);
}

/* Selected question */
    .question.selected-question {
        color: #8b0b15; 
        text-decoration: none;   
    }

/* ====== Details content fade-in ====== */
.content-in {
  animation: contentFade .22s ease both;
}
@keyframes contentFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Skeleton loader ====== */
.sk-list { list-style: none; margin: 8px 0 16px; padding: 0; }
.sk-line { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.sk-id {
  width: 48px; height: 14px; border-radius: 3px;
  background: linear-gradient(90deg, #eee 25%, #f6f6f6 50%, #eee 75%);
  background-size: 200% 100%; animation: sk-shimmer 1.1s linear infinite;
}
.sk-text {
  flex: 1; height: 14px; border-radius: 3px;
  background: linear-gradient(90deg, #eee 25%, #f6f6f6 50%, #eee 75%);
  background-size: 200% 100%; animation: sk-shimmer 1.1s linear infinite;
}
@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Optional: tidy lists */
.rel-list { margin: 8px 0 16px; padding-left: 18px; }
.rel-list li { margin: 4px 0; }




    @media (max-width: 1024px) {
      .container {
        flex-direction: column;
        align-items: center;
      }

      .matrix {
        margin-bottom: 20px;
      }

      .q-list {
        width: 100%;
        max-width: 100%;
      }
    }




/* pub */    

/* Container for cards */
.rel-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    margin-top: 16px;
    margin-bottom: 30px;
}

/* Card */
.rel-card {
    width: 412px;
    border: 1px solid #e7e7ec;
    border-radius: 0px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    /* gap: 10px; */
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 4px solid #b6212b;
    position: relative;
}

/* Title */
.rel-card__title {
    margin: 0 0 4px;
    line-height: 29px;
    min-height: auto;
    font-size: 26px;
    margin-bottom: 12px;
}
.rel-card__title a {
  color:#85715b;
}

/* Image */
.rel-card__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0px;
  object-fit: cover;
}

/* Abstract */
.rel-card__abstract {
    max-height: 275px;
    overflow: hidden;
}

/* Meta rows */
.rel-card__meta {
    margin-top: auto;
    clear: both;
}
.rel-card__row { 

}

/* Link button */
.rel-card__links { margin-top: 6px; }
.rel-card__btn {
  display: inline-block;
  padding: 8px 12px;
  background: #800000;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
}
.rel-card__btn:hover { background: #a00000; }

/* Image floated to the right with text wrapping */
.rel-card__image--right {

}
.rel-card__image--right img {

}

img.rel-pimg {
    float: right;
    margin-left: 6px;
    width: 140px;
    height: 140px;
    border-radius: 0px;
    border: 1px solid #e9d5aa;
    display: block;
    margin-right: 0px;
    margin-top: 12px;
    margin-bottom: 13px;
}


.rel-card__links {
  clear: both;
  margin-top: 8px;
}

.rel_pub_stp1 {
    width: 100%;
    height: 1px;
    background-color: #e3c17a;
    clear: both;
    margin-top: 12px;
    margin-bottom: 12px;
}

.int_pudl_img_icon {
    position: absolute;
    bottom: -41px;
    right: 18px;
    display: block;
}

#relGroups .rel-card__image {
  margin-bottom: 20px;
}

#relGroups .rel-card {
    width: 412px;
    border: 1px solid #e7e7ec;
    border-radius: 0px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    /* gap: 10px; */
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 4px solid #93a6cb;
    position: relative;
}

#selectedText {
    color: #8b0b15;
    font-size: 38px;
    margin-bottom: 15px;
}

.rel-section__head h4 {
    display: inline-block;
    color: #535658;
    font-size: 30px;
    margin-left: 7px;
}

.rel-card__abstract {
  margin-top: 10px;
}


.welcome_note {
    /* margin-top: -15px; */
    padding-top: 45px;
    padding-bottom: 30px;
}
.welcome_note ul {
    list-style: outside none none;
    margin-bottom: 30px;
    margin-left: 13px;
    margin-top: 0;
    padding-left: 21px;
}
.welcome_note ul li {
    padding-left: 29px;
    background-image: url(../img/icon-text.png);
    background-position: 0px 12px;
    /* background-size: 17px 20px; */
    margin-bottom: 5px;
    background-repeat: no-repeat;
    font-weight: 400;
    height: auto;
    padding-top: 3px;
}

#relPublicationsBody .rel-card {
    border: 1px solid #e7e7ec;
    border-bottom: 4px solid #e3c17a;

}



a.rgi img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

a.rgi img:hover, a.rgi img:focus {
    transform: scale(1.15);
}

a.rgi:hover img, a.rgi:focus img {
    transform: scale(1.15);
}

#relGroups .rel-card__image {
    margin-bottom: 20px;
    overflow: hidden;
}

@media (max-width: 520px) {
  .rel-card__image--right {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0 0 8px 0;
  }
  .rel-card__links {
    clear: none;
  }
}



.matrix__cell {
  display: inline-block;   /* или block */
  line-height: 0;          /* убираем «щель» вокруг img */
  cursor: pointer;
  text-decoration: none;
  outline: none;
}

.matrix__cell img {
  display: block;
  width: 135px;
  height: 135px;
  transition: transform .12s ease;
}

.matrix__cell.active img {
  transform: scale(.96);
}

.dots {
    display: flex;
    gap: 4px;
    margin-right: 6px;
    /* vertical-align: 6px; */
    align-items: flex-end;
    align-content: flex-end;
    height: 27px;
    flex-direction: row;
    min-width: 52px;
    flex-wrap: nowrap;
}
.dot {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--dot-color,#ccc);
    box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset;
    margin-left: -11px;
}


/*.dot.is-selected { box-shadow: 0 0 0 2px currentColor; transform: scale(1.05); }*/
.dot.is-dim      { opacity: .35; }


@media (max-width: 520px) {
  .matrix { grid-template-columns: repeat(3, 100px); }
  .matrix__cell img {
      width: 134px;
      height: auto;
  }
}

@media (max-width: 992px) {
    .mcontainer {
        display: flex;
        gap: 30px;
        justify-content: center;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .q-list {
        min-width: 100%;
        max-width: 100%;
    }

    .rel-cards {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
        margin-top: 16px;
        margin-bottom: 30px;
    }


      .dots {
          display: flex;
          gap: 4px;
          margin-right: -14px;
          /* vertical-align: 6px; */
          align-items: flex-end;
          align-content: flex-end;
          height: 27px;
          flex-direction: row;
          width: 66px;
          min-width: 64px;
          flex-wrap: nowrap;
      }

}