/* Accessible, RTL-aware category scroller on blog archives only. */
.blog-categoires {
    position: sticky;
    top: 100px;
    z-index: 50;
    display: block;
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid #ece8df;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.blog-categoires .blog-categories-shell {
    position: relative;
    width: min(1320px, calc(100% - 32px));
    max-width: 100%;
    margin-inline: auto;
}

.blog-categoires .blog-ul {
    box-sizing: border-box;
    direction: rtl;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 13px 44px 15px !important;
    /* Only the navigation arrows may move this viewport. Programmatic scroll remains available. */
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    list-style: none;
    white-space: nowrap;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    touch-action: pan-y; /* Allow page scrolling on mobile; disable sideways finger scrolling. */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none; /* Legacy Edge / IE */
}

.blog-categoires .blog-ul::-webkit-scrollbar {
    display: none !important; /* Chromium / Safari */
    width: 0 !important;
    height: 0 !important;
}

.blog-categoires .blog-ul li {
    display: block !important;
    flex: 0 0 auto;
    padding: 0 !important;
    margin: 0 !important;
}

.blog-categoires .blog-ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    max-width: none;
    padding: 8px 13px !important;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #494540;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.blog-categoires .blog-ul li a:hover {
    padding-bottom: 8px !important;
    border: 1px solid #e5ddce;
    background: #f8f6f1;
    color: #171717;
}

.blog-categoires .blog-ul li a.blog-active {
    padding-bottom: 8px !important;
    border: 1px solid #d9c6a5;
    background: #f8f4ed;
    color: #211d18;
    font-weight: 600;
}

.blog-categoires .blog-ul li a:focus-visible,
.blog-categoires .blog-scroll-arrow:focus-visible,
.blog-categoires .blog-ul:focus-visible {
    outline: 2px solid #a88758;
    outline-offset: 2px;
}

/* Gradient hints only appear at ends with more content. */
.blog-categoires .blog-categories-shell::before,
.blog-categoires .blog-categories-shell::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 6px;
    width: 55px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity .18s ease;
}
.blog-categoires .blog-categories-shell::before {
    right: 0;
    background: linear-gradient(to left, #fff 30%, rgba(255,255,255,0));
}
.blog-categoires .blog-categories-shell::after {
    left: 0;
    background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0));
}
.blog-categoires .blog-categories-shell.can-scroll-prev::before,
.blog-categoires .blog-categories-shell.can-scroll-next::after {
    opacity: 1;
}

.blog-categoires .blog-scroll-arrow {
    position: absolute;
    top: calc(50% - 3px);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid #e7dccb;
    border-radius: 50%;
    background: #fff;
    color: #514435;
    box-shadow: 0 2px 9px rgba(58, 42, 25, .09);
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, opacity .18s ease;
}
.blog-categoires .blog-scroll-arrow--prev { right: 2px; }
.blog-categoires .blog-scroll-arrow--next { left: 2px; }
.blog-categoires .blog-scroll-arrow svg { width: 17px; height: 17px; }
.blog-categoires .blog-scroll-arrow:hover:not(:disabled) {
    background: #f8f4ed;
    border-color: #cab18a;
}
.blog-categoires .blog-scroll-arrow:disabled {
    opacity: .32;
    cursor: default;
}
.blog-categoires .blog-scroll-arrow[hidden] { display: none !important; }

@media (max-width: 991px) {
    .blog-categoires { top: 103px; }
}

@media (max-width: 639px) {
    .blog-categoires { top: 80px; }
    .blog-categoires .blog-categories-shell {
        width: 100%;
    }
    .blog-categoires .blog-ul {
        padding: 10px 36px 12px !important;
        gap: 6px;
    }
    .blog-categoires .blog-ul li a {
        min-height: 35px;
        padding: 7px 10px !important;
        font-size: 12px;
    }
    .blog-categoires .blog-ul li a:hover,
    .blog-categoires .blog-ul li a.blog-active {
        padding-bottom: 7px !important;
    }
    .blog-categoires .blog-scroll-arrow { width: 29px; height: 29px; }
    .blog-categoires .blog-categories-shell::before,
    .blog-categoires .blog-categories-shell::after { width: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-categoires .blog-ul { scroll-behavior: auto; }
    .blog-categoires .blog-scroll-arrow,
    .blog-categoires .blog-ul li a { transition: none; }
}

