/* Базовые стили */
body {
    margin: 0;
    background-color: #121018;
    color: #d0cfe8;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #8e5cc6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background-color: #181525;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-container .logo {
    height: 30px;
    width: auto;
}

.company-name {
    color: #8e5cc6;
    font-weight: 700;
    font-size: 1.2rem;
}

nav#mainNav ul {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

nav#mainNav ul::-webkit-scrollbar {
    display: none;
}

nav#mainNav ul li {
    margin: 0 15px;
    flex: 0 0 auto;
}

nav#mainNav ul li a {
    color: #8e5cc6;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    padding: 5px 0;
    display: inline-block;
}

main {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 15px;
}

.hero-video-container {
    width: 100%;
    margin: 0 auto 100px;
}

.hero-video {
    width: 100%;
    height: auto;
}

h2 {
    color: #8e5cc6;
    margin-bottom: 15px;
    border-bottom: 1px solid #442e77;
    padding-bottom: 6px;
}

#work, #reel, #about {
    scroll-margin-top: 60px; /* Отступ для фиксированного хедера */
}

.gallery {
    justify-content: center;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 25px;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.cover {
    min-width: 140px;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(142, 92, 198, 0.4);
}

.cover img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

button#loadMoreBtn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin: 0 auto 150px;
    display: block;
    transition: transform 0.3s ease;
}

.gallery.hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    margin-bottom: 0;
}

.gallery:not(.hidden) {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

#reel {
    margin-top: 50px;
}

.video-container {
    position: relative;
    width: 70%;
    margin: 0 auto 150px;
    padding-bottom: 39%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#about p {
    line-height: 1.6;
    text-align: center;
    margin-bottom: 150px;
}

#contact {
    margin-top: 40px;
    text-align: left;
}

#contact form {
    max-width: 400px;
    margin: 50px auto 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contact input, #contact textarea {
    background-color: #282238;
    border: 1px solid #442e77;
    border-radius: 4px;
    padding: 10px;
    color: #d0cfe8;
    font-size: 1rem;
    resize: vertical;
}

#contact button {
    background-color: #8e5cc6;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact button:hover {
    background-color: #6b3fa7;
}

.contact-info p {
    margin: 5px 0;
    color: #a89ee0;
    text-align: center;
}

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #8e5cc6;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: none;
    box-shadow: 0 0 10px #8e5cc6;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#backToTop svg {
    width: 30px;
    height: 30px;
}

/* Мобильные стили */
@media (max-width: 600px) {
    .company-name {
        display: none;
    }

    nav#mainNav ul li {
        margin: 0 10px;
    }

    main {
        margin: 20px auto;
        padding: 0 10px;
    }

    .hero-video-container {
        margin-bottom: 60px;
    }

    .gallery {
        margin-bottom: 15px;
    }

    button#loadMoreBtn {
        margin-bottom: 90px;
    }

    #reel {
        margin-top: 30px;
    }

    .video-container {
        width: 100%;
        margin-bottom: 90px;
        padding-bottom: 56.25%; /* 16:9 соотношение */
    }

    #about p {
        margin-bottom: 90px;
    }

    #contact {
        margin-top: 20px;
    }

    #contact form {
        margin: 30px auto 10px;
    }

    #backToTop {
        bottom: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }

    #backToTop svg {
        width: 26px;
        height: 26px;
    }
}
