* {
    box-sizing: border-box;
    font-family: "IBM Plex Sans", monospace;
    margin: 0%;
    padding: 0%;
}



.mainbg {
    height: auto;
}

.mainbg video {
    height: 100vh;
    object-fit: cover;
    position: fixed;
    width: 100vw;
    z-index: -1;
}

.background-image {
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: -1;
}

.content {
    padding-bottom: 60px;
    padding-top: 8%;
    
}

.content div {
    align-items: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    text-align: center;
}

.contenthead {
    padding: 3px;
    
}

.contentheading {
    display: flex;
    font-family: inherit;
    font-size: 20px;
    justify-content: center;
    margin: 0%;
    padding: 5px;
    text-shadow: 0 0 3px #fff;
}

.animatedText {
    font-size: 18px;
    height: 5vh;
    padding-bottom: 10px;
    text-shadow: 0 0 5px #fff;
    width: 100%;
}
.contentbtn {
    /* Ваши стили, например: */
    /*background: rgba(0, 0, 0, 0.5);*/
    padding: 10px;
    justify-content: center;
    
}
/* Style for both button and anchor */
.contentbtn button,
.contentbtn a {
    border-radius: 5px;
    display: block; /* Changed to block for better centering */
    letter-spacing: .025em;
    margin: 0 auto 20px; /* Center horizontally */
    max-width: 250px; /* Limit width */
    text-decoration: none; /* Remove default underline on anchor elements */
    text-shadow: 0 0 1px #fff;
    transition: all .15s ease;
    width: 100%;
}

.contentbtn button:hover,
.contentbtn a:hover {
    background-color: #fff;
    color: black;
}

.contentbtn.alt {
    container-type: inline-size;
     /*background: rgba(218, 17, 17, 0.5);*/
    padding: 10px;
    justify-content: center;
    display: grid !important; /*!important;*/
    grid-template-columns: repeat(2, 1fr); /* Ровно 2 колонки равной ширины */
    gap: 10px; /* Расстояние между кнопками */
    max-width: 90vw;
    width: 400px;
    box-sizing: border-box;
    /* justify-items: center; /* Опционально: центрирование кнопок в ячейках */
    
}
.contentbtn.alt a {
    position: relative; /* Для z-index текста */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-size: cover; /* Заполняет весь элемент */
    background-position: center;
    background-repeat: no-repeat;
    width: 100%; /* Занимает полную ширину ячейки grid */
    aspect-ratio: 190 / 230; 
    background-color: #242424;
    border-color: #ffffff2a;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.15s ease;
    color: #fff; /* Цвет текста */
    text-shadow: 0 0 3px #000; /* Тень для видимости на фоне */

}

.contentbtn.alt a span {
    display: flex; /* Flex для внутреннего выравнивания */
    align-items: flex-end; /* Текст внизу span */
    justify-content: center; /* Горизонтальное центрирование */
    font-size: 4cqw;
    display: block;                  /* Блочный элемент (на всю ширину) */
    text-align: center;  
    width: 80%; 
    max-width: 90%; 
    min-height: 2.5em; /* Высота ~2 строки, текст поднимается для 1 строки */
    line-height: 1.2; /* Для читаемости */
    }

.contentbtn.alt a img {
  
    object-fit: cover; /* Чтобы не искажалась */
    
}



.contentbtn.alt a:hover {
    background-color: #fff;
    border-color: #ffffff;
    
}

footer {
    align-items: center;
    background-color: transparent;
    bottom: 0;
    display: flex;
    font-family: system-ui, -apple-system, sans-serif;
    height: 50px;
    justify-content: center;
    left: 0;
    position: fixed;
    right: 0;
    width: 100%;
}

footer p {
    color: whitesmoke;
    margin: 0;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: grey;
}

.contenttoggle {
    padding-top: 10px;
    
}

.toggle-link {
    border-radius: 5px;
    color: #ffffff; /* Whitesmoke из оригинала, но #ffffff для consistency */
    display: inline-block;
    font-size: 14px;
    letter-spacing: .025em;
    text-decoration: none;
    text-shadow: 0 0 1px #fff;
    transition: all .15s ease; /* Для плавности всего */
    position: relative;
    cursor: pointer;
    line-height: 1;
}

.toggle-link:hover {
    color: #ffffff; /* Фикс: текст белый на hover */
}

.toggle-link:after {
    display: block;
    position: absolute;
    left: 0;
    bottom: 0; /* Линия строго снизу */
    width: 0;
    height: 2px;
    background-color: #ffffff;
    content: "";
    transition: width 0.3s ease-out;
}

.toggle-link:hover:after {
    width: 100%; /* Только на hover */
}

/* Responsive */
@media screen AND (max-width: 700px) {
    .mainbg {
        height: 100vh !important;
    }
}

@media screen and (max-width: 768px) {
    body, html {
        overscroll-behavior: none; /* Предотвращает overscroll (сдвиг за пределы) */
        touch-action: manipulation; /* Ограничивает touch-жесты, предотвращает нежелательный scroll */
    }

    .content {
        position: fixed; /* Фиксирует content относительно viewport, как фон */
        top: 8%;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto; /* Вертикальный скролл, если content > viewport */
        overflow-x: hidden; /* Без горизонтального скролла */
    }

    
}

