/* Стили для военно-исторического зала */

.military-hall-container {
    position: relative;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Фоновое изображение зала */
.military-hall-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/military-hall/hall-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Логотип зала */
.military-hall-logo {
    position: absolute;
    top: 0%;
    left: 2%;
    z-index: 10;
    width: 25%;
    max-width: 400px;
    min-width: 40px;
    height: auto;
    pointer-events: none;
    transition: width 0.3s ease;
}

/* Контейнер с кнопками войн - поднят выше */
.military-wars-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 90%; /* Увеличил ширину */
    max-width: 1200px; /* Увеличил максимальную ширину */
    height: 70vh; /* Немного уменьшил высоту */
    max-height: 550px; /* Немного уменьшил */
    min-height: 280px;
    padding: 10px 0;
    margin-left: 0;
    margin-top: -5vh; /* Поднимаем контейнер выше */
    overflow: visible;
}

/* Кнопка войны */
.military-war-button {
    position: relative;
    left: -15px;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    background: none;
    overflow: visible;
    border-radius: 0;
    opacity: 0;
    animation: militarySlideInFromLeft 0.6s ease-out forwards;
    z-index: 2;
}

/* Первая кнопка с отступом */
.military-war-button.first-btn {
    margin-top: 15px;
}

/* Фоновое изображение кнопки */
.military-war-button-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 0 30px 30px 0;
    pointer-events: none;
    overflow: hidden;
    max-width: 100%;
    max-height: 100%;
}

/* При наведении увеличиваем изображение */
.military-war-button:hover .military-war-button-bg {
    transform: scale(1.03);
    filter: brightness(1.1);
}

/* При клике уменьшаем */
.military-war-button:active .military-war-button-bg {
    transform: scale(0.97);
}

/* ===== Кнопка "Назад" ===== */
.military-back-container {
    position: absolute; /* Абсолютное позиционирование */
    bottom: 30px;       /* Отступ снизу */
    right: 100px;        /* Отступ справа */
    z-index: 10;
}

.military-back-button {
    display: block;
    width: 180px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.military-back-button-img {
    width: 100%;
    height: auto;
    display: block;
}

.military-back-button:hover {
    transform: scale(1.05);
}

.military-back-button:active {
    transform: scale(0.98);
}

/* Адаптивность для кнопки "Назад" */
@media (max-width: 1024px) {
    .military-back-button {
        width: 140px;
    }
    .military-back-container {
        bottom: 25px;
        right: 25px;
    }
}

@media (max-width: 768px) {
    .military-back-button {
        width: 100px;
    }
    .military-back-container {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .military-back-button {
        width: 70px;
    }
    .military-back-container {
        bottom: 15px;
        right: 15px;
    }
}

@media (max-height: 600px) {
    .military-back-button {
        width: 80px;
    }
    .military-back-container {
        bottom: 15px;
        right: 20px;
    }
}

/* Анимация появления */
@keyframes militarySlideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Задержки анимации */
.military-war-button:nth-child(1) { animation-delay: 0.1s; }
.military-war-button:nth-child(2) { animation-delay: 0.2s; }
.military-war-button:nth-child(3) { animation-delay: 0.3s; }

.military-war-button {
    opacity: 0;
    animation: militarySlideInFromLeft 0.6s ease-out forwards;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .military-wars-container {
        gap: 12px;
        height: 50vh;
        max-height: 450px;
        width: 92%;
        margin-top: -4vh;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .military-wars-container {
        gap: 10px;
        height: 45vh;
        max-height: 380px;
        min-height: 220px;
        width: 95%;
        padding: 8px 0;
        margin-top: -3vh;
    }
    
    .military-war-button {
        left: -8px;
    }
    
    .military-war-button.first-btn {
        margin-top: 10px;
    }
    
    .military-hall-logo {
        width: 20%;
        max-width: 250px;
        top: 1.5%;
        left: 1.5%;
    }
}

@media (max-width: 480px) {
    .military-wars-container {
        gap: 8px;
        height: 40vh;
        max-height: 320px;
        min-height: 180px;
        padding: 5px 0;
        margin-top: -2vh;
    }
    
    .military-war-button.first-btn {
        margin-top: 8px;
    }
    
    .military-hall-logo {
        width: 15%;
        max-width: 180px;
        top: 1%;
        left: 1%;
    }
}

/* Для маленьких экранов по высоте */
@media (max-height: 700px) {
    .military-wars-container {
        gap: 10px;
        height: 50vh;
        max-height: 350px;
        min-height: 180px;
        padding: 5px 0;
        margin-top: -3vh;
    }
    
    .military-war-button.first-btn {
        margin-top: 10px;
    }
}

@media (max-height: 550px) {
    .military-wars-container {
        gap: 6px;
        height: 45vh;
        max-height: 260px;
        min-height: 140px;
        padding: 3px 0;
        margin-top: -2vh;
    }
    
    .military-war-button.first-btn {
        margin-top: 5px;
    }
}

/* Для очень больших экранов */
@media (min-width: 1440px) {
    .military-wars-container {
        max-width: 1500px;
        max-height: 650px;
        gap: 20px;
        margin-top: -6vh;
    }
}
