/* ==========================================================================
   BucketCarousel  —  .bkc / --bkc-*  (scoped to avoid collisions)
   Per-view: 1 (mobile)  →  2 (≥576px)  →  --bkc-per-view-desktop (≥992px, default 3)
   ========================================================================== */
.bkc {
    --bkc-primary:      var(--primary-blue, #00578a);
    --bkc-primary-dark: var(--dark-blue, #004570);
    --bkc-accent:       var(--accent-cyan, #0097c7);
    --bkc-text:         #33404a;
    --bkc-muted:        #5b6770;
    --bkc-card-bg:      #ffffff;
    --bkc-card-border:  #dfe6ec;
    --bkc-radius:       6px;
    --bkc-gap:          24px;
    --bkc-img-ratio:    16 / 10;
    --bkc-per-view:     1;
    --bkc-per-view-desktop: 3;
    --bkc-duration:     .45s;

    position: relative;
    box-sizing: border-box;
    width: 100%;
    color: var(--bkc-text);
}
.bkc *, .bkc *::before, .bkc *::after { box-sizing: inherit; }

@media (min-width: 576px) { .bkc { --bkc-per-view: 2; } }
@media (min-width: 992px) { .bkc { --bkc-per-view: var(--bkc-per-view-desktop); } }

/* ---- viewport / track ---------------------------------------------------- */
.bkc-viewport {
    overflow: hidden;
    outline: none;
    /* room for the card shadow on hover/focus without clipping */
    padding: 4px;
    margin: -4px;
    touch-action: pan-y;
}
.bkc-viewport:has(.is-dragging) { user-select: none; }
.bkc-card__figure img { -webkit-user-drag: none; }
.bkc-viewport:focus-visible { box-shadow: 0 0 0 3px rgba(0, 151, 199, .45); border-radius: var(--bkc-radius); }

.bkc-track {
    display: flex;
    gap: var(--bkc-gap);
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform var(--bkc-duration) cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}
.bkc-track.is-dragging { transition: none; }

.bkc-slide {
    flex: 0 0 calc((100% - (var(--bkc-per-view) - 1) * var(--bkc-gap)) / var(--bkc-per-view));
    min-width: 0;
    display: flex;
}

/* ---- card ---------------------------------------------------------------- */
.bkc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bkc-card-bg);
    border: 1px solid var(--bkc-card-border);
    border-radius: var(--bkc-radius);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.bkc-card--linked:hover,
.bkc-card--linked:focus-within {
    border-color: var(--bkc-accent);
    box-shadow: 0 6px 18px rgba(0, 69, 112, .12);
}

.bkc-card__figure {
    margin: 0;
    aspect-ratio: var(--bkc-img-ratio);
    overflow: hidden;
    background: #eef2f5;
}
.bkc-card__figure img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bkc-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.25rem 1.375rem 1.375rem;
}

.bkc .bkc-card__header {
    margin: 0 0 .25rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bkc-primary-dark);
}
.bkc .bkc-card__subheader {
    margin: 0 0 .75rem;
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--bkc-accent);
}
.bkc .bkc-card__desc {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--bkc-muted);
}
.bkc .bkc-card__desc p { margin: 0 0 .75em; }
.bkc .bkc-card__desc p:last-child { margin-bottom: 0; }

.bkc .bkc-card__link {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 1rem;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--bkc-primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color .2s ease, color .2s ease;
}
.bkc .bkc-card__link:hover,
.bkc .bkc-card__link:focus-visible { color: var(--bkc-primary-dark); text-decoration-color: currentColor; }
/* whole card clickable (Bootstrap stretched-link pattern) */
.bkc-card--linked .bkc-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* ---- controls ------------------------------------------------------------ */
.bkc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.bkc-controls[hidden] { display: none; }

.bkc-nav {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid var(--bkc-primary);
    border-radius: 50%;
    background: #fff;
    color: var(--bkc-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.bkc-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.bkc-nav:hover:not(:disabled), .bkc-nav:focus-visible { background: var(--bkc-primary); color: #fff; }
.bkc-nav:focus-visible { outline: 3px solid rgba(0, 151, 199, .45); outline-offset: 2px; }
.bkc-nav:disabled { opacity: .35; cursor: default; }

.bkc-dots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bkc-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: #c5cfd6;
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}
.bkc-dot[aria-current="true"] { width: 28px; background: var(--bkc-primary); }
.bkc-dot:focus-visible { outline: 3px solid rgba(0, 151, 199, .45); outline-offset: 2px; }

.bkc-play { margin-left: .25rem; }
.bkc-play .bkc-icon-pause, .bkc-play[aria-pressed="false"] .bkc-icon-play { display: none; }
.bkc-play[aria-pressed="false"] .bkc-icon-pause { display: block; }
.bkc-play .bkc-icon-play { display: block; }

/* ---- reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .bkc-track, .bkc-card, .bkc-nav, .bkc-dot, .bkc .bkc-card__link { transition: none; }
}
