/**
 * Раздел «Фото с выступлений».
 */


/* ==========================================================================
   Общая страница выступления
   ========================================================================== */

.performance-page {
    color: var(--color-content);
    background-color: #b5cbe6;
    font-family: var(--font-content);
}


/* ==========================================================================
   Логотип
   ========================================================================== */

/*
 * Положение и размер повторяют страницы
 * «История» и «Тексты песен».
 */

.single-vdv_performance .site-branding {
    transform: translateX(-220px);
}


/* Мониторы и ноутбуки средней ширины */

@media (max-width: 1599px) and (min-width: 1101px) {

    .single-vdv_performance {
        --logo-size: 66px;
    }

    .single-vdv_performance .site-branding {
        transform: translate(-7px, -6px);
    }

}


/* Планшеты и небольшие ноутбуки */

@media (max-width: 1100px) and (min-width: 783px) {

    .single-vdv_performance {
        --logo-size: 46px;
    }

    .single-vdv_performance .site-branding {
        transform: translate(28px, -1px);
    }

}


/* ==========================================================================
   Hero-фотография выступления
   ========================================================================== */

.performance-hero {
    width: 100%;
    background-color: #b5cbe6;
}

.performance-hero__media {
    width: 100%;
    overflow: hidden;
}

.performance-hero__image {
    display: block;
    width: 100%;
    height: auto;
}

.performance-hero__placeholder {
    display: flex;
    min-height: 340px;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.14);
}

.performance-hero__placeholder-text {
    margin: 0;
    color: #4d6993;
    font-size: 20px;
    text-align: center;
}


/* ==========================================================================
   Заголовок и данные выступления
   ========================================================================== */

.performance-content {
    padding: 42px 0 44px;
}

.performance-content__inner {
    width: 100%;
    max-width: 1300px;
    margin-inline: auto;
}

.performance-content__header {
    text-align: center;
}

.performance-content__city {
    margin: 0;
    color: #2f5d96;
    font-family: var(--font-content);
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    
}

.performance-content__venue {
    margin: 1px 0 0;
    color: var(--color-content);
    font-family: var(--font-content);
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 500;
    line-height: 1.3;
}

.performance-content__date {
    margin: 1px 0 0;
    color: #4d6993;
    font-family: var(--font-content);
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 500;
    line-height: 1.3;
}


/* ==========================================================================
   Описание выступления
   ========================================================================== */

.performance-content__description {
    width: min(100%, 900px);
    margin: 28px auto 0;
    color: var(--color-content);
    font-size: 18px;
    line-height: 1.6;
}

.performance-content__description p {
    margin: 0 0 16px;
}

.performance-content__description p:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Галерея фотографий
   ========================================================================== */

.performance-gallery {
    width: 100%;
    margin-top: 30px;
}

.performance-gallery__title {
    margin: 0 0 20px;
    color: #2f5d96;
    font-family: var(--font-content);
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
}

.performance-gallery__grid {
    --performance-gallery-gap: 10px;

    position: relative;
    width: 100%;
}

/*
 * Masonry использует фактическую ширину первого элемента
 * как ширину одной колонки.
 *
 * Четыре колонки:
 * 3 промежутка × 18 px = 54 px.
 */
.performance-gallery__item {
    position: relative;
    display: block;
    width: calc((100% - 54px) / 4);
    min-width: 0;
    margin-bottom: var(--performance-gallery-gap);
    overflow: hidden;
    background-color: transparent;
    border: none;
    text-decoration: none;
    transition:
        box-shadow 250ms ease,
        transform 250ms ease;
}

.performance-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 300ms ease;
}

.performance-gallery__item:hover,
.performance-gallery__item:focus-visible {
    z-index: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.performance-gallery__item:hover .performance-gallery__image,
.performance-gallery__item:focus-visible .performance-gallery__image {
    transform: scale(1.035);
}

.performance-gallery__item:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 3px;
}


/* ==========================================================================
   Лайтбокс фотографий
   ========================================================================== */

/*
 * Во время просмотра блокируем прокрутку всей страницы.
 */
html.has-performance-lightbox,
html.has-performance-lightbox body {
    overflow: hidden;
}

.performance-lightbox {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 42px 70px;
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

.performance-lightbox[hidden] {
    display: none;
}

.performance-lightbox.is-open {
    visibility: visible;
    opacity: 1;
}

.performance-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(5, 10, 18, 0.94);
    cursor: zoom-out;
}

.performance-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: scale(0.97);
    transition: transform 200ms ease;
}

.performance-lightbox.is-open
.performance-lightbox__dialog {
    transform: scale(1);
}

.performance-lightbox__stage {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    pointer-events: none;
	touch-action: pan-y;
	
}

.performance-lightbox__media {
    position: relative;
    display: inline-grid;
    max-width: 100%;
    max-height: 100%;
    line-height: 0;
    pointer-events: none;
}

.performance-lightbox__image {
    display: block;
    grid-area: 1 / 1;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 84px);
    object-fit: contain;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.36);
    pointer-events: auto;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y;
}

.performance-lightbox__close {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
    padding: 0;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    opacity 220ms ease,
    visibility 220ms ease;
}

.performance-lightbox__close:hover,
.performance-lightbox__close:focus-visible {
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.55);
    transform: scale(1.04);
}

.performance-lightbox__close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.performance-lightbox__close span::before,
.performance-lightbox__close span::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    content: "";
    background-color: currentColor;
}

.performance-lightbox__close span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.performance-lightbox__close span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}


/* ==========================================================================
   Навигация лайтбокса
   ========================================================================== */

.performance-lightbox__navigation {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 52px;
    height: 70px;
    padding: 0;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    cursor: pointer;
    pointer-events: auto;
    transform: translateY(-50%);
    transition:
    background-color 180ms ease,
    border-color 180ms ease,
    opacity 220ms ease,
    visibility 220ms ease;
}

.performance-lightbox__navigation--previous {
    left: 20px;
}

.performance-lightbox__navigation--next {
    right: 20px;
}

.performance-lightbox__navigation:hover,
.performance-lightbox__navigation:focus-visible {
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.5);
}

.performance-lightbox__navigation:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.performance-lightbox__navigation[hidden] {
    display: none;
}

.performance-lightbox__navigation span::before {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    content: "";
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.performance-lightbox__navigation--previous span::before {
    left: 19px;
    transform:
        translateY(-50%)
        rotate(-135deg);
}

.performance-lightbox__navigation--next span::before {
    right: 19px;
    transform:
        translateY(-50%)
        rotate(45deg);
}


/* ==========================================================================
   Счётчик лайтбокса
   ========================================================================== */

.performance-lightbox__counter {
    position: absolute;
    z-index: 3;
    right: 14px;
    bottom: 14px;
    min-width: 66px;
    padding: 8px 12px;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    font-family: var(--font-content);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    pointer-events: none;
    transition:
        opacity 220ms ease,
        visibility 220ms ease;
}

.performance-lightbox__counter[hidden] {
    display: none;
}

/*
 * Автоматическое скрытие элементов управления
 * применяется только на устройствах с мышью.
 */
@media (hover: hover) and (pointer: fine) {

    .performance-lightbox.is-controls-hidden
    .performance-lightbox__close,

    .performance-lightbox.is-controls-hidden
    .performance-lightbox__navigation,

    .performance-lightbox.is-controls-hidden
    .performance-lightbox__counter {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

    /*
     * При наведении курсора непосредственно
     * на элемент управления он не должен исчезать.
     */
    .performance-lightbox__close:hover,
    .performance-lightbox__close:focus-visible,
    .performance-lightbox__navigation:hover,
    .performance-lightbox__navigation:focus-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

}


/*
 * Пользователи, отключившие анимацию в системе,
 * не получают масштабирование и плавные переходы.
 */
@media (prefers-reduced-motion: reduce) {

    .performance-lightbox,
    .performance-lightbox__dialog,
    .performance-lightbox__close,
    .performance-lightbox__navigation,
    .performance-lightbox__counter {
        transition: none;
    }

}


/* ==========================================================================
   Ссылка назад
   ========================================================================== */

.performance-content__back {
    width: 100%;
    margin: 24px auto 0;
}

.performance-content__back-link {
    color: #2f5d96;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.performance-content__back-link:hover,
.performance-content__back-link:focus-visible {
    color: #244f83;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.performance-content__back-link:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 4px;
}



@media (max-width: 1100px) {

.performance-gallery {
	margin-top: 20px;
}
}

/* ==========================================================================
   Планшеты
   ========================================================================== */

@media (max-width: 782px) {

    .single-vdv_performance {
        --logo-size: 58px;
    }

    .single-vdv_performance .site-branding {
        transform: translate(5px, 0);
    }

    .performance-content {
        padding: 34px 0 38px;
    }

    .performance-content__venue {
        margin-top: 8px;
    }

    .performance-content__description {
        margin-top: 24px;
        font-size: 17px;
        line-height: 1.55;
    }

     .performance-gallery {
        margin-top: 28px;
    }

    .performance-gallery__title {
        margin-bottom: 18px;
        font-size: 23px;
    }

    .performance-gallery__grid {
    --performance-gallery-gap: 16px;
}

.performance-gallery__item {
    width: calc((100% - 16px) / 2);
    margin-bottom: var(--performance-gallery-gap);
}
	
	
	 .performance-lightbox {
        padding: 54px 18px 28px;
    }

    .performance-lightbox__close {
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
}
	
	
	 .performance-lightbox__navigation {
        width: 46px;
        height: 62px;
    }

    .performance-lightbox__navigation--previous {
        left: 12px;
    }

    .performance-lightbox__navigation--next {
        right: 12px;
    }

    .performance-lightbox__navigation--previous span::before {
        left: 17px;
    }

    .performance-lightbox__navigation--next span::before {
        right: 17px;
    }

    .performance-lightbox__counter {
        right: 10px;
    bottom: 10px;
    }
	
	.performance-lightbox__stage {
        transform: translateY(-30px);
    }
	
	.performance-gallery__grid {
    --performance-gallery-gap: 9px;
	}

}


/* ==========================================================================
   Телефоны
   ========================================================================== */

@media (max-width: 479px) {

    .single-vdv_performance {
        --logo-size: 52px;
    }

    .single-vdv_performance .site-branding {
        transform: translate(2px, 2px);
    }

    .performance-hero__placeholder {
        min-height: 220px;
    }

    .performance-content {
        padding: 27px 0 30px;
    }

 .performance-content__city,
.performance-content__venue,
.performance-content__date {
    font-size: 20px;
}

.performance-content__venue,
.performance-content__date {
    margin-top: 1px;
}
    

    .performance-content__description {
        margin-top: 21px;
        font-size: 16px;
        line-height: 1.5;
    }

 .performance-gallery {
        margin-top: 15px;
    }

    .performance-gallery__title {
        margin-bottom: 15px;
        font-size: 20px;
    }

  .performance-gallery__grid {
    --performance-gallery-gap: 10px;
}

.performance-gallery__item {
    width: calc((100% - 10px) / 2);
    margin-bottom: var(--performance-gallery-gap);
}

    

    .performance-content__back {
        margin-top: 20px;
    }

    .performance-content__back-link {
        font-size: 15px;
    }
	
	 .performance-lightbox {
        padding: 56px 8px 18px;
    }

    .performance-lightbox__close {
    top: 7px;
    right: 7px;
    width: 38px;
    height: 38px;
}

    .performance-lightbox__image {
        max-width: 100%;
        max-height: 100%;
    }
	
	
	.performance-lightbox__navigation {
        width: 40px;
        height: 56px;
        background-color: rgba(0, 0, 0, 0.42);
        border-color: rgba(255, 255, 255, 0.16);
    }

    .performance-lightbox__navigation--previous {
        left: 6px;
    }

    .performance-lightbox__navigation--next {
        right: 6px;
    }

    .performance-lightbox__navigation span::before {
        width: 15px;
        height: 15px;
        border-top-width: 2px;
        border-right-width: 2px;
    }

    .performance-lightbox__navigation--previous span::before {
        left: 15px;
    }

    .performance-lightbox__navigation--next span::before {
        right: 15px;
    }

    .performance-lightbox__counter {
    right: 7px;
    bottom: 7px;
    min-width: 58px;
    padding: 6px 10px;
    font-size: 13px;
}

	.performance-lightbox__stage {
        transform: translateY(-60px);
    }

.performance-gallery__grid {
    --performance-gallery-gap: 6px;
	}

}


@media (max-width: 320px) {

    .single-vdv_performance {
        --logo-size: 46px;
    }

    .single-vdv_performance .site-branding {
        transform: translate(-2px, 2px);
    }

.performance-content__city,
.performance-content__venue,
.performance-content__date {
    font-size: 18px;
}


 .performance-gallery__grid {
    --performance-gallery-gap: 7px;
}

.performance-gallery__item {
    width: calc((100% - 7px) / 2);
    margin-bottom: var(--performance-gallery-gap);
}

    .performance-gallery__title {
        font-size: 19px;
    }
	
	
	.performance-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 74px);
}

}