body.base-page {
    background-color: #EEE8E8;
}

.base-page h1,
.base-page h2,
.base-page h3,
.base-page h4,
.base-page h5,
.base-page h6 {
    font-family: 'SF UI Display', sans-serif;
    color: #860101;
    line-height: 1.6;
}

.base-box h4.text-center,
.base-box p.text-center {
    text-align: left !important;
}

.base-page h6{
    font-size: 0.85rem;
}


.base-box {
    background-color: #fff;
    border-radius: 20px;
    padding: 1rem;
    height: 100%;
}

/* Линия */
.base-divider {
    border-top: 2px solid #860101;
    opacity: 1 !important;
    margin: 1.5rem 0;
}

.base-footer-block {
    text-align: center;
    background-color: #ffffff;
    border-radius: 20px;
    border-bottom-right-radius: 0px;
    padding: 1rem;
    min-height: 40vh;
    margin: 0 !important;
    flex: 1;
}

.base-footer-block h5 {
    font-weight: regular;
    color: #860101;
    font-family: 'SF UI Display', sans-serif;
}

.text-danger {
    font-weight: regular !important;
    color: #860101 !important;
    font-family: 'SF UI Display', sans-serif;
}

.fw-bold {
    font-family: 'SF UI Display', sans-serif;
}

.base-vertical-line {
    border-left: 2px solid #860101 !important;
    height: 100%;
    opacity: 1 !important;
}

.border-start-custom {
    border-left: 2px solid #860101;
    /* margin-right: 1rem; */
}

@media (max-width: 991.98px) {
    .border-md-start-custom {
        border-left: none !important;
        padding-left: 0 !important;
    }
    .base-footer-block {
        margin: 0 !important;
        border-radius: 20px !important;
    }
}

@media (min-width: 992px) {
    .border-lg-start-custom {
        border-left: 2px solid #860101;
        padding-left: 1.5rem;      /* тот же внутренний отступ */
    }
}

.base-content-wrapper {
    background-color: #EEE8E8;
    padding-bottom: 5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}



.col-md-6.border-end {
    border-right: 2px solid #860101 !important;
}

main.py-4 {
    flex: 1;
}

.base-rounded-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 20px;
	border-bottom-right-radius: 0;
	object-fit: cover;
}

.base-right-img-wrapper {
	padding-left: 0 !important;
	padding-right: 0 !important;
}







/* ---------- База знаний ---------- */


/* ---------- МЕНЮ С ПОИСКОМ ---------- */
.knowledge-search-wrapper {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    position: relative;
}

.knowledge-search {
    width: 100%;
}

.knowledge-search .form-control {
    height: 70px;
    background-color: #EEE8E8;
    border: none;
    border-radius: 10px;
    padding-right: 50px;
}

.knowledge-search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.knowledge-search-btn i {
    font-size: 20px;
    color: #000;
}

/* Абсолютное позиционирование на десктопе */
@media (min-width: 768px) {
    .knowledge-nav .container {
        position: relative; /* для поиска */
    }

    .knowledge-nav {
        padding-bottom: 2rem; /* запас снизу под поиск */
    }

    .knowledge-search-wrapper {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 400px); /* ← ширина от контейнера, не экрана */
        max-width: 500px;
        padding: 0;
    }

    .knowledge-search {
        width: 100%;
        max-width: none;
    }
}




/* -------------СПИСОК КАТЕГОРОИЙ--------------- */

.knowledge-page .knowledge-wrapper {
    background-color: #EEE8E8;
    padding-bottom: 5rem;
    min-height: 10vh;
}

/* заголовок */
.knowledge-page h2 {
    font-family: 'SF UI Display', sans-serif;
    color: #860101;
}

/* карточки */
.kb-grid .col-md-4 {
    margin-bottom: 3rem;
}

/* вертикальные разделители между колонками (>= md) */
@media (min-width: 768px) {
    .knowledge-grid .col-md-4:nth-child(3n+2),
    .knowledge-grid .col-md-4:nth-child(3n+3) {
        border-left: 2px solid #860101;
    }
}

/* фон */
.knowledge-wrapper {
    background: #FFFFFF;
}

/* блок‑карточка как ссылка */
.kb-block-link {
    display: block;
    text-decoration: none;
    border-radius: 20px;
    border: 2px solid transparent; /* ← важно для предотвращения скачков */
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* при наведении */
.kb-block-link:hover {
    border-color: #0038A8;
}

/* внутренний блок */
.kb-block {
    background-color: #FFFFFF;
    border-radius: 20px;
    min-height: 240px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-align: center;
}

/* иконка */
.kb-icon i {
    font-size: 2.5rem;
    color: #860101;
}

/* заголовок */
.kb-title {
    font-family: 'SF UI Display', sans-serif;
    color: #860101;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 0.3rem;
    margin-bottom: 0.4rem;
}

/* счётчик статей */
.kb-link-count {
    font-size: 0.9rem;
    color: #0038A8;
    border: 2px solid #860101;
    border-radius: 6px;
    padding: 0.2rem 1.2rem;
    font-weight: 500;
    display: inline-block;
}




/* ----СПИСОК СТАТЕЙ---- */

.kb-breadcrumb {
    font-size: 0.85rem;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-family: 'SF UI Display', sans-serif;
}

.kb-article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kb-article-link {
    background-color: #fff;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: 0.2s;
    display: block;
}

.kb-article-link.active {
    border-color: #0038A8;
}

.kb-article-title {
    font-weight: 500;
    font-size: 1rem;
    color: #0038A8;
    font-family: 'SF UI Display', sans-serif;
}

.kb-article-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.2rem;
}

.kb-breadcrumb-link {
    text-decoration: none;
    color: #0038A8;
    font-weight: 500;
}

.kb-breadcrumb-link:hover {
    text-decoration: underline;
}


.kb-article-link {
    display: block;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.kb-article-link:hover {
    border: 2px solid #0038A8;
}

.kb-article-title {
    font-weight: 600;
    color: #0038A8;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.kb-article-subtitle {
    color: #666;
    font-size: 0.85rem;
}

.kb-article-content {
    background-color: #fff;
    border-radius: 20px;
    padding: 2rem 3rem;
    max-width: 100%;
    width: 100%;
}


/* Выпадающие подсказки */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.suggestion-item {
    padding: 0.6rem 1rem;
    display: block;
    text-decoration: none;
    color: #333;
    transition: 0.2s;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.suggestion-item.muted {
    color: #999;
    pointer-events: none;
}
