/* Общие настройки сброса стилей */
* { 
    box-sizing: border-box; 
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #24292e;
    background-color: #f6f8fa;
    margin: 0;
}

.sidebar {
  scrollbar-width: thin; /* Тонкий скроллбар для Firefox */
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Цвета для Firefox */
}
.sidebar::-webkit-scrollbar {
  width: 5px; /* Делаем его ультратонким, всего 5 пикселей */
}
.sidebar::-webkit-scrollbar-track {
  background: transparent; /* Полностью прозрачная подложка, чтобы не выделялась */
}
.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  transition: background-color 0.3s ease;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3); 
}

/* Главный контейнер-сетка */
.wrapper { 
    display: flex;
    min-height: 100vh;
    background-color: #eaedf1;
}

/* Боковое динамическое меню */
.sidebar {
    flex: 0 0 280px;
    padding: 30px 5px 30px 10px;
    background: #f2f4f7;
    border-right: 1px solid #e1e4e8;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar .logo { 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 30px; 
    color: #0366d6; 
}
.sidebar ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}
.sidebar a {
    text-decoration: none;
    color: #1f1f22;
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.2;
    transition: background 0.2s, color 0.2s;
}
.sidebar a:hover { 
    background: #e3e6ea; 
    color: #24292e; 
}
.sidebar a.active { 
    background: #e3e6ea; 
    color: #000; 
    font-weight: 600; 
}

/* Основная область чтения */
.content-area { 
    flex: 1; 
    min-width: 0;
    margin: 26px 20px 22px;
    padding: 26px 52px 32px;
    border-radius: 24px;
    background: #fff; 
    display: flex; 
    justify-content: center; 
    overflow: hidden;
}
.prose { 
    max-width: 1160px; 
    width: 100%; 
}

/* Красивое оформление элементов Markdown для чтения трактатов */
.prose h1 { 
    font-size: 32px; 
    border-bottom: 1px solid #eaecef; 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
    color: #111;
}
.prose h2 { 
    font-size: 24px; 
    border-bottom: 1px solid #eaecef; 
    padding-bottom: 6px; 
    margin-top: 40px; 
    color: #111;
}
.prose h3 { 
    font-size: 20px; 
    margin-top: 30px; 
    color: #222;
}
.prose p { 
    font-size: 16px; 
    margin-bottom: 16px; 
    color: #24292e; 
}

.prose a { 
    color: #0366d6;
}

.prose strong { 
    padding-right: 4px;
}

/* Таблицы для фиксации технических параметров */
.prose table { 
    border-collapse: collapse; 
    width: 100%; 
    margin: 20px 0; 
}
.prose th, .prose td { 
    border: 1px solid #dfe2e5; 
    padding: 10px 15px; 
    font-size: 15px; 
}
.prose th { 
    background-color: #f6f8fa; 
    font-weight: 600; 
}

/* Цитаты и важные мысли */
.prose blockquote { 
    border-left: 4px solid #0366d6; 
    padding: 0 20px; 
    color: #586069; 
    margin: 25px 0; 
    font-style: italic;
}

/* Кнопки постраничной навигации в самом низу текста */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eaecef;
}
.nav-btn {
    text-decoration: none;
    color: #0366d6;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 20px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background-color: #fafbfc;
    transition: all 0.2s ease;
}
.nav-btn:hover {
    background-color: #f3f4f6;
    border-color: #0366d6;
}
.next-btn { 
    margin-left: auto; /* Сдвигает кнопку "Вперед" вправо, если нет предыдущей */
}

.mobile-menu-toggle {
    display: none; /* На десктопе кнопка полностью скрыта */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 999;
    width: 44px;
    height: 44px;
    background: #0366d6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(3, 102, 214, 0.3);
}
.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    transition: all 0.2s ease;
}

/* Анимация превращения гамбургер-полосок в крестик при активации */
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-footer {
    background-color: #0b0f15; /* Глубокий темный фон, как в лайтбоксе */
    color: #94a3b8;
    padding: 50px 60px 20px;
    font-size: 14px;
    border-top: 1px solid #1e293b;
    font-family: inherit;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-disclaimer {
    width: 100%; /* Растягиваем на всю ширину над столбцами */
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #1e293b; /* Аккуратная разделительная линия */
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.disclaimer-label {
    display: inline-block;
    color: rgb(41, 98, 255); /* НАШ фирменный синий */
    font-size: 18px;
    font-weight: bold;
    letter-spacing: .02em;
    margin-bottom: 15px;
}

.footer-disclaimer p {
    margin: 0;
    color: #64748b; /* Спокойный приглушенный цвет */
    line-height: 1.4;
    font-style: italic; /* Выделяем как экспертное примечание */
}

.footer-brand h4 {
    color: rgb(41, 98, 255); /* НАШ синий акцент */
    font-size: 18px;
    letter-spacing: .02em;
    margin: 0 0 15px 0;
}

.footer-brand p {
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.footer-meta {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

.footer-links h5, .footer-status h5 {
    color: #f8fafc;
    font-size: 15px;
    margin: 0 0 15px 0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: rgb(41, 98, 255); /* НАШ синий при наведении */
}

/* Стили для статусных пасхалок */
.status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.status-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: #cbd5e1;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981; /* Зеленый огонек работающей системы */
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

#waveCanvas {
    position: absolute;
    top: -196px;
    right: 0;
    width: 100%;  /* Размеры теперь живут здесь */
    max-width: 500px;
    height: 450px; /* Размеры теперь живут здесь */
    z-index: 1;
    opacity: 0.62;
    pointer-events: none;
}



/* ПРЕМИАЛЬНЫЙ ТРЁХМЕРНЫЙ СЛАЙДЕР — РЕЗИНОВАЯ СБОРКА С ФИКСОМ НАЕЗДА НА ФУТЕР */
.index-contrast-section {
    margin: 0 -60px;
}

.premium-slider-wrapper {
    position: relative;
    width: 100%; /* Строго держимся в рамках 1160px контента */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
    box-sizing: border-box;
}

.premium-slider {
    position: relative;
    width: 100%;
    padding-top: calc(53% + 80px);
}

/* БАЗОВОЕ СОСТОЯНИЕ СЛАЙДА — ПОЛНАЯ РЕЗИНА */
.p-slide {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%; /* Главный слайд во всю ширину контента */
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15); /* Твоя плотная тень из дебагера */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    /* Базовый сдвиг */
    transform: translate3d(-50%, 0, 0) scale(0.7);
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.45s ease, 
                visibility 0.45s ease;
    cursor: pointer;
}

.p-slide-img {
    width: 100%;
    flex: 1;
    aspect-ratio: 16 / 9; 
    overflow: hidden;
}

.p-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p-slide-caption {
    padding: 7px 0 10px;
    line-height: 1.4;
    background: #f2f4f7;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #000;
}

/* СОСТОЯНИЕ 1: ЦЕНТРАЛЬНЫЙ АКТИВНЫЙ СЛАЙД */
.p-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
    transform: translate3d(-50%, 0, 0) scale(1);
}

/* СОСТОЯНИЕ 2: ПЕРВОЕ УШКО СПРАВА */
.p-slide.next {
    opacity: 0.9;
    visibility: visible;
    z-index: 5;
    transform: translate3d(-40%, 0, 0) scale(0.86); 
}

/* СОСТОЯНИЕ 3: ПЕРВОЕ УШКО СЛЕВА */
.p-slide.prev {
    opacity: 0.9;
    visibility: visible;
    z-index: 5;
    transform: translate3d(-60%, 0, 0) scale(0.86);
}

/* СОСТОЯНИЕ 4: ВТОРОЕ ДВОЙНОЕ УШКО СПРАВА */
.p-slide.next-deep {
    opacity: 0.8;
    visibility: visible;
    z-index: 2;
    transform: translate3d(-31%, 0, 0) scale(0.74);
}

/* СОСТОЯНИЕ 5: ВТОРОЕ ДВОЙНОЕ УШКО СЛЕВА */
.p-slide.prev-deep {
    opacity: 0.8;
    visibility: visible;
    z-index: 2;
    transform: translate3d(-69%, 0, 0) scale(0.74);
}

/* КНОПКИ-НЕВИДИМКИ ДЛЯ СМАРТФОНОВ */
.slider-tap-zone {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    z-index: 99 !important; 
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1024px) {
    .slider-tap-zone {
        display: block;
    }
    .zone-left {
        left: 0;
        right: auto;
    }
    .zone-right {
        right: 0;
        left: auto;
    }
}

/* БЛОК 2: РАЗРЫВ ШАБЛОНА */
.dvc-disruptor {
    padding: 40px 0;
    text-align: center;
}

/* Интерактивный указатель с анимацией */
.disruptor-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 40px;
}

.disruptor-arrow .arrow-icon {
    width: 256px;
    height: 128px;
    background: url(/i/ico/arrow-down.webp) center no-repeat;
    animation: bounceArrow 2s infinite ease-in-out;
    will-change: transform;
}

.disruptor-arrow .arrow-text {
    position: absolute;
    top: 10%;
    font-size: 74px;
    font-weight: bold;
    color: #fff;
}

/* Витрина официального инструментария */
.museum-tools-grid {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.tools-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.tools-caption {
    margin: 0 !important;
    padding: 7px 0 10px;
    line-height: 1.4;
    background: #f2f4f7;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #000 !important;
}

/* Финальный хук и премиальная кнопка */
.cta-funnel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.cta-title {
    font-size: 1.4rem;
    font-weight: 400;
    max-width: 700px;
    line-height: 1.4;
}

.dvc-premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    background: #151922;
    border: 1px solid #2c3545;
    border-radius: 4px;
    color: #fff !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Эффекты наведения кнопки */
.dvc-premium-btn:hover {
    background: #1f2533;
    border-color: #38ef7d;
    box-shadow: 0 0 20px rgba(56, 239, 125, 0.35);
}

.dvc-premium-btn .btn-arrow {
    transition: transform 0.3s ease;
}

.dvc-premium-btn:hover .btn-arrow {
    transform: translateX(5px);
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* Базовый изолированный контейнер */
.macro-blocks-container {
  width: 100%;
  padding-bottom: 60px;
}

.macro-section {
  padding-top: 20px;
}

.macro-title {
}

/* Флекс-контейнер для ссылок с поддержкой CSS-карусели */
.macro-nav-scroll {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 7px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.macro-nav-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .1) transparent;
}
.macro-nav-scroll::-webkit-scrollbar {
  width: 5px;
}
.macro-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.macro-nav-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, .1);
  border-radius: 10px;
  transition: background-color 0.3s ease;
}
.macro-nav-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, .3); 
}

.macro-btn {
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid #e1e4e8;
  background-color: #fafbfc;
  color: #24292e !important;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: .85rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.macro-btn:hover {
  background-color: #f3f4f6;
  border-color: #0366d6;
  box-shadow: 0 0 20px rgba(3, 102, 214, .15);
}

.macro-btn:active {
  transform: scale(0.98);
}

.macro-content p em {
  font-weight: normal;
}

.macro-content p:last-child {
  margin-bottom: 0;
}

.chapter-passport {
  margin: 35px 0;
  padding: 20px;
  background-color: #f2f4f7;
  border-left: 4px solid #e3e6ea;
  border-radius: 10px;
  color: #586069;
}

.chapter-passport em {
  font-weight: normal;
}




/* Адаптивность для мобильных устройств */
@media (max-width: 1024px) {
    .wrapper { 
        flex-direction: column;
        min-width: 320px;
    }
    .sidebar .logo {
        margin-bottom: 15px;
    }
    .post-navigation {
        flex-direction: column;
        gap: 12px;
    }
    .nav-btn {
        text-align: center;
        width: 100%;
    }
    .prose h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    .prose h2 { 
        font-size: 22px;
        line-height: 1.3;
    }
    .prose h3 { 
        font-size: 18px;
        line-height: 1.4;
    }
    .prose p, .prose div, .prose li {
	font-size: 14px;
    }
    .prose ul, .prose ol {
        padding-inline-start: 20px;
    }
    .prose blockquote {
        padding: 0 0 0 8px;
    }

    .mobile-menu-toggle {
        display: flex; /* Активируем кнопку на смартфонах */
    }
    
    /* Сайдбар превращается в скрытую выезжающую оверлей-панель */
    .sidebar {
        position: fixed;
        top: 0;
        left: -320px; /* Прячем её за левую границу экрана */
        width: 320px;
        height: 100vh;
        z-index: 998;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Плавный выезд */
        padding-top: 80px; /* Сдвигаем пункты меню вниз, чтобы не перекрывались кнопкой */
    }
    
    /* Этот класс наш JS будет вешать на сайдбар при клике */
    .sidebar.menu-open {
        left: 0; /* Выезжаем на экран! */
        box-shadow: 5px 0 25px rgba(0,0,0,0.15);
    }
    
    .content-area {
        margin: 5px 5px -20px;
        padding: 76px 10px 62px;
        border-radius: 0 24px 24px 24px;
    }

    .site-footer {
        padding: 40px 15px 20px;
    }
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }
    .footer-disclaimer {
        margin-bottom: 0;
    }
    .footer-status {
        display: none;
    }
    .footer-brand p {
        line-height: 1.4;
    }
    .footer-bottom {
        margin-top: 20px;
    }

    .chapter-passport {
        margin: 25px 0;
        padding: 10px;
    }

    #waveCanvas {
        top: -104px;
        height: 240px;
    }

    .cta-title { font-size: 18px !important; }
    .dvc-premium-btn { font-size: 14px; }
}




/* Монолитный светло-серый контейнер карусели */
.media-carousel-container {
    width: 100%;
    margin: 15px 0 35px;
    padding: 20px 0; /* Оставляем только верх/низ */
    background-color: #f2f4f7;
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

/* Скрываем стандартный уродливый скроллбар браузера для чистоты интерфейса */
.media-carousel-container::-webkit-scrollbar {
    height: 6px;
}
.media-carousel-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}
.media-carousel-container::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 10px;
}

/* Трек-линия, выстраивающая карточки строго в один ряд */
.media-carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    padding: 0 20px;
}

.media-carousel-card {
    flex: 0 0 230px;
    scroll-snap-align: start;
    scroll-margin-left: 20px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.media-carousel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

/* Окно превью */
.media-carousel-preview {
    width: 100%;
    padding-top: 56%;
    background-size: cover;
    background-position: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.media-carousel-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Короткое описание (3-5 слов) */
.media-carousel-description {
    padding: 10px 12px;
    font-size: 12px !important;
    line-height: 1.4;
    color: #343a40;
    font-weight: 600;
    text-align: left;
    white-space: normal; /* Разрешаем перенос только внутри карточки */
}

/* --- СТРОГИЙ ЛАЙТБОКС С ПОЛНЫМ ТЕКСТОМ АННОТАЦИИ --- */
.lightbox {
    display: none !important; /* Жестко скрываем окно по умолчанию, чтобы не вылетало при загрузке */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(11, 15, 21, 0.95);
    backdrop-filter: blur(6px);
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}
.lightbox-content {
    flex: 1;
    height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 110px); /* Оставляем снизу ровно под широкую строку текста */
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.8);
    animation: lightboxZoom 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Сюда теперь прилетает гигантский длинный текст из title */
.lightbox-caption {
    width: 100%; /* Растягиваем на всю доступную ширину */
    color: #f8f9fa;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    background: rgba(33, 37, 41, 0.7);
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    box-sizing: border-box;
}
.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    color: #adb5bd;
    font-size: 36px;
    line-height: 34px;
    text-align: center;
    background-color: rgba(11, 15, 21, 0.65);
    cursor: pointer;
    z-index: 10000;
    transition: color 0.15s;
    user-select: none;
}
.lightbox-close:hover { color: #ffffff; }

.lightbox-nav {
    flex: 0 0 auto; /* Запрещаем стрелкам сжиматься */
    background: rgba(33, 37, 41, 0.8);
    color: #ffffff;
    border: 1px solid #495057;
    font-size: 24px;
    padding: 20px 15px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
    z-index: 10000;
}
.lightbox-nav:hover { 
    background: #21262d; 
    color: #58a6ff; 
    border-color: #58a6ff;
}

@keyframes lightboxZoom {
    from { transform: scale(0.97); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ГОРИЗОНТАЛЬНЫЙ ТРЕК ДЛЯ СВАЙПА */
.lightbox-swipe-track {
    display: flex;
    width: 100%;
    height: calc(100vh - 110px); /* Место под фотку, исключая нижний текст */
    overflow-x: auto; /* Включаем горизонтальный скролл/свайп */
    scroll-snap-type: x mandatory; /* Магнитный свайп */
    -webkit-overflow-scrolling: touch;
}
/* Прячем скроллбары внутри лайтбокса для чистоты */
.lightbox-swipe-track::-webkit-scrollbar {
    display: none;
}

/* Контейнер для каждой отдельной фотки в режиме свайпа */
.lightbox-swipe-item {
    flex: 0 0 100%; /* Каждый элемент занимает ровно 100% ширины контента */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: center; /* Картинка центрируется при свайпе */
}

/* Модифицированные стили картинки: теперь она масштабируется внутри слайд-элемента */
.lightbox-swipe-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.8);
}

@media (pointer: fine) {
    .lightbox-swipe-item.zoomed {
        cursor: zoom-out;
    }

    .lightbox-swipe-item.zoomed img {
        max-width: none !important;
        max-height: none !important;
        /* Уменьшили масштаб до комфортных 1.5, чтобы не было гигантизма */
        transform: scale(1.5); 
        transition: transform 0.05s ease-out; /* Чуть ускорил отклик */
        cursor: zoom-out;
    }

    .lightbox-swipe-item:not(.zoomed) img {
        cursor: zoom-in;
    }
}



/* На мобилках скрываем стрелки, листаем свайпом */
@media (max-width: 768px) {
    .lightbox-nav { display: none; } /* На смартфонах управляем только тапами/свайпами */
    .lightbox-content { margin: 0; }
}

