/* =========================================
   VENUS GALLERY — ОСНОВНОЙ СТИЛЬ
========================================= */

.gallery-page {
    min-height: 100vh;
    color: #f4f0ff;

    background:
        radial-gradient(
            ellipse at 12% 8%,
            rgba(111, 76, 245, .15),
            transparent 34%
        ),
        radial-gradient(
            ellipse at 90% 45%,
            rgba(89, 54, 177, .12),
            transparent 36%
        ),
        #0d0b1b;
}

/* =========================================
   ЗАГОЛОВОК
========================================= */

.gallery-hero {
    position: relative;

    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(120, 91, 255, .18),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #15112b,
            #100d20 70%
        );

    border-bottom: 1px solid #30264e;
}

.gallery-hero h1,
.gallery-heading h2,
.gallery-card-title,
.gallery-empty h3 {
    color: #f7f3ff;
}

.gallery-hero p,
.gallery-heading p,
.gallery-card-description,
.gallery-empty p {
    color: #aaa2c4;
}

.gallery-back,
.gallery-label,
.section-label {
    color: #a18aff;
}

/* =========================================
   СЧЁТЧИК
========================================= */

.gallery-count {
    background: rgba(27, 22, 49, .92);
    border: 1px solid #342a55;

    box-shadow:
        0 12px 32px rgba(0, 0, 0, .24);

    border-radius: 15px;
}

.gallery-count strong {
    color: #ad9aff;
}

.gallery-count span {
    color: #a49bbf;
}

.gallery-new-count {
    display: block;
    margin-top: 4px;

    color: #7edba5;
    font-size: 11px;
}

/* =========================================
   СЕТКА КАРТОЧЕК
========================================= */

.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 22px;
    align-items: stretch;
}

/* =========================================
   КАРТОЧКА
========================================= */

.gallery-card {
    position: relative;

    display: block;
    width: 100%;
    min-width: 0;

    padding: 0;
    overflow: hidden;

    text-align: left;
    color: inherit;

    background: rgba(27, 22, 49, .92);

    border: 1px solid #342a55;
    border-radius: 19px;

    box-shadow:
        0 12px 32px rgba(0, 0, 0, .24);

    cursor: pointer;

    opacity: 0;
    transform: translateY(14px);

    transition:
        opacity .35s ease,
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.gallery-card-visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card:hover {
    transform: translateY(-5px);

    border-color: #7560bb;

    box-shadow:
        0 18px 42px rgba(0, 0, 0, .34),
        0 0 22px rgba(112, 82, 221, .12);
}

.gallery-card:focus-visible {
    outline: 2px solid #9d87ff;
    outline-offset: 4px;
}

/* =========================================
   ФОТОГРАФИЯ В КАРТОЧКЕ
========================================= */

.gallery-image {
    position: relative;

    display: block;

    height: clamp(170px, 17vw, 215px);

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #302454,
            #19142e
        );
}

.gallery-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .45s ease;
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.045);
}

/* =========================================
   ИНФОРМАЦИЯ КАРТОЧКИ
========================================= */

.gallery-card-body {
    display: block;
    padding: 16px 17px 15px;
}

.gallery-card-title {
    display: block;

    font-size: 17px;
    line-height: 1.35;

    font-weight: 800;
}

.gallery-card-description {
    display: -webkit-box;

    margin-top: 7px;
    overflow: hidden;

    font-size: 13px;
    line-height: 1.55;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.gallery-card-description:empty {
    display: none;
}

/* Нижняя часть карточки */

.gallery-card-footer {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 10px;

    margin-top: 13px;
    padding-top: 11px;

    border-top: 1px solid #342a55;

    color: #9289ad;
    font-size: 11px;
}

.gallery-open-label {
    color: #b2a1ff;

    font-weight: 700;
    white-space: nowrap;
}

/* =========================================
   МЕТКА НОВОЙ ПУБЛИКАЦИИ
========================================= */

.gallery-new-badge {
    position: absolute;

    top: 12px;
    left: 12px;

    z-index: 1;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding: 6px 10px;

    border: 1px solid rgba(105, 221, 151, .2);
    border-radius: 999px;

    color: #c5f5d7;

    background: rgba(13, 35, 26, .78);

    backdrop-filter: blur(8px);

    font-size: 11px;
    font-weight: 700;
}

.gallery-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #65d995;

    box-shadow:
        0 0 0 3px rgba(101, 217, 149, .12),
        0 0 9px rgba(101, 217, 149, .35);
}

/* =========================================
   ПУСТАЯ ГАЛЕРЕЯ
========================================= */

.gallery-empty {
    color: #f4f0ff;

    background: rgba(27, 22, 49, .92);

    border: 1px dashed #45376e;
    border-radius: 18px;

    box-shadow:
        0 12px 32px rgba(0, 0, 0, .24);
}

.gallery-empty-icon {
    color: #fff;
}

/* =========================================
   ПОЛНОЭКРАННЫЙ ПРОСМОТР
========================================= */

.gallery-detail-modal {
    position: fixed;

    inset: 0;

    z-index: 10000;

    display: flex;
    align-items: stretch;
    justify-content: center;

    padding: 12px;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .22s ease,
        visibility .22s ease;
}

.gallery-detail-modal.is-open {
    opacity: 1;
    visibility: visible;
}

/* Затемнение фона */

.gallery-detail-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(3, 2, 10, .96);

    backdrop-filter: blur(12px);
}

/* Основное окно */

.gallery-lightbox {
    position: relative;

    z-index: 1;

    width: min(100%, 1600px);
    height: 100%;

    display: grid;

    grid-template-rows:
        54px
        minmax(0, 1fr)
        auto
        24px;

    overflow: hidden;

    border: 1px solid rgba(153, 125, 255, .28);
    border-radius: 18px;

    background: #0d0a19;

    box-shadow:
        0 20px 80px rgba(0, 0, 0, .6);
}

/* =========================================
   ВЕРХНЯЯ ПАНЕЛЬ
========================================= */

.gallery-lightbox-top {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 0 18px;

    color: #b9aaff;

    border-bottom:
        1px solid rgba(153, 125, 255, .16);
}

.gallery-lightbox-counter {
    font-size: 13px;
    font-weight: 700;
}

.gallery-lightbox-tools {
    display: flex;
    gap: 8px;
}

/* Кнопки управления */

.gallery-tool-btn {
    width: 38px;
    height: 36px;

    border: 1px solid #46376d;
    border-radius: 10px;

    color: #eee8ff;

    background: #211a38;

    font-size: 22px;

    cursor: pointer;

    transition:
        background .2s,
        transform .2s;
}

.gallery-tool-btn:hover {
    background: #493778;
    transform: translateY(-1px);
}

.gallery-close-btn {
    font-size: 25px;
}

/* =========================================
   ОБЛАСТЬ ФОТОГРАФИИ
========================================= */

.gallery-lightbox-stage {
    min-height: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: auto;

    padding: 10px 70px;

    background:
        radial-gradient(
            ellipse,
            rgba(70, 48, 125, .12),
            transparent 65%
        );
}

.gallery-lightbox-image {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    transform-origin: center center;

    transition:
        transform .18s ease;
}

/* =========================================
   СТРЕЛКИ ВПРАВО И ВЛЕВО
========================================= */

.gallery-nav {
    position: absolute;

    top: 46%;

    z-index: 3;

    display: grid;
    place-items: center;

    width: 48px;
    height: 58px;

    border: 1px solid rgba(183, 160, 255, .32);
    border-radius: 14px;

    color: #fff;

    background: rgba(33, 25, 57, .88);

    font-size: 42px;
    line-height: 1;

    cursor: pointer;

    transition:
        background .2s,
        transform .2s;
}

.gallery-nav:hover {
    background: #59448f;
    transform: scale(1.06);
}

.gallery-prev {
    left: 14px;
}

.gallery-next {
    right: 14px;
}

.gallery-nav[hidden] {
    display: none;
}

/* =========================================
   ОПИСАНИЕ ФОТОГРАФИИ
========================================= */

.gallery-lightbox-info {
    padding: 14px 22px 12px;

    border-top:
        1px solid rgba(153, 125, 255, .17);

    background: rgba(20, 15, 37, .96);
}

.gallery-lightbox-text {
    max-width: 1000px;

    margin: 0 auto;
}

.gallery-lightbox-date {
    color: #a58cff;
    font-size: 12px;
}

.gallery-lightbox-title {
    margin: 4px 0 5px;

    color: #fff;

    font-size: 20px;
}

.gallery-lightbox-description {
    max-height: 72px;

    margin: 0;

    overflow: auto;

    color: #c2bad7;

    font-size: 13px;
    line-height: 1.5;

    white-space: pre-wrap;
}

/* Подсказка клавиатуры */

.gallery-lightbox-hint {
    display: flex;

    align-items: center;
    justify-content: center;

    color: #756b91;

    font-size: 10px;
    letter-spacing: .02em;
}

/* Блокировка прокрутки страницы */

body.gallery-modal-open {
    overflow: hidden;
}

/* =========================================
   ПЛАНШЕТЫ
========================================= */

@media (max-width: 1000px) {

    .gallery-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

/* =========================================
   ТЕЛЕФОНЫ
========================================= */

@media (max-width: 650px) {

    .gallery-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 13px;
    }

    .gallery-image {
        height: clamp(125px, 30vw, 185px);
    }

    .gallery-card-body {
        padding: 12px;
    }

    .gallery-card-title {
        font-size: 14px;
    }

    .gallery-card-description {
        font-size: 12px;
    }

    .gallery-card-footer {
        flex-wrap: wrap;
        font-size: 10px;
    }

    /* Полноэкранное окно */

    .gallery-detail-modal {
        padding: 5px;
    }

    .gallery-lightbox {
        border-radius: 12px;

        grid-template-rows:
            48px
            minmax(0, 1fr)
            auto
            22px;
    }

    .gallery-lightbox-stage {
        padding: 8px 42px;
    }

    .gallery-nav {
        width: 34px;
        height: 46px;

        font-size: 32px;

        border-radius: 10px;
    }

    .gallery-prev {
        left: 5px;
    }

    .gallery-next {
        right: 5px;
    }

    .gallery-lightbox-info {
        padding: 10px 14px;
    }

    .gallery-lightbox-title {
        font-size: 17px;
    }

    .gallery-lightbox-description {
        font-size: 12px;
        max-height: 60px;
    }

    .gallery-tool-btn {
        width: 34px;
        height: 33px;
    }

}

/* =========================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
========================================= */

@media (max-width: 360px) {

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-image {
        height: 205px;
    }

}

/* ===== СВЕТЛАЯ ТЕМА ГАЛЕРЕИ ===== */

body.light-theme .gallery-page,
body.light-mode .gallery-page,
body[data-theme="light"] .gallery-page {
    background:
        radial-gradient(circle at 15% 10%, rgba(150, 110, 255, .12), transparent 35%),
        linear-gradient(135deg, #f5f1ff, #eeeaff 55%, #f8f5ff);
    color: #24183f;
    transition: background .4s ease, color .4s ease;
}

body.light-theme .gallery-heading h1,
body.light-mode .gallery-heading h1,
body[data-theme="light"] .gallery-heading h1 {
    color: #251744;
}

body.light-theme .gallery-heading p,
body.light-mode .gallery-heading p,
body[data-theme="light"] .gallery-heading p {
    color: #76688f;
}

body.light-theme .gallery-count,
body.light-mode .gallery-count,
body[data-theme="light"] .gallery-count {
    background: rgba(255,255,255,.65);
    border: 1px solid rgba(120,80,210,.15);
    color: #7045df;
}

body.light-theme .gallery-grid > *,
body.light-mode .gallery-grid > *,
body[data-theme="light"] .gallery-grid > * {
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(125,90,210,.17);
    box-shadow: 0 8px 28px rgba(75,45,130,.09);
    color: #281b43;
}

body.light-theme .gallery-grid > *:hover,
body.light-mode .gallery-grid > *:hover,
body[data-theme="light"] .gallery-grid > *:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(115,75,220,.2);
}

body.light-theme .gallery-empty,
body.light-mode .gallery-empty,
body[data-theme="light"] .gallery-empty {
    color: #51436c;
}

/* Плавное появление карточек */

.gallery-grid > * {
    animation: galleryAppear .65s ease both;
    transition: transform .3s ease, box-shadow .3s ease;
}

@keyframes galleryAppear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== СВЕТЛЯЧКИ ===== */

.gallery-sparkle {
    position: fixed;
    z-index: 5;
    pointer-events: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #bda0ff;
    box-shadow: 0 0 8px 3px rgba(157,105,255,.65),
                0 0 20px rgba(157,105,255,.35);
    animation: sparkleFloat 3s ease-out forwards;
}

@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(.3);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    80% {
        opacity: .8;
    }
    100% {
        opacity: 0;
        transform: translateY(-45px) scale(.2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-grid > *,
    .gallery-sparkle {
        animation: none !important;
    }
}


/* =====================================
   VENUS GALLERY — НОВЫЙ ДИЗАЙН
===================================== */

.gallery-page {
    min-height: calc(100vh - 80px);
    padding: 40px 0 90px;
    box-sizing: border-box;
    transition: background .4s ease, color .4s ease;
}

.gallery-content {
    max-width: 1500px;
    margin: auto;
    padding: 0 35px;
    box-sizing: border-box;
}

/* Заголовок */

.gallery-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 25px;
    margin-bottom: 30px;
}

.gallery-heading h1 {
    font-size: clamp(36px, 4vw, 50px);
    font-weight: 800;
    margin: 10px 0;
}

.gallery-heading p {
    font-size: 18px;
    margin: 0;
}

.gallery-count {
    padding: 13px 20px;
    border-radius: 15px;
    white-space: nowrap;
    font-weight: 700;
}

/* Общая рамка */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;

    min-height: 300px;
    padding: 25px;

    border-radius: 24px;
    border: 1px solid rgba(140, 105, 255, .3);

    background: rgba(130, 100, 200, .035);

    box-shadow: 0 10px 35px rgba(60, 30, 120, .08);
}

/* Карточки */

.gallery-grid > * {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 20px;

    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;

    animation: galleryAppear .7s ease both;
}

.gallery-grid > *:hover {
    transform: translateY(-7px);
}

/* Светлая тема */

body:not(.dark) .gallery-page {
    background:
        radial-gradient(
            ellipse at 10% 10%,
            rgba(154, 117, 255, .15),
            transparent 38%
        ),
        linear-gradient(135deg, #f7f4ff, #eee9ff);

    color: #271b43;
}

body:not(.dark) .gallery-heading h1 {
    color: #291b48;
}

body:not(.dark) .gallery-heading p {
    color: #76688e;
}

body:not(.dark) .gallery-count {
    color: #7045dc;
    background: rgba(255,255,255,.8);
    border: 1px solid #dfd4ff;
}

body:not(.dark) .gallery-grid {
    background: rgba(255,255,255,.48);
    border-color: rgba(130,90,220,.25);
}

body:not(.dark) .gallery-grid > * {
    background: #fff;
    color: #281c43;
    border: 1px solid #e7defb;
    box-shadow: 0 8px 25px rgba(70,40,130,.1);
}

body:not(.dark) .gallery-grid > *:hover {
    box-shadow: 0 16px 35px rgba(112,70,220,.2);
}

/* Тёмная тема */

body.dark .gallery-page {
    background:
        radial-gradient(
            ellipse at 10% 5%,
            rgba(112,66,220,.18),
            transparent 38%
        ),
        linear-gradient(135deg, #151027, #0b0916 75%);

    color: #f4efff;
}

body.dark .gallery-heading h1 {
    color: #f4efff;
}

body.dark .gallery-heading p {
    color: #b6a8d8;
}

body.dark .gallery-count {
    color: #c2a9ff;
    background: rgba(100,65,170,.13);
    border: 1px solid rgba(158,120,255,.24);
}

body.dark .gallery-grid {
    background: rgba(100,70,160,.07);
    border-color: rgba(155,115,255,.25);
}

body.dark .gallery-grid > * {
    background: #1b1530;
    color: #f5efff;
    border: 1px solid rgba(160,120,255,.24);
    box-shadow: 0 8px 28px rgba(0,0,0,.25);
}

body.dark .gallery-grid > *:hover {
    box-shadow: 0 15px 38px rgba(120,75,255,.2);
}

/* Появление карточек */

@keyframes galleryAppear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптация */

@media (max-width: 1000px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .gallery-content {
        padding: 0 16px;
    }

    .gallery-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        padding: 13px;
        gap: 18px;
    }
}


/* ===== СВЕТЛЫЙ ФУТЕР ===== */

body:not(.dark) footer,
body:not(.dark) #contacts {
    background: linear-gradient(135deg, #eee8ff, #e5dcff) !important;
    color: #291b48 !important;
    border-top: 1px solid rgba(120, 80, 210, .2);
    transition: background .4s ease, color .4s ease;
}

body:not(.dark) footer h3,
body:not(.dark) footer p,
body:not(.dark) footer small,
body:not(.dark) footer a {
    color: #51416f !important;
}

body:not(.dark) footer a:hover {
    color: #7545ed !important;
}

body:not(.dark) footer .footer-grid {
    border-color: rgba(120, 80, 210, .2);
}

/* ===== ТЁМНЫЙ ФУТЕР ===== */

body.dark footer,
body.dark #contacts {
    background: linear-gradient(135deg, #11101d, #090812) !important;
    color: #f4efff !important;
    border-top: 1px solid rgba(150, 110, 255, .2);
}

body.dark footer h3,
body.dark footer p,
body.dark footer small,
body.dark footer a {
    color: #d0c4ed !important;
}



/* ==========================================
   VENUS — НОВОЕ ОКНО ПРОСМОТРА ФОТОГРАФИЙ
========================================== */

/* Затемнение фона */

.gallery-detail-modal {
    padding: 20px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.gallery-detail-backdrop {
    background: rgba(12, 8, 25, .82);
    backdrop-filter: blur(18px);
}

/* Основное окно */

.gallery-lightbox {
    width: min(1500px, 100%);
    height: min(900px, 94vh);
    max-height: 94vh;

    display: grid;
    grid-template-rows: 62px minmax(0, 1fr) 34px;

    overflow: hidden;
    border-radius: 24px;

    background: #151126;
    border: 1px solid rgba(164, 130, 255, .35);

    box-shadow:
        0 30px 100px rgba(0, 0, 0, .5),
        0 0 35px rgba(125, 82, 255, .13);

    animation: venusModalAppear .35s ease both;
}

@keyframes venusModalAppear {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Верхняя панель */

.gallery-lightbox-top {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;

    border-bottom: 1px solid rgba(160, 130, 255, .17);
    background: rgba(255, 255, 255, .025);
}

.gallery-lightbox-top-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-lightbox-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 11px;

    color: #b69aff;
    background: rgba(135, 95, 255, .15);
}

.gallery-lightbox-counter {
    color: #d3c5ff;
    font-size: 14px;
    font-weight: 800;
}

.gallery-lightbox-tools {
    display: flex;
    gap: 9px;
}

.gallery-tool-btn {
    width: 39px;
    height: 38px;
    border-radius: 11px;

    border: 1px solid rgba(169, 137, 255, .28);
    background: rgba(116, 81, 190, .14);
    color: #eee7ff;

    font-size: 21px;
    cursor: pointer;

    transition: .25s ease;
}

.gallery-tool-btn:hover {
    background: #6845ce;
    border-color: #a78aff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(125, 80, 255, .3);
}

/* Две колонки */

.gallery-lightbox-content {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    overflow: hidden;
}

/* Левая область фотографии */

.gallery-photo-area {
    position: relative;
    min-width: 0;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            ellipse at center,
            rgba(106, 72, 190, .18),
            transparent 65%
        ),
        #0e0b19;

    border-right: 1px solid rgba(160, 130, 255, .15);
}

.gallery-lightbox-stage {
    width: 100%;
    height: 100%;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 28px 75px;
    overflow: auto;
    box-sizing: border-box;
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 9px;

    opacity: 0;
    transform: scale(.97);

    transition:
        opacity .35s ease,
        transform .3s ease;

    box-shadow:
        0 12px 45px rgba(0, 0, 0, .35),
        0 0 25px rgba(148, 105, 255, .13);
}

.gallery-lightbox-image.image-visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-lightbox-stage.is-zoomed {
    cursor: zoom-out;
}

/* Стрелки */

.gallery-nav {
    top: 50%;
    transform: translateY(-50%);

    width: 47px;
    height: 55px;

    border-radius: 15px;
    border: 1px solid rgba(180, 150, 255, .3);

    background: rgba(33, 25, 57, .8);
    color: #fff;

    font-size: 36px;

    backdrop-filter: blur(10px);
}

.gallery-nav:hover {
    transform: translateY(-50%) scale(1.08);
    background: #6949c7;
}

.gallery-prev {
    left: 16px;
}

.gallery-next {
    right: 16px;
}

/* Правая информационная панель */

.gallery-info-panel {
    position: relative;
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    padding: 38px 30px 24px;
    overflow-y: auto;
    box-sizing: border-box;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(132, 91, 235, .16),
            transparent 42%
        ),
        #19132b;
}

.gallery-info-decoration {
    position: absolute;
    top: 20px;
    right: 25px;

    display: flex;
    gap: 8px;

    color: rgba(179, 147, 255, .65);
    font-size: 20px;
}

.gallery-info-category {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    width: fit-content;
    padding: 8px 13px;

    border-radius: 30px;
    border: 1px solid rgba(161, 127, 255, .22);

    background: rgba(128, 87, 220, .12);
    color: #c2aaff;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.gallery-info-category-icon {
    font-size: 17px;
}

.gallery-lightbox-title {
    margin: 28px 0 18px;

    color: #f5f0ff;
    font-size: clamp(24px, 2.3vw, 34px);
    line-height: 1.2;
    font-weight: 800;

    overflow-wrap: anywhere;
}

.gallery-info-date {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 15px;

    border: 1px solid rgba(157, 124, 255, .18);
    border-radius: 13px;

    background: rgba(122, 82, 200, .09);
    color: #c8b7ef;

    font-size: 13px;
}

.gallery-info-date > span {
    font-size: 19px;
    color: #b69aff;
}

.gallery-info-divider {
    height: 1px;
    margin: 27px 0;

    background: linear-gradient(
        90deg,
        rgba(162, 124, 255, .55),
        transparent
    );
}

.gallery-description-heading {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0 0 15px;

    color: #e8ddff;
    font-size: 16px;
    font-weight: 800;
}

.gallery-description-heading span {
    color: #b99aff;
}

.gallery-lightbox-description {
    max-height: none;
    margin: 0;

    color: #c5badc;
    font-size: 14px;
    line-height: 1.85;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow: visible;
}

.gallery-info-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: auto;
    padding-top: 35px;

    color: #81719f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
}

.gallery-info-bottom span:last-child {
    color: #ad8aff;
    font-size: 22px;
}

/* Нижняя панель подсказок */

.gallery-lightbox-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;

    border-top: 1px solid rgba(160, 130, 255, .13);

    color: #8e81ad;
    font-size: 11px;
}

/* ==========================================
   СВЕТЛАЯ ТЕМА — ОКНО ПРОСМОТРА
========================================== */

body:not(.dark) .gallery-lightbox {
    background: #faf8ff;
    border-color: #ded2ff;

    box-shadow:
        0 30px 90px rgba(70, 45, 130, .22),
        0 0 35px rgba(130, 90, 220, .12);
}

body:not(.dark) .gallery-lightbox-top {
    background: #fff;
    border-color: #e8dfff;
    color: #4d347e;
}

body:not(.dark) .gallery-lightbox-counter {
    color: #6442b0;
}

body:not(.dark) .gallery-tool-btn {
    background: #f0eaff;
    color: #6543bd;
    border-color: #ded1ff;
}

body:not(.dark) .gallery-tool-btn:hover {
    color: #fff;
    background: #704ce0;
}

body:not(.dark) .gallery-photo-area {
    background:
        radial-gradient(
            ellipse,
            rgba(173, 140, 255, .18),
            transparent 70%
        ),
        #eee9fb;

    border-color: #e4d9fa;
}

body:not(.dark) .gallery-info-panel {
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(160, 120, 245, .12),
            transparent 45%
        ),
        #fff;

    color: #291b48;
}

body:not(.dark) .gallery-info-category {
    color: #7048c6;
    background: #f2edff;
    border-color: #e0d3ff;
}

body:not(.dark) .gallery-lightbox-title {
    color: #291b48;
}

body:not(.dark) .gallery-info-date {
    color: #67577f;
    background: #f8f5ff;
    border-color: #e8def9;
}

body:not(.dark) .gallery-info-date > span,
body:not(.dark) .gallery-description-heading,
body:not(.dark) .gallery-description-heading span {
    color: #7955cb;
}

body:not(.dark) .gallery-info-divider {
    background: linear-gradient(
        90deg,
        #b99aff,
        transparent
    );
}

body:not(.dark) .gallery-lightbox-description {
    color: #655777;
}

body:not(.dark) .gallery-info-bottom {
    color: #9586ad;
}

body:not(.dark) .gallery-lightbox-hint {
    color: #817398;
    border-color: #e8def9;
    background: #faf8ff;
}

/* ==========================================
   СВЕТЛАЯ И ТЁМНАЯ ТЕМА ОСНОВНОЙ ГАЛЕРЕИ
========================================== */

body:not(.dark) .gallery-card {
    background: #fff;
    color: #291b48;
    border-color: #e5dbfa;
}

body:not(.dark) .gallery-card-title {
    color: #291b48;
}

body:not(.dark) .gallery-card-description {
    color: #76688e;
}

body:not(.dark) .gallery-card-footer {
    border-color: #e9e0f8;
    color: #9183a8;
}

body:not(.dark) .gallery-open-label {
    color: #7148d2;
}

body:not(.dark) .gallery-empty {
    background: #fff;
    color: #291b48;
    border-color: #d9cbf5;
}

body.dark .gallery-card {
    background: #1b1530;
    color: #f4efff;
}

body.dark .gallery-card-title {
    color: #f4efff;
}

body.dark .gallery-card-description {
    color: #b6a8d8;
}

body.dark .gallery-card-footer {
    border-color: #342a55;
}

/* ==========================================
   АДАПТАЦИЯ ПОД ТЕЛЕФОНЫ И ПЛАНШЕТЫ
========================================== */

@media (max-width: 900px) {
    .gallery-lightbox-content {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .gallery-info-panel {
        padding: 28px 22px 20px;
    }

    .gallery-lightbox-stage {
        padding: 20px 55px;
    }
}

@media (max-width: 650px) {
    .gallery-detail-modal {
        padding: 6px;
    }

    .gallery-lightbox {
        height: 96vh;
        max-height: 96vh;
        border-radius: 16px;

        grid-template-rows: 52px minmax(0, 1fr) 30px;
    }

    .gallery-lightbox-content {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(220px, 1fr) auto;
        overflow-y: auto;
    }

    .gallery-photo-area {
        min-height: 230px;
        border-right: 0;
        border-bottom: 1px solid rgba(160, 130, 255, .18);
    }

    .gallery-lightbox-stage {
        padding: 15px 48px;
    }

    .gallery-info-panel {
        padding: 23px 20px 18px;
        overflow: visible;
    }

    .gallery-lightbox-title {
        margin: 17px 0 14px;
        font-size: 23px;
    }

    .gallery-info-divider {
        margin: 18px 0;
    }

    .gallery-info-bottom {
        padding-top: 20px;
    }

    .gallery-lightbox-hint {
        gap: 10px;
        font-size: 9px;
    }

    .gallery-lightbox-top {
        padding: 0 10px;
    }

    .gallery-lightbox-tools {
        gap: 5px;
    }

    .gallery-tool-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .gallery-nav {
        width: 34px;
        height: 44px;
        font-size: 30px;
    }
}

@media (max-width: 380px) {
    .gallery-lightbox-hint span {
        font-size: 8px;
    }

    .gallery-lightbox-title {
        font-size: 20px;
    }
}

/* Учитываем настройки доступности */

@media (prefers-reduced-motion: reduce) {
    .gallery-lightbox,
    .gallery-lightbox-image,
    .gallery-tool-btn,
    .gallery-nav {
        animation: none !important;
        transition: none !important;
    }
}
