.kb-slider {
    position: relative;
    width: 100%;
    height: var(--kb-height, 520px);
    overflow: hidden;
    background: #111;
}

.kb-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility .9s;
    z-index: 1;
}

.kb-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Слой с картинкой и эффект Ken Burns */
.kb-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: kb-zoom-in 14s ease-in-out infinite alternate;
}

.kb-slide:nth-child(even) .kb-bg { animation-name: kb-zoom-out; }
.kb-static .kb-bg { animation: none; }

@keyframes kb-zoom-in {
    from { transform: scale(1); }
    to   { transform: scale(1.14); }
}

@keyframes kb-zoom-out {
    from { transform: scale(1.14); }
    to   { transform: scale(1); }
}

/* Затемнение поверх картинки */
.kb-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    opacity: var(--kb-overlay, .4);
}

/* Контент */
.kb-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    padding: 2rem 8%;
    color: #fff;
}

.kb-content > * {
    margin: 0;
    max-width: 640px;
}

.kb-v-top    .kb-content { justify-content: flex-start; }
.kb-v-center .kb-content { justify-content: center; }
.kb-v-bottom .kb-content { justify-content: flex-end; }

.kb-h-left   .kb-content { align-items: flex-start; text-align: left; }
.kb-h-center .kb-content { align-items: center;     text-align: center; }
.kb-h-right  .kb-content { align-items: flex-end;   text-align: right; }

.kb-heading {
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 3rem);
    line-height: 1.15;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
    margin-bottom: .5rem;
}

.kb-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

/* Кнопка — компактная, со скруглением из настроек */
.kb-btn {
    display: inline-block;
    width: auto;
    margin-top: 1.2rem;
    padding: .6em 1.7em;
    border-radius: var(--kb-btn-radius, 30px);
    background: var(--kb-btn-bg, #fff);
    color: var(--kb-btn-color, #222);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.kb-btn:hover,
.kb-btn:focus {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    color: var(--kb-btn-color, #222);
}

/* Стрелки навигации */
.kb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.kb-arrow:hover,
.kb-arrow:focus {
    background: rgba(0, 0, 0, .6);
    color: #fff;
    outline: none;
}

.kb-prev { left: 14px; }
.kb-next { right: 14px; }

.kb-prev:active { transform: translateY(-50%) scale(.94); }
.kb-next:active { transform: translateY(-50%) scale(.94); }

/* Точки-переключатели */
.kb-dots {
    position: absolute;
    bottom: 1.1rem;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: .5rem;
}

.kb-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.kb-dot.is-active { background: #fff; }

/* На маленьких экранах стрелки компактнее */
@media (max-width: 640px) {
    .kb-arrow { width: 36px; height: 36px; }
    .kb-prev  { left: 8px; }
    .kb-next  { right: 8px; }
}
