.reestr-block-wraper {
    position: relative; /* Абсолютное позиционирование */
    height: 1250px;
}

.reestr-block-wraper::before {
    content: '';
    position: absolute; /* Абсолютное позиционирование */
    background-image: url('../../img/cabinet/backgrond-top.png');
    background-size: 100% 100%;
    top: -170px; /* Выход за пределы верхнего отступа */
    left: 0;
    right: 0;
    z-index: -1;
}

@media (max-width: 600px) {
    .reestr-block-wraper {
        height: 960px;
    }
}

.reestr-block {
    max-width: 1200px;
    margin: 30px auto;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

/* Заголовок блока */
.reestr-title {
    margin-bottom: 70px;
    text-align: center;
    font-family: 'Montserrat Alternates';
    font-style: normal;
    font-weight: 400;
    font-size: 48px;
    color: #C2A14C;
    text-shadow: 0px 4px 6px rgba(0, 0, 0, 0.26);
}

/* Контейнер для контента со скроллом */
.reestr-scroll-wrapper {
    position: relative;
    overflow: hidden;
}

/* Контент со скроллом */
.reestr-scroll-content {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 70px;
}

.reestr-scroll-content::-webkit-scrollbar {
    display: none;
}

/* Строки с элементами */
.reestr-row {
    display: flex;
    gap: 55px;
    margin-bottom: 100px;
}

.reestr-row:last-child {
    margin-bottom: 0;
}

/* Стили для элементов галереи */
.reestr-item {
    min-width: 380px;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    font-family: Montserrat Alternates;
    font-weight: 400;
    font-style: Regular;
    font-size: 16px;
    line-height: 100%;
}

@media (max-width: 600px) {
    .reestr-item {
        min-width: 260px;
    }
    .reestr-title {
        font-size: 24px;
    }
}

.reestr-item:hover {
}

.reestr-item-content {
    display: flex;
    padding: 12px;
    flex-grow: 1;
}

.reestr-item-img-wrapper {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    margin-right: 12px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .reestr-item-img-wrapper {
        width: 80px;
        height: 80px;
    }
}

.reestr-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: opacity 0.2s;
    box-shadow: 0px 11px 10px rgba(0, 0, 0, 0.25);
    object-position: 0% 0%;
}

.reestr-item-img:hover {
    opacity: 0.9;
}

.reestr-item-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.reestr-item-line {
    font-size: 15px;
    color: #5B2812;
    margin-bottom: 6px;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .reestr-item-line {
        font-size: 12px;
    }
}

.reestr-item-line:last-child {
    margin-bottom: 0;
}

.reestr-item-link-wrapper {
    width: 75%;
    padding: 5px;
    background: linear-gradient(180deg, #DFC070 0%, #D5B460 100%);
    box-shadow: 0px 6px 9px rgba(0, 0, 0, 0.25), inset 0px 5px 11.7px rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    text-align: center;
}

.reestr-item-link {
    display: inline-block;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    font-family: 'Montserrat Alternates';
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    color: #FFFFFF;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.reestr-item-link:hover {
    text-decoration: underline;
}

/* Фиксированный контейнер для скроллбара */
.reestr-scrollbar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px; /* Увеличиваем высоту контейнера */
    overflow: visible; /* Важно! */
    z-index: 2; /* Чтобы был над другими элементами */
}

.reestr-scrollbar-track {
    position: absolute;
    width: 100%;
    height: 15px; /* Тонкий трек */
    background-color: #D9D9D9;
    box-shadow: inset 0px 4px 4px rgba(0, 0, 0, 0.12);
    border-radius: 19px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 4px;
}

.reestr-scrollbar-thumb {
    position: absolute;
    width: 60px;
    height: 20px; /* Выше трека */
    background-color: #FFFFFF;
    border-radius: 19px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0px 9px 8.8px rgba(0, 0, 0, 0.25);
    z-index: 3; /* Чтобы был над треком */
}

.reestr-scrollbar-thumb:hover {
    height: 21px; /* Увеличиваем при наведении */
}

/* Модальное окно*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-img {
    max-width: 90%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    transition: opacity 0.2s;
    box-shadow: 0px 11px 10px rgba(0, 0, 0, 0.25);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #DFC070;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.modal-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .modal-close {
        top: -30px;
        font-size: 24px;
    }

    .modal-caption {
        font-size: 14px;
    }
}

/* Стили плашки (аналогичны основному блоку) */
.modal-item-link-wrapper {
    padding: 25px 15px;
    margin: 10px auto;
    background: linear-gradient(180deg, #DFC070 0%, #D5B460 100%);
    box-shadow: 0px 6px 9px rgba(0, 0, 0, 0.25), inset 0px 5px 11.7px rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    width: 60%;
    height: 70px;
    box-sizing: border-box;
    text-align: center;
}

.modal-item-link {
    text-decoration: none;
    font-size: 18px;
    transition: color 0.2s;
    font-family: 'Montserrat Alternates';
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    color: #FFFFFF;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}



.modal-item-link:hover {
    text-decoration: underline;
}

/* Стили для текстовой информации */
.modal-info {
    padding: 15px;
}

.modal-line {
    margin-bottom: 8px;
    font-family: Montserrat Alternates;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.5;
    color: #5B2812;
    text-align: center;
}

.modal-line:last-child {
    margin-bottom: 0;
}

.modal-item-link::after {
    content: "→";
    margin-left: 5px;
    transition: margin-left 0.2s;
}

.modal-item-link:hover::after {
    margin-left: 8px;
}

@media (max-width: 768px) {
    .modal-item-link-wrapper {
        padding: 23px 12px;
    }

    .modal-info {
        padding: 12px;
    }

    .modal-line {
        font-size: 13px;
    }

    .modal-item-link {
        font-size: 13px;
    }
}