/* monkeytrip: правый сайдбар по контексту (Т6, inc/sidebar-context.php) */

/* Тема делает всю колонку sticky — длинный сайдбар статьи обрезался бы снизу.
   Колонка прокручивается, «прилипает» только последний блок. */
@media (min-width: 768px) {
    .widget-area--two .widget-area-inner { position: static; height: 100%; min-height: 0; }
    .widget-area--two .widget.mt-context > .mt-side-box:last-child { position: sticky; top: 30px; }
}

.widget.mt-context {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: var(--wpsc-site-gap);
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

/* Постер */
.mt-side-poster {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    padding: 1.5rem;
    border-radius: var(--wpsc-box-border-radius, 1rem);
    background: linear-gradient(135deg, #2f2a7a 0%, #665dcb 60%, #8f86e8 100%);
    color: #fff !important;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}
.mt-side-poster__globe {
    position: absolute;
    right: -18px;
    top: -14px;
    width: 120px;
    height: 120px;
    color: rgba(255, 255, 255, .35);
}
.mt-side-poster__title {
    font-size: 1.35em;
    font-weight: 700;
    line-height: 1.2;
    max-width: 75%;
    position: relative;
}
.mt-side-poster__text {
    font-size: .9em;
    opacity: .85;
    position: relative;
}
.mt-side-poster__btn {
    margin-top: .5rem;
    padding: .5em 1em;
    border-radius: 999px;
    background: #fff;
    color: #2f2a7a;
    font-weight: 600;
    font-size: .9em;
    position: relative;
    transition: transform .15s;
}
.mt-side-poster:hover .mt-side-poster__btn { transform: translateX(3px); }

/* Карточки блоков */
.mt-side-box {
    padding: var(--wpsc-widget-padding-y, 1.5rem) var(--wpsc-widget-padding-x, 1.5rem);
    border-radius: var(--wpsc-box-border-radius, 1rem);
    background: var(--wpsc-white-bg);
    box-shadow: var(--wpsc-shadow-box);
}
.mt-side-box__title {
    margin: 0 0 1rem;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
}
.mt-side-box__more {
    display: inline-block;
    margin-top: .75rem;
    font-size: .9em;
    font-weight: 500;
}

/* Список статей с миниатюрами */
.mt-side-posts { list-style: none; margin: 0; padding: 0; }
.mt-side-posts li { margin: 0; }
.mt-side-posts li + li { margin-top: .75rem; }
.mt-side-posts a {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--wpsc-text-color);
    text-decoration: none;
    font-size: .9em;
    line-height: 1.3;
}
.mt-side-posts a:hover { color: var(--wpsc-link-hover-color); }
.mt-side-posts a span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mt-side-posts__img {
    flex: 0 0 56px;
    width: 56px !important;
    height: 56px !important;
    object-fit: cover;
    border-radius: var(--wpsc-element-border-radius, .5rem);
}

/* Направления */
.mt-side-dirs { list-style: none; margin: 0; padding: 0; }
.mt-side-dirs li { margin: 0; }
.mt-side-dirs a {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .4em .6em;
    margin: 0 -.6em;
    border-radius: var(--wpsc-element-border-radius, .5rem);
    color: var(--wpsc-text-color);
    text-decoration: none;
    font-size: .95em;
}
.mt-side-dirs a:hover,
.mt-side-dirs li.is-active a { background: var(--wpsc-light-bg); }
.mt-side-dirs__count { color: var(--wpsc-text-lighter-color); font-size: .9em; }
