/*
 * bin-bash.de — bb-theme
 * Design: Clean Documentation
 * CSS-Prefix: bb-
 * Version: 1.0
 *
 * Sections:
 *   1.  Custom Properties
 *   2.  Fonts
 *   3.  Reset & Base
 *   4.  Typography
 *   5.  Layout
 *   6.  Header & Navigation
 *   7.  Footer
 *   8.  Homepage — Hero, Silos, Cards
 *   9.  Tutorial-Seite
 *  10.  Archive
 *  11.  Pages & Legal
 *  12.  404
 *  13.  WordPress Core Classes
 *  14.  Responsive
 */


/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */

:root {
    --bb-primary:       #5c8f55;
    --bb-primary-dark:  #4a7345;
    --bb-primary-light: #e8f0e6;
    --bb-bg:            #faf8f5;
    --bb-text:          #2b2d2b;
    --bb-accent:        #b5673a;
    --bb-accent-light:  #f5ede7;
    --bb-code-bg:       #eef3ed;
    --bb-border:        #d4d0c8;
    --bb-white:         #ffffff;

    --bb-font-heading:  'Zilla Slab', Georgia, serif;
    --bb-font-body:     -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --bb-font-code:     'Source Code Pro', 'Consolas', monospace;

    --bb-max-width:     1060px;
    --bb-gap:           1.5rem;
    --bb-radius:        6px;
    --bb-shadow:        0 2px 8px rgba(43, 45, 43, 0.10);
    --bb-shadow-hover:  0 4px 16px rgba(43, 45, 43, 0.16);
    --bb-transition:    0.2s ease;
}


/* ============================================================
   2. FONTS
   ============================================================ */

@font-face {
    font-family: 'Zilla Slab';
    src: url('../fonts/zilla-slab-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Zilla Slab';
    src: url('../fonts/zilla-slab-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('../fonts/source-code-pro-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ============================================================
   3. RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--bb-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--bb-text);
    background-color: var(--bb-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: var(--bb-primary-light);
    color: var(--bb-text);
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--bb-primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

hr {
    border: none;
    border-top: 1px solid var(--bb-border);
    margin: 2rem 0;
}


/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--bb-font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--bb-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: 700;
}

em,
i {
    font-style: italic;
}

small {
    font-size: 0.875rem;
}

code,
kbd,
samp,
tt {
    font-family: var(--bb-font-code);
    font-size: 0.875em;
    background-color: var(--bb-code-bg);
    border: 1px solid var(--bb-border);
    border-radius: 3px;
    padding: 2px 6px;
}

pre {
    font-family: var(--bb-font-code);
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: var(--bb-code-bg);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    -webkit-overflow-scrolling: touch;
}

pre code,
pre kbd,
pre samp {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: inherit;
}

blockquote {
    border-left: 4px solid var(--bb-primary);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background-color: var(--bb-primary-light);
    border-radius: 0 var(--bb-radius) var(--bb-radius) 0;
    color: #3a4a39;
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

table th,
table td {
    border: 1px solid var(--bb-border);
    padding: 0.6rem 0.875rem;
    text-align: left;
}

table th {
    background-color: var(--bb-primary-light);
    font-family: var(--bb-font-heading);
    font-weight: 700;
}

table tr:nth-child(even) td {
    background-color: #f3f0eb;
}


/* ============================================================
   5. LAYOUT
   ============================================================ */

.bb-container {
    max-width: var(--bb-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.bb-main {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
    min-height: 60vh;
}

/* Two-column layout used by tutorial pages */
.bb-layout-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--bb-gap);
}


/* ============================================================
   6. HEADER & NAVIGATION
   ============================================================ */

.bb-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bb-white);
    border-bottom: 1px solid var(--bb-border);
    /* Subtle shadow when page scrolls */
    box-shadow: 0 1px 3px rgba(43, 45, 43, 0.06);
}

.bb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 1rem;
    position: relative;
}

/* Logo */
.bb-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.bb-logo:hover {
    text-decoration: none;
}

.bb-logo-img {
    height: 34px;
    width: auto;
}

.bb-logo-text {
    font-family: var(--bb-font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bb-text);
    letter-spacing: -0.01em;
}

.bb-logo-text span {
    color: var(--bb-primary);
}

/* Navigation — Hamburger CSS-only (checkbox hack) */
.bb-nav-toggle {
    display: none;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bb-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: var(--bb-radius);
    padding: 4px;
    transition: background-color var(--bb-transition);
}

.bb-hamburger:hover {
    background-color: var(--bb-primary-light);
}

.bb-hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--bb-text);
    border-radius: 2px;
    transition: transform var(--bb-transition), opacity var(--bb-transition);
}

/* Nav */
.bb-nav {
    display: flex;
    align-items: center;
}

.bb-nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.bb-nav-list a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--bb-text);
    border-radius: var(--bb-radius);
    text-decoration: none;
    transition: background-color var(--bb-transition), color var(--bb-transition);
}

.bb-nav-list a:hover,
.bb-nav-list a.bb-nav-current {
    background-color: var(--bb-primary-light);
    color: var(--bb-primary-dark);
    text-decoration: none;
}

.bb-nav-list a.bb-nav-current {
    font-weight: 700;
}


/* ============================================================
   7. FOOTER
   ============================================================ */

.bb-footer {
    background-color: var(--bb-white);
    border-top: 1px solid var(--bb-border);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: #6b716b;
}

.bb-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bb-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    list-style: none;
}

/* Separator dots between footer links */
.bb-footer-nav li + li::before {
    content: '·';
    margin: 0 0.5rem;
    color: var(--bb-border);
}

.bb-footer-nav a {
    color: #6b716b;
    text-decoration: none;
    transition: color var(--bb-transition);
}

.bb-footer-nav a:hover {
    color: var(--bb-primary-dark);
    text-decoration: underline;
}

.bb-footer-copy {
    color: #8a908a;
}

.bb-footer-partners {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--bb-border);
}

.bb-footer-partners-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a0a6a0;
}

.bb-footer-partners a {
    display: inline-block;
    line-height: 0;
    opacity: 0.85;
    transition: opacity var(--bb-transition);
}

.bb-footer-partners a:hover {
    opacity: 1;
}

.bb-footer-partners img {
    border-radius: 3px;
    height: 2em;
    width: auto;
}


/* ============================================================
   8. HOMEPAGE — HERO, SILOS, CARDS
   ============================================================ */

/* Hero */
.bb-hero {
    text-align: center;
    padding: 3.5rem 1rem 3rem;
    border-bottom: 1px solid var(--bb-border);
    margin-bottom: 3rem;
}

.bb-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--bb-text);
}

.bb-hero-lead {
    font-size: 1.125rem;
    color: #4a4e4a;
    max-width: 640px;
    margin: 0 auto 1.75rem;
    line-height: 1.7;
}

.bb-hero-cta {
    display: inline-block;
    background-color: var(--bb-primary);
    color: var(--bb-white);
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.7rem 1.75rem;
    border-radius: var(--bb-radius);
    text-decoration: none;
    transition: background-color var(--bb-transition);
}

.bb-hero-cta:hover {
    background-color: var(--bb-primary-dark);
    text-decoration: none;
    color: var(--bb-white);
}

/* Silo sections */
.bb-silo {
    margin-bottom: 3rem;
}

.bb-silo-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid var(--bb-primary-light);
}

.bb-silo-title {
    font-family: var(--bb-font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--bb-text);
    position: relative;
}

.bb-silo-title::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 3px;
    background-color: var(--bb-primary);
    margin-top: 0.3rem;
    border-radius: 2px;
}

.bb-silo-all {
    font-size: 0.875rem;
    color: var(--bb-primary-dark);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--bb-transition);
}

.bb-silo-all:hover {
    color: var(--bb-primary);
    text-decoration: underline;
}

/* Card Grid */
.bb-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bb-gap);
}

/* Card */
.bb-card {
    background-color: var(--bb-white);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius);
    padding: 1.25rem 1.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    transition: box-shadow var(--bb-transition), border-color var(--bb-transition);
    text-decoration: none;
    color: inherit;
}

.bb-card:hover {
    box-shadow: var(--bb-shadow-hover);
    border-color: var(--bb-primary);
    text-decoration: none;
    color: inherit;
}

.bb-card-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bb-primary-dark);
}

.bb-card-title {
    font-family: var(--bb-font-heading);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--bb-text);
    line-height: 1.3;
    /* Two-line clamp for card titles in archive/lists */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bb-card-desc {
    font-size: 0.875rem;
    color: #4a4e4a;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bb-card-link {
    display: inline-block;
    margin-top: auto;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bb-primary-dark);
    text-decoration: none;
    transition: color var(--bb-transition);
}

.bb-card:hover .bb-card-link {
    color: var(--bb-primary);
}

.bb-card-link::after {
    content: ' →';
}

.bb-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.bb-card-image {
    margin: -1.25rem -1.375rem 0.75rem;
    overflow: hidden;
    border-radius: var(--bb-radius) var(--bb-radius) 0 0;
}

.bb-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform var(--bb-transition);
}

.bb-card:hover .bb-card-image img {
    transform: scale(1.03);
}

.bb-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.625rem;
}


/* ============================================================
   9. TUTORIAL-SEITE
   ============================================================ */

/* Breadcrumb */
.bb-breadcrumb {
    font-size: 0.8125rem;
    color: #7a807a;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.bb-breadcrumb a {
    color: #7a807a;
    text-decoration: none;
    transition: color var(--bb-transition);
}

.bb-breadcrumb a:hover {
    color: var(--bb-primary-dark);
    text-decoration: underline;
}

.bb-breadcrumb-sep {
    color: var(--bb-border);
    font-size: 0.75rem;
}

.bb-breadcrumb-current {
    color: var(--bb-text);
    font-weight: 500;
}

/* Meta / Badges */
.bb-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.bb-meta-date {
    font-size: 0.8125rem;
    color: #7a807a;
}

.bb-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.bb-badge-einsteiger {
    background-color: var(--bb-primary-light);
    color: var(--bb-primary-dark);
    border: 1px solid #c4d9c0;
}

.bb-badge-fortgeschritten {
    background-color: var(--bb-accent-light);
    color: var(--bb-accent);
    border: 1px solid #e0c0ae;
}

/* Tutorial content area */
.bb-tutorial-header {
    margin-bottom: 2rem;
}

.bb-tutorial-header h1 {
    margin-bottom: 0.75rem;
}

/* Main content block — all rich content lives here */
.bb-content {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.bb-tutorial-image {
    max-width: 720px;
    margin: 0 auto 2rem;
}

.bb-tutorial-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.bb-content h2 {
    font-family: var(--bb-font-heading);
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    margin-top: 2.5rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--bb-border);
    color: var(--bb-text);
}

.bb-content h3 {
    font-family: var(--bb-font-heading);
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    margin-top: 2rem;
    margin-bottom: 0.625rem;
    color: var(--bb-text);
}

.bb-content h4 {
    font-family: var(--bb-font-heading);
    font-size: 1.0625rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--bb-text);
}

.bb-content p {
    margin-bottom: 1.125rem;
    line-height: 1.75;
}

.bb-content a {
    color: var(--bb-primary-dark);
    text-decoration: underline;
    text-decoration-color: #b4ccb1;
    transition: color var(--bb-transition), text-decoration-color var(--bb-transition);
}

.bb-content a:hover {
    color: var(--bb-primary);
    text-decoration-color: var(--bb-primary);
}

/* Lists in content */
.bb-content ul,
.bb-content ol {
    margin: 0.875rem 0 1.125rem 1.5rem;
    line-height: 1.75;
}

.bb-content ul {
    list-style: disc;
}

.bb-content ol {
    list-style: decimal;
}

.bb-content li {
    margin-bottom: 0.375rem;
}

.bb-content li:last-child {
    margin-bottom: 0;
}

/* Nested lists */
.bb-content ul ul,
.bb-content ol ol,
.bb-content ul ol,
.bb-content ol ul {
    margin-top: 0.375rem;
    margin-bottom: 0.375rem;
}

/* Code blocks */
.bb-content pre {
    margin: 1.75rem 0;
    border-left: 3px solid var(--bb-primary);
}

.bb-content pre:focus {
    outline: 2px solid var(--bb-primary);
    outline-offset: 2px;
}

/* Inline code */
.bb-content code {
    font-family: var(--bb-font-code);
    font-size: 0.875em;
    background-color: var(--bb-code-bg);
    border: 1px solid var(--bb-border);
    border-radius: 3px;
    padding: 2px 6px;
}

/* Images */
.bb-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bb-radius);
    margin: 1.5rem 0;
    border: 1px solid var(--bb-border);
}

.bb-content figure {
    margin: 1.75rem 0;
}

.bb-content figcaption {
    font-size: 0.8125rem;
    color: #7a807a;
    text-align: center;
    margin-top: 0.5rem;
}

/* Tip box */
.bb-tip-box {
    border-left: 4px solid var(--bb-primary);
    background-color: var(--bb-primary-light);
    border-radius: 0 var(--bb-radius) var(--bb-radius) 0;
    padding: 1rem 1.25rem;
    margin: 1.75rem 0;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.bb-tip-box strong,
.bb-tip-box-title {
    display: block;
    font-family: var(--bb-font-heading);
    font-weight: 700;
    color: var(--bb-primary-dark);
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
}

.bb-tip-box p:last-child {
    margin-bottom: 0;
}

/* Warning box */
.bb-warning-box {
    border-left: 4px solid var(--bb-accent);
    background-color: var(--bb-accent-light);
    border-radius: 0 var(--bb-radius) var(--bb-radius) 0;
    padding: 1rem 1.25rem;
    margin: 1.75rem 0;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.bb-warning-box strong,
.bb-warning-box-title {
    display: block;
    font-family: var(--bb-font-heading);
    font-weight: 700;
    color: var(--bb-accent);
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
}

.bb-warning-box p:last-child {
    margin-bottom: 0;
}

/* Prev / Next navigation */
.bb-prev-next {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bb-border);
}

.bb-prev-next-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 45%;
}

.bb-prev-next-link.bb-next {
    text-align: right;
    margin-left: auto;
}

.bb-prev-next-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a807a;
}

.bb-prev-next-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bb-primary-dark);
    text-decoration: none;
    line-height: 1.35;
    transition: color var(--bb-transition);
}

.bb-prev-next-title:hover {
    color: var(--bb-primary);
    text-decoration: underline;
}

/* Table of contents (optional) */
.bb-toc {
    background-color: var(--bb-white);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius);
    padding: 1.125rem 1.375rem;
    margin: 0 0 2rem;
    font-size: 0.9rem;
}

.bb-toc-title {
    font-family: var(--bb-font-heading);
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--bb-text);
}

.bb-toc ol {
    list-style: decimal;
    margin-left: 1.25rem;
}

.bb-toc li {
    margin-bottom: 0.25rem;
}

.bb-toc a {
    color: var(--bb-primary-dark);
    text-decoration: none;
    font-size: 0.875rem;
}

.bb-toc a:hover {
    text-decoration: underline;
    color: var(--bb-primary);
}


/* ============================================================
   10. ARCHIVE
   ============================================================ */

.bb-archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--bb-primary-light);
}

.bb-archive-header h1 {
    margin-bottom: 0.5rem;
}

.bb-archive-description {
    font-size: 1rem;
    color: #4a4e4a;
    line-height: 1.65;
    max-width: 640px;
}

.bb-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bb-gap);
    margin-bottom: 3rem;
}

/* Archive card — same base as .bb-card, teaser gets 3 lines */
.bb-archive-card {
    background-color: var(--bb-white);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius);
    padding: 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: box-shadow var(--bb-transition), border-color var(--bb-transition);
}

.bb-archive-card:hover {
    box-shadow: var(--bb-shadow);
    border-color: var(--bb-primary);
}

.bb-archive-card-title {
    font-family: var(--bb-font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--bb-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: color var(--bb-transition);
}

.bb-archive-card-title:hover {
    color: var(--bb-primary-dark);
    text-decoration: none;
}

.bb-archive-card-teaser {
    font-size: 0.875rem;
    color: #4a4e4a;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bb-archive-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
}

.bb-archive-card-date {
    font-size: 0.75rem;
    color: #8a908a;
}

.bb-archive-card-more {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bb-primary-dark);
    text-decoration: none;
    transition: color var(--bb-transition);
}

.bb-archive-card-more:hover {
    color: var(--bb-primary);
}

/* Pagination */
.bb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.bb-pagination a,
.bb-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.625rem;
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius);
    font-size: 0.875rem;
    color: var(--bb-text);
    text-decoration: none;
    transition: background-color var(--bb-transition), border-color var(--bb-transition), color var(--bb-transition);
}

.bb-pagination a:hover {
    background-color: var(--bb-primary-light);
    border-color: var(--bb-primary);
    color: var(--bb-primary-dark);
    text-decoration: none;
}

.bb-pagination .bb-pagination-current,
.bb-pagination .current {
    background-color: var(--bb-primary);
    border-color: var(--bb-primary);
    color: var(--bb-white);
    font-weight: 700;
}


/* ============================================================
   11. PAGES & LEGAL
   ============================================================ */

.bb-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bb-border);
}

.bb-page-header h1 {
    margin-bottom: 0;
}

.bb-page-content {
    max-width: 720px;
}

.bb-page-content h2 {
    font-family: var(--bb-font-heading);
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.bb-page-content h3 {
    font-family: var(--bb-font-heading);
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.bb-page-content p {
    line-height: 1.75;
    margin-bottom: 1rem;
}

.bb-page-content ul,
.bb-page-content ol {
    margin: 0.75rem 0 1rem 1.5rem;
    line-height: 1.75;
}

.bb-page-content ul {
    list-style: disc;
}

.bb-page-content ol {
    list-style: decimal;
}

.bb-page-content li {
    margin-bottom: 0.375rem;
}

.bb-page-content a {
    color: var(--bb-primary-dark);
    text-decoration: underline;
}

.bb-page-content a:hover {
    color: var(--bb-primary);
}

/* Legal pages — slightly narrower for dense text */
.bb-legal .bb-page-content {
    max-width: 640px;
}

.bb-legal .bb-page-content p,
.bb-legal .bb-page-content li {
    font-size: 0.9375rem;
}


/* ============================================================
   12. 404
   ============================================================ */

.bb-404 {
    text-align: center;
    padding: 5rem 1rem 4rem;
}

.bb-404-code {
    font-family: var(--bb-font-heading);
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 700;
    color: var(--bb-primary-light);
    line-height: 1;
    margin-bottom: 0.5rem;
    user-select: none;
}

.bb-404 h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
    color: var(--bb-text);
}

.bb-404-text {
    font-size: 1rem;
    color: #4a4e4a;
    max-width: 420px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.bb-404-back {
    display: inline-block;
    background-color: var(--bb-primary);
    color: var(--bb-white);
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.65rem 1.75rem;
    border-radius: var(--bb-radius);
    text-decoration: none;
    transition: background-color var(--bb-transition);
}

.bb-404-back:hover {
    background-color: var(--bb-primary-dark);
    text-decoration: none;
    color: var(--bb-white);
}


/* ============================================================
   13. WORDPRESS CORE CLASSES
   ============================================================ */

/* Alignments */
.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
    max-width: 50%;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
    max-width: 50%;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.alignwide {
    max-width: calc(var(--bb-max-width) + 120px);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    width: 100%;
}

/* WP Caption */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption img {
    display: block;
    width: 100%;
    border-radius: var(--bb-radius);
    border: 1px solid var(--bb-border);
}

.wp-caption-text {
    font-size: 0.8125rem;
    color: #7a807a;
    text-align: center;
    margin-top: 0.375rem;
    line-height: 1.4;
}

/* Gallery */
.gallery {
    display: grid;
    gap: 0.75rem;
    margin: 1.75rem 0;
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: var(--bb-radius);
    border: 1px solid var(--bb-border);
}

.gallery-caption {
    font-size: 0.75rem;
    color: #7a807a;
    text-align: center;
    padding: 0.25rem 0;
}

/* Screen reader text (WordPress standard) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* WP search form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius);
    font-size: 0.9375rem;
    background-color: var(--bb-white);
    color: var(--bb-text);
    transition: border-color var(--bb-transition);
}

.search-field:focus {
    outline: none;
    border-color: var(--bb-primary);
    box-shadow: 0 0 0 3px rgba(92, 143, 85, 0.15);
}

.search-submit {
    padding: 0.5rem 1.125rem;
    background-color: var(--bb-primary);
    color: var(--bb-white);
    border: none;
    border-radius: var(--bb-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--bb-transition);
}

.search-submit:hover {
    background-color: var(--bb-primary-dark);
}

/* Sticky post label */
.bb-sticky-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background-color: var(--bb-accent-light);
    color: var(--bb-accent);
    border: 1px solid #e0c0ae;
    border-radius: 20px;
    padding: 1px 8px;
    margin-bottom: 0.5rem;
}


/* ============================================================
   14. RESPONSIVE
   ============================================================ */

/* ------ Tablet: 768px – 1060px ------ */
@media (max-width: 1060px) {
    .bb-card-grid,
    .bb-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ------ Mobile: < 768px ------ */
@media (max-width: 767px) {

    /* Container */
    .bb-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .bb-main {
        padding-top: 1.75rem;
        padding-bottom: 2.5rem;
    }

    /* Header */
    .bb-header-inner {
        height: 54px;
    }

    /* Show hamburger */
    .bb-hamburger {
        display: flex;
    }

    /* Hide nav by default on mobile */
    .bb-nav {
        position: absolute;
        top: 54px;
        left: 0;
        right: 0;
        background-color: var(--bb-white);
        border-bottom: 1px solid var(--bb-border);
        box-shadow: var(--bb-shadow);
        padding: 0.75rem 1rem;
        /* Hidden state */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding var(--bb-transition);
    }

    .bb-nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        width: 100%;
    }

    .bb-nav-list a {
        width: 100%;
        padding: 0.6rem 0.75rem;
        font-size: 1rem;
    }

    /* Checkbox hack: when nav-toggle is checked, show nav */
    .bb-nav-toggle:checked ~ .bb-nav {
        max-height: 400px;
        padding: 0.75rem 1rem;
    }

    /* Hamburger → X animation */
    .bb-nav-toggle:checked ~ .bb-hamburger .bb-hamburger-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .bb-nav-toggle:checked ~ .bb-hamburger .bb-hamburger-bar:nth-child(2) {
        opacity: 0;
    }

    .bb-nav-toggle:checked ~ .bb-hamburger .bb-hamburger-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Cards: 1 column */
    .bb-card-grid,
    .bb-archive-grid {
        grid-template-columns: 1fr;
    }

    /* Hero */
    .bb-hero {
        padding: 2rem 0.5rem 1.75rem;
    }

    /* Content max-width relinquished on mobile */
    .bb-content {
        max-width: 100%;
    }

    /* Prev/Next stack vertically on small screens */
    .bb-prev-next {
        flex-direction: column;
        gap: 1.25rem;
    }

    .bb-prev-next-item,
    .bb-prev-next-link.bb-next {
        max-width: 100%;
        text-align: left;
        margin-left: 0;
    }

    /* Alignleft / alignright: full width on mobile */
    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin: 1rem auto;
        max-width: 100%;
    }

    /* Gallery: max 2 columns on mobile */
    .gallery-columns-3,
    .gallery-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Silo header: stack on mobile */
    .bb-silo-header {
        flex-direction: column;
        gap: 0.375rem;
        align-items: flex-start;
    }

    /* Footer nav */
    .bb-footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.375rem;
    }

    .bb-footer-nav li + li::before {
        display: none;
    }
}

/* ------ Small phones < 400px ------ */
@media (max-width: 399px) {
    .bb-hero-cta,
    .bb-404-back {
        display: block;
        text-align: center;
    }

    .bb-pagination a,
    .bb-pagination span {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8125rem;
    }
}


/* ============================================================
   15. DARK MODE
   ============================================================ */

/* Klasse wird per JS gesetzt (OS-Preference + manueller Toggle) */

html.dark-mode {
    --bb-primary:       #7abf70;
    --bb-primary-dark:  #8ed083;
    --bb-primary-light: #1e2d1c;
    --bb-bg:            #1a1e1a;
    --bb-text:          #dedad4;
    --bb-accent:        #d08050;
    --bb-accent-light:  #2a1a12;
    --bb-code-bg:       #0f140f;
    --bb-border:        #384038;
    --bb-shadow:        0 2px 8px rgba(0, 0, 0, 0.40);
    --bb-shadow-hover:  0 4px 16px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
}

/* Selektion */
html.dark-mode ::selection {
    background-color: var(--bb-primary-light);
    color: var(--bb-primary);
}

/* Toggle-Button */
.bb-dark-toggle {
    background: none;
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius);
    color: var(--bb-text);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.35rem 0.5rem;
    transition: border-color var(--bb-transition), background-color var(--bb-transition);
    flex-shrink: 0;
}

.bb-dark-toggle:hover {
    border-color: var(--bb-primary);
    background-color: var(--bb-primary-light);
}

/* Header */
html.dark-mode .bb-header {
    background-color: #111511;
    border-bottom-color: #2e352e;
}

html.dark-mode .bb-logo-text {
    color: var(--bb-primary);
}

html.dark-mode .bb-logo-text span {
    color: var(--bb-accent);
}

/* Navigation */
html.dark-mode .bb-nav a {
    color: #b8c4b6;
}

html.dark-mode .bb-nav a:hover,
html.dark-mode .bb-nav a[aria-current="page"] {
    color: var(--bb-primary);
    background-color: var(--bb-primary-light);
}

/* Hamburger (Mobile) */
html.dark-mode .bb-hamburger-bar {
    background-color: #b8c4b6;
}

/* Hero */
html.dark-mode .bb-hero {
    background-color: #111511;
    border-bottom-color: #2e352e;
}

html.dark-mode .bb-hero-lead {
    color: #a8b8a6;
}

/* Silo-Karten */
html.dark-mode .bb-silo {
    background-color: #1f251f;
    border-color: #2e352e;
}

html.dark-mode .bb-silo:hover {
    border-color: var(--bb-primary);
    background-color: #232a23;
}

html.dark-mode .bb-silo-header {
    border-bottom-color: #2e352e;
}

html.dark-mode .bb-silo-count {
    color: #7a8e78;
}

/* Tutorial-Karten */
html.dark-mode .bb-card {
    background-color: #1f251f;
    border-color: #2e352e;
}

html.dark-mode .bb-card:hover {
    border-color: var(--bb-primary);
    background-color: #232a23;
}

html.dark-mode .bb-card-meta {
    color: #7a8e78;
}

/* Badges */
html.dark-mode .bb-badge-einsteiger {
    background-color: #1a2e1a;
    color: #7abf70;
    border-color: #2e4a2e;
}

html.dark-mode .bb-badge-fortgeschritten {
    background-color: #2a2010;
    color: #d08050;
    border-color: #4a3820;
}

html.dark-mode .bb-badge-experte {
    background-color: #2a1818;
    color: #c06060;
    border-color: #4a2828;
}

/* Tutorial-Seite */
html.dark-mode .bb-tutorial-header {
    border-bottom-color: #2e352e;
}

html.dark-mode .bb-meta-date,
html.dark-mode .bb-meta-thema {
    color: #7a8e78;
}

html.dark-mode .bb-tutorial-image img {
    border-color: #2e352e;
}

/* Code */
html.dark-mode .bb-content pre,
html.dark-mode .bb-content code {
    background-color: var(--bb-code-bg);
    color: #a8d4a0;
    border-color: #2e352e;
}

html.dark-mode .bb-content pre {
    border-left-color: var(--bb-primary);
}

/* Tabellen */
html.dark-mode .bb-content th {
    background-color: #1f251f;
    border-color: #2e352e;
}

html.dark-mode .bb-content td {
    border-color: #2e352e;
}

html.dark-mode .bb-content tr:nth-child(even) td {
    background-color: #1c211c;
}

/* Blockquote */
html.dark-mode .bb-content blockquote {
    border-left-color: var(--bb-primary);
    background-color: var(--bb-primary-light);
    color: #b8c4b6;
}

/* Breadcrumb */
html.dark-mode .bb-breadcrumb,
html.dark-mode .bb-breadcrumb a {
    color: #7a8e78;
}

html.dark-mode .bb-breadcrumb a:hover {
    color: var(--bb-primary);
}

/* Prev/Next */
html.dark-mode .bb-prev-next-link {
    background-color: #1f251f;
    border-color: #2e352e;
}

html.dark-mode .bb-prev-next-link:hover {
    border-color: var(--bb-primary);
    background-color: #232a23;
}

html.dark-mode .bb-prev-next-label {
    color: #7a8e78;
}

/* Archive */
html.dark-mode .bb-archive-header {
    background-color: #111511;
    border-bottom-color: #2e352e;
}

/* Formulare */
html.dark-mode input[type="text"],
html.dark-mode input[type="email"],
html.dark-mode textarea {
    background-color: #1f251f;
    border-color: #384038;
    color: var(--bb-text);
}

html.dark-mode input[type="text"]:focus,
html.dark-mode input[type="email"]:focus,
html.dark-mode textarea:focus {
    border-color: var(--bb-primary);
    outline-color: var(--bb-primary);
}

/* Footer */
html.dark-mode .bb-footer {
    background-color: #111511;
    border-top-color: #2e352e;
    color: #7a8e78;
}

html.dark-mode .bb-footer a {
    color: #7a8e78;
}

html.dark-mode .bb-footer a:hover {
    color: var(--bb-primary);
}

html.dark-mode .bb-footer-partners {
    border-bottom-color: #2e352e;
}

html.dark-mode .bb-footer-partners-label {
    color: #5a6a58;
}

/* Pagination */
html.dark-mode .bb-pagination a {
    background-color: #1f251f;
    border-color: #384038;
    color: var(--bb-primary);
}

html.dark-mode .bb-pagination a:hover {
    background-color: var(--bb-primary-light);
    border-color: var(--bb-primary);
}

html.dark-mode .bb-pagination .current {
    background-color: var(--bb-primary);
    border-color: var(--bb-primary);
    color: #111511;
}

/* Download-Seite */
html.dark-mode .bb-download-block {
    background-color: #1f251f;
    border-color: #2e352e;
}
