/*============================*/
/* Custom Blog Posts          */
/*============================*/

.custom-blog-posts-wrapper {
	position: relative;
}

/* ============================ */
/* Filters                      */
/* ============================ */

.blog-posts-filter-wrap {
    margin-bottom: 50px;
    display: flex;
	flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
	gap: 30px;
    row-gap: 60px;
}

.blog-filter-cat,
.blog-filter-search {
	position: relative;
    flex-basis: 200px;
}

.blog-filter-cat::before {
    position: absolute;
    top: 50%;
    content: '';
    background-image: url('arrow-down.svg');
    width: 22px;
    height: 22px;
    right: 10px;
    background-size: 22px;
    margin-top: -11px;
	z-index: 0;
	pointer-events: none;
}

/* Support BOTH: old ID + new class */
#custom-blog-posts-category,
.custom-blog-posts-category {
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
}

.blog-filter-cat select {
    border: 0px solid #cccccc;
    border-radius: 0 !important;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    position: relative;
    background: transparent;
}

.blog-filter-cat select:focus {
    outline: none;
    border: 0px solid #cccccc;
}

.blog-filter-search input {
	background-color: #f4f4f4;
	border: 0px solid #cccccc !important;
	border-radius: 0 !important;
	font-size: 14px;
}

.blog-filter-search input:focus {
	outline: none;
	border: 0px solid #cccccc !important;
}

.blog-filter-search:after {
	position: absolute;
    top: 50%;
    content: '';
    background-image: url('../search-b.svg');
    width: 22px;
    height: 22px;
    right: 10px;
    background-size: 22px;
    margin-top: -11px;
	z-index: 0;
	pointer-events: none;
}

.blog-filter-search input::-webkit-input-placeholder {
	font-weight: 500;
	text-transform: uppercase;
	color: #000000;
}
.blog-filter-search input::-moz-placeholder {
	font-weight: 500;
	text-transform: uppercase;
	color: #000000;
}
.blog-filter-search input:-ms-input-placeholder {
	font-weight: 500;
	text-transform: uppercase;
	color: #000000;
}
.blog-filter-search input::-ms-input-placeholder {
	font-weight: 500;
	text-transform: uppercase;
	color: #000000;
}
.blog-filter-search input::placeholder {
	font-weight: 500;
	text-transform: uppercase;
	color: #000000;
}

/* ============================ */
/* Results / Grid (fixed)       */
/* ============================ */

/* Results wrapper only */
.custom-blog-posts-results {
    opacity: 0;
    transition: opacity 0.2s ease;
}
.custom-blog-posts-results.show { opacity: 1; }

/* Grid wrapper (like produkt list) */
.custom-blog-posts-grid{
    --columns: 3;
    --gap: 30px;
    display: grid;
    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    gap: var(--gap);
    row-gap: 60px;
}

@media (max-width: 992px){ .custom-blog-posts-grid{ --columns: 2; } }
@media (max-width: 767px){ .custom-blog-posts-grid{ --columns: 1; } }


/* Animation (unchanged) */
.custom-blog-posts-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
	width: 100%;
}

.custom-blog-posts-item.show {
    opacity: 1;
    transform: translateY(0);
}

.custom-blog-posts-content-wrap {
	padding: 0;
}

.custom-blog-post-thumb { 
	margin-bottom: 25px; 
}

.custom-blog-post-title { 
	font-size: 19px; 
	font-weight: 600; 
	margin-bottom: 5px; 
}
.custom-blog-post-title a { 
	color: #000000; 
	transition: all 0.3s linear; 
}
.custom-blog-post-title a:hover { 
	color: #112746; 
}

.custom-blog-post-date { 
	color: #26459D; 
	font-weight: 500; 
	font-size: 16px; 
	margin-bottom: 10px; 
}

.custom-blog-post-content { 
	color: #000000; 
	font-size: 16px; 
}

.custom-blog-post-content .morelink {
	display: inline-flex !important;
	border: 1px solid #000000;
	background-color: #000000 !important;
	color: #ffffff !important;
	padding: 8px 20px;
	margin-top: 5px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1px;
	transition: all 0.2s ease;
}

.custom-blog-post-content .morelink:hover {
	border: 1px solid #000000;
	background-color: #000000 !important;
}

.custom-blog-post-thumb img {
    width: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    max-height: 260px;
	display: flex;
	height: 280px;
}

/* Responsive columns */
@media (max-width: 992px) {
	#custom-blog-posts-results,
	.custom-blog-posts-results {
		--columns: 2;
	}
}
@media (max-width: 767px) {
	#custom-blog-posts-results,
	.custom-blog-posts-results {
		--columns: 1;
	}
}

/* ============================ */
/* Load More (Blog Posts)       */
/* ============================ */

.custom-blog-posts-loadmore-wrap {
    margin-top: 60px;
    text-align: center;
}

.custom-blog-posts-loadmore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000000;
    background-color: #ffffff;
    color: #000000;
    padding: 12px 28px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.custom-blog-posts-loadmore:hover {
    background-color: #000000;
    color: #ffffff;
}

.custom-blog-posts-loadmore.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Use wrapper state rather than relying on inline show/hide */
.custom-blog-posts-loadmore-wrap { display: none; }
.custom-blog-posts-wrapper.has-more .custom-blog-posts-loadmore-wrap { display: block; }



/* ============================ */
/* Skeleton Loader (Blog Posts) */
/* ============================ */

.cbp-skeleton-item{
	width: 100%;
}

.cbp-skeleton-thumb{
	height: 280px;
	width: 100%;
	background: #f0f0f0;
	position: relative;
	overflow: hidden;
	margin-bottom: 25px;
}

.cbp-skeleton-line{
	height: 14px;
	background: #f0f0f0;
	position: relative;
	overflow: hidden;
	margin-bottom: 10px;
}
.cbp-skeleton-line.sm{ width: 55%; }
.cbp-skeleton-line.md{ width: 75%; }
.cbp-skeleton-line.lg{ width: 90%; }

.cbp-skeleton-thumb::after,
.cbp-skeleton-line::after{
	content: '';
	position: absolute;
	top: 0;
	left: -60%;
	height: 100%;
	width: 60%;
	background: linear-gradient(90deg, rgba(240,240,240,0) 0%, rgba(255,255,255,.8) 50%, rgba(240,240,240,0) 100%);
	-webkit-animation: cbpShimmer 1.1s infinite;
	        animation: cbpShimmer 1.1s infinite;
}

@-webkit-keyframes cbpShimmer{
	0%   { left: -60%; }
	100% { left: 120%; }
}

@keyframes cbpShimmer{
	0%   { left: -60%; }
	100% { left: 120%; }
}

/* Optional: while loading, make load more feel disabled */
.custom-blog-posts-loadmore.is-loading{
	opacity: 0.6;
	pointer-events: none;
}


/* ========================================= */
/* Align "WEITERLESEN" buttons to bottom     */
/* ========================================= */

.custom-blog-posts-item{
	display: flex;
	flex-direction: column;
	height: 100%;
}

.custom-blog-posts-content-wrap{
	display: flex;
	flex-direction: column;
	flex: 1;              /* take remaining height */
}

.custom-blog-post-content{
	display: flex;
	flex-direction: column;
	flex: 1;              /* allows pushing button down */
}

.custom-blog-post-content .morelink{
	margin-top: auto;     /* pushes button to bottom */
	align-self: flex-start; /* keep button aligned left */
}
