/* ALG STYLES */
body {
    background: var(--bg-color);
}
@media (min-width: 1024px) {
    .category-wrap {
        margin-top: 5.5rem;
    }
}

.category-header {
    position: relative;
    display: flex;
    align-content: center;
    justify-content: center;
    min-height: 20vh;
    background-color: var(--od-black);
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.2s ease 0s;
    padding: 0;
}

.category-header:hover {
    border-radius: 36px !important;
    padding: 10px;
}

.category-header-has-image {
    background-size: cover;
    background-position: center;
}

.category-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.65) 100%
    );
}

.category-header-info {
    position: relative;
    z-index: 1;
    padding: 2rem;
    display: grid;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    align-self: center;
    justify-self: center;
    text-align: center;
}

.category-header-name {
    margin: 0;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color-on-picture);
}

.category-header-description {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color-on-picture);
    align-self: center;
}

/* Category Posts */
.category-post-item:first-of-type {
    margin-top: 0.5rem;
}

.category-posts-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 21px;
    color: var(--text-color-comm);
}

.category-post-thumb {
    position: relative;
}

.category-post-thumb img {
    aspect-ratio: 1.618/1;
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

@media (min-width: 1024px) {
.category-post-thumb img {
    max-width: 225px;
}
}

.category-post-categories {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 1;
}

.category-post-title {
    margin: 0;
    color: var(--text-color-comm);
    font-size: 1.1rem;
}

.category-post-title a {
    color: var(--text-color-comm);
}

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

/* Layout */
.category-content-wrap {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-posts {
    flex: 1;
    min-width: 0;
    margin-top: 0.5rem;
}

/* Sidebar */
.category-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.child-categories-sidebar {
    width: 100%;
}

.child-categories-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color-comm);
}

.child-categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Cards */
.child-category-card {
    position: relative;
    display: block;
    border-radius: 50px;
    overflow: hidden;
    text-decoration: none;
    height: 8vh;
    transition: height 0.2s ease 0s, border-radius 0.2s ease 0s;
}

.child-category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(80%);
    transition: filter 0.2s ease 0s;
}

.child-category-card:hover {
    height: 15vh;
    border-radius: 60px;
}

.child-category-card:hover img {
    filter: brightness(85%);
}

.child-category-name-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.child-category-name {
    font-size: 1.2rem;
    color: var(--text-color-on-picture);
    font-weight: 700;
    text-align: center;
    padding: 0 0.5rem;
}

/* Hide sidebar if empty */
.child-categories-sidebar:empty {
    display: none;
}

/* LATEST POSTS */
.laatste-nieuws-container {
    margin-top: 0.5rem;
}

/* Responsive */
/* DESKTOP */
@media (min-width: 1024px) {
    .category-post-item {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/*MOBILE */
@media (max-width: 768px) {
    .category-wrap {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .category-header {
        min-height: 10vh;
    }
    .category-header-name {
        font-size: 1.5rem;
    }
    .category-header-description {
        font-size: 0.9rem;
    }
    .sidebar-latest {
        display: none;
    }
    .category-content-wrap {
        display: grid;
        grid-template-rows: auto auto;

    }
    .category-post-item {
        grid-template-rows: auto auto;
    }

    .category-sidebar {
        width: 100%;
    }

    .category-post-thumb img{
        height: 26vh;
        width: 100%;
    }

    .category-post-item {
        margin-bottom: 1rem;
    }

    .child-category-card:hover {
        height: 8vh;
        filter: brightness (80%);
    }

    .child-category-card:hover img {
        filter: brightness(80%);
    }
    .category-posts-title {
        font-size: 1.3rem;
    }
}

/* HORIZONTAL MOBILE */
@media (max-width: 768px) and (orientation: landscape) {
    .category-post-item {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
    }
}