/* Perpetuum homepage teaser and opt-in compact mobile homepage.
   naslovnica.js adds the compact classes only when this request has a widget. */
.pp-home-widget {
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding: 8px 18px 0;
    border-top: 2px solid #b39759;
    border-bottom: 1px solid #d7cfbb;
    background: transparent;
    color: #292920;
}


.pp-home-widget *,
.pp-home-widget *::before,
.pp-home-widget *::after {
    box-sizing: border-box;
}

.pp-home-widget a {
    color: inherit;
    text-decoration: none;
}

.pp-home-widget a:hover {
    color: #76602f;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pp-home-widget a:focus-visible,
.pp-home-widget summary:focus-visible {
    outline: 2px solid #8a713a;
    outline-offset: 4px;
}

.pp-home-widget .pp-home-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 7px 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d4cdbb;
}

.pp-home-widget .pp-home-brand {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pp-home-widget .pp-home-picker {
    position: static;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
}

.pp-home-widget .pp-home-picker summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #75602e;
    cursor: pointer;
    list-style: none;
    font-size: 20px;
    line-height: 1;
}

.pp-home-widget .pp-home-picker summary::-webkit-details-marker { display: none; }
.pp-home-widget .pp-home-picker summary::marker { content: ''; }
.pp-home-widget .pp-home-picker summary:hover,
.pp-home-widget .pp-home-picker[open] summary { background: #e2dbc9; }
.pp-home-widget .pp-home-picker[open] summary i { transform: rotate(180deg); }

.pp-home-widget .pp-home-channels {
    position: absolute;
    z-index: 5;
    right: 12px;
    left: 12px;
    margin-top: 4px;
    padding: 5px;
    max-height: min(360px, 60vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #cfc6b0;
    border-radius: 7px;
    background: #fffcf5;
    box-shadow: 0 8px 20px #29292024;
    color: #292920;
    font-family: 'Source Sans 3', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
}

.pp-home-widget .pp-home-channels ul,
.pp-home-widget .pp-home-channels li { display: block; margin: 0; padding: 0; list-style: none; }
.pp-home-widget .pp-home-channels a {
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    overflow-wrap: anywhere;
}
.pp-home-widget .pp-home-channels a.pp-home-subchannel { padding-left: 27px; }
.pp-home-widget .pp-home-channels a:hover,
.pp-home-widget .pp-home-channels a:focus-visible { background: #eee8da; }
.pp-home-widget .pp-home-channels a:focus-visible { outline-offset: -2px; }

.pp-home-widget .pp-home-heading h2 {
    flex: 0 1 auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.7px;
    text-transform: none;
}

.pp-home-widget .pp-home-heading h2 a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pp-home-widget .pp-home-mark {
    flex: 0 0 auto;
    color: #a78943;
    font-size: 27px;
    line-height: 1;
}

.pp-home-widget .pp-home-kicker {
    color: #766536;
    font-family: 'Source Sans 3', Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.75px;
    white-space: nowrap;
}

.pp-home-widget .pp-home-list {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-home-widget .pp-home-item {
    display: block;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #d4cdbb;
}

.pp-home-widget .pp-home-meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    margin-bottom: 6px;
    color: #625f53;
    font-family: 'Source Sans 3', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}

.pp-home-widget .pp-home-time {
    padding-right: 10px;
    color: #80662d;
    font-variant-numeric: tabular-nums;
}

.pp-home-widget .pp-home-channel {
    min-width: 0;
    padding-left: 10px;
    border-left: 1px solid #cfc6b0;
    overflow-wrap: anywhere;
}

.pp-home-widget .pp-home-title {
    display: block;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.32;
    letter-spacing: -0.25px;
    overflow-wrap: anywhere;
}

.pp-home-widget .pp-home-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 8px 0;
    color: #75602e;
    font-family: 'Source Sans 3', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.pp-home-widget .pp-home-footer i {
    flex: 0 0 auto;
    font-size: 20px;
}

@media (max-width: 750px) {
    .pp-home-widget.pp-home-mobile {
        width: auto;
        max-width: none;
        margin: 0 -20px 30px;
        padding: 8px 20px 0;
        border-top-width: 1px;
    }

    .pp-home-widget .pp-home-heading h2 {
        font-size: 22px;
    }

    .pp-home-widget .pp-home-kicker {
        font-size: 11px;
    }

    .pp-home-widget .pp-home-item {
        padding: 8px 0 6px;
    }

    /* Added only while the mobile layout contains the Perpetuum widget. */
    .ngduk_tekst_first.pp-home-before-widget {
        margin-bottom: -20px;
    }

    .pp-home-hide-lead {
        display: none !important;
    }

    /* The site's usual author row has a negative top margin. With the lead
       removed it would overlap the headline; leave all other author rows alone. */
    .ngduk_tekst_first .pp-home-hide-lead + .meta_info {
        margin-top: 12px;
    }
}

/* Compact opening: three complete article titles, then Perpetuum.
   Scope to the first feature group selected by the mobile layout manager.
   No line clamping or fixed text heights: longer headlines can grow naturally. */
@media (max-width: 750px) {
    body.pp-home-compact #mainHeader {
        padding: 4px 0 0;
    }

    body.pp-home-compact #mainHeader nav {
        width: calc(100% - 32px);
        padding-right: 16px;
        padding-left: 16px;
    }

    body.pp-home-compact #mainHeader nav .hscroll-inner,
    body.pp-home-compact .pratimoBlok .hscroll-inner {
        width: calc(100% + 16px);
        margin-left: -16px;
        padding-left: 16px;
    }

    body.pp-home-compact #mainHeader nav li {
        margin-bottom: 0;
    }

    body.pp-home-compact #mainHeader nav li a {
        display: inline-flex;
        align-items: center;
        box-sizing: border-box;
        min-height: 32px;
        padding: 4px 9px;
        font-size: 15px;
        line-height: 1.2;
        letter-spacing: 0.7px;
    }

    body.pp-home-compact .pratimoBlok {
        width: calc(100% - 32px);
        padding-right: 16px;
        padding-left: 16px;
        margin-top: 4px;
        margin-bottom: 8px;
        font-size: 11px;
        line-height: 1.3;
        letter-spacing: 0.6px;
    }

    body.pp-home-compact .pratimoBlok a {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
    }

    body.pp-home-compact .pp-home-compact-wrapper {
        padding: 0 16px 20px;
    }

    body.pp-home-compact .pp-home-compact-hero {
        row-gap: 10px;
        margin-bottom: 12px;
        border-bottom: 0;
    }

    body.pp-home-compact .pp-home-compact-hero .naslovnicaGornjiDio_udarnaKocka_left {
        gap: 0;
    }

    body.pp-home-compact .pp-home-compact-hero .naslovnicaGornjiDio_udarnaKocka_right {
        height: 170px;
        min-height: 170px;
        max-height: 170px;
        margin-right: -16px;
        margin-left: -16px;
    }

    body.pp-home-compact .pp-home-compact-hero .naslovnicaGornjiDio_udarnaKocka_right > a {
        margin-bottom: 0 !important;
    }

    body.pp-home-compact .pp-home-compact-hero .ngduk_tekst_first {
        margin: 0;
        padding: 0;
        border-bottom: 0;
    }

    body.pp-home-compact .pp-home-compact-hero .ngduk_tekst_first > a,
    body.pp-home-compact .pp-home-compact-secondary > .ngduk_tekst > a {
        display: block;
    }

    body.pp-home-compact .pp-home-compact-hero .ngduk_tekst_first .pretitle {
        margin: 0 0 5px;
        padding: 0;
        font-size: 10px;
        line-height: 1.25;
    }

    body.pp-home-compact .pp-home-compact-hero .ngduk_tekst_first h2 {
        margin: 0;
        padding: 0;
        /* Override optional desktop inline title size only in compact mode. */
        font-size: 22px !important;
        line-height: 1.2;
        letter-spacing: 0;
        text-align: left;
    }

    body.pp-home-compact .pp-home-compact-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin: 0 0 12px;
    }

    body.pp-home-compact .pp-home-compact-secondary .ngduk_mobile_thumb {
        aspect-ratio: 16 / 9;
        max-height: 96px;
        margin-bottom: 7px;
    }

    body.pp-home-compact .pp-home-compact-secondary h3 {
        margin: 0;
        padding: 0;
        font-size: 15.5px;
        line-height: 1.25;
        letter-spacing: 0;
    }

    body.pp-home-compact .pp-home-compact-hero .ngduk_tekst_first p[itemprop="description"],
    body.pp-home-compact .pp-home-compact-secondary p[itemprop="description"] {
        display: none !important;
    }

    /* Reset the legacy negative author margin instead of compensating inside
       the author's name. A local inline margin on that name is safe to remove. */
    body.pp-home-compact .pp-home-compact-hero .ngduk_tekst_first .meta_info,
    body.pp-home-compact .pp-home-compact-secondary .meta_info {
        display: block;
        margin: 8px 0 0;
        padding: 0;
        font-size: 12px;
        line-height: 1.3;
        letter-spacing: 0.35px;
    }

    body.pp-home-compact .pp-home-compact-hero .meta_info [itemprop="name"],
    body.pp-home-compact .pp-home-compact-secondary .meta_info [itemprop="name"] {
        margin-top: 0 !important;
    }

    body.pp-home-compact .pp-home-widget.pp-home-mobile {
        margin-right: -16px;
        margin-left: -16px;
        padding: 4px 16px 0;
    }

    body.pp-home-compact .pp-home-widget .pp-home-heading {
        gap: 4px 8px;
        padding-bottom: 4px;
    }

    body.pp-home-compact .pp-home-widget .pp-home-heading h2 {
        font-size: 20px;
    }

    body.pp-home-compact .pp-home-widget .pp-home-mark {
        font-size: 23px;
    }

    body.pp-home-compact .pp-home-widget .pp-home-kicker {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    body.pp-home-compact .pp-home-compact-wrapper .telegraf-mobile-rail {
        margin-right: -16px;
        margin-left: -16px;
    }
}
