/* ============================================================
   Unbroken Glossar — Styles
   ============================================================ */

:root {
    --ub-black:       #111111;
    --ub-white:       #ffffff;
    --ub-red:         #ff4f16;
    --ub-gray-light:  #f4f4f4;
    --ub-gray-mid:    #e0e0e0;
    --ub-gray-dark:   #555555;
    --ub-text:        #1a1a1a;
    --ub-radius:      8px;
    --ub-transition:  0.2s ease;
}

/* ── Breadcrumbs ───────────────────────────────────────────── */
.ub-breadcrumbs {
    margin-bottom: 24px;
}
.ub-breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--ub-gray-dark);
}
.ub-breadcrumbs li + li::before {
    content: '›';
    margin-right: 6px;
    color: var(--ub-gray-dark);
}
.ub-breadcrumbs a {
    color: var(--ub-gray-dark);
    text-decoration: none;
}
.ub-breadcrumbs a:hover {
    color: var(--ub-black);
    text-decoration: underline;
}
.ub-breadcrumbs [aria-current="page"] {
    color: var(--ub-black);
    font-weight: 600;
}

/* ── Category badge (single page) ─────────────────────────── */
.ub-single-badge {
    display: inline-block;
    background: var(--ub-red);
    color: var(--ub-white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
}

/* ── Single page layout ────────────────────────────────────── */
.ub-glossar-single {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}
.ub-glossar-content {
    flex: 1 1 0;
    min-width: 0;
}
.ub-glossar-sidebar {
    flex: 0 0 260px;
    position: sticky;
    top: 100px;
}

/* ── TOC ───────────────────────────────────────────────────── */
.ub-toc {
    background: var(--ub-gray-light);
    border-left: 3px solid var(--ub-red);
    border-radius: var(--ub-radius);
    padding: 20px 24px;
}
.ub-toc-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ub-gray-dark);
    margin: 0 0 12px 0;
}
.ub-toc ol {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: decimal;
}
.ub-toc li {
    margin: 6px 0;
}
.ub-toc-link {
    font-size: 14px;
    color: var(--ub-text);
    text-decoration: none;
    line-height: 1.4;
    transition: color var(--ub-transition);
}
.ub-toc-link:hover,
.ub-toc-link.active {
    color: var(--ub-red);
    font-weight: 600;
}

/* ── Related entries section ────────────────────────────────── */
.ub-related {
    margin-top: 64px;
    padding-top: 40px;
	padding-bottom: 64px;
    border-top: 1px solid var(--ub-gray-mid);
}
.ub-related-heading {
    font-size: 20px;
    margin-bottom: 24px;
}
.ub-related-heading em {
    font-style: normal;
    color: var(--ub-red);
}
.ub-related-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--ub-gray-mid) transparent;
}
.ub-related-slider::-webkit-scrollbar { height: 4px; }
.ub-related-slider::-webkit-scrollbar-thumb {
    background: var(--ub-gray-mid);
    border-radius: 4px;
}
.ub-related-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    background: var(--ub-gray-light);
    border-radius: var(--ub-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--ub-text);
    border: 1px solid var(--ub-gray-mid);
    transition: border-color var(--ub-transition), transform var(--ub-transition);
}
.ub-related-card:hover {
    border-color: var(--ub-red);
    transform: translateY(-2px);
}
.ub-related-card h3 {
    font-size: 15px;
    margin: 0 0 8px 0;
    color: var(--ub-black);
}
.ub-related-card p {
    font-size: 13px;
    color: var(--ub-gray-dark);
    margin: 0;
    line-height: 1.5;
}


/* ══════════════════════════════════════════════════════════════
   HUB PAGE
   ══════════════════════════════════════════════════════════════ */

/* ── Category filter pills ─────────────────────────────────── */
.ub-hub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}
.ub-cat-btn {
    background: var(--ub-gray-light);
    border: 2px solid var(--ub-gray-mid);
    color: var(--ub-text);
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ub-transition);
    font-family: inherit;
    line-height: 1;
}
.ub-cat-btn:hover {
    background: var(--ub-red);
    border-color: var(--ub-red);
    color: var(--ub-white);
}
.ub-cat-btn.active {
    background: var(--ub-black);
    border-color: var(--ub-black);
    color: var(--ub-white);
    font-weight: 700;
}
.ub-cat-btn.active:hover {
    background: var(--ub-red);
    border-color: var(--ub-red);
}

/* ── Mobile category pill menu ─────────────────────────────── */

/* Hidden by default on desktop */
.ub-mobile-cat-menu {
    display: none;
}


/* ── A–Z navigation ────────────────────────────────────────── */
.ub-hub-az-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 40px;
    padding: 16px;
    background: var(--ub-gray-light);
    border-radius: var(--ub-radius);
}
.ub-az-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--ub-transition);
}
.ub-az-link.has-entries {
    color: var(--ub-black);
    background: var(--ub-white);
    border: 1px solid var(--ub-gray-mid);
}
.ub-az-link.has-entries:hover {
    background: var(--ub-red);
    border-color: var(--ub-red);
    color: var(--ub-white);
}
.ub-az-link.no-entries {
    color: var(--ub-gray-mid);
    cursor: default;
    pointer-events: none;
    background: transparent;
    border: 1px solid transparent;
}
.ub-az-link.highlight {
    background: var(--ub-black);
    border-color: var(--ub-black);
    color: var(--ub-white);
}

/* ── Letter group ──────────────────────────────────────────── */
.ub-letter-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}
.ub-letter-heading {
    grid-column: 1 / -1;
    font-size: 28px;
    font-weight: 800;
    color: var(--ub-black);
    margin: 0 0 8px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--ub-red);
    display: inline-block;
    min-width: 36px;
}

/* ── Entry cards ───────────────────────────────────────────── */
.ub-entry-card {
    background: var(--ub-white);
    border: 1px solid var(--ub-gray-mid);
    border-radius: var(--ub-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--ub-text);
    transition: border-color var(--ub-transition), transform var(--ub-transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ub-entry-card:hover {
    border-color: var(--ub-red);
    transform: translateY(-2px);
}
.ub-entry-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ub-black);
    margin: 0;
    line-height: 1.3;
}
.ub-entry-excerpt {
    font-size: 13px;
    color: var(--ub-gray-dark);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}
.ub-entry-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--ub-gray-light);
    color: var(--ub-gray-dark);
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: auto;
    align-self: flex-start;
    border: 1px solid var(--ub-gray-mid);
}

/* ── No results ────────────────────────────────────────────── */
.ub-no-results {
    text-align: center;
    color: var(--ub-gray-dark);
    padding: 40px 0;
    font-size: 15px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media ( max-width: 900px ) {
    .ub-glossar-single { flex-direction: column; }
    .ub-glossar-sidebar {
        position: static;
        width: 100%;
        flex: 0 0 auto;
        order: -1;
    }
    .ub-toc { margin-bottom: 32px; }
    .ub-related-card { flex: 0 0 200px; }
}
@media ( max-width: 600px ) {

	
    .ub-letter-group {
        grid-template-columns: 1fr;
    }

    .ub-hub-az-nav {
        gap: 2px;
    }

    .ub-az-link {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }


    /* Hide the normal desktop category pills */
    .ub-hub-filters {
        display: none;
    }


    /* Show mobile category menu */
    .ub-mobile-cat-menu {
        display: inline-block;
        position: relative;
        margin-bottom: 32px;
    }


    /* The one visible pill */

.ub-mobile-cat-trigger,
.ub-mobile-cat-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 0;
    height: auto;

    padding: 8px 18px;

    background: var(--ub-red);
    border: 2px solid var(--ub-red);

    border-radius: 24px !important;

    color: var(--ub-white);

    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;

    cursor: pointer;
}

.ub-mobile-cat-trigger {
    font-weight: 700;
}

.ub-mobile-cat-option {
    font-weight: 500;
}

    /* Menu containing all category pills */
.ub-mobile-cat-options {
    position: absolute;

    top: calc(100% + 8px);
    left: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;

    background: var(--ub-white);
    padding: 12px;

    border: 1px solid var(--ub-gray-mid);
    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

    z-index: 20;
}


    /* Each option keeps the exact existing pill style */


    .ub-mobile-cat-option:hover {
        background: var(--ub-black);
        border-color: var(--ub-black);
        color: var(--ub-white);
    }
}

/* ── Related entries (replaces slider) ────────────────────── */
.ub-related {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--ub-gray-mid);
}
.ub-related-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.ub-related-heading {
    font-size: 20px;
    margin: 0;
}
.ub-related-heading em {
    font-style: normal;
    color: var(--ub-red);
}
.ub-related-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--ub-red);
    text-decoration: none;
    white-space: nowrap;
}
.ub-related-all:hover {
    text-decoration: underline;
}
.ub-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.ub-related-card {
    background: var(--ub-gray-light);
    border-radius: var(--ub-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--ub-text);
    border: 1px solid var(--ub-gray-mid);
    transition: border-color var(--ub-transition), transform var(--ub-transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ub-related-card:hover {
    border-color: var(--ub-red);
    transform: translateY(-2px);
}
.ub-related-card h3 {
    font-size: 15px;
    margin: 0;
    color: var(--ub-black);
    line-height: 1.3;
}
.ub-related-card p {
    font-size: 13px;
    color: var(--ub-gray-dark);
    margin: 0;
    line-height: 1.5;
}
@media ( max-width: 700px ) {
    .ub-related-grid {
        grid-template-columns: 1fr;
    }
    .ub-related-header {
        flex-direction: column;
        gap: 8px;
    }
}

/* ── Disclaimer ───────────────────────────────────────────── */

.ub-disclaimer {
    margin-top: 48px;
    padding: 20px 24px;
    background: rgba(255, 79, 22, 0.04);
    border: 1px solid rgba(255, 79, 22, 0.14);
    border-left: 3px solid rgba(255, 79, 22, 0.35);
    border-radius: var(--ub-radius);
}

.ub-disclaimer p {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: var(--ub-gray-dark);
}

/* Prevent mobile tap/focus highlight on category trigger */
button.ub-mobile-cat-trigger,
button.ub-mobile-cat-trigger:hover,
button.ub-mobile-cat-trigger:focus,
button.ub-mobile-cat-trigger:focus-visible,
button.ub-mobile-cat-trigger:active,
button.ub-mobile-cat-trigger.active,
button.ub-mobile-cat-trigger.active:hover {
    background: var(--ub-red) !important;
    background-color: var(--ub-red) !important;
    border-color: var(--ub-red) !important;
    color: var(--ub-white) !important;

    outline: none !important;
    box-shadow: none !important;
    filter: none !important;

    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    appearance: none;

    -webkit-user-select: none;
    user-select: none;
}
