.post-grid.post-grid-custom {
    max-width: 1160px;
    margin: 0 auto;
}

.post-grid-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    grid-auto-rows: auto;
}

div#grid-outter-wrapper {
    position: relative;
    overflow: hidden;
}

div#grid-outter-wrapper {
    --link-btn-size: 70px;
    --link-btn-margin: 25px;
    z-index: 99;
    height: 100%;
}

div#grid-outter-wrapper a {
    text-decoration: none;
}

div#grid-outter-wrapper .inner-wrapper {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
}

div#grid-outter-wrapper .gird-title {
    width: 100%;
    z-index: 99;
    background-color: #fff;
    padding: var(--link-btn-margin);
}

div#grid-outter-wrapper .gird-title {
    width: 100%;
    z-index: 99;
    background-color: #fff;
    padding: var(--link-btn-margin);
    position: absolute;
    bottom: 0;
    transition: all .5s ease 0s;
}

div#grid-outter-wrapper .gird-title * {
    font-size: 16px;
    line-height: 1.3;
    color: var(--anthrazit);
    font-weight: 400;
    padding: 0px 0px 0px 0px;
    border-radius: 0px 0px 0px 0px;
    background: transparent;
    z-index: 2 !important;
    display: block;
    display: flex;
    margin-bottom: 0;
    font-family: 'Nunito';
}

div#grid-outter-wrapper p.grid-categories {
    display: flex;
    gap: 5px;
    padding-bottom: 0.4em !important;
}

div#grid-outter-wrapper .gird-title p.grid-categories span {
    font-weight: 700 !important;
    font-size: 14px;
}

div#grid-outter-wrapper .gird-title h4 {
    justify-content: space-between;
    align-items: center;
    color: var(--anthrazit);
    word-wrap: anywhere;
    font-size: 18px;
    font-family: "Unbounded", sans-serif !important;
    letter-spacing: 0;
    line-height: 1.7;
    font-weight: 400;
}

div#grid-outter-wrapper p.grid-excerpt {
    transition: all .5s ease 0s;
    max-height: 0;
    overflow: hidden;
}

div#grid-outter-wrapper a:hover p.grid-excerpt {
    max-height: 5rem;
    padding-top: 1em !important;
}

div#grid-outter-wrapper span.grid-weiterlesen {
    margin-top: 1em;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

div#grid-outter-wrapper span.grid-weiterlesen p {
    transition: all .6s ease 0s;
    justify-content: flex-end;
    white-space: nowrap;
}



div#grid-outter-wrapper span.grid-weiterlesen:after {
    content: '';
    display: block;
    width: 14px;
    height: 8px;
    right: 15px;
    background-color: var(--anthrazit);
    -webkit-mask: url("/wp-content/themes/visual-composer-starter-theme-child/img/sub-label-indicator.svg") no-repeat center / contain;
    mask: url("/wp-content/themes/visual-composer-starter-theme-child/img/sub-label-indicator.svg") no-repeat center / contain;
    rotate: -90deg;
}

div#grid-outter-wrapper .meta-wrapper {
    position: absolute;
    bottom: 0;
    background-color: #fff;
    padding: 20px;
    transform: translateY(101%);
    transition: 0.5s ease 0s;
    z-index: 9;
}

div#grid-outter-wrapper .gird-content {
    margin-top: 15px;
}

div#grid-outter-wrapper>a:hover .meta-wrapper {
    transform: translateY(0);
}

div#grid-outter-wrapper .meta-wrapper * {
    color: var(--dunkelgruen);
}

div#grid-outter-wrapper .gird-thumbnail-wrapper {
    position: relative;
    padding-bottom: 120%;
    transition: all 0.5s ease 0s;
}

div#grid-outter-wrapper>a:hover .gird-thumbnail>.gird-thumbnail-wrapper {
    filter: brightness(0.75);
}

div#grid-outter-wrapper .gird-thumbnail-wrapper:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(180deg,
            rgba(12, 12, 12, 0) 0%,
            rgba(12, 12, 12, 0.11) 45%,
            rgb(12 12 12 / 36%) 89%);
    z-index: 1;
}

div#grid-outter-wrapper .gird-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Shared spin animation */
@keyframes post-grid-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Main loading overlay — filter change / reset (replaces results) */
.post-grid-loading {
    display: none;
}

.post-grid.is-loading .post-grid-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.post-grid.is-loading .post-grid-results {
    opacity: 0;
    pointer-events: none;
}

.post-grid-loading .loader {
    margin-top: 10vh;
    width: 28px;
    height: 28px;
    border: 3px solid #ddd;
    border-top-color: #222;
    border-radius: 50%;
    animation: post-grid-spin 0.7s linear infinite;
}

/* Sentinel spinner — infinite scroll (appends, no dimming of existing items) */
.post-grid-sentinel {
    height: 1px;
}

.post-grid.is-loading-more .post-grid-sentinel {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-grid.is-loading-more .post-grid-sentinel::after {
    content: "";
    width: 24px;
    height: 24px;
    border: 3px solid #ddd;
    border-top-color: #222;
    border-radius: 50%;
    animation: post-grid-spin 0.7s linear infinite;
    margin-top: 10vh;
}

.grid-outter-wrapper {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.grid-outter-wrapper.tile-in-view {
    opacity: 1;
    transform: translateY(0);
}

/**Custom Grid*/
.post-grid.post-grid-custom .post-grid-results {
    gap: 15px !important;
}

.post-grid.post-grid-custom .inner-wrapper:after {
    width: 100%;
    height: 100%;
    content: "";
    position: absolute;
    display: block;
    background-color: var(--dunkelgruen);
    z-index: 9;
    transform: scaleY(0) rotateY(90deg);
    transition: all 0.5s cubic-bezier(0.1, 0.24, 0.51, 0.79) 0s;
    opacity: 0;
    pointer-events: none;
    top: 0;
    left: 0;
}

.post-grid.post-grid-custom .inner-wrapper:hover:after {
    transform: scale(1) rotate(0);
    border-radius: 0;
    opacity: 0.65;
}

@media screen and (max-width:1400px) {
    div#grid-outter-wrapper {
        --link-btn-size: 48px;
        --link-btn-margin: 15px;
    }

    div#grid-outter-wrapper h4 {
        font-size: 15px !important;
    }
}

@media screen and (max-width:1250px) {
    .post-grid-results {
        gap: 15px;
    }

    div#grid-outter-wrapper .meta-wrapper * {
        font-size: 0.85rem !important;
    }


}

@media screen and (max-width:990px) {
    .post-grid-results {
        grid-template-columns: repeat(2, 1fr);
    }

    div#grid-outter-wrapper .meta-wrapper * {
        font-size: 1rem !important;
    }
}

@media screen and (max-width:767px) {
    .post-grid-results {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (max-width:576px) {
    div#grid-outter-wrapper .gird-title h4:after {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {
    div#grid-outter-wrapper>a:hover .gird-thumbnail>.gird-thumbnail-wrapper {
        filter: none;
    }

    div#grid-outter-wrapper a:hover p.grid-excerpt {
        max-height: 0;
        padding-top: 0 !important;
    }

    div#grid-outter-wrapper>a:hover .meta-wrapper {
        transform: translateY(101%);
    }

    .post-grid.post-grid-custom .inner-wrapper:hover:after {
        transform: scaleY(0) rotateY(90deg);
        opacity: 0;
    }

    div#grid-outter-wrapper.is-touch-preview>a .gird-thumbnail>.gird-thumbnail-wrapper {
        filter: brightness(0.75);
    }

    div#grid-outter-wrapper.is-touch-preview a p.grid-excerpt {
        max-height: 5rem;
        padding-top: 1em !important;
    }

    div#grid-outter-wrapper.is-touch-preview>a .meta-wrapper {
        transform: translateY(0);
    }

    .post-grid.post-grid-custom .grid-outter-wrapper.is-touch-preview .inner-wrapper:after {
        transform: scale(1) rotate(0);
        border-radius: 0;
        opacity: 0.65;
    }
}