body {
    margin: 0;
    font-family: "Georgia", serif;
    background: linear-gradient(90deg, #000000, #2c2c2c);
    color: white;
    overflow-x: hidden;
    transition: background 0.5s ease-in-out;
}

.container {
    display: flex;
    height: 100vh;
}

.top-right-logo {
    position: fixed;
    top: -2rem;
    right: 1rem;
    z-index: 1000;
}

.top-right-logo img {
    height: 150px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.top-right-logo img:hover {
    opacity: 1;
}

.sidebar {
    position: relative;
    flex: 1;
    padding: 4rem 2rem 3rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: start;
    overflow: hidden;
}

/* Фоновый слой для анимации слайд-смена */
.sidebar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.5);
    transition: transform 0.5s ease;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    z-index: 0;
    transition: transform 0.5s ease;

    opacity: 0;
    transition:
        transform 0.5s ease,
        opacity 0.5s ease;
}

.sidebar h1,
.sidebar h2,
.sidebar p {
    position: relative;
    z-index: 1;
}

.sidebar h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.sidebar h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.sidebar p {
    font-size: 1rem;
    color: #cccccc;
}

.main {
    flex: 2;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 5rem;
    margin-bottom: 1rem;
    text-align: left;

    background-image: linear-gradient(45deg, white, black);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* may be after background-clip */
    -webkit-text-fill-color: transparent; /* Safari */
}

.xv-slider {
    overflow: hidden;
    position: relative;
    margin-top: 2rem;
}

.slider-wrapper {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.sidebar h1 {
    color: white;
    -webkit-text-stroke: 0.5px black;
    text-shadow:
        -1px -1px 0 black,
        1px -1px 0 black,
        -1px 1px 0 black,
        1px 1px 0 black;
}

.xv-card {
    flex: 0 0 calc(25% - 1.125rem);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: white;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.xv-card img {
    width: 100%;
    height: auto;
    display: block;
}

.xv-card .info {
    padding: 1rem;
}

.xv-card .info h3 {
    margin: 0;
    font-size: 1.25rem;
}

.xv-card .info p {
    margin: 0;
    font-size: 0.9rem;
    color: #bbb;
}

.xv-card:hover {
    transform: scale(1.02);
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.buttons button {
    background: #333;
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.footer {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    font-size: 1rem;
    margin-top: auto;
    padding-right: 2rem;
}

.footer-copy {
    font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
    text-align: right;
    font-size: 8px;
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        display: none;
        padding: 2rem 1rem;
        align-items: center;
        text-align: center;
        flex: none;
    }

    .sidebar h1 {
        font-size: 2rem;
    }

    .sidebar h2 {
        font-size: 1.25rem;
    }

    .sidebar p {
        font-size: 0.9rem;
    }

    .main {
        padding: 1rem;
        width: 100%;
    }

    .page-title {
        font-size: 1.75rem;
        margin-top: 2rem;
        text-align: center;
    }

    .slider-wrapper {
        gap: 1rem;
    }

    .xv-card {
        flex: 0 0 90%;
        margin: 0 auto;
    }

    .buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        padding-right: 0;
        font-size: 0.75rem;
    }

    .top-right-logo {
        top: 0.5rem;
        right: 0.5rem;
    }

    .top-right-logo img {
        height: 80px;
    }
}
