/* ══════════════════════════════════════════════════════════════
   NibPageHero — Paginaheader: foto + infobalk eronder
   Kleur-systeem identiek aan nib-card.css
   ══════════════════════════════════════════════════════════════ */

.nib-page-hero {
    position: relative;
    width: 100%;
    container-type: inline-size;

    /* Afgeleide kleuren — licht thema (zelfde percentages als nib-card) */
    --_color:   var(--nph-color, #075082);
    --_info-bg: color-mix(in oklab, var(--_color), white 52%);
    --_border:  color-mix(in oklab, var(--_color), white 35%);
    --_type:    color-mix(in oklab, var(--_color), black 10%);
    --_title:   color-mix(in oklab, var(--_color), black 32%);
    --_since:   color-mix(in oklab, var(--_color), black 12%);
}

/* ── Fotovlak ─────────────────────────────────────────── */
.nib-page-hero-photo {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: color-mix(in oklab, var(--_color) 55%, #0a0a14);

    /* Desktop: 3:1 verhouding (2400x800) */
    aspect-ratio: 3 / 1;
}

.nib-page-hero-bg-img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.nib-page-hero-bg-color {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.nib-page-hero-bg-color.nib-sk {
    border-radius: 0;
    opacity: 0.6;
}

/* ── Acties rechtsboven in de foto ──────────────────────── */
.nib-page-hero-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
    display: flex;
    gap: 0.5rem;
    max-width: calc(100% - 2rem);
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── Infobalk onder foto ─────────────────────────────────── */
.nib-page-hero-infobar {
    position: relative;
    display: flex;
    align-items: flex-start;
    background: var(--_info-bg);
    padding: calc(40px + 0.6rem) 1.5rem 1.25rem;
    min-height: 4rem;
}

/* ── Avatar zweeft over de rand ──────────────────────────── */
.nib-page-hero-avatar {
    position: absolute;
    top: -2.5rem;
    left: 1.5rem;
    z-index: 5;
    flex-shrink: 0;
}

/* Extra linker-ruimte als avatar aanwezig is */
.nib-page-hero-content--with-avatar {
    padding-left: calc(80px + 1.5rem);
}

/* ── Tekstinhoud ─────────────────────────────────────────── */
.nib-page-hero-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
    padding-top: 0;
}

.nib-page-hero-type {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--_type);
    opacity: 0.8;
    line-height: 1;
}

.nib-page-hero-title {
    font-size: clamp(1.35rem, 2.8cqi, 2rem);
    font-weight: 500;
    color: var(--_title);
    margin: 0.1rem 0 0;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nib-page-hero-since {
    font-size: 0.75rem;
    color: var(--_since);
    line-height: 1;
    letter-spacing: 0.02em;
    margin-top: 0.1rem;
    opacity: 0.75;
}

/* ── Actieknoppen rechts in de infobalk ─────────────────────── */
.nib-page-hero-info-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    align-self: center;
    padding-left: 1rem;
}

.nib-page-hero-body {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* ── Skeleton ────────────────────────────────────────────── */
.nib-page-hero-sk-type {
    height: 0.6rem;
    width: 4rem;
    border-radius: 3px;
    opacity: 0.4;
}

.nib-page-hero-sk-title {
    height: 1.7rem;
    width: min(16rem, 55cqi);
    margin-top: 0.35rem;
    border-radius: 4px;
    opacity: 0.35;
}

.nib-page-hero-sk-since {
    height: 0.6rem;
    width: 8rem;
    margin-top: 0.3rem;
    border-radius: 3px;
    opacity: 0.25;
}

/* ── Avatar-rand matcht de infobalk-achtergrond ──────────── */
.nib-page-hero-avatar .profiel-avatar-img,
.nib-page-hero-avatar .profiel-avatar-placeholder {
    border: 3px solid var(--_info-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* ── Donker thema — zelfde percentages als nib-card dark ─── */
.rz-material-dark .nib-page-hero {
    --_info-bg: color-mix(in oklab, var(--_color), black 55%);
    --_border:  color-mix(in oklab, var(--_color), black 35%);
    --_type:    color-mix(in oklab, var(--_color), white 55%);
    --_title:   color-mix(in oklab, var(--_color), white 75%);
    --_since:   color-mix(in oklab, var(--_color), white 50%);
}

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet: 2:1 verhouding (1600x800) */
@media (max-width: 1024px) {
    .nib-page-hero-photo {
        aspect-ratio: 2 / 1;
    }
}

/* Mobiel: 1:1 verhouding (1200x1200) */
@media (max-width: 600px) {
    .nib-page-hero-photo {
        aspect-ratio: 1 / 1;
    }

    .nib-page-hero-infobar {
        padding: calc(32px + 0.6rem) 1rem 1rem;
    }

    .nib-page-hero-content--with-avatar {
        padding-left: calc(64px + 1rem);
    }

    .nib-page-hero-avatar {
        left: 1rem;
        top: -1.75rem;
    }
}