/* История - стили для изображений и пагинации */

html, body, .content-container, .history-image {
    touch-action: auto !important;
    -ms-touch-action: auto !important;
    overscroll-behavior: auto !important;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    touch-action: auto !important;
}

/* Переключатель разделов */
.section-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.section-btn {
    background-color: #ea6511;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-family: "Bastion", "Golos Text", Arial, sans-serif;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    font-size: 1.1em;
}

.section-btn:hover {
    background-color: #e7362c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.section-btn.active {
    background-color: #e7362c;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: default;
}

.history-image {
    max-width: 100%;
    height: auto;
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: block;
    cursor: pointer;
    touch-action: auto !important;
}

.history-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Модальное окно для увеличения изображения */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1200px;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

.image-modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-family: "Bastion", "Golos Text", Arial, sans-serif;
    font-size: 1.2em;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

/* Стили пагинации с дизайном от .points-button */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.prev-btn, .next-btn {
    background-color: #ea6511;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-family: "Bastion", "Golos Text", Arial, sans-serif;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.prev-btn:hover, .next-btn:hover {
    background-color: #e7362c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.pagination-number {
    background-color: #ea6511;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-family: "Bastion", "Golos Text", Arial, sans-serif;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.pagination-number:hover {
    background-color: #e7362c;
    color: white;
    transform: translateY(-2px);
}

.pagination-number.active {
    background-color: #e7362c;
    color: white;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.pagination-info {
    font-family: "Bastion", "Golos Text", Arial, sans-serif;
    font-weight: 500;
    color: #333;
    margin: 0 15px;
    font-size: 1.1em;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .content-container {
        padding: 15px;
        gap: 20px;
    }

    .pagination {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-numbers {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
    }

    .prev-btn {
        order: 1;
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

    .next-btn {
        order: 3;
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

    .prev-btn, .next-btn {
        padding: 12px 20px;
        font-size: 1.1em;
    }

    .pagination-number {
        padding: 10px 14px;
        font-size: 1.1em;
        min-width: 45px;
    }

    .pagination-info {
        order: 4;
        margin: 10px 0 0 0;
        font-size: 1em;
    }

    .history-image {
        border-width: 3px;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    .content-container {
        padding: 10px;
    }

    .pagination-numbers {
        gap: 5px;
    }

    .pagination-number {
        padding: 8px 10px;
        min-width: 35px;
        font-size: 1em;
    }

    .prev-btn, .next-btn {
        padding: 10px 15px;
        font-size: 1em;
    }
}

.prev-btn.disabled, .next-btn.disabled {
    background-color: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.prev-btn.disabled:hover, .next-btn.disabled:hover {
    background-color: #f0f0f0;
    color: #aaa;
}
