/* Javni dio: kartice sa naslovnom slikom, stranica objave, galerije, lightbox */
.post-card {
    padding: 0;
    overflow: hidden;
}

.post-card .cover {
    display: block;
}

.post-card .cover img,
.cover-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #e8e0cf;
}

.post-card .card-body {
    padding: 1rem;
}

.post-card h3 {
    margin: 0 0 .25rem;
    font-size: 1.1rem;
}

.post-card .meta,
.article .meta {
    color: #777;
    font-size: .85rem;
    margin: 0 0 .5rem;
}

.article {
    max-width: 1000px;
}

.article-cover {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 7px;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.7;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    cursor: zoom-in;
}

.article-body blockquote {
    margin: 1rem 0;
    padding: .25rem 1rem;
    border-left: 4px solid #c9b88f;
    color: #555;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .5rem;
    margin: 1.25rem 0;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    display: grid;
    place-items: center;
    z-index: 1000;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 94vw;
    max-height: 94vh;
    border-radius: 4px;
}

.embed-block {
    margin: 1.25rem 0;
}

.embed-block iframe {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 6px;
}

.embed-block iframe[style*="aspect-ratio"] {
    height: auto;
}

.clergy-card .cover img,
.clergy-card .cover-placeholder {
    aspect-ratio: 1 / 1;
}

.clergy-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 300px));
    justify-content: center;
}

.clergy-card {
    width: 300px;
    max-width: 100%;
}

.clergy-card .card-body>p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

@media (max-width: 700px) {
    .clergy-grid {
        grid-template-columns: minmax(0, 80vw);
    }

    .clergy-card {
        width: 80vw;
        max-width: 80vw;
    }

    .clergy-card .cover img,
    .clergy-card .cover-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

.clergy-card .cover-placeholder {
    display: grid;
    place-items: center;
    font-size: 4rem;
    color: #6b7a88;
}

.clergy-card .btn {
    margin-top: .5rem;
}

.bio-dialog {
    width: min(760px, 94vw);
    max-height: 90vh;
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

.bio-dialog::backdrop {
    background: rgba(0, 0, 0, .55);
}

.bio-inner {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
}

.bio-close {
    align-self: flex-end;
    margin-left: auto;
    margin-bottom: 7px;
}

.bio-head {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.bio-head img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.bio-head h2 {
    margin: 0;
}

.bio-body {
    line-height: 1.7;
}

.bio-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Stilovi slika (biraju se u uređivaču: "Stil slike") */
:is(.article-body, .bio-body, .editor, .img-style-btn) img.img-frame {
    border: 10px solid #fff;
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 3px 10px rgba(0, 0, 0, .3);
}

:is(.article-body, .bio-body, .editor, .img-style-btn) img.img-border {
    border: 1px solid #222;
    border-radius: 0;
}

:is(.article-body, .bio-body, .editor, .img-style-btn) img.img-shadow {
    border-radius: 0;
    box-shadow: 4px 6px 14px rgba(0, 0, 0, .4);
}

:is(.article-body, .bio-body, .editor, .img-style-btn) img.img-rounded {
    border-radius: 18px;
}

:is(.article-body, .bio-body, .editor, .img-style-btn) img.img-oval {
    border-radius: 50%;
}

:is(.article-body, .bio-body, .editor, .img-style-btn) img.img-polaroid {
    border: 10px solid #fff;
    border-bottom-width: 38px;
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 3px 12px rgba(0, 0, 0, .3);
}

/* Liste (da se uvijek vide tačke i brojevi) */
.article-body ul,
.bio-body ul,
.editor ul {
    list-style: disc;
    margin: .5rem 0;
    padding-left: 1.6rem;
}

.article-body ol,
.bio-body ol,
.editor ol {
    list-style: decimal;
    margin: .5rem 0;
    padding-left: 1.6rem;
}

.article-body li,
.bio-body li,
.editor li {
    margin: .2rem 0;
}

/* PDF cards are grouped automatically when content is rendered or saved. */
.pdf-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
    align-items: stretch;
    justify-content: center;
    gap: 1rem;
    max-width: 928px;
    margin: 1.25rem 0;
}

.pdf-block {
    display: flex;
    min-width: 0;
}

.pdf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    width: 100%;
    height: 100%;
    padding: .75rem;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #d5dbe0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    color: #222;
    text-decoration: none;
}

.pdf-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}

.pdf-card img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e3e7ea;
    border-radius: 0;
    cursor: inherit;
    pointer-events: none;
}

.pdf-thumbnail {
    pointer-events: none;
}

.pdf-card::before {
    content: "PDF";
    position: absolute;
    top: .4rem;
    left: .4rem;
    z-index: 1;
    padding: .1rem .45rem;
    background: #b42318;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    border-radius: 4px;
}

.pdf-card:has(.pdf-icon)::before {
    display: none;
}

.pdf-icon {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f3f6f8;
    color: #b42318;
    font-size: 2rem;
    font-weight: 800;
}

.pdf-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.6em;
    flex-shrink: 0;
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    overflow-wrap: anywhere;
}

.footnote-ref {
    font-size: .75em;
    line-height: 0;
    vertical-align: super;
}

.footnotes {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #d5dbe0;
    font-size: .95rem;
}

.footnotes h2 {
    margin-top: 0;
    font-size: 1.15rem;
}

.footnotes li {
    padding-left: .25rem;
}

.footnote-back {
    margin-left: .35rem;
    text-decoration: none;
}

@media (max-width: 700px) {
    .pdf-gallery {
        grid-template-columns: minmax(0, 220px);
    }
}