@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Exo:400,700|Orbitron:400,700');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#section1, .section-container, .controls-container, .home-section {
    margin: 0 !important;
    padding: 0 !important;
}

/* Основные стили для body и html */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.header, .top-section, .home-section {
    background-color: transparent;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: -3;
}

/* Фон для секций */
body.bg1::before {
    background-image: url('../images/fon1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
body.bg2::before {
    background-image: url('../images/fon2.webp');
}
body.bg3::before {
    background-image: url('../images/fon3.webp');
}
body.bg4::before {
    background: linear-gradient(to bottom, #ffffff, #808080);
}

/* По умолчанию меню скрыто на мобильных */
.menu-container {
    position: fixed;
    padding: 20px;
    align-items: center;
    box-sizing: border-box;
    top: 0;
    right: 0;
    width: auto;
    min-width: auto;
    max-width: none;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.menu-container.menu-open {
    transform: translateX(0);
}

/* Стиль для полей ввода */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 25px;
    background-color: #f8f8f8;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
    outline: none;
}

/* Кнопка "Войти" */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #404440;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}
button[type="submit"]:hover {
    background-color: #363a36;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Изображения */
.clickable-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}
.clickable-image:hover {
    transform: scale(1.05);
}

body { 
    font-family: 'Exo', sans-serif; 
    overflow: hidden; 
}

.fake-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
}

#section1 {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* Видео-фон для десктопа */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    background: transparent;
}

.video-bg--main {
    pointer-events: none;
}

.video-bg-ambient-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
    background: #000;
    display: none;
}

@media (min-width: 1280px) {
    .video-bg-ambient-wrapper {
        display: block;
    }
}

.video-bg--ambient {
    position: absolute;
    top: 0;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translateX(-50%) scale(1.08);
    transform-origin: center;
    object-fit: cover;
    filter: blur(48px);
    opacity: 0.7;
    will-change: transform;
}

.demo-section {
    position: relative;
    padding: 40px 20px;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
}

.demo-card {
    width: min(700px, 90vw);
    padding: 48px 40px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(16px);
    color: #1a1a1a;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.demo-card__title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.demo-card__subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(26, 26, 26, 0.75);
}

.demo-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 20px;
    color: rgba(26, 26, 26, 0.85);
    font-size: 1rem;
    line-height: 1.6;
}

.demo-credentials {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.demo-credentials__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 1.05rem;
}

.demo-credentials__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(26, 26, 26, 0.6);
    font-weight: 600;
}

.demo-credentials__value {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1f2933;
}

.demo-highlight {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.demo-highlight__eyebrow {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(26, 26, 26, 0.55);
    font-weight: 600;
}

.demo-highlight__text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(26, 26, 26, 0.85);
}

.demo-note {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(26, 26, 26, 0.65);
}

.demo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.demo-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
    background: linear-gradient(120deg, rgba(64, 68, 64, 0.95), rgba(32, 34, 32, 0.85));
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(31, 41, 51, 0.18);
}

.demo-action:hover,
.demo-action:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(31, 41, 51, 0.26);
}

.demo-action--ghost {
    background: rgba(255, 255, 255, 0.75);
    color: #1f2933;
    border: 1px solid rgba(64, 68, 64, 0.4);
}

.demo-action--ghost:hover,
.demo-action--ghost:focus-visible {
    background: rgba(255, 255, 255, 0.9);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .demo-card {
        padding: 36px 28px;
        gap: 20px;
    }

    .demo-credentials {
        gap: 16px;
    }

    .demo-credentials__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .demo-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .demo-action,
    .demo-action--ghost {
        width: 100%;
    }
}

@media screen and (min-aspect-ratio: 21/9) {
    .video-bg--main {
        object-fit: contain;
        object-position: center;
        width: auto;
        height: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    .video-bg-ambient-wrapper {
        display: block;
    }
}

/* Видео-фон для мобильных устройств */
.video-bg-mobile {
    display: none; /* Изначально скрыто на десктопах */
}

.demo-button {
    display: inline-block;
    padding: 15px 30px;
    margin-top: 20px;
    background-color: rgba(50, 50, 50, 0.7);
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    z-index: 10;
    position: relative;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.demo-button:hover {
    background-color: rgba(50, 50, 50, 0.9);
    transform: translateY(-5px);
}

.button-container {
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.button-container:hover .overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Форма логина */
.top-form {
    margin-bottom: 20px;
}
.top-form form {
    display: flex;
    flex-direction: column;
}
.top-form form input {
    margin-bottom: 10px;
    padding: 8px;
    box-sizing: border-box;
}
.top-form form button {
    padding: 8px;
    background: #4e54c8;
    color: #fff;
    border: none;
    cursor: pointer;
}

.sections {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.sections .section {
    display: block;
    padding: 15px 30px;
    margin: 10px 0;
    background-color: rgba(50, 50, 50, 0.7);
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    border: none;
    width: 100%;
    text-align: center;
    appearance: none;
}

.sections .section:hover {
    background-color: rgba(50, 50, 50, 0.9);
    transform: translateY(-5px);
}

.sections .section:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
}

.sections .section.section--active {
    background-color: rgba(65, 65, 65, 0.95);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15) inset;
}

.sections .section--contacts {
    margin-top: auto;
}

/* Гамбургер меню */
.menu-button {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 30px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 100000;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .video-bg {
        display: none; /* Скрываем десктопное видео */
    }
    .video-bg-ambient-wrapper {
        display: none !important;
    }
    .video-bg-mobile {
        display: block; /* Показываем мобильное видео */
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: -1;
    }

    .menu-button {
        display: block;
    }

    .menu-container {
        width: 100vw;
        min-width: 100vw;
    }
}

/* Десктопная адаптация */
@media (min-width: 769px) {
    .menu-button {
        display: none;
    }
    /* На десктопе меню сразу показано */
    .menu-container {
        transform: translateX(0);
    }
}

.info-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: clamp(24px, 5vw, 56px) clamp(28px, 8vw, 96px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.65), rgba(51, 65, 85, 0.4));
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 -30px 60px rgba(15, 23, 42, 0.35);
    color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: clamp(220px, 34vh, 420px);
    z-index: 120;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.45s ease, visibility 0s linear 0.45s;
}

.info-bar--visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
    .info-bar,
    .info-bar--visible {
        transition: none !important;
    }
}

.info-bar__content {
    width: min(1120px, 100%);
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2.8vw, 32px);
}

.info-bar__title {
    font-family: 'Orbitron', 'Exo', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: clamp(1.1rem, 0.8rem + 1.2vw, 2.2rem);
    color: #e2e8f0;
}

.info-bar__line {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.65), rgba(148, 163, 184, 0));
    border-radius: 999px;
}

.info-bar__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(12px, 2vw, 24px);
}

.info-bar__item {
    margin: 0;
    font-size: clamp(0.85rem, 0.75rem + 0.6vw, 1.15rem);
    font-weight: 400;
    color: rgba(226, 232, 240, 0.9);
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.info-bar__item strong {
    font-weight: 600;
    color: #ffffff;
}

@media (max-width: 768px) {
    .info-bar {
        padding: 28px 20px 32px;
        min-height: clamp(260px, 48vh, 520px);
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.5);
    }

    .info-bar__title {
        text-align: center;
        letter-spacing: 0.2em;
    }

    .info-bar__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}