/* ==========================================================================
   DZIENNIK POLICKI – NAGŁÓWEK FELIETONU (układ artykułu 2.2, 20.11.2026)
   Ładowany tylko w artykułach z kategorii felietonów.
   ========================================================================== */

.dp-felieton-hero {
    container: dp-felieton / inline-size;
    position: relative;
    margin: 0 0 28px;
    text-align: center;
}

/* --- zdjęcie z tytułem ------------------------------------------------- */
.dp-felieton-hero__media {
    position: relative;
    overflow: hidden;
    height: clamp(340px, 46cqi, 600px);
    border-top: 4px solid var(--dp-red, #c0130e);
    border-radius: 0 0 6px 6px;
    background: linear-gradient(135deg, #0d2238 0%, #091929 70%);
}

.dp-felieton-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 30%;
}

/* ciemne przejście od dołu – tytuł zawsze czytelny */
.dp-felieton-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(9, 25, 41, .92) 0%, rgba(9, 25, 41, .55) 38%, rgba(9, 25, 41, 0) 70%);
    pointer-events: none;
}

.dp-felieton-hero__overlay {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 82px;          /* miejsce na zdjęcie autora */
    padding: 0 6%;
}

.dp-felieton-hero__kicker {
    display: inline-block;
    margin: 0 0 12px;
    padding: 5px 12px 6px;
    background: var(--dp-red, #c0130e);
    color: #fff;
    font: 700 1.5rem/1 "Saira Condensed", Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dp-article--felieton .dp-felieton-hero__title {
    margin: 0;
    color: #fff !important;
    font-family: "Saira Condensed", Arial, sans-serif !important;
    font-weight: 700;
    font-size: clamp(2.8rem, 5cqi, 5.2rem);
    line-height: 1.08;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
    text-wrap: balance;
    /* szablon wyrównuje tytuł artykułu do lewej – tutaj zawsze środek, pod etykietą */
    max-width: 22em;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.dp-felieton-hero__credit {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    padding: 4px 9px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font: 600 1.2rem/1.3 Arial, sans-serif;
    border-top-left-radius: 4px;
}

/* --- autor ------------------------------------------------------------- */
.dp-felieton-hero__author {
    position: relative;
    z-index: 2;
    margin-top: -62px;      /* zdjęcie autora „wchodzi” na dolną krawędź */
}

.dp-felieton-hero__avatar {
    display: block;
    width: 124px;
    height: 124px;
    margin: 0 auto 12px;
    border: 4px solid var(--dp-red, #c0130e);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.dp-felieton-hero__avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dp-navy-deep, #091929);
    color: #fff;
    font: 700 4rem/1 "Saira Condensed", Arial, sans-serif;
}

.dp-felieton-hero__name {
    margin: 0 0 4px;
    font: 700 2rem/1.2 "Saira Condensed", Arial, sans-serif;
    color: var(--dp-red, #c0130e);
}

.dp-felieton-hero__name a {
    color: inherit !important;
    text-decoration: none;
}

.dp-felieton-hero__name a:hover,
.dp-felieton-hero__name a:focus-visible {
    text-decoration: underline;
}

.dp-felieton-hero__name a:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}

.dp-felieton-hero__date {
    display: block;
    color: #6b7280;
    font-size: 1.5rem;
}

/* bez zdjęcia głównego – granatowe tło z tytułem */
.dp-felieton-hero--no-photo .dp-felieton-hero__media {
    height: auto;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
}

.dp-felieton-hero--no-photo .dp-felieton-hero__overlay {
    position: relative;
    bottom: auto;
    padding: 48px 6% 86px;
}

/* opis zdjęcia pod nagłówkiem (część przed „/” w podpisie) */
.dp-felieton-caption {
    margin: -12px 0 22px;
    color: #6b7280;
    font-size: 1.4rem;
    text-align: center;
}

/* data jest już w nagłówku – w linii meta zostaje kategoria i czas czytania */
.dp-article--felieton .item-top-info {
    justify-content: center;
}

/* --- wąsko (telefon) --------------------------------------------------- */
@container dp-felieton (max-width: 600px) {
    .dp-felieton-hero__media {
        height: clamp(320px, 110cqi, 460px);
        border-radius: 0;
    }

    .dp-felieton-hero__media::after {
        background: linear-gradient(to top, rgba(9, 25, 41, .95) 0%, rgba(9, 25, 41, .65) 45%, rgba(9, 25, 41, .05) 80%);
    }

    .dp-felieton-hero__overlay {
        bottom: 66px;
        padding: 0 18px;
    }

    .dp-felieton-hero__kicker {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .dp-article--felieton .dp-felieton-hero__title {
        font-size: clamp(2.6rem, 8.5cqi, 3.4rem);
    }

    .dp-felieton-hero__credit {
        font-size: 1.1rem;
    }

    .dp-felieton-hero__author {
        margin-top: -50px;
    }

    .dp-felieton-hero__avatar {
        width: 100px;
        height: 100px;
    }

    .dp-felieton-hero__name {
        font-size: 1.8rem;
    }
}

@media print {
    .dp-felieton-hero__media { height: auto; }
    .dp-felieton-hero__media::after { display: none; }
    .dp-article--felieton .dp-felieton-hero__title { color: #000 !important; text-shadow: none; }
}
