/* Flatsome Title With Category - polished styles for homepage & builder preview */
.wootech-title-cat.section-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.wootech-title-cat .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto; /* allow title+cats to share available space without forcing wrap */
    min-width: 0;
    flex-wrap: nowrap; /* prevent children from wrapping to next line */
    border: none;
    overflow: hidden;
}

.wootech-title-cat .section-title-main {
    font-size: 26px;
    line-height: 1.5;
    color: #0b1320;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    transition: max-width .18s ease;
    border: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

/* Remove theme-provided underlines if present (override) */
.wootech-title-cat .section-title-main::after,
.wootech-title-cat .section-title-main::before {
    display: none !important;
    content: none !important;
}

.wootech-title-cat .title-show-cats {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    overflow: hidden;
    padding-top: 4px;
    padding-bottom: 0;
    margin-bottom: 0;
    border: none;
}

/* ensure pills are centered area: keep scroller centered visually */
.wootech-title-cat .title-show-cats { justify-content: center; }

.wootech-title-cat .title-show-cats .scroll {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto; /* allow scroller to take available space while keeping CTA visible */
    min-width: 0;
    white-space: nowrap;
    cursor: grab;
}

.wootech-title-cat .title-show-cats .scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

/* --- Wootech custom styles (UX style selector) --- */
.wootech-title-cat.wootech-style-inline-scroll .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.wootech-title-cat.wootech-style-stack-scroll .section-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title cta"
        "cats cats";
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
}

.wootech-title-cat.wootech-style-stack-scroll .section-title-main {
    grid-area: title;
    max-width: 100%;
}

.wootech-title-cat.wootech-style-stack-scroll .title-show-cats {
    grid-area: cats;
}

.wootech-title-cat.wootech-style-stack-scroll .section-title .cta {
    grid-area: cta;
    margin-left: 0;
}

.wootech-title-cat.wootech-title-align-left .section-title-main {
    text-align: left;
}

.wootech-title-cat.wootech-title-align-center .section-title-main {
    text-align: center;
}

.wootech-title-cat.wootech-style-stack-scroll.wootech-title-align-center .section-title {
    grid-template-columns: 1fr auto;
}

.wootech-title-cat.wootech-style-stack-scroll.wootech-title-align-center .section-title-main {
    justify-self: center;
}

.wootech-title-cat.wootech-style-inline-scroll.wootech-title-align-center .section-title-main {
    text-align: center;
}

@media (max-width: 991px) {
    .wootech-title-cat.wootech-style-inline-scroll .section-title-main {
        max-width: 180px;
    }
}

@media (max-width: 767px) {
    .wootech-title-cat.wootech-style-inline-scroll .section-title,
    .wootech-title-cat.wootech-style-stack-scroll .section-title {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "title"
            "cats"
            "cta";
        row-gap: 8px;
    }

    .wootech-title-cat.wootech-style-inline-scroll .section-title-main,
    .wootech-title-cat.wootech-style-stack-scroll .section-title-main {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .wootech-title-cat.wootech-style-inline-scroll .title-show-cats,
    .wootech-title-cat.wootech-style-stack-scroll .title-show-cats {
        width: 100%;
    }

    .wootech-title-cat.wootech-style-inline-scroll .section-title .cta,
    .wootech-title-cat.wootech-style-stack-scroll .section-title .cta {
        justify-self: start;
        margin: 0;
    }

    .wootech-title-cat.wootech-title-align-center .section-title-main {
        justify-self: center;
    }
}

/* Arrows and fade overlays */
.wootech-title-cat.section-title-container { position: relative; }
.wootech-title-cat .title-show-cats .wootech-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    border: 0;
    background: rgba(255,255,255,0.92);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(15,23,42,0.06);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #222;
    cursor: pointer;
    transition: opacity .12s ease, transform .12s ease;
}
.wootech-title-cat .title-show-cats .wootech-scroll-btn.prev { left: 4px; }
.wootech-title-cat .title-show-cats .wootech-scroll-btn.next { right: 4px; }

/* subtle gradient to hint at overflow on the right */
.wootech-title-cat.section-title-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 80%);
    opacity: 0; /* keep subtle */
    transition: opacity .18s ease;
}
.wootech-title-cat.section-title-container.can-scroll-right::after { opacity: 0.35; }

.wootech-title-cat .title-show-cats .scroll ul {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 10px;
    margin: 0;
    padding: 5px 0;
    list-style: none;
    align-items: center;
    white-space: nowrap;
    min-width: max-content;
}
.wootech-title-cat .title-show-cats li {
    margin-bottom: 0;
    margin-left: 0px;
    flex: 0 0 auto;
}
.wootech-title-cat .title-show-cats .scroll li {
    flex: 0 0 auto;
}

/* Pills */
.wootech-title-cat .title-show-cats .scroll a {
    text-transform: initial;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(13, 24, 41, 0.06);
    color: #0b1320;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: none;
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
    white-space: nowrap;
}
.wootech-title-cat .title-show-cats .scroll a:hover {
    transform: translateY(-2px);
    background: rgba(15,88,184,0.06);
    border-color: rgba(15,88,184,0.12);
    color: #0b1320;
}

.wootech-title-cat .section-title .cta {
    margin-left: auto;
    color: #0f58b8;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 13px;
    border: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.wootech-title-cat .section-title .cta a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.wootech-title-cat .section-title .cta a::after {
    content: '\203A';
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    transform: translateY(-1px);
    color: currentColor;
}

/* UX Builder preview compatibility (scoped) */
.ux-builder .wootech-title-cat .section-title-container,
.flatsome-ux-preview .wootech-title-cat .section-title-container,
.ux-builder-frame .wootech-title-cat .section-title-container {
    padding: 10px 0;
    border-bottom-color: rgba(0,0,0,0.04);
    background: transparent;
}

/* Hide native scrollbars but keep scroll functionality (scoped) */
.wootech-title-cat .title-show-cats .scroll::-webkit-scrollbar { height: 6px; display: none; }
.wootech-title-cat .title-show-cats .scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* Responsive behavior (scoped) */
@media (max-width: 900px) {
    .wootech-title-cat .section-title-main { font-size: 20px; }
}

@media (max-width: 767px) {
    .wootech-title-cat.section-title-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 0;
    }
    .wootech-title-cat .section-title-main { font-size: 18px; }
    .wootech-title-cat .title-show-cats { margin-left: 0; }
    .wootech-title-cat .section-title .cta { margin-left: 0; margin-top: 6px; }
}

@media (max-width: 479px) {
    .wootech-title-cat .section-title-main { font-size: 16px; }
    .wootech-title-cat .title-show-cats .scroll a { font-size: 12px; padding: 5px 10px; }
}

/* Responsive: stack categories under title on small screens (scoped) */
@media (max-width: 767px) {
    .wootech-title-cat.section-title-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 0;
    }
    .wootech-title-cat .section-title-main { font-size: 18px; }
    .wootech-title-cat .title-show-cats {
        margin-left: 0;
        max-width: 100%;
    }
    .wootech-title-cat .title-show-cats .scroll { overflow-x: auto; }
    .wootech-title-cat .title-show-cats ul { gap: 8px; }
}

/* Small screens: tighter sizing (scoped) */
@media (max-width: 479px) {
    .wootech-title-cat .section-title-main { font-size: 16px; }
    .wootech-title-cat .title-show-cats a { font-size: 12px; padding: 5px 8px; }
}

/* Mobile: stack title and categories, hide CTA and arrows (scoped) */
@media (max-width: 479px) {
    .wootech-title-cat .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }
    .wootech-title-cat .section-title-main {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        display: block;
    }
    .wootech-title-cat .title-show-cats {
        width: 100%;
    }
    .wootech-title-cat .title-show-cats .scroll {
        width: 100%;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .wootech-title-cat .section-title .cta {
        display: none !important;
    }
    .wootech-title-cat .title-show-cats .wootech-scroll-btn { display: none !important; }
    .wootech-title-cat.section-title-container::after { display: none; }
}
