/* =========================================================
   HBS Garage · Neuigkeiten
   ========================================================= */

.news-page,
.news-editor-page {
    display: grid;
    gap: 1rem;
    padding: .8rem 0 3rem;
}


/* =========================================================
   ÜBERSICHT · HERO
   ========================================================= */

.news-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.55rem 1.7rem;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(126, 166, 112, .17),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #fafbf7 0%,
            #eff5ed 100%
        );
}

.news-hero-copy h1 {
    margin: .25rem 0 .35rem;
    color: var(--color-text);
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.news-hero-copy p {
    max-width: 680px;
    margin: 0;
    color: var(--color-text-muted);
    font-size: .8rem;
    line-height: 1.55;
}

.news-hero-side {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.news-hero-badge {
    min-width: 145px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .55rem;
    align-items: center;
    padding: .7rem .8rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
}

.news-hero-badge > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--color-primary-light);
}

.news-hero-badge div {
    display: grid;
}

.news-hero-badge small {
    color: var(--color-text-muted);
    font-size: .56rem;
}

.news-hero-badge strong {
    margin-top: .08rem;
    font-size: .7rem;
}


/* =========================================================
   CONTENT
   ========================================================= */

.news-content {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(245px, .48fr);
    gap: 1rem;
    align-items: start;
}


/* ---------- Timeline ---------- */

.news-timeline {
    position: relative;
    display: grid;
    gap: .75rem;
    padding-left: 1.25rem;
}

.news-timeline::before {
    content: "";
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: .28rem;
    width: 2px;
    border-radius: 999px;
    background: var(--color-border);
}

.news-card {
    position: relative;
    overflow: visible;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(25, 47, 31, .035);
}

.news-card-marker {
    position: absolute;
    top: 1.35rem;
    left: -1.43rem;
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary);
}

.news-card--announcement .news-card-marker {
    background: #c98b2d;
    box-shadow: 0 0 0 2px #c98b2d;
}

.news-card.is-draft {
    border-style: dashed;
    opacity: .78;
}

.news-card-content {
    padding: 1.2rem 1.3rem;
}


/* ---------- Meta ---------- */

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-bottom: .65rem;
}

.news-card-meta time {
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: .62rem;
}

.news-type,
.news-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: 25px;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .6rem;
    font-weight: 850;
}

.news-type--update {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.news-type--announcement {
    background: #fff3dc;
    color: #7a5318;
}

.news-status {
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
}


/* ---------- Beitrag ---------- */

.news-card h2 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    letter-spacing: -.02em;
}

.news-summary {
    margin: .45rem 0 0;
    color: #536159;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.55;
}

.news-body {
    margin-top: .8rem;
    color: var(--color-text);
    font-size: .74rem;
    line-height: 1.7;
}

.news-body p {
    margin: 0 0 .65rem;
}

.news-body p:last-child {
    margin-bottom: 0;
}


/* ---------- Termin ---------- */

.news-expected {
    width: fit-content;
    display: grid;
    grid-template-columns: 34px auto;
    gap: .5rem;
    align-items: center;
    margin-top: .9rem;
    padding: .55rem .65rem;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface-muted);
}

.news-expected.is-announcement {
    border-color: #ead7b5;
    background: #fff9ed;
}

.news-expected-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #fff;
}

.news-expected > span:last-child {
    display: grid;
}

.news-expected small {
    color: var(--color-text-muted);
    font-size: .54rem;
}

.news-expected strong {
    margin-top: .05rem;
    font-size: .66rem;
}


/* ---------- Admin ---------- */

.news-admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .7rem;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--color-border);
}

.news-admin-label {
    color: var(--color-text-muted);
    font-size: .56rem;
}

.news-admin-actions > div {
    display: flex;
    gap: .45rem;
}

.news-admin-actions form {
    margin: 0;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.news-side {
    position: sticky;
    top: calc(var(--header-height, 74px) + 1rem);
    display: grid;
    gap: .75rem;
}

.news-side-card,
.news-feedback-link {
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(25, 47, 31, .035);
}

.news-side-card {
    padding: 1.05rem;
}

.news-side-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: .7rem;
    border-radius: 12px;
    background: var(--color-primary-light);
}

.news-side-card h2 {
    margin: 0;
    font-size: .9rem;
    line-height: 1.3;
}

.news-side-card > p {
    margin: .35rem 0 0;
    color: var(--color-text-muted);
    font-size: .66rem;
    line-height: 1.5;
}

.news-legend {
    display: grid;
    gap: .55rem;
    margin-top: .85rem;
}

.news-legend > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: .5rem;
    align-items: center;
}

.news-legend-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.news-legend-icon.update {
    background: var(--color-primary-light);
}

.news-legend-icon.announcement {
    background: #fff3dc;
}

.news-legend > div > span:last-child {
    display: grid;
}

.news-legend strong {
    font-size: .64rem;
}

.news-legend small {
    margin-top: .05rem;
    color: var(--color-text-muted);
    font-size: .56rem;
    line-height: 1.35;
}


/* ---------- Feedback Link ---------- */

.news-feedback-link {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: .55rem;
    align-items: center;
    padding: .8rem;
    color: var(--color-text);
    text-decoration: none;
}

.news-feedback-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--color-surface-muted);
}

.news-feedback-link > span:nth-child(2) {
    display: grid;
}

.news-feedback-link small {
    color: var(--color-text-muted);
    font-size: .55rem;
}

.news-feedback-link strong {
    margin-top: .05rem;
    font-size: .65rem;
}


/* =========================================================
   EMPTY
   ========================================================= */

.news-empty {
    display: grid;
    justify-items: center;
    padding: 4rem 1.5rem;
    border: 1px dashed var(--color-border);
    border-radius: 22px;
    background: var(--color-surface-muted);
    text-align: center;
}

.news-empty-icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    margin-bottom: .75rem;
    border-radius: 18px;
    background: #fff;
    font-size: 1.6rem;
}

.news-empty h2 {
    margin: .3rem 0;
}

.news-empty p {
    max-width: 480px;
    margin: 0 0 1rem;
    color: var(--color-text-muted);
    font-size: .72rem;
}


/* =========================================================
   EDITOR
   ========================================================= */

.news-editor-back {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: .4rem;
    color: var(--color-primary-dark);
    text-decoration: none;
    font-size: .7rem;
    font-weight: 800;
}

.news-editor-header {
    padding: 1.4rem 1.55rem;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            #fafbf7,
            #eff5ed
        );
}

.news-editor-header h1 {
    margin: .2rem 0 .3rem;
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    letter-spacing: -.035em;
}

.news-editor-header p {
    max-width: 650px;
    margin: 0;
    color: var(--color-text-muted);
    font-size: .74rem;
}

.news-editor-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(260px, .55fr);
    gap: 1rem;
    align-items: start;
}

.news-editor-card,
.news-editor-side-card {
    padding: 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
}

.news-editor-sidebar {
    display: grid;
    gap: .75rem;
}

.news-editor-section-heading {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    margin-bottom: 1rem;
}

.news-editor-section-heading > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--color-primary-light);
}

.news-editor-section-heading h2 {
    margin: 0;
    font-size: .95rem;
}

.news-editor-section-heading p {
    margin: .15rem 0 0;
    color: var(--color-text-muted);
    font-size: .62rem;
}

.news-editor-section-heading.compact {
    margin-bottom: .8rem;
}

.news-editor-grid {
    display: grid;
    gap: .85rem;
}

.news-editor-card .form-group,
.news-editor-side-card .form-group {
    display: grid;
    gap: .35rem;
}

.news-editor-side-card .form-group + .form-group {
    margin-top: .75rem;
}

.news-editor-card label,
.news-editor-side-card label {
    font-size: .68rem;
    font-weight: 800;
}

.news-editor-card .form-control,
.news-editor-side-card .form-control {
    width: 100%;
    box-sizing: border-box;
}

.news-body-input {
    min-height: 260px;
    resize: vertical;
}

.form-help {
    color: var(--color-text-muted);
    font-size: .6rem;
    line-height: 1.4;
}

.form-error {
    color: #a33434;
    font-size: .62rem;
    font-weight: 700;
}


/* ---------- Benachrichtigung ---------- */

.news-notify-option {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: .6rem;
    align-items: start;
    cursor: pointer;
}

.news-notify-option input {
    width: 18px;
    height: 18px;
    margin: .1rem 0 0;
    accent-color: var(--color-primary);
}

.news-notify-option > span {
    display: grid;
}

.news-notify-option strong {
    font-size: .68rem;
}

.news-notify-option small {
    margin-top: .15rem;
    color: var(--color-text-muted);
    font-size: .6rem;
    font-weight: 500;
    line-height: 1.4;
}


/* ---------- Editor Actions ---------- */

.news-editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.news-editor-actions .btn {
    width: 100%;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .news-content,
    .news-editor-layout {
        grid-template-columns: 1fr;
    }

    .news-side {
        position: static;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .news-feedback-link {
        align-self: start;
    }
}


@media (max-width: 700px) {

    .news-page,
    .news-editor-page {
        padding-top: .3rem;
        padding-bottom: 6rem;
    }

    .news-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
        padding: 1.2rem;
        border-radius: 20px;
    }

    .news-hero-side {
        align-items: stretch;
        flex-direction: column;
    }

    .news-hero-badge {
        min-width: 0;
    }

    .news-hero-side .btn {
        width: 100%;
    }

    .news-timeline {
        padding-left: .9rem;
    }

    .news-timeline::before {
        left: .08rem;
    }

    .news-card-marker {
        left: -1.08rem;
    }

    .news-card-content {
        padding: 1rem;
    }

    .news-card-meta time {
        width: 100%;
        margin-left: 0;
    }

    .news-admin-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .news-admin-actions > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .news-side {
        grid-template-columns: 1fr;
    }

    .news-editor-header {
        padding: 1.15rem;
    }

    .news-editor-actions {
        grid-template-columns: 1fr;
    }

    .news-editor-actions .btn:first-child {
        order: 2;
    }
}


@media (max-width: 430px) {

    .news-card-meta {
        align-items: flex-start;
    }

    .news-admin-actions > div {
        grid-template-columns: 1fr;
    }

    .news-expected {
        width: 100%;
        box-sizing: border-box;
    }
}
