.history-section-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    position: relative;
}

.slider-external-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    width: 100%;
    max-width: 800px;
}

.ancient-slider {
    width: 700px;
    height: 450px;
    position: relative;
    overflow: hidden;
    background: transparent;
    flex-shrink: 0;
}

.ancient-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.ancient-slide.active {
    opacity: 1;
    z-index: 2;
}

.ancient-slide img {
    width: 100%; height: 100%; object-fit: contain;
}

/* Внешние кнопки - позиционируются абсолютно относительно slider-external-layout */
.ext-anc-btn {
    background: #ccc;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
}

.ext-anc-btn.prev {
    left: 0;
}

.ext-anc-btn.next {
    right: 0;
}

/* Появление кнопок при наведении на обертку */
.history-section-wrapper:hover .ext-anc-btn {
    opacity: 1;
}

.ext-anc-btn:hover {
    background: rgb(40, 172, 35);
    transform: translateY(-50%) scale(1.1);
}

.ancient-status-panel {
    position: absolute;
    top: 15px; right: 15px;
    z-index: 10;
    display: flex;
    background: rgba(46, 46, 46, 0.6);
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    align-items: center;
    gap: 10px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .slider-external-layout {
        max-width: 100%;
        padding: 0 40px;
    }

    .ancient-slider {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        min-height: 250px;
    }

    .ext-anc-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .ext-anc-btn.prev {
        left: 5px;
    }

    .ext-anc-btn.next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .slider-external-layout {
        padding: 0 32px;
    }

    .ancient-slider {
        min-height: 200px;
    }

    .ext-anc-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}