/* ══════════════════════════════════════════════════════════════════
   STARTSEITE: CRITICAL CSS (Above the fold)
   Fokus: Featured-Banner, Artikelliste, obere Sidebar-Widgets
══════════════════════════════════════════════════════════════════ */

.home-shell {
    padding-top: 0;
    padding-bottom: 0;
}

.home-section--featured { margin-bottom: var(--home-sp-repo, 32px); }
.home-section--list { margin-bottom: var(--home-sp-list, 32px); }

.home-featured-banner {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(132px, 21%) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    height: clamp(176px, 20vw, 220px);
    max-height: 250px;
    min-height: 0;
    overflow: hidden;
    padding: 16px 18px;
    background:
        radial-gradient(circle at 10% 14%, rgba(13, 148, 136, .055), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96));
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.home-featured-banner[hidden] {
    display: none;
}

.home-featured-banner__media {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    border: 1px solid rgba(15, 23, 42, .06);
}

.home-featured-banner__media picture,
.home-featured-banner__media img {
    display: block;
    width: 100%;
    height: 100%;
}

.home-featured-banner__media img {
    object-fit: contain;
    object-position: center center;
    opacity: .86;
    filter: saturate(.78) contrast(.96);
}

.home-featured-banner--no-media {
    grid-template-columns: minmax(0, 1fr);
    background:
        radial-gradient(circle at 12% 18%, rgba(13, 148, 136, .07), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .95));
}

.home-featured-banner__body {
    position: relative;
    z-index: 2;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.home-featured-banner__label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 8px;
    padding: 0 0 6px;
    border-bottom: 1px solid rgba(13, 148, 136, .18);
    background: transparent;
    color: var(--color-text-secondary, var(--text-secondary));
    font-size: var(--fs-section-label, 11px);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-featured-banner__title {
    margin: 0;
    font-family: var(--font-brand, 'Space Grotesk', 'Sora', 'Inter', sans-serif);
    font-size: var(--hero-title-size, clamp(20px, 2.1vw, 28px));
    line-height: var(--lh-display-2, 1.08);
    letter-spacing: var(--ls-display-2, -0.034em);
    color: var(--text-primary);
    text-wrap: pretty;
}

.home-featured-banner__title a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.home-featured-banner__text {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: var(--hero-subtitle-size, .9rem);
    line-height: var(--hero-subtitle-line-height, 1.55);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.home-featured-banner__footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

.home-featured-banner__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    margin-left: auto;
    border: 1px solid rgba(13, 148, 136, .24);
    border-radius: var(--radius-sm);
    background: rgba(13, 148, 136, .045);
    color: var(--accent-teal);
    font-size: var(--fs-sm, .875rem);
    font-weight: 700;
    text-decoration: none;
}

.homepage-list-with-sidebar {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.homepage-list-main {
    flex: 1;
    min-width: 0;
}

.homepage-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 var(--hp-sidebar-w, 270px);
    width: var(--hp-sidebar-w, 270px);
    min-width: 0;
    align-self: stretch;
}

.article-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--bg-primary);
}

.article-card {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.article-card:last-child {
    border-bottom: none;
}

.article-thumb {
    position: relative;
    isolation: isolate;
    flex-shrink: 0;
    width: 162px;
    height: 215px;
    overflow: hidden;
    border-radius: calc(var(--radius) - 2px);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.article-thumb picture,
.article-thumb img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
}

.article-thumb picture {
    opacity: 1;
    transition: opacity .12s ease;
}

.article-thumb--js-loading picture {
    opacity: 0;
}

.article-thumb.is-loaded picture {
    opacity: 1;
}

.article-thumb img {
    object-fit: cover;
    object-position: center top;
}

.thumb-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 4px;
    background: var(--accent-teal);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    z-index: 3;
}

.article-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-light);
    font-size: 2rem;
}

.article-thumb-placeholder--skeleton {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    color: transparent;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .04), transparent 45%),
        linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    opacity: 1;
    transition: opacity .12s ease;
}

.article-thumb-placeholder--skeleton::before {
    content: '';
    width: 46%;
    height: 42%;
    border-radius: 999px;
    background: rgba(255, 255, 255, .36);
    box-shadow: 0 0 0 22px rgba(255, 255, 255, .1);
}

.article-thumb.is-loaded .article-thumb-placeholder--skeleton {
    opacity: 0;
}

.article-thumb.has-image-error .article-thumb-placeholder--skeleton {
    opacity: 1;
}

.article-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.article-body h3,
.article-body h4 {
    order: 1;
    margin: 0 0 4px;
    color: var(--text-primary);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.4;
}

.article-body h3 a,
.article-body h4 a {
    color: inherit;
    text-decoration: none;
}

.article-meta {
    order: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    color: #475569;
    font-size: var(--fs-xs);
}

.article-meta__primary,
.article-meta__timing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}

.article-meta .read {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 600;
    line-height: 1.2;
}

.article-body p {
    order: 3;
    margin: 6px 0 0;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.article-footer {
    order: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    color: #475569;
    font-size: var(--fs-xs);
}

.article-meta__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid rgba(13, 148, 136, .28);
    border-radius: 999px;
    background: transparent;
    color: var(--accent-teal);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.sb-widget {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.homepage-list-sidebar .sb-widget > .sb-widget-title {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    margin: -12px -14px 12px;
    padding: 9px 14px;
    background: linear-gradient(90deg, rgba(51, 65, 85, .96) 0%, rgba(100, 116, 139, .9) 100%);
    border-bottom: 1px solid rgba(226, 232, 240, .22);
    color: #f8fafc;
    font-size: var(--fs-widget-title, 10px);
    font-weight: 700;
    letter-spacing: .9px;
    line-height: 1.2;
    text-transform: uppercase;
}

.sb-widget-title__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    line-height: 1;
}

.sb-widget-title__text {
    min-width: 0;
}

.sb-widget--identity {
    padding: 0;
}

.sb-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 14px 13px;
    background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
    text-decoration: none;
}

.sb-identity-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
}

.sb-identity-logo {
    max-width: 130px;
    max-height: 42px;
    width: auto;
    object-fit: contain;
    margin-bottom: 5px;
}

.sb-identity--has-badge .sb-identity-logo {
    margin-bottom: 0;
}

.sb-identity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(217, 119, 6, .28);
    border-radius: 999px;
    background: rgba(245, 158, 11, .12);
    color: #92400e;
    font-size: var(--fs-widget-title, 10px);
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.sb-identity-tagline {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: var(--fs-widget-meta, 11px);
    line-height: 1.4;
}

.sb-widget--carousel {
    padding: 0;
}

.homepage-list-sidebar .sb-widget--carousel > .sb-widget-title {
    margin: 0;
}

.sb-carousel-track {
    position: relative;
    min-height: calc(var(--sb-carousel-image-h, 96px) + 104px);
    background: var(--bg-primary);
    overflow: hidden;
}

.sb-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.sb-carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.sb-carousel-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.sb-carousel-image {
    display: block;
    width: 100%;
    height: var(--sb-carousel-image-h, 96px);
    object-fit: cover;
    background: var(--bg-secondary);
}

.sb-carousel-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px 12px;
}

.sb-carousel-title {
    margin: 0;
    color: var(--text-primary);
    font-size: calc(var(--fs-widget-link, 12px) + 1px);
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.sb-carousel-controls {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.sb-carousel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1;
}

.sb-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.sb-carousel-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--border-color);
}

.sb-carousel-dot.is-active {
    width: 18px;
    background: var(--accent-teal);
}

body.dark-mode .home-featured-banner {
    background:
        radial-gradient(circle at 10% 14%, rgba(45, 212, 191, .045), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 41, 59, .94));
    border-color: rgba(226, 232, 240, .12);
}

body.dark-mode .home-featured-banner--no-media {
    background:
        radial-gradient(circle at 12% 18%, rgba(45, 212, 191, .055), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 41, 59, .94));
}

body.dark-mode .home-featured-banner__label {
    border-bottom-color: rgba(226, 232, 240, .24);
    color: rgba(226, 232, 240, .76);
}

body.dark-mode .home-featured-banner__text,
body.dark-mode .article-body p,
body.dark-mode .article-meta,
body.dark-mode .article-footer,
body.dark-mode .sb-identity-tagline {
    color: #cbd5e1;
}

body.dark-mode .article-list,
body.dark-mode .article-card,
body.dark-mode .sb-widget,
body.dark-mode .homepage-list-sidebar .sb-widget > .sb-widget-title,
body.dark-mode .sb-carousel-controls {
    border-color: var(--border-dark);
}

body.dark-mode .article-card,
body.dark-mode .sb-widget,
body.dark-mode .sb-carousel-track,
body.dark-mode .sb-carousel-btn {
    background: var(--bg-dark-2);
}

body.dark-mode .sb-identity {
    background: linear-gradient(160deg, rgba(30, 41, 59, .96) 0%, rgba(17, 24, 39, .98) 100%);
}

body.dark-mode .homepage-list-sidebar .sb-widget > .sb-widget-title {
    background: linear-gradient(90deg, rgba(30, 41, 59, .96) 0%, rgba(71, 85, 105, .92) 100%);
    color: rgba(248, 250, 252, .96);
}

@media (max-width: 768px) {
    .home-featured-banner {
        grid-template-columns: 1fr;
        grid-template-rows: 84px minmax(0, 1fr);
        gap: 12px;
        height: clamp(200px, 54vw, 250px);
        max-height: 250px;
        padding: 14px;
    }

    .home-featured-banner__media {
        height: 84px;
        max-height: 84px;
    }

    .home-featured-banner__text {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .homepage-list-with-sidebar {
        flex-direction: column;
        gap: 18px;
    }

    .homepage-list-main,
    .homepage-list-sidebar {
        width: 100%;
    }

    .article-list {
        gap: 16px;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        background: transparent;
    }

    .article-card {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .article-thumb,
    .article-thumb-placeholder {
        width: 100%;
        height: clamp(150px, 45vw, 210px);
        min-width: 0;
        max-height: 210px;
        border-radius: 0;
    }

    .thumb-badge {
        display: none;
    }

    .article-body {
        padding: 13px 14px 14px;
    }

    .article-body h3,
    .article-body h4 {
        margin: 0 0 5px;
        font-size: 1rem;
        line-height: 1.35;
        min-height: calc(1.35em * 2);
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

    .article-body p {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        font-size: var(--fs-sm);
        line-height: 1.6;
    }

    .article-footer {
        align-items: center;
        padding-top: 10px;
    }
}

@media (max-width: 480px) {
    .article-body {
        padding: 10px 12px 10px;
    }

    .article-body h3,
    .article-body h4 {
        font-size: .92rem;
    }

    .article-body p {
        font-size: .82rem;
        line-height: 1.55;
    }
}
