.bf-instagram-reels {
    --bf-ink: #22201d;
    --bf-paper: #f7f3ee;
    width: 100%;
    padding: clamp(24px, 4vw, 52px) 0;
    color: var(--bf-ink);
}

.bf-instagram-reels__header,
.bf-instagram-reels__controls {
    display: flex;
    align-items: center;
}

.bf-instagram-reels__header {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.bf-instagram-reels__header h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.05;
}

.bf-instagram-reels__controls {
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.bf-instagram-reels__profile {
    min-height: 48px;
    border: 1px solid var(--bf-ink);
    color: var(--bf-ink);
    background: #fff;
}

.bf-instagram-reels__control {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: rgba(34, 32, 29, .58);
    background: transparent;
    place-items: center;
    font-size: 17px;
    cursor: pointer;
}

.bf-instagram-reels__control:disabled {
    opacity: .35;
    cursor: default;
}

.bf-instagram-reels__profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.bf-instagram-reels__profile:hover,
.bf-instagram-reels__profile:focus-visible,
.bf-instagram-reels__control:hover:not(:disabled),
.bf-instagram-reels__control:focus-visible {
    color: #fff;
    background: var(--bf-ink);
}

.bf-instagram-reels__profile svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.bf-instagram-reels__track {
    display: grid;
    grid-auto-columns: clamp(210px, 20vw, 285px);
    grid-auto-flow: column;
    gap: clamp(12px, 1.5vw, 20px);
    overflow-x: auto;
    padding: 2px 2px 14px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #b9b2aa transparent;
    overscroll-behavior-inline: contain;
}

.bf-instagram-reels__card {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 26px;
    background: var(--bf-paper);
    scroll-snap-align: start;
    box-shadow: 0 10px 30px rgba(34, 32, 29, .09);
}

.bf-instagram-reels__card > a {
    position: relative;
    display: block;
    color: #fff;
    text-decoration: none;
}

.bf-instagram-reels__card img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform .35s ease;
}

.bf-instagram-reels__card:hover img,
.bf-instagram-reels__card:focus-within img {
    transform: scale(1.035);
}

.bf-instagram-reels__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 48%, rgba(0, 0, 0, .72) 100%);
}

.bf-instagram-reels__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(5px);
    place-items: center;
}

.bf-instagram-reels__badge svg {
    width: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.bf-instagram-reels__caption {
    position: absolute;
    right: 16px;
    bottom: 18px;
    left: 16px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

@media (max-width: 700px) {
    .bf-instagram-reels__header {
        align-items: stretch;
        flex-direction: column;
    }

    .bf-instagram-reels__header h2 {
        text-align: center;
    }

    .bf-instagram-reels__profile {
        align-self: center;
    }

    .bf-instagram-reels__track {
        grid-auto-columns: min(76vw, 285px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bf-instagram-reels__track {
        scroll-behavior: auto;
    }

    .bf-instagram-reels__card img {
        transition: none;
    }
}
