/* ------------------------------------------- */
/*                  СБРОС                      */
/* ------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ------------------------------------------- */
/*        БАЗОВЫЕ СТИЛИ + ФОНОВОЕ ИЗОБРАЖЕНИЕ   */
/* ------------------------------------------- */
html, body {
	scroll-behavior: smooth;
	scrollbar-width: none;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    color: #00ffea;
}

/* Стили для анимации падающих букв */
.falling-text {
    font-size: 3em;
    font-weight: bold;
    display: inline-block;
}

.falling-text span {
    display: inline-block;
    opacity: 0;
    animation: fall 1s forwards;
}

.falling-text span:nth-child(1) {
    animation-delay: 0s;
}
.falling-text span:nth-child(2) {
    animation-delay: 0.1s;
}
.falling-text span:nth-child(3) {
    animation-delay: 0.2s;
}
.falling-text span:nth-child(4) {
    animation-delay: 0.3s;
}
.falling-text span:nth-child(5) {
    animation-delay: 0.4s;
}
.falling-text span:nth-child(6) {
    animation-delay: 0.5s;
}
.falling-text span:nth-child(7) {
    animation-delay: 0.6s;
}
.falling-text span:nth-child(8) {
    animation-delay: 0.7s;
}
.falling-text span:nth-child(9) {
    animation-delay: 0.8s;
}
.falling-text span:nth-child(10) {
    animation-delay: 0.9s;
}
.falling-text span:nth-child(11) {
    animation-delay: 1s;
}
.falling-text span:nth-child(12) {
    animation-delay: 1.1s;
}
.falling-text span:nth-child(13) {
    animation-delay: 1.2s;
}
.falling-text span:nth-child(14) {
    animation-delay: 1.3s;
}
.falling-text span:nth-child(15) {
    animation-delay: 1.4s;
}
.falling-text span:nth-child(16) {
    animation-delay: 1.5s;
}
.falling-text span:nth-child(17) {
    animation-delay: 1.6s;
}
.falling-text span:nth-child(18) {
    animation-delay: 1.7s;
}
.falling-text span:nth-child(19) {
    animation-delay: 1.8s;
}
.falling-text span:nth-child(20) {
    animation-delay: 1.9s;
}
.falling-text span:nth-child(21) {
    animation-delay: 2s;
}
.falling-text span:nth-child(22) {
    animation-delay: 2.1s;
}
.falling-text span:nth-child(23) {
    animation-delay: 2.2s;
}
.falling-text span:nth-child(24) {
    animation-delay: 2.3s;
}
.falling-text span:nth-child(25) {
    animation-delay: 2.4s;
}
.falling-text span:nth-child(26) {
    animation-delay: 2.5s;
}
.falling-text span:nth-child(27) {
    animation-delay: 2.6s;
}
.falling-text span:nth-child(28) {
    animation-delay: 2.7s;
}
.falling-text span:nth-child(29) {
    animation-delay: 2.8s;
}
.falling-text span:nth-child(30) {
    animation-delay: 2.9s;
}
.falling-text span:nth-child(31) {
    animation-delay: 3.0s;
}
.falling-text span:nth-child(32) {
    animation-delay: 3.1s;
}
.falling-text span:nth-child(33) {
    animation-delay: 3.2s;
}
.falling-text span:nth-child(34) {
    animation-delay: 3.3s;
}
.falling-text span:nth-child(35) {
    animation-delay: 3.4s;
}

/* Определение анимации падения */
@keyframes fall {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

body {
    background-image: url("pic/изгип3.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ------------------------------------------- */
/*                 ЗАТЕМНЕНИЕ                  */
/* ------------------------------------------- */
.overlay {
    background: rgba(0, 0, 0, 0);
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ------------------------------------------- */
/*                     HEADER                  */
/* ------------------------------------------- */
header {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    background: linear-gradient(90deg, #090979, #090979);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #86fce0f7;
    text-shadow: 0 0 5px #ffcf40,
                 0 0 10px #ffcf40,
                 0 0 20px #ff6c00,
                 0 0 30px #ff6c00;
    font-size: 2.5rem;
    transition: font-size 0.3s;
}

nav a {
    color: #fff;
    margin-left: 20px;
    text-decoration: none;
    font-size: 18px;
    transition: 0.3s;
}
nav a:hover { color: #f40606; }

.btn-gallery {
    margin-top: 5px;
    padding: 12px 18px;
    background: linear-gradient(90deg, #e3212100, #5c697500);
    color: #093cd5;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}
.btn-gallery:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(244, 6, 6, 0.8);
}

/* ------------------------------------------- */
/*              ОСНОВНОЙ КОНТЕНТ               */
/* ------------------------------------------- */
.main-content { flex-grow: 1; padding: 10px; }

.hero {
    padding-top: 120px;
    text-align: center;
    animation: fadeIn 5s ease;
}

.hero h2 { font-size: 48px; margin-bottom: 20px; }
.hero p {
    font-size: 22px;
    max-width: 600px;
    margin: auto;
}

.section {
    padding: 80px 20px;
    text-align: center;
}

.folder-gallery h3 {
	text-align: center; /* Центрируем текст */
	font-weight: bold; /* Жирный текст */
	color: #fff; /* Белый цвет текста */
}

/* ------------------------------------------- */
/*                   ГАЛЕРЕЯ                   */
/* ------------------------------------------- */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.gallery-thumb {
    width: 180px;
    height: 140px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s;
}
.gallery-thumb:hover { transform: scale(1.05); }

/* ------------------- */
/*  МОДАЛКА */
/* ------------------- */
#viewer {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .95);
    z-index: 9999;
}

#viewer.show {
    display: flex;
    overflow: hidden;
}

#viewerImg {
    max-width: 90%;
    max-height: 70vh;
    border-radius: 12px;
    position: relative;
    z-index: 10;
	transition: transform 0.3s ease; /* Плавное увеличение/уменьшение */
    cursor: pointer; /* Курсор изменяется при увеличении */
}

/* Кнопка закрытия */
#closeViewer {
    position: fixed;
    top: 15px;
    right: 15px;
    font-size: clamp(28px, 6vw, 50px);
    color: white;
    cursor: pointer;
    z-index: 100000;
    transition: transform 0.2s;
}
#closeViewer:hover {
    transform: scale(3.15);
    color: #FF0000;
}

#prevBtn, #nextBtn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 10001;
}

#prevBtn { left: 20px; }
#nextBtn { right: 20px; }

#caption {
    color: #fff;
    margin-top: 10px;
    font-size: 18px;
    z-index: 20;
}
#prevBtn:hover, #nextBtn:hover { color: #48E888; }

/* ------------------------------------------- */
/*                     ВИДЕО                   */
/* ------------------------------------------- */
#viewerVideo {
    width: 100%;
    max-width: 90%;
    max-height: 90vh;
    background-color: black;
    object-fit: contain;
    border-radius: 5px;
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
	justify-items: center;
}
.video-thumbnail {
    width: 100%;
    max-width: 200px;
    transition: 0.2s;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.video-thumbnail:hover { transform: scale(1.05); }

/* ------------------------------------------- */
/*                     ФУТЕР                   */
/* ------------------------------------------- */
footer {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: #00ffea;
    font-size: 0.4em;
    z-index: 2;

    pointer-events: none; /* 🔥 ключевая строчка */
}

/* ------------------------------------------- */
/*                  АНИМАЦИИ                  */
/* ------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes swipeLeftClose {
    from { transform: translateX(0) scale(1); opacity: 1; }
    to   { transform: translateX(-150%) scale(0.8); opacity: 0; }
}
.swipe-left-close { animation: swipeLeftClose 0.4s ease forwards; }

/* ------------------------------------------- */
/*                МЕДИА-ЗАПРОСЫ                */
/* ------------------------------------------- */

/* Фон */
@media (max-width: 768px) {
    body { background-image: url('pic/изгип3х768.webp'); }
}
@media (max-width: 480px) {
    body { background-image: url('pic/изгип3х480.webp'); font-size: 14px; }
	header {padding: 20px 0px;}
}

/* 1024 */
@media (max-width: 1024px) {
    #closeViewer { font-size: 30px; }
    #viewerVideo { max-width: 95%; max-height: 85vh; }
}

/* 768 */
@media (max-width: 768px) {
    #closeViewer { font-size: 25px; }
    #viewerVideo { max-height: 80vh; }
    .video-gallery { grid-template-columns: 1fr; }
    footer p { font-size: 14px; }
}

/* 480 */
@media (max-width: 480px) {
    #closeViewer {
        font-size: clamp(40px, 12vw, 65px);
        top: 10px;
        right: 10px;
    }
    #viewerVideo { max-height: 75vh; }
    footer p { font-size: 12px; }
}

/* 320 */
@media (max-width: 320px) {
    #closeViewer { font-size: 20px; }
    footer p { font-size: 10px; }
}
