/* ==========================================================================
   News & Events (app/Views/news/*.php), mock-up pages.
   The list page and the article header reuse projects.css (.pj-intro, .pj-card, .pj-hero, tabs);
   this file is the article body.
   ========================================================================== */

.nw-head__inner .sample-badge {
    margin-bottom: 0.9rem;
}

.nw-title {
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
}

.nw-body-wrap {
    padding-top: 0;
}

/* Two columns on desktop: article text + sticky sidebar. Same outer edges as the cover photo. */
.nw-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
}

.nw-aside {
    align-self: stretch; /* full column height, so the inner box has room to stick */
}

.nw-aside__inner {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

/* Article text */
.nw-body {
    font-size: 1.04rem;
    line-height: 1.85;
    color: var(--color-ink-soft);
}

/* Justified article text; hyphens soften the gaps on narrow phones */
.nw-body > p,
.nw-body li {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Lead paragraph: larger serif text, left-aligned so the big words keep even spacing */
.nw-body > p:first-child {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2vw, 1.55rem);
    line-height: 1.55;
    color: var(--color-ink);
    text-align: left;
    hyphens: manual;
    -webkit-hyphens: manual;
}

.nw-body > p:first-child + p {
    margin-top: 1.5rem;
}

.nw-body p + p {
    margin-top: 1.15rem;
}

.nw-body h2 {
    font-size: clamp(1.55rem, 2.6vw, 1.95rem);
    color: var(--color-ink);
    margin: 2.4rem 0 0.9rem;
}

.nw-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nw-body li {
    position: relative;
    padding: 0.7rem 0 0.7rem 1.6rem;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.65;
}

.nw-body li::before {
    content: '';
    position: absolute;
    left: 0.2rem;
    top: calc(0.7rem + 0.85em); /* middle of the first text line (padding-top + half the line height) */
    width: 0.55rem;
    height: 1px;
    background-color: var(--color-accent);
}

/* Reseller box (sidebar): text on top, buttons below */
.nw-callout {
    padding: 1.6rem 1.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--color-surface-alt);
}

.nw-callout__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--color-ink);
}

.nw-callout__desc {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.nw-callout__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.nw-callout__actions .btn {
    flex: 1;
}

/* Share */
.nw-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.nw-callout + .nw-share {
    margin-top: 1.75rem;
}

.nw-share__label {
    flex-basis: 100%; /* own line in the narrow sidebar */
    margin-right: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.nw-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: none;
    font-family: inherit;
    font-size: 0.84rem;
    line-height: 1.2;
    color: var(--color-ink-soft);
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nw-share__btn:hover {
    border-color: var(--color-ink);
    background-color: var(--color-ink);
    color: #FFFFFF;
}

.nw-back {
    display: inline-block;
    margin-top: 1.75rem;
}

/* Tablets and phones: one column, the sidebar drops below the text and stops sticking */
@media (max-width: 1024px) {
    .nw-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.75rem;
    }

    .nw-aside__inner {
        position: static;
    }

    /* Wider box: text and buttons side by side */
    .nw-callout {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem 2rem;
        padding: clamp(1.5rem, 3.5vw, 2rem) clamp(1.5rem, 3.5vw, 2.25rem);
    }

    .nw-callout__text {
        flex: 1 1 260px;
    }

    .nw-callout__actions {
        margin-top: 0;
    }

    .nw-callout__actions .btn {
        flex: none;
    }

    .nw-share__label {
        flex-basis: auto;
    }
}

@media (max-width: 560px) {
    .nw-callout__actions {
        width: 100%;
    }

    .nw-callout__actions .btn {
        flex: 1;
    }
}
