/* Full-width editorial pages keep the shared header, navigation, and footer. */
.site-wrapper.site-wrapper--full-width {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "content";
}

.site-wrapper--full-width .content-main {
    min-width: 0;
    padding: 1rem 0;
}

.site-wrapper--full-width .content-card > p,
.site-wrapper--full-width .content-card > .wp-block-heading {
    max-width: 76ch;
    margin-inline: auto;
}

.manek-document {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--theme-primary);
}

.publication-list {
    max-width: 960px;
    margin: 2.5rem auto;
}

.publication-entry {
    position: relative;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    gap: 2rem;
    padding: 1.75rem 0;
    border-top: 1px solid #dce1e7;
    border-bottom: 1px solid #dce1e7;
    transition: background-color 160ms ease;
}

.publication-entry + .publication-entry {
    border-top: 0;
}

.publication-entry:hover {
    background: #f7f9fb;
}

.publication-entry__cover {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e1e5ea;
}

.publication-entry h2 {
    margin: 0 0 0.65rem;
    padding: 0;
    border: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    line-height: 1.25;
    text-transform: none;
}

.publication-entry__title {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--theme-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.publication-entry__title::after {
    content: "";
    position: absolute;
    inset: 0;
}

.publication-entry__title:focus-visible {
    outline: none;
}

.publication-entry__title:focus-visible::after {
    outline: 2px solid var(--theme-primary);
    outline-offset: 5px;
}

.publication-entry .publication-entry__meta {
    margin: 0 0 1rem;
    color: var(--theme-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    text-indent: 0;
}

.publication-entry__meta a {
    position: relative;
    z-index: 1;
    color: var(--theme-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.publication-entry__action {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--theme-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .publication-list {
        margin: 1.5rem 0;
    }

    .publication-entry {
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 1rem;
        padding: 1.25rem 0;
    }

    .publication-entry .publication-entry__meta {
        font-size: 0.85rem;
    }
}

.manek-spread {
    margin: 0 0 2rem;
}

.manek-spread > a {
    display: block;
    cursor: zoom-in;
}

.manek-spread img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e8e8e8;
}

.manek-spread figcaption {
    margin-top: 0.5rem;
    color: var(--theme-text-light);
    text-align: center;
    font-size: 0.9rem;
}

.document-reader--paged .document-reader__scroll {
    overflow: auto;
    position: relative;
    cursor: grab;
    display: flex;
    flex-direction: column;
}

.document-reader--paged .document-reader__pages {
    max-width: none;
    margin: auto;
    padding-bottom: 0;
    flex-shrink: 0;
}

.document-reader--paged .document-reader__page[hidden],
.document-reader__zoom[hidden] {
    display: none !important;
}

.document-reader--paged .document-reader__nav {
    position: static;
    transform: none;
    align-self: center;
    flex-shrink: 0;
    max-width: 100%;
    margin: 0.4rem 0 max(0.4rem, env(safe-area-inset-bottom));
}

.document-reader__zoom {
    display: inline-flex;
    gap: 0.2rem;
}

.document-reader--paged .document-reader__zoom-reset {
    width: 3.6rem;
    font-size: 0.85rem;
}

.document-reader--paged .document-reader__nav-label {
    min-width: 7rem;
}

.document-reader--paged .document-reader__nav-prev,
.document-reader--paged .document-reader__nav-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 2.75rem;
    height: 3.5rem;
    background: rgba(18, 18, 18, 0.8);
    font-size: 2rem;
}

.document-reader--paged .document-reader__nav-prev {
    left: max(0.5rem, env(safe-area-inset-left));
}

.document-reader--paged .document-reader__nav-next {
    right: max(0.5rem, env(safe-area-inset-right));
}

@media (max-width: 600px) {
    .site-wrapper.site-wrapper--full-width {
        max-width: 100%;
    }

    .manek-document {
        margin-top: 2rem;
    }
}

/* Keep all main titles on 30 godina in the same dark blue. */
.page-id-617 .content-card h2,
.page-id-617 .content-card .publication-entry__title {
    color: var(--theme-primary);
}

/* Consistent bibliographic hierarchy on 30 godina. */
.page-id-617 .publication-entry h2 {
    font-family: inherit;
    font-weight: 700;
    font-style: normal;
}

.page-id-617 .content-card .publication-entry__title {
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
}

.page-id-617 .publication-entry .publication-entry__subtitle,
.page-id-617 .publication-entry .publication-entry__meta {
    font-family: inherit;
    font-weight: 400;
    text-align: left;
    text-indent: 0;
    line-height: 1.5;
    margin: 0 0 0.65rem;
}

.page-id-617 .publication-entry .publication-entry__subtitle {
    color: var(--theme-text-light);
    font-size: 1rem;
    font-style: italic;
}

.page-id-617 .publication-entry .publication-entry__meta {
    font-style: normal;
}

.page-id-617 .publication-entry .publication-entry__links {
    margin-top: 0.85rem;
}

.page-id-617 .publication-entry__action {
    margin-top: 0.35rem;
}

/* Proglas phone reader: keep page controls clear of the scan and edge gestures. */
@media (max-width: 767px) {
    .page-izdanja .document-reader--paged {
        bottom: auto;
        height: 100vh;
        height: 100dvh;
    }

    .page-izdanja .document-reader__chrome {
        flex-shrink: 0;
    }

    .page-izdanja .document-reader--paged .document-reader__nav {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        gap: 6px;
        align-self: stretch;
        margin: 0;
        padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        background: #121212;
        border-width: 1px 0 0;
    }

    .page-izdanja .document-reader--paged .document-reader__nav-prev,
    .page-izdanja .document-reader--paged .document-reader__nav-next {
        position: static;
        transform: none;
        width: 48px;
        height: 48px;
        background: #333;
        border-color: #999;
    }

    .page-izdanja .document-reader--paged .document-reader__nav-label {
        min-width: 0;
        white-space: normal;
    }

    .page-izdanja .document-reader__zoom {
        grid-column: 1 / -1;
        justify-content: center;
        gap: 8px;
    }

    .page-izdanja .document-reader__nav-btn {
        min-width: 48px;
        min-height: 48px;
        touch-action: manipulation;
    }

    .page-izdanja .document-reader__nav-btn:disabled {
        opacity: 0.55;
    }
}
