/* ==================================================================
NCP TOPIC BAR – Division of North Central Positronics™
Frontend-Themenleiste.
================================================================== */

.ncptb-topic-bar-wrap {
    display: block;
    position: relative;
    z-index: 9998;
    width: min(1170px, calc(100% - 32px));
    margin: 0 auto;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.ncptb-topic-bar {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 9px 18px;
    font-size: 14px;
    line-height: 1.45;
}

.ncptb-topic-bar-label {
    flex: 0 0 auto;
    font-weight: 800;
    color: #111;
    white-space: nowrap;
}

.ncptb-topic-bar-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 13px;
}

.ncptb-topic-link {
    color: #222 !important;
    text-decoration: none !important;
    font-weight: 500;
    white-space: nowrap;
}

.ncptb-topic-link:hover,
.ncptb-topic-link:focus {
    color: var(--ncptb-hover-color, #d71920) !important;
    text-decoration: none !important;
}

.ncptb-topic-separator {
    color: rgba(0,0,0,.28);
    margin-left: -6px;
    margin-right: -6px;
}

body.aft-dark-mode .ncptb-topic-bar-wrap,
body.ncpab-dark-mode .ncptb-topic-bar-wrap,
body.ncptb-dark-mode .ncptb-topic-bar-wrap {
    display: block;
    position: relative;
    z-index: 50;
    background: #151515;
    border-bottom-color: rgba(255,255,255,.12);
}

body.aft-dark-mode .ncptb-topic-bar-label,
body.ncpab-dark-mode .ncptb-topic-bar-label,
body.ncptb-dark-mode .ncptb-topic-bar-label {
    color: #fff;
}

body.aft-dark-mode .ncptb-topic-link,
body.ncpab-dark-mode .ncptb-topic-link,
body.ncptb-dark-mode .ncptb-topic-link {
    color: rgba(255,255,255,.84) !important;
}

body.aft-dark-mode .ncptb-topic-link:hover,
body.aft-dark-mode .ncptb-topic-link:focus,
body.ncpab-dark-mode .ncptb-topic-link:hover,
body.ncpab-dark-mode .ncptb-topic-link:focus,
body.ncptb-dark-mode .ncptb-topic-link:hover,
body.ncptb-dark-mode .ncptb-topic-link:focus {
    color: var(--ncptb-hover-color, #d71920) !important;
}

body.aft-dark-mode .ncptb-topic-separator,
body.ncpab-dark-mode .ncptb-topic-separator,
body.ncptb-dark-mode .ncptb-topic-separator {
    color: rgba(255,255,255,.26);
}

@media (max-width: 700px) {
    .ncptb-topic-bar-wrap {
    display: block;
    position: relative;
    z-index: 50;
        width: calc(100% - 24px);
    }

    .ncptb-topic-bar {
        flex-direction: column;
        gap: 7px;
        padding: 9px 14px;
        font-size: 13px;
    }

    .ncptb-topic-bar-links {
        gap: 5px 11px;
    }
}


.ncptb-footer-failsafe {
    display: block;
}

.ncptb-footer-failsafe .ncptb-topic-bar-wrap {
    display: block !important;
}


.ncptb-position-header_area {
    border-top: 1px solid rgba(0,0,0,.06);
}
body.aft-dark-mode .ncptb-position-header_area,
body.ncpab-dark-mode .ncptb-position-header_area,
body.ncptb-dark-mode .ncptb-position-header_area {
    border-top-color: rgba(255,255,255,.10);
}


.ncptb-position-header_area {
    border-top: 1px solid rgba(0,0,0,.06);
}
body.aft-dark-mode .ncptb-position-header_area,
body.ncpab-dark-mode .ncptb-position-header_area,
body.ncptb-dark-mode .ncptb-position-header_area {
    border-top-color: rgba(255,255,255,.10);
}


/* Headerbild-Overlay: keine eigene Fläche, sondern Text direkt auf dem Headerbild. */
.darknews-header .af-middle-header.ncptb-has-header-overlay,
.af-middle-header.ncptb-has-header-overlay {
    position: relative;
}

.darknews-header .af-middle-header .ncptb-position-header_area,
.af-middle-header .ncptb-position-header_area {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 99;
    width: min(1170px, calc(100% - 32px));
    margin: 0 auto;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.darknews-header .af-middle-header .ncptb-position-header_area .ncptb-topic-bar,
.af-middle-header .ncptb-position-header_area .ncptb-topic-bar {
    padding: 0 18px;
    background: transparent !important;
    gap: 14px;
}

.darknews-header .af-middle-header .ncptb-position-header_area .ncptb-topic-bar-label,
.af-middle-header .ncptb-position-header_area .ncptb-topic-bar-label,
.darknews-header .af-middle-header .ncptb-position-header_area .ncptb-topic-link,
.af-middle-header .ncptb-position-header_area .ncptb-topic-link {
    color: #111 !important;
    text-shadow: 0 1px 2px rgba(255,255,255,.85), 0 0 10px rgba(255,255,255,.6);
}

.darknews-header .af-middle-header .ncptb-position-header_area .ncptb-topic-separator,
.af-middle-header .ncptb-position-header_area .ncptb-topic-separator {
    color: rgba(0,0,0,.38) !important;
    text-shadow: 0 1px 2px rgba(255,255,255,.85);
}

.darknews-header .af-middle-header .ncptb-position-header_area .ncptb-topic-link:hover,
.darknews-header .af-middle-header .ncptb-position-header_area .ncptb-topic-link:focus,
.af-middle-header .ncptb-position-header_area .ncptb-topic-link:hover,
.af-middle-header .ncptb-position-header_area .ncptb-topic-link:focus {
    color: var(--ncptb-hover-color, #d71920) !important;
}

@media (max-width: 700px) {
    .darknews-header .af-middle-header .ncptb-position-header_area,
    .af-middle-header .ncptb-position-header_area {
        position: static !important;
        width: calc(100% - 24px);
        padding: 8px 0 0;
    }

    .darknews-header .af-middle-header .ncptb-position-header_area .ncptb-topic-bar,
    .af-middle-header .ncptb-position-header_area .ncptb-topic-bar {
        padding: 0;
    }
}


/* v0.1.9 – Headerbild-Position: mehr Luft zum Logo und kräftigere Themenlinks */
.ncptb-position-header_area {
    margin-top: 18px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.ncptb-position-header_area .ncptb-topic-bar {
    padding-top: 12px;
    padding-bottom: 12px;
}

.ncptb-position-header_area .ncptb-topic-link,
.ncptb-position-header_area .ncptb-topic-bar-label {
    font-weight: 800;
}

.ncptb-position-header_area .ncptb-topic-bar-links {
    gap: 8px 18px;
}

@media (max-width: 700px) {
    .ncptb-position-header_area {
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .ncptb-position-header_area .ncptb-topic-bar {
        padding-top: 9px;
        padding-bottom: 9px;
    }
}


/* v0.1.10 – Headerbild-Position kompakter, aber mit mehr Luft zum Logo */
.ncptb-position-header_area {
    margin-top: 28px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.ncptb-position-header_area .ncptb-topic-bar {
    padding: 8px 10px;
    line-height: 1.18;
    gap: 8px;
}

.ncptb-position-header_area .ncptb-topic-bar-links {
    gap: 2px 9px;
}

.ncptb-position-header_area .ncptb-topic-link,
.ncptb-position-header_area .ncptb-topic-bar-label {
    font-weight: 800;
}

.ncptb-position-header_area .ncptb-topic-separator {
    margin-left: -3px;
    margin-right: -3px;
    opacity: .55;
}

@media (min-width: 701px) {
    .ncptb-position-header_area {
        transform: translateY(10px);
    }
}

@media (max-width: 700px) {
    .ncptb-position-header_area {
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
        transform: none;
    }

    .ncptb-position-header_area .ncptb-topic-bar {
        padding: 9px 14px;
        line-height: 1.35;
    }

    .ncptb-position-header_area .ncptb-topic-bar-links {
        gap: 5px 11px;
    }
}


/* v0.1.11 – Headerbild-Position: weniger Rand links/rechts, Separatoren bold */
.ncptb-position-header_area {
    width: calc(100% - 12px) !important;
    max-width: none !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
}

.ncptb-position-header_area .ncptb-topic-bar {
    padding-left: 4px;
    padding-right: 4px;
}

.ncptb-position-header_area .ncptb-topic-separator {
    font-weight: 800;
    opacity: .72;
}

@media (max-width: 700px) {
    .ncptb-position-header_area {
        width: calc(100% - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .ncptb-position-header_area .ncptb-topic-bar {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* ==================================================================
NCP Topic Tiles – Shortcode [ncp_topic_tiles]
================================================================== */
.ncptb-topic-tiles-wrap {
    display: block;
    width: 100%;
    margin: 22px 0;
    padding-left: var(--ncptb-tile-outer-padding, 0px);
    padding-right: var(--ncptb-tile-outer-padding, 0px);
    box-sizing: border-box;
}

.ncptb-topic-tiles-wrap *,
.ncptb-topic-tiles-wrap *::before,
.ncptb-topic-tiles-wrap *::after {
    box-sizing: border-box;
}

.ncptb-topic-tiles-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin: 0 0 14px;
}

.ncptb-topic-tiles-disclosure {
    display: block;
    width: 100%;
    text-align: center;
}

.ncptb-topic-tiles-title {
    margin: 0;
    color: #111;
    font-size: var(--ncptb-tile-heading-size, 28px);
    font-weight: 800;
    line-height: 1.12;
}

.ncptb-topic-tiles-wrap.ncptb-has-heading-font .ncptb-topic-tiles-title {
    font-family: var(--ncptb-tile-heading-font);
}


.ncptb-topic-tiles-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px 20px 13px;
    color: #251a10;
    cursor: pointer;
    list-style: none;
    user-select: none;
    border: 1px solid rgba(76, 50, 26, .24);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,250,240,.98), rgba(232,220,198,.98)),
        linear-gradient(135deg, rgba(110,70,30,.05), rgba(255,255,255,0) 60%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 22px rgba(71, 45, 20, .12);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}

.ncptb-topic-tiles-toggle::-webkit-details-marker {
    display: none;
}

.ncptb-topic-tiles-toggle::marker {
    content: "";
}

.ncptb-topic-tiles-toggle:hover,
.ncptb-topic-tiles-toggle:focus-visible {
    color: #1e140c;
    background:
        linear-gradient(180deg, rgba(255,252,245,1), rgba(239,227,204,1)),
        linear-gradient(135deg, rgba(110,70,30,.08), rgba(255,255,255,0) 60%);
    border-color: rgba(76, 50, 26, .34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.58), 0 12px 26px rgba(71, 45, 20, .16);
    transform: translateY(-1px);
}


.ncptb-topic-tiles-toggle:hover .ncptb-topic-tiles-title,
.ncptb-topic-tiles-toggle:focus-visible .ncptb-topic-tiles-title {
    color: var(--ncptb-hover-color, #d71920);
}

.ncptb-topic-tiles-toggle:focus-visible {
    outline: 2px solid var(--ncptb-hover-color, #d71920);
    outline-offset: 4px;
}

.ncptb-topic-tiles-toggle-icon {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin: 0 0 0 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform .18s ease, margin .18s ease;
    opacity: .9;
}

.ncptb-topic-tiles-disclosure[open] .ncptb-topic-tiles-toggle {
    margin: 0 auto 14px;
    border-color: rgba(76, 50, 26, .32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px rgba(71, 45, 20, .14);
}

.ncptb-topic-tiles-disclosure[open] .ncptb-topic-tiles-toggle-icon {
    margin: 0 0 0 2px;
    transform: rotate(225deg) translateY(1px);
}

.ncptb-topic-tiles-panel {
    display: block;
}

body.aft-dark-mode .ncptb-topic-tiles-toggle,
body.ncpab-dark-mode .ncptb-topic-tiles-toggle,
body.ncptb-dark-mode .ncptb-topic-tiles-toggle {
    color: #f4e6d0;
    border-color: rgba(187,151,112,.28);
    background:
        linear-gradient(180deg, rgba(52,38,27,.98), rgba(29,22,16,.98)),
        linear-gradient(135deg, rgba(187,151,112,.08), rgba(255,255,255,0) 60%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.28);
}

body.aft-dark-mode .ncptb-topic-tiles-toggle:hover,
body.aft-dark-mode .ncptb-topic-tiles-toggle:focus-visible,
body.ncpab-dark-mode .ncptb-topic-tiles-toggle:hover,
body.ncpab-dark-mode .ncptb-topic-tiles-toggle:focus-visible,
body.ncptb-dark-mode .ncptb-topic-tiles-toggle:hover,
body.ncptb-dark-mode .ncptb-topic-tiles-toggle:focus-visible {
    color: #fff2dc;
    background:
        linear-gradient(180deg, rgba(62,45,32,.99), rgba(36,27,20,.99)),
        linear-gradient(135deg, rgba(187,151,112,.12), rgba(255,255,255,0) 60%);
    border-color: rgba(187,151,112,.40);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 28px rgba(0,0,0,.34);
}

.ncptb-topic-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(var(--ncptb-tile-min-width, 300px), 100%), 1fr));
    gap: var(--ncptb-tile-gap, 16px);
    width: 100%;
}

.ncptb-topic-tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: var(--ncptb-tile-height, 155px);
    height: var(--ncptb-tile-height, 155px);
    overflow: hidden;
    padding: var(--ncptb-tile-padding, 14px);
    color: #fff !important;
    text-decoration: none !important;
    background-color: #1e1e1e;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: var(--ncptb-tile-radius, 12px);
    isolation: isolate;
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
    transform: translateZ(0);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.ncptb-topic-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0,0,0,var(--ncptb-tile-overlay-opacity, .38));
    pointer-events: none;
}

.ncptb-topic-tile.no-image {
    background-image: linear-gradient(135deg, #292929, #111);
}

.ncptb-topic-tile:hover,
.ncptb-topic-tile:focus {
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0,0,0,.22);
    filter: saturate(1.05);
}

.ncptb-topic-tile-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: var(--ncptb-tile-content-flex, flex-start);
    gap: 4px;
    text-align: var(--ncptb-tile-content-text, left);
    width: 100%;
}

.ncptb-topic-tile-title {
    display: block;
    color: #fff;
    font-size: var(--ncptb-tile-title-size, 22px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,.36);
}

.ncptb-topic-tiles-wrap.ncptb-has-title-font .ncptb-topic-tile-title,
.ncptb-topic-tiles-wrap.ncptb-has-title-font .ncptb-topic-tile-count {
    font-family: var(--ncptb-tile-title-font);
}

.ncptb-topic-tile-count {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 9px;
    color: rgba(255,255,255,.92);
    background: rgba(0,0,0,.32);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 999px;
    font-size: var(--ncptb-tile-count-size, 12px);
    font-weight: 700;
    line-height: 1.2;
    backdrop-filter: blur(4px);
}

body.aft-dark-mode .ncptb-topic-tiles-title,
body.ncpab-dark-mode .ncptb-topic-tiles-title,
body.ncptb-dark-mode .ncptb-topic-tiles-title {
    color: #fff;
}

@media (max-width: 700px) {
    .ncptb-topic-tiles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .ncptb-topic-tiles-toggle {
        display: inline-flex;
        width: auto;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .ncptb-topic-tile {
        min-width: 0;
        padding: var(--ncptb-tile-padding, 14px);
    }

    .ncptb-topic-tile-title,
    .ncptb-topic-tile-count {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}


.ncptb-topic-tiles-auto-source {
    display: block;
    width: 100%;
}
