/* Startseite im gleichen Designsystem wie das ueberarbeitete Kunena-Forum. */
body.is-homepage {
    --home-red: #e53935;
    --home-red-bright: #ff4b46;
    --home-bg: rgba(25, 25, 28, 0.72);
    --home-panel: rgba(39, 39, 43, 0.9);
    --home-panel-soft: rgba(48, 49, 54, 0.82);
    --home-border: rgba(171, 174, 183, 0.22);
    --home-text: #f4f4f5;
    --home-muted: #b6b7bd;
}

body.is-homepage main {
    padding: clamp(18px, 2.5vw, 34px) clamp(10px, 2.2vw, 26px) 54px;
}

/* Entspricht der grossen #kunena-Flaeche. */
body.is-homepage .blog-container,
body.is-homepage .blog-container.sb-homepage {
    position: relative;
    isolation: isolate;
    overflow: visible;
    width: min(100%, 1180px) !important;
    max-width: 1180px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 auto 44px !important;
    padding: clamp(12px, 1.7vw, 20px) !important;
    border: 2px solid rgba(5, 5, 7, 0.9) !important;
    border-radius: 12px !important;
    background: var(--home-bg) !important;
    color: var(--home-text) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
    backdrop-filter: blur(5px) saturate(0.84);
    -webkit-backdrop-filter: blur(5px) saturate(0.84);
}

body.is-homepage .blog-container.sb-homepage::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.018), transparent 35%);
    filter: none;
    transform: none;
    pointer-events: none;
}

body.is-homepage .blog-container.sb-homepage::after {
    display: none !important;
    content: none !important;
}

/* Alle Alt-Huellen werden flach, damit keine Rahmen ineinander liegen. */
body.is-homepage .sb-home-shell,
body.is-homepage .sb-home-neutral-layer,
body.is-homepage .sb-home-flat-layer {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

body.is-homepage .sb-home-shell::before,
body.is-homepage .sb-home-shell::after,
body.is-homepage .sb-home-neutral-layer::before,
body.is-homepage .sb-home-neutral-layer::after,
body.is-homepage .sb-home-flat-layer::before,
body.is-homepage .sb-home-flat-layer::after {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* Logo: kompakt wie der Benutzerkopf im Forum. */
body.is-homepage .sb-home-brand-zone {
    position: relative;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
    margin: 0 0 12px !important;
    padding: 8px 14px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.is-homepage .sb-home-brand-zone::after {
    content: "" !important;
    position: absolute;
    right: 50%;
    bottom: -1px;
    display: block !important;
    width: 112px;
    height: 2px;
    border-radius: 999px;
    background: var(--home-red) !important;
    box-shadow: 0 0 12px rgba(229, 57, 53, 0.48) !important;
    transform: translateX(50%);
}

body.is-homepage .sb-home-brand-visual {
    display: block !important;
    width: min(500px, 70vw) !important;
    max-width: 100% !important;
    max-height: 120px !important;
    object-fit: contain;
    margin: 0 auto !important;
    filter: drop-shadow(0 9px 18px rgba(0, 0, 0, 0.34));
}

/* Begruessung als kompakte Forum-Sektion. */
body.is-homepage .sb-home-intro {
    position: relative;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden;
    margin: 0 0 14px !important;
    padding: clamp(20px, 2.6vw, 30px) clamp(20px, 3vw, 36px) !important;
    border: 1px solid var(--home-border) !important;
    border-radius: 9px !important;
    background: rgba(38, 38, 42, 0.78) !important;
    color: var(--home-text) !important;
    text-align: left !important;
    box-shadow: 0 9px 23px rgba(0, 0, 0, 0.26) !important;
}

body.is-homepage .sb-home-intro::before {
    content: "";
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: var(--home-red);
    box-shadow: 0 0 12px rgba(255, 55, 55, 0.62);
}

body.is-homepage .sb-home-intro::after {
    display: none !important;
    content: none !important;
}

body.is-homepage .sb-home-intro :is(h1, h2, h3) {
    max-width: none;
    margin: 0 0 10px !important;
    color: #fff !important;
    font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    text-align: left !important;
}

body.is-homepage .sb-home-intro p {
    max-width: 900px;
    margin: 0 !important;
    color: #d4d5d9 !important;
    font-size: clamp(0.96rem, 1.2vw, 1.05rem) !important;
    line-height: 1.55 !important;
    text-align: left !important;
}

/* Abschnittsueberschrift wie kpage-header im Forum. */
body.is-homepage .sb-home-section-heading {
    position: relative;
    display: block;
    margin: 12px 0 7px;
    padding: 10px 14px 10px 17px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

body.is-homepage .sb-home-section-heading::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: var(--home-red);
    box-shadow: 0 0 12px rgba(255, 55, 55, 0.62);
}

body.is-homepage .sb-home-section-heading h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px !important;
    color: #fff !important;
    font-size: clamp(1.15rem, 1.8vw, 1.45rem) !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
}

body.is-homepage .sb-home-section-heading h2::after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: var(--home-red);
    box-shadow: 0 0 9px rgba(229, 57, 53, 0.42);
}

body.is-homepage .sb-home-section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--home-muted);
    line-height: 1.45;
    text-align: left;
}

body.is-homepage .com-content-category-blog.blog,
body.is-homepage .com-content-category-blog.blog .items-row,
body.is-homepage .com-content-category-blog.blog .blog-items {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Videobeitraege entsprechen den kompakten Forumzeilen. */
body.is-homepage .sb-home-card {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden;
    margin: 5px 0 !important;
    padding: 0 !important;
    border: 1px solid var(--home-border) !important;
    border-radius: 9px !important;
    background: linear-gradient(110deg, rgba(50, 51, 56, 0.88), rgba(35, 35, 39, 0.88)) !important;
    color: var(--home-text) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26) !important;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

body.is-homepage .sb-home-card::before {
    content: "";
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: rgba(255, 55, 55, 0.72);
    box-shadow: 0 0 13px rgba(255, 55, 55, 0.5);
}

body.is-homepage .sb-home-card:hover,
body.is-homepage .sb-home-card:focus-within {
    transform: translateX(3px);
    border-color: rgba(255, 75, 70, 0.46) !important;
    background: linear-gradient(110deg, rgba(56, 56, 62, 0.94), rgba(38, 36, 40, 0.94)) !important;
    box-shadow: 0 11px 25px rgba(0, 0, 0, 0.32), 0 0 15px rgba(255, 48, 48, 0.09) !important;
}

body.is-homepage .sb-home-card-layout {
    display: grid !important;
    grid-template-columns: minmax(300px, 0.95fr) minmax(280px, 1.05fr);
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    align-items: stretch;
}

body.is-homepage .sb-home-media {
    position: relative;
    min-width: 0;
    min-height: 220px;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #090a0c !important;
}

body.is-homepage .sb-home-media::after {
    display: none !important;
    content: none !important;
}

body.is-homepage .sb-home-media iframe,
body.is-homepage .sb-home-media lite-youtube,
body.is-homepage .sb-home-media video,
body.is-homepage .sb-home-media > [class*="video" i] {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 220px !important;
    aspect-ratio: 16 / 9;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: cover;
}

body.is-homepage .sb-home-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding: clamp(17px, 2.5vw, 28px) !important;
    background: transparent !important;
    color: var(--home-text) !important;
}

body.is-homepage .sb-home-copy :is(h1, h2, h3, h4, .item-title) {
    margin: 0 0 7px !important;
    color: #fff !important;
    font-size: clamp(1.05rem, 1.55vw, 1.25rem) !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
}

body.is-homepage .sb-home-copy :is(h1, h2, h3, h4, .item-title) a {
    color: #fff !important;
    text-decoration: none !important;
}

body.is-homepage .sb-home-copy :is(h1, h2, h3, h4, .item-title) a:hover,
body.is-homepage .sb-home-copy :is(h1, h2, h3, h4, .item-title) a:focus-visible {
    color: var(--home-red-bright) !important;
}

body.is-homepage .sb-home-copy :is(p, .article-info, small, .small) {
    color: var(--home-muted) !important;
    line-height: 1.45 !important;
}

body.is-homepage .sb-home-copy p {
    margin: 0 0 8px !important;
}

body.is-homepage .sb-home-copy a,
body.is-homepage .blog-container a.readmore,
body.is-homepage .blog-container .readmore a {
    color: var(--home-red-bright) !important;
    text-decoration-color: rgba(255, 75, 70, 0.42);
}

/* Grosses Video als normale Forumkarte, nicht als eigener Showblock. */
body.is-homepage .sb-home-feature-frame {
    position: relative;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 340px !important;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    box-sizing: border-box;
    margin: 10px 0 0 !important;
    padding: 8px !important;
    border: 1px solid var(--home-border) !important;
    border-radius: 9px !important;
    background: var(--home-panel) !important;
    box-shadow: 0 9px 23px rgba(0, 0, 0, 0.26) !important;
}

body.is-homepage .sb-home-feature-frame::before {
    content: "";
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: rgba(255, 55, 55, 0.72);
    box-shadow: 0 0 13px rgba(255, 55, 55, 0.5);
}

body.is-homepage .sb-home-feature-frame > *,
body.is-homepage .sb-home-feature-frame .video-responsive,
body.is-homepage .sb-home-feature-frame [class*="video" i] {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    box-sizing: border-box;
}

body.is-homepage .sb-home-feature-frame iframe,
body.is-homepage .sb-home-feature-frame lite-youtube,
body.is-homepage .sb-home-feature-frame video {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    aspect-ratio: auto;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: #090a0c;
}

/* Gleicher dunkler Button wie im Forum. */
body.is-homepage .sb-home-load-more,
body.is-homepage button.sb-home-load-more,
body.is-homepage a.sb-home-load-more,
body.is-homepage input.sb-home-load-more {
    display: flex !important;
    width: max-content !important;
    min-width: 132px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    margin: 12px auto 4px !important;
    padding: 8px 16px !important;
    border: 1px solid rgba(229, 57, 53, 0.62) !important;
    border-radius: 6px !important;
    background: rgba(57, 57, 62, 0.9) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-weight: 650 !important;
    text-decoration: none !important;
    box-shadow: 0 0 12px rgba(229, 57, 53, 0.1) !important;
    opacity: 1 !important;
}

body.is-homepage .sb-home-load-more:hover,
body.is-homepage .sb-home-load-more:focus-visible {
    border-color: var(--home-red-bright) !important;
    background: rgba(229, 57, 53, 0.2) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

body.is-homepage .blog-container .icons .btn,
body.is-homepage .blog-container a[title*="bearbeiten" i] {
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 6px !important;
    background: rgba(57, 57, 62, 0.9) !important;
    color: #fff !important;
    box-shadow: none !important;
}

@media (max-width: 820px) {
    body.is-homepage .sb-home-card-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.is-homepage .sb-home-media,
    body.is-homepage .sb-home-media iframe,
    body.is-homepage .sb-home-media lite-youtube,
    body.is-homepage .sb-home-media video {
        min-height: 0 !important;
    }
}

@media (max-width: 560px) {
    body.is-homepage main {
        padding: 12px 6px 40px;
    }

    body.is-homepage .blog-container,
    body.is-homepage .blog-container.sb-homepage {
        padding: 8px !important;
        border-radius: 9px !important;
    }

    body.is-homepage .sb-home-brand-visual {
        max-height: 90px !important;
    }

    body.is-homepage .sb-home-intro {
        padding: 19px 17px 19px 20px !important;
    }

    body.is-homepage .sb-home-feature-frame {
        min-height: 220px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.is-homepage .sb-home-card,
    body.is-homepage .sb-home-load-more {
        transition-duration: 0.01ms !important;
    }
}
