/* Семейство страниц: фотогалерея (photo_video, photo_video_list, …) */

.xras-rail__extra .xras-rail-card + .xras-rail-card {
    margin-top: 16px;
}

/* rail: типографика в shell.css; здесь только отличия темы */

.xras-gal {
    width: 100%;
    margin: 2.1em 0 0;
}

@media (min-width: 992px) {
    .xras-gal {
        max-width: 729px;
    }
}

.xras-gal__heading {
    margin: 0 0 1em;
    font-family: 'DinCondensed', 'Arial Narrow', Arial, sans-serif;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}

.xras-gal__frame {
    --xras-gal-cap-h: 386px;
    --xras-gal-rail-w: 6px;
    --xras-gal-rail-color: rgb(5, 7, 8);

    position: relative;
    width: 100%;
    margin: 0;
    background-color: #000;
    background-image: url('/img/gallery/w729.gif');
    background-repeat: no-repeat;
    background-position: left top;
    /* ширина по блоку, высота шапки фиксирована (mobile: гориз. сжатие) */
    background-size: 100% 386px;
}

/* w729: боковые рельсы ~386px; псевдоэлементы тянут их до tab_btm */
.xras-gal__frame::before,
.xras-gal__frame::after {
    content: '';
    position: absolute;
    top: var(--xras-gal-cap-h);
    bottom: 0;
    width: var(--xras-gal-rail-w);
    background: var(--xras-gal-rail-color);
    pointer-events: none;
    z-index: 1;
}

.xras-gal__frame::before {
    left: 0;
}

.xras-gal__frame::after {
    right: 0;
}

.xras-gal__body {
    position: relative;
    z-index: 2;
    padding: 35px 10px 0;
}

.xras-gal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 15px;
    width: 100%;
}

.xras-gal__item {
    min-width: 0;
}

.xras-gal__thumb {
    display: block;
    position: relative;
    aspect-ratio: 206 / 210;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

.xras-gal__frame-deco {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 78.095%;
    background: url('/img/gallery/ramka.gif') no-repeat center top;
    background-size: 100% 100%;
    z-index: 10;
    pointer-events: none;
}

.xras-gal__img {
    position: absolute;
    top: 11.429%;
    left: 0;
    right: 0;
    z-index: 5;
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0 1px;
    box-sizing: border-box;
}

.xras-gal__caption {
    position: absolute;
    top: 83.81%;
    left: 0;
    right: 0;
    z-index: 15;
    margin: 0;
    text-align: center;
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
}

/* desktop: footer в потоке frame, слегка наезжает на контент */
.xras-gal__footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: auto;
    margin: 0;
    line-height: 0;
    font-size: 0;
    background: #000;
}

.xras-gal__footer-img {
    display: block;
    width: 100%;
    height: 42px;
    object-fit: fill;
    margin: 0;
    border: 0;
}

@media (max-width: 991px) {
    .xras-gal__heading {
        font-size: 18px;
        line-height: 1.3;
    }

    .xras-gal__body {
        padding-top: 24px;
        padding-bottom: 6px;
    }

    /* mobile: footer в потоке — не перекрывает подписи */
    .xras-gal__footer {
        position: relative;
        bottom: auto;
    }
}

@media (max-width: 480px) {
    .xras-gal__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.xras-gal__pager {
    margin: 1.5em 0 0.5em;
    text-align: center;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
}

.xras-gal__pager a {
    color: #ffd800;
    text-decoration: none;
}

.xras-gal__pager a:hover {
    text-decoration: underline;
}

.xras-gal__pager span[aria-current="page"] {
    color: rgba(255, 255, 255, 0.55);
}
