/* Reset styles - no font-family or other styles */
.cbl-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

/* Container */
.cbl-container {
    width: 100%;
    max-width: 100%;
}

.cbl-style-2 {
    overflow: visible;
}

.cbl-style-2 .cbl-grid-style2 {
    margin-bottom: 0; /* Remove any bottom margin */
    padding-bottom: 0; /* Remove any bottom padding */
}

/* Grid layout - Base */
.cbl-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Style 1 - Uniform Grid Layout */
.cbl-grid-style1 {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

/* Style 2 - Asymmetric Masonry Layout */
.cbl-grid-style2 {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(200px, auto);
    gap: 24px;
    width: 100%;
}

/* Tablet: 2x2 grid layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .cbl-grid-style2 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, minmax(0, auto));
        gap: 20px;
        align-items: start;
        align-content: start;
    }
    
    /* Reset all grid positioning for tablet - simple 2x2 layout */
    .cbl-grid-style2 .cbl-grid-item-1 {
        grid-column: 1;
        grid-row: 1;
    }
    
    .cbl-grid-style2 .cbl-grid-item-2 {
        grid-column: 2;
        grid-row: 1;
    }
    
    .cbl-grid-style2 .cbl-grid-item-3 {
        grid-column: 1;
        grid-row: 2;
    }
    
    .cbl-grid-style2 .cbl-grid-item-4 {
        grid-column: 2;
        grid-row: 2;
    }
    
    .cbl-grid-style2 .cbl-grid-item-5 {
        grid-column: 1;
        grid-row: 3;
    }
    
    .cbl-grid-style2 .cbl-grid-item-6 {
        grid-column: 2;
        grid-row: 3;
    }
    
    /* For posts beyond 6, continue in 2-column grid */
    .cbl-grid-style2 .cbl-card:not([class*="cbl-grid-item-"]) {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Desktop: 4-column grid for asymmetric layout */
@media (min-width: 1024px) {
    .cbl-grid-style2 {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, minmax(0, auto)); /* Exactly 3 rows, no auto-rows */
        gap: 24px;
        align-items: start;
        align-content: start; /* Align content to start */
    }
    
    /* Post 1: Left top, full width (columns 1-2, rows 1-2) */
    .cbl-grid-style2 .cbl-grid-item-1 {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }
    
    /* Post 2: Right top left, half width (column 3, row 1) */
    .cbl-grid-style2 .cbl-grid-item-2 {
        grid-column: 3;
        grid-row: 1;
    }
    
    /* Post 3: Right top right, half width (column 4, row 1) */
    .cbl-grid-style2 .cbl-grid-item-3 {
        grid-column: 4;
        grid-row: 1;
    }
    
    /* Post 4: Left bottom left, half width (column 1, row 3) */
    .cbl-grid-style2 .cbl-grid-item-4 {
        grid-column: 1;
        grid-row: 3;
    }
    
    /* Post 5: Left bottom right, half width (column 2, row 3) */
    .cbl-grid-style2 .cbl-grid-item-5 {
        grid-column: 2;
        grid-row: 3;
    }
    
    /* Post 6: Right bottom, full width (columns 3-4, rows 2-3) */
    .cbl-grid-style2 .cbl-grid-item-6 {
        grid-column: 3 / 5;
        grid-row: 2 / 4; /* Spans rows 2 and 3 */
        align-self: start;
    }
    
    /* For posts beyond 6, default to full width */
    .cbl-grid-style2 .cbl-card:not([class*="cbl-grid-item-"]) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1200px) {
    .cbl-grid-style2 {
        gap: 30px;
    }
}

/* Adjust image aspect ratios for tablet 2x2 layout */


/* Card */
.cbl-card {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Style 2 cards should not stretch */
.cbl-style-2 .cbl-card {
    height: auto;
    align-self: start;
}

.cbl-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image wrapper */
.cbl-image-wrapper {
    width: 100%;
    padding-top: 75%; /* Aspect ratio */
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.cbl-featured-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sold overlay and badge (category "verkauft") */
.cbl-sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

.cbl-sold-badge {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, 0%);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    pointer-events: none;
}

/* Text overlay */
.cbl-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

/* Red style overlay */
.cbl-overlay-red {
    background-color: rgba(173, 58, 60, 0.8);
}

/* Green style overlay */
.cbl-overlay-green {
    background-color: rgba(32, 81, 59, 0.8); /* #20513B with opacity */
}

/* Style 2 specific green - darker to match design */
.cbl-style-2 .cbl-overlay-green {
    background-color: rgba(32, 81, 59, 0.8);
}

/* Title - only bold, no other styles */
.cbl-title {
    font-family: 'Outfit Semibold',Helvetica,Arial,Lucida,sans-serif;
    color: #fff;
    margin-bottom: 8px;
    font-size: 24px !important;
}

/* Subline */
.cbl-subline {
    color: #fff;
    flex: 1;
}

/* Arrow wrapper */
.cbl-arrow-wrapper {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbl-arrow {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Style 1 specific adjustments */
.cbl-style-1 .cbl-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Style 2 specific adjustments - Matching design */
.cbl-style-2 .cbl-card {
    border-radius: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cbl-style-2 .cbl-image-wrapper {
    border-radius: 12px 12px 0 0;
}

/* Adjust aspect ratios for different card sizes in Style 2 */
.cbl-style-2 .cbl-grid-item-1 .cbl-image-wrapper,
.cbl-style-2 .cbl-grid-item-6 .cbl-image-wrapper {
    padding-top: 70%; /* Taller for full-width cards */
}

.cbl-style-2 .cbl-image-wrapper{
    padding-top: 80%; /* Slightly taller for half-width cards */
}

.cbl-style-2 .cbl-grid-item-1  .cbl-text-overlay,
.cbl-style-2 .cbl-grid-item-6  .cbl-text-overlay {
    padding: 24px;
    min-height: 100px;
}

/* Adjust text overlay for smaller cards */
.cbl-style-2 .cbl-text-overlay {
    padding: 15px;
    min-height: 80px;
    border-radius: 0;

}

.cbl-style-2 .cbl-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    line-height: 1.3;
	font-size: 24px;
	font-family: 'Outfit Semibold',Helvetica,Arial,Lucida,sans-serif;
}

.cbl-style-2 .cbl-subline {
    font-size: 18px;
    line-height: 1;
}

.cbl-style-2 .cbl-arrow-wrapper {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
}
.cbl-container.cbl-style-2  .cbl-title{
    font-size: 20px !important;
	font-family: 'Outfit Semibold',Helvetica,Arial,Lucida,sans-serif;
	color: #fff !important;
}
.cbl-container.cbl-style-2 .cbl-card:nth-child(1) .cbl-title,.cbl-container.cbl-style-2 .cbl-card:last-child .cbl-title{
    font-size: 24px !important;
	font-family: 'Outfit Semibold',Helvetica,Arial,Lucida,sans-serif;
	color: #fff !important;
}

/* Responsive adjustments */

@media (min-width: 768px) and (max-width: 1023px) {
    .cbl-style-2 .cbl-image-wrapper {
        padding-top: 75% !important; /* Uniform aspect ratio for tablet */
    }
    
.cbl-style-2 .cbl-grid-item-1  .cbl-text-overlay,
.cbl-style-2 .cbl-grid-item-6  .cbl-text-overlay {
    padding: 10px 20px;
    min-height: 110px;
}
.cbl-container.cbl-style-2 .cbl-title {
    font-size: 24px !important;
}
	
	.cbl-style-2 .cbl-arrow-wrapper {
		width: 40px;
		height: 40px;
		bottom: 15px;
		right: 15px;
	}
}
@media (max-width: 767px) {
    .cbl-container.cbl-style-2 .cbl-title {
        font-size: 20px !important;
    }
	
	   .cbl-grid-style1 {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    .cbl-container.cbl-style-2 .cbl-title {
        font-size: 20px !important;
    }
    .cbl-grid-style2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cbl-text-overlay {
        padding: 15px;
        min-height: 100px;
    }
    
    .cbl-style-2 .cbl-text-overlay {
        padding: 20px;
        min-height: 120px;
    }
    
    .cbl-arrow-wrapper {
        bottom: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
    }
    
    .cbl-style-2 .cbl-arrow-wrapper {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    .cbl-style-2 .cbl-image-wrapper {
        padding-top: 75% !important;
    }
    
.cbl-style-2 .cbl-grid-item-1  .cbl-text-overlay,
.cbl-style-2 .cbl-grid-item-6  .cbl-text-overlay {
    padding: 15px;
    min-height: 110px;
}
}

@media screen and (max-width: 500px) {
	.cbl-container.cbl-style-2 .cbl-card:nth-child(1) .cbl-title,.cbl-container.cbl-style-2 .cbl-card:last-child .cbl-title{
    font-size: 20px !important;
}

    .cbl-sold-badge {
        font-size: 18px;
    }
}
