/* SINGLE POST STYLES */
@media (min-width: 1024px) {
    .single-wrap {
        padding-top: 3.5rem !important;
    }
}

@media (max-width: 768px) {
    .single-wrap {
        padding-top: 5px !important;
    }
    p {
        max-width: 100vw !important;
        overflow-wrap: break-word !important;
    }
    .single-article {
        padding-right: 0rem !important;
        overflow-x: hidden;
    }
    .single-title {
        font-size: 1.85rem !important;
    }
}

/* POST CONTENT */
.single-content h3{
    margin: 0 0 0 0;
}

.single-content h4 {
    margin: 0 0 0 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.single-content p {
    margin: 0 0 1rem 0;
}

.single-content p img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.single-featured-image {
    margin-top: 0.5rem;
}

.single-featured-image img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 60vh;
    border-radius: 6px;
}

.wp-element-caption {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    font-family: Roboto !important;
    color: var(--text-color-comm);
}

.single-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

.single-title-meta {
    margin-bottom: 1.5rem;
}

.single-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0;
}

.single-byline {
    display: flex;
    gap: 1rem;
    color: var(--text-color-dates);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.single-content {
    font-size: 1rem;
    line-height: 1.7;
    font-family: Roboto !important;
}

.single-content p {
    margin-bottom: 1.2rem;
    color: var(--text-color-comm);
}

.single-meta {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 1rem 0 1rem 0;
}

.single-author-wrap {
    display: flex;
    align-items: center;
}

.single-author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 7px;
    object-fit: cover;
}

.single-author {
    font-size: 1rem;
    font-weight: 600;
    margin-left: 0.5rem;
    color: var(--text-color-comm);
    transition: color 0.2s ease 0s;
}

.single-author:hover {
    color: var(--color-accent);
}

.single-date {
    align-self: center;
    color: var(--text-color-dates);
    font-size: 1rem;
}

.single-categories {
    align-self: center;
}

.single-title-meta {
    margin-bottom: 0;
}

.single-wrap {
    margin-top: 0;
}

p {
    font-size: 1.1rem;
}

.single-wrap .wp-block-image img {
    border-radius: 6px;
    transition: all 0.2s ease;
}

.single-wrap .wp-block-image img:hover {
    border-radius: 12px;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-image figure {
    margin: 0;
}

iframe {
    border-radius: 6px;
    max-width: 100%;
    aspect-ratio: 16/9;
    transition: border-radius 0.2s ease;
}

iframe:hover {
    border-radius: 12px;
}

/* LAATSTE NIEUWS */
.latest-item {
    display: grid;
    grid-template-columns: 37% minmax(0, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.latest-item-media img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
}

.latest-item-title {
    max-height: 108px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.latest-item-title,
.related-post-title {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color-comm);
    transition: color 0.2s ease 0s;
}

.latest-item-title:hover,
.related-post-title:hover {
    color: var(--color-accent);
}

@media (min-width: 1024px) {
    .latest-item-content,
    .related-post-content {
        padding-left: 1rem;
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
        display: flex;
        flex-direction: column;
        justify-content: start;
        gap: 0.2rem;
    }
}

.latest-item-date,
.related-post-date {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color-dates);
}

.latest-block-title,
.related-posts-title {
    font-size: 28px !important;
    font-weight: 700;
    width: 100%;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.latest-item-media-image {
    position: relative;
    overflow: hidden; /* keeps badge clipped to image bounds */
}

.latest-item-media-image img {
    display: block;
    aspect-ratio: 4/3;
    border-radius: 6px;
}

.latest-item-media-image .badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    margin-bottom: 0.3rem;
    margin-left: 0.3rem;
}

.has-background {
    border-radius: 6px;
    padding: 0.5rem;
    background: var(--od-has-background) !important;
    transition: 0.25s ease 0s;
}

@media (min-width: 1024px) {
    .has-background:hover {
        border-radius: 24px;
        padding: 0.7rem;
    }
}

/* RELATED POSTS */
@media (min-width: 1024px) {
    .related-post-item {
        display: grid;
        grid-template-columns: 37% minmax(0, 1fr);
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

.related-post-image {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

@media (min-width: 1024px) {
    .related-post-image {
        min-width: 100%;
    }
    .related-post-image img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4/3 !important;
        border-radius: 6px;
        object-fit: cover;
        display: block;
    }
}

.related-post-image .badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    margin-bottom: 0.3rem;
    margin-left: 0.3rem;
}

@media (min-width: 1024px) {
    .related-post-title {
        max-height: 108px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}

h4.related-post-item-title {
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* NEXT/PREV */
.adjacent-posts {
    display: flex;
    justify-content: space-between;
}

.adjacent-posts {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.adjacent-post {
    display: flex;
    flex-direction: column;
    max-width: 45%;
}

.adjacent-post--next {
    text-align: right;
    margin-left: auto;
}

.adjacent-post-label {
    font-size: 0.85rem;
    color: var(--text-color-dates);
    font-weight: 500;
}

.adjacent-post-title {
    font-weight: 600;
    font-size: 1.1rem;
    padding-top: 0.3rem;
    color: var(--text-color-comm);
    transition: color 0.2s ease 0s;
}

.adjacent-post-title:hover {
    color: var(--color-accent);
}

/* SHARE BUTTONS */
.share-button-native {
    border: none;
    outline: none; /* removes the focus ring */
    cursor: pointer;
    padding: 0;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    gap: 0.5rem;
    min-height: 5vh;
    transition: min-height 0.2s ease 0s;
    margin-bottom: 1rem;
}

.share-buttons:hover {
    min-height: 6vh;
}

.share-button--facebook {
    background-color: #1877f2;
}

.share-button--whatsapp {
    background-color: #25d366;
}

.share-button--copy {
    background-color: var(--color-main);
}

.share-button-native {
    background-color: var(--color-main);
}

.share-button-native:hover,
.share-button--copy:hover {
    background-color: var(--color-accent) !important;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--text-color-cats);
    transition:
        border-radius 0.2s ease 0s,
        background 0.2s ease 0s;
}

.share-button:hover {
    color: var(--text-color-cats) !important;
    border-radius: 24px;
}

.share-button svg {
    width: 1.5rem;
    height: auto;
}

@media (max-width: 768px) {
    .share-button--twitter {
        display: none;
    }
}

@media (min-width: 768px) {
    .share-button-native {
        display: none;
    }
}

/* ── Dossier grid ────────────────────────────────────── */

.post-dossiers-heading {
    margin: 0 0 0.5rem 0;
}

h2.post-dossiers-heading {
    font-size: 28px !important;
    font-weight: 700;
}

@media (min-width: 1024px) {
    .post-dossiers-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
        margin-bottom: 0.5rem;
    }
}

/* ── Dossier card ────────────────────────────────────── */
.dossier-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8vh;
    border-radius: 50px;
    overflow: hidden;
    text-decoration: none;
    background-color: var(--od-black);
    background-size: cover;
    background-position: center;
    position: relative;
    transition:
        border-radius 0.2s ease,
        min-height 0.2s ease;
}

@media (min-width: 1024px) {
    .dossier-card:hover {
        border-radius: 60px;
        min-height: 15vh;
    }
}

/* Dark gradient so the title is always legible */
.dossier-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0) 55%
    );
    pointer-events: none;
}

.dossier-card-title {
    position: relative;
    z-index: 1; /* above the gradient overlay */
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color-on-picture);
    line-height: 1.3;
    text-align: center;
}

/* MOBILE */
@media (max-width: 768px) {
    .sidebar-latest {
        display: none;
    }
    .single-wrap {
        grid-template-columns: 1fr;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 99vw !important;
    }
    .single-categories {
        display: grid;
        grid-template-rows: auto auto;
        gap: 0.3rem;
    }
    .related-posts,
    .single-content,
    .single-title-meta,
    .adjacent-post--next {
        margin-right: 0.5rem !important;
    }
    .ord-gerelateerd {
        max-width: 99vw !important;
    }
    .wp-block-image {
        overflow: hidden;
        min-width: 100%;
    }
    /* RELATED STYLES */
    .related-post-item {
        display: grid;
        grid-template-rows: 1fr auto;
        gap: 0.5rem;
    }
    .related-post-image img {
        width: 100%;
        object-fit: cover;
        border-radius: 6px;
        height: 26vh;
        overflow: hidden;
    }
    .related-post-content {
        display: block;
    }
    .related-post-item {
        margin-bottom: 0.5rem;
    }
    .adjacent-post-title {
        max-width: 212px;
    }
    /* SHARE BUTTONS */
    .share-buttons {
        margin-bottom: 0.5rem;
    }
}

/*HORIZONTAL STYLES */
@media (max-width: 768px) and (orientation: landscape) {
    .related-post-item {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
    }
    .related-post-image img {
        aspect-ratio: 4/3;
        width: auto;
        height: 26vh;
    }
    .wp-block-image {
        max-height: 70vh;
        width: auto;
    }
    .wp-block-image img {
        max-height: 70vh;
        width: auto;
    }
    .share-button {
        min-height: 9vh;
    }
    .adjacent-post-title {
        font-size: 1.2rem;
    }
    .single-content p {
        font-size: 0.85rem !important;
    }
}
