/* Gesamtbereich */
.bl-section {
    margin: 40px 0;
    font-family: inherit;
}

/* Kopfzeile: Linie oben + Tabs rechts */
.bl-header {
    padding-top: 14px;
    padding-bottom: 14px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-bottom: 2px solid #000;
}

.bl-label {
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    background: var(--theme-palette-color-2);
    color: #000;
}

.bl-header-right {
    flex: 1;
    text-align: right;
}

.bl-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bl-tabs li {
    display: inline-block;
    margin-left: 18px;
}

.bl-tabs li:first-child {
    margin-left: 0;
}

.bl-tabs a {
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #555;
}

.bl-tabs li.active a,
.bl-tabs a:hover {
    color: #000;
}

/* Disabled/Empty Category State */
.bl-tabs li.bl-tab-empty a {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.bl-tabs li.bl-tab-empty a:hover {
    color: #ccc;
    cursor: not-allowed;
}

/* Mobile Dropdown - standardmäßig versteckt */
.bl-mobile-dropdown {
    display: none;
}

.bl-category-select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #000;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.bl-category-select:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.bl-category-select option {
    padding: 8px;
    font-weight: 600;
}

.bl-category-select option:disabled {
    color: #ccc;
}

/* Empty State Message */
.bl-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #555;
    font-size: 14px;
    background: #f6f7f7;
    border-radius: 4px;
    margin: 40px 0;
}

.bl-empty-state p {
    margin: 0;
    font-style: italic;
}

/* Posts Container für AJAX-Filterung */
.bl-posts-container {
    transition: opacity 0.3s ease;
}

/* Obere drei großen Artikel */
.bl-top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 36px;
}

.bl-item-large {
    display: flex;
    flex-direction: column;
}

.bl-thumb-link {
    display: block;
    margin-bottom: 14px;
    position: relative;
}

.bl-thumb {
    width: 100%;
    padding-top: 65%; /* Seitenverhältnis 16:10 / ähnlich */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Category Badges wie bei car-tiles */
.bl-category-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bl-category-badge {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0;
    background: var(--theme-palette-color-2);
    color: #000;
    border: none;
    letter-spacing: 0.5px;
    display: inline-block;
}

.bl-title-large {
    font-size: 1.35rem; /* größer als unten */
    line-height: 1.3;
    margin: 0 0 12px;
    font-weight: 700;
    /* Titel auf max. 2 Zeilen begrenzen */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.35rem * 1.3 * 2); /* Reserviert Platz für 2 Zeilen */
}

.bl-title-large a {
    text-decoration: none;
    color: inherit;
}

.bl-title-large a:hover {
    text-decoration: underline;
}

.bl-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
    /* Exakt 3 Zeilen für Vorschau */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: calc(0.95rem * 1.6 * 3); /* Fixe Höhe für 3 Zeilen */
}

/* Unterer Sechserblock */
.bl-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 30px;
}

/* Newsletter-Kachel */
.bl-item-newsletter {
    background: #fff;
    border: 2px solid #e5e5e5;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bl-item-newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--theme-palette-color-2);
}

.bl-item-newsletter:hover {
    border-color: var(--theme-palette-color-2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bl-newsletter-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    padding: 32px 24px;
}

.bl-newsletter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 300px;
}

.bl-newsletter-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    background: var(--theme-palette-color-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.bl-newsletter-icon svg {
    width: 28px;
    height: 28px;
}

.bl-newsletter-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #000;
}

.bl-newsletter-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 24px;
    max-width: 280px;
}

.bl-newsletter-button {
    display: inline-block;
    padding: 10px 20px;
    background: #000;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    border: 2px solid #000;
}

.bl-newsletter-link:hover .bl-newsletter-button {
    background: var(--theme-palette-color-2);
    color: #000;
    border-color: #000;
}

/* Unterer Sechserblock - kleinere Artikel */

.bl-item-small {
    display: flex;
    align-items: flex-start;
}

.bl-thumb-link-small {
    display: block;
    flex: 0 0 40%;
    margin-right: 12px;
    position: relative;
}

.bl-thumb-small {
    width: 100%;
    padding-top: 65%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bl-category-badges--small {
    top: 8px;
    left: 8px;
}

.bl-category-badges--small .bl-category-badge {
    padding: 3px 8px;
    font-size: 10px;
}

.bl-small-content {
    flex: 1;
}

.bl-title-small {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 700;
    /* Titel auf max. 3 Zeilen begrenzen */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-title-small a {
    text-decoration: none;
    color: inherit;
}

.bl-title-small a:hover {
    text-decoration: underline;
}

/* Responsive Anpassungen */

/* iPad Pro und größere Tablets (Landscape) */
@media (max-width: 1200px) {
    .bl-top-grid {
        gap: 24px;
    }

    .bl-bottom-grid {
        gap: 20px 24px;
    }

    .bl-title-large {
        font-size: 1.25rem;
    }

    .bl-excerpt {
        font-size: 0.9rem;
    }

    .bl-tabs li {
        margin-left: 14px;
    }

    .bl-tabs a {
        font-size: 12px;
    }
}

/* Tablets und kleinere Desktops */
@media (max-width: 1024px) {
    .bl-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .bl-bottom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 20px;
    }

    .bl-title-large {
        font-size: 1.2rem;
    }

    .bl-title-small {
        font-size: 0.95rem;
    }

    .bl-newsletter-content {
        min-height: 250px;
        padding: 24px 18px;
    }

    .bl-newsletter-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }

    .bl-newsletter-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* iPad und kleinere Tablets (Portrait) */
@media (max-width: 820px) {
    .bl-section {
        margin: 30px 0;
    }

    .bl-header {
        margin-bottom: 20px;
        gap: 16px;
    }

    .bl-top-grid {
        margin-bottom: 30px;
    }

    .bl-thumb-link-small {
        flex: 0 0 45%;
    }

    .bl-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .bl-tabs li {
        margin-left: 0;
    }
}

/* Mobile Landscape und kleine Tablets */
@media (max-width: 768px) {
    .bl-header {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 12px;
    }

    .bl-label {
        font-size: 12px;
        padding: 5px 12px;
    }

    .bl-header-right {
        text-align: left;
        width: 100%;
    }

    /* Desktop Tabs verstecken */
    .bl-tabs-desktop {
        display: none;
    }

    /* Mobile Dropdown zeigen */
    .bl-mobile-dropdown {
        display: block;
        width: 100%;
    }

    .bl-category-select {
        font-size: 12px;
        padding: 8px 28px 8px 10px;
    }

    .bl-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }

    .bl-bottom-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bl-title-large {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .bl-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .bl-item-small {
        align-items: flex-start;
    }

    .bl-thumb-link-small {
        flex: 0 0 35%;
        margin-right: 14px;
    }

    .bl-title-small {
        font-size: 1rem;
        -webkit-line-clamp: 4;
    }

    .bl-newsletter-content {
        min-height: 200px;
        padding: 24px 16px;
    }

    .bl-newsletter-title {
        font-size: 1.15rem;
    }

    .bl-newsletter-text {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .bl-section {
        margin: 20px 0;
    }

    .bl-header {
        margin-bottom: 16px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .bl-label {
        font-size: 11px;
        padding: 4px 10px;
    }

    .bl-category-select {
        font-size: 11px;
        padding: 7px 26px 7px 9px;
        background-position: right 10px center;
        background-size: 10px;
    }

    .bl-top-grid {
        gap: 16px;
        margin-bottom: 20px;
    }

    .bl-bottom-grid {
        gap: 16px;
    }

    .bl-thumb {
        padding-top: 60%;
    }

    .bl-category-badges {
        top: 12px;
        left: 12px;
        gap: 4px;
    }

    .bl-category-badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    .bl-title-large {
        font-size: 1.15rem;
        margin-bottom: 8px;
        min-height: calc(1.15rem * 1.3 * 2);
    }

    .bl-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        height: calc(0.85rem * 1.5 * 2);
    }

    .bl-thumb-link-small {
        flex: 0 0 40%;
        margin-right: 12px;
    }

    .bl-thumb-small {
        padding-top: 56.25%; /* 16:9 Aspect Ratio */
    }

    .bl-category-badges--small {
        top: 6px;
        left: 6px;
    }

    .bl-category-badges--small .bl-category-badge {
        padding: 2px 6px;
        font-size: 9px;
    }

    .bl-title-small {
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .bl-newsletter-link {
        padding: 20px 16px;
    }

    .bl-newsletter-content {
        min-height: 180px;
        padding: 16px 12px;
    }

    .bl-newsletter-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .bl-newsletter-icon svg {
        width: 20px;
        height: 20px;
    }

    .bl-newsletter-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .bl-newsletter-text {
        font-size: 0.85rem;
        margin-bottom: 16px;
        max-width: 100%;
    }

    .bl-newsletter-button {
        padding: 8px 16px;
        font-size: 11px;
    }
}

/* Extra kleine Mobile-Geräte */
@media (max-width: 360px) {

    .bl-title-large {
        font-size: 1.1rem;
    }

    .bl-title-small {
        font-size: 0.95rem;
    }

    .bl-tabs a {
        font-size: 9px;
    }
}
