/* === EVENTS ARCHIVE GRID === */
.lb-events-archive-wrapper {
    /* CSS-Variablen für dynamische Werte werden inline gesetzt */
}
.lb-event-card{
    height: auto !important;
}
.lb-events-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: row dense; /* Dense: füllt Lücken automatisch */
    gap: var(--lb-grid-gap, 20px);
    margin-bottom: 40px;
    align-items: stretch;
}

/* Grid Items - wichtig für gleiche Höhe */
.lb-events-archive-grid > .lb-grid-item {
    display: grid; /* Grid statt flex für bessere Höhenverteilung */
}

.lb-events-archive-grid > .lb-grid-item > .lb-event-card {
    height: 100%; /* Card füllt gesamte Höhe des Grid-Items */
}

/* === GRID LAYOUT SYSTEM === */
.lb-event-card {
    background: var(--lb-card-background, #ffffff);
    border-radius: var(--lb-card-border-radius, 12px);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--lb-card-border-color, #e8e8e8);
    /* height: auto - Cards wachsen mit Content, Grid gleicht Höhe pro Zeile an */
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* Card-Link Overlay - macht gesamte Card klickbar */
.lb-event-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-decoration: none;
}

/* Elemente die über dem Card-Link liegen sollen */
.lb-event-card .lb-event-btn,
.lb-event-card .lb-event-title a,
.lb-event-card .lb-schwerpunkt-chip {
    position: relative;
    z-index: 2;
}

/* Favoriten-Button braucht absolute Position + höheren z-index */
.lb-event-card .lb-favorite-button-container {
    z-index: 10;
}

.lb-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Banner positioning in grid - 2 Spalten breit, rechts */
.lb-banner-container.lb-banner-1x4 {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    min-height: var(--lb-card-height, 460px);
    grid-column: -3 / -1; /* Immer die letzten 2 Spalten (rechts) */
}

/* Nur der ERSTE Banner pro Grid in die erste Zeile */
.lb-events-archive-grid > .lb-banner-container.lb-banner-1x4:first-of-type {
    grid-row: 1;
}

.lb-banner-container.lb-banner-1x4:hover {
    transform: none;
    box-shadow: none;
}

/* Banner Items für Rotation */
.lb-banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.lb-banner-item.lb-banner-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.lb-banner-item.lb-banner-hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.lb-banner-single {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-banner-pagination {
    display: none;
}

.lb-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.lb-banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.lb-banner-dot.active {
    background: #ffffff;
    border-color: #ffffff;
    transform: scale(1.3);
}

.lb-banner-single img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    display: block;
    margin: auto;
}

.lb-banner-overlay {
    display: none !important;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.3), transparent);
    color: white;
    padding: 20px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.lb-banner-container:hover .lb-banner-overlay {
    transform: none;
    opacity: 0;
}

.lb-banner-overlay h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.lb-banner-container a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* === EVENT CARD STYLING === */
.lb-event-image {
    position: relative;
    height: var(--lb-image-height, 160px);
    min-height: var(--lb-image-height, 160px);
    max-height: var(--lb-image-height, 160px);
    overflow: hidden;
    border-radius: 12px 12px 0 0; /* Nur oben abgerundet */
    margin: 0; /* Kein Margin */
    padding: 0; /* Kein Padding */
    flex-shrink: 0; /* Verhindert, dass Bild kleiner wird */
}

/* Favoriten-Button Positionierung */
.lb-favorite-button-container {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 10;
}

/* Favoriten-Button Styling - Stern Icon */
.lb-favorite-button-container .lb-favorite-btn {
    background: rgba(255, 215, 0, 0.95) !important;
    color: #191970 !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}

.lb-favorite-button-container .lb-favorite-btn:hover {
    background: rgba(255, 215, 0, 1) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.lb-favorite-button-container .lb-favorite-btn i {
    font-size: 18px !important;
    color: #191970 !important;
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    font-family: 'eicons' !important;
    text-align: center !important;
}

.lb-favorite-button-container .lb-favorite-btn.lb-favorited {
    background: rgba(25, 25, 112, 0.95) !important;
    color: #FFD700 !important;
}

.lb-favorite-button-container .lb-favorite-btn.lb-favorited i {
    color: #FFD700 !important;
}

.lb-event-image img, .lb-event-image svg {
    width: 100%;
    height: var(--lb-image-height, 160px);
    min-height: var(--lb-image-height, 160px);
    max-height: var(--lb-image-height, 160px);
    object-fit: cover;
    object-position: 50% 25%;


    transition: transform 0.3s ease;
    display: block; /* Entfernt Leerraum unter Bildern */
    margin: 0;
    padding: 0;
}

.lb-event-card:hover .lb-event-image img,
.lb-event-card:hover .lb-event-image svg {
    transform: scale(1.02); /* Weniger aggressive Skalierung */
}

.lb-event-content {
    padding: var(--lb-content-padding, 16px);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0; /* Wichtig für Flexbox mit overflow */
}

.lb-event-title {
    margin: 0 0 10px 0;
    font-size: var(--lb-title-font-size, 16px);
    font-weight: 600;
    line-height: 1.4;
    color: var(--lb-title-color, #191970);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    max-height: 2.8em; /* Maximal 2 Zeilen (1.4 line-height * 2) */
    flex-shrink: 0;
}

.lb-event-title a {
    color: #191970; /* Dunkelblau wie events-grid.php */
    text-decoration: none;
    transition: color 0.3s ease;
}

.lb-event-title a:hover {
    color: #4B0082; /* Dunkelviolett beim Hover wie events-grid.php */
}

.lb-event-date {
    font-size: 13px;
    color: #666;
    font-weight: 400;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lb-event-date svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.lb-event-type {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #4B0082;
    font-weight: 500;
    margin-bottom: 6px;
}

.lb-event-type svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    flex-shrink: 0;
}

/* Schwerpunkte Styling */
.lb-schwerpunkt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    margin-top: 2px;
}

.lb-schwerpunkt-chip {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: #191970;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(25, 25, 112, 0.15);
    white-space: nowrap;
    line-height: 1.4;
    display: inline-block;
    cursor: default !important;
    pointer-events: none;
}

.lb-event-datetime {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.lb-event-datetime svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    flex-shrink: 0;
}

.lb-event-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.lb-event-location svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    flex-shrink: 0;
}

.lb-event-location i {
    font-size: 16px;
    margin-right: 2px;
    flex-shrink: 0;
}

.lb-event-description {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 5 !important;
    line-clamp: 5 !important;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    flex-shrink: 0;
    min-height: calc(13px * 1.5 * 5); /* 5 Zeilen Mindesthöhe */
}

.lb-event-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    flex-shrink: 0;
}

.lb-event-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.lb-event-participants {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lb-event-participants svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

.lb-event-price {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-top: 4px;
}

.lb-event-price.free {
    color: #4B0082; /* Dunkelviolett wie events-grid.php */
}

/* "Mehr Infos" Link-Text Style */
/* "Mehr Infos" als Link-Text ohne Hintergrund */
.lb-event-btn,
.lb-event-btn.mehr-infos,
.lb-event-btn.anmelden,
.lb-event-btn.teilnehmen,
.lb-event-btn.kostenlos {
    padding: 0 !important;
    color: #191970 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.lb-event-btn::after {
    content: '\2192';
    transition: transform 0.3s ease;
}

.lb-event-btn:hover,
.lb-event-btn.mehr-infos:hover,
.lb-event-btn.anmelden:hover,
.lb-event-btn.teilnehmen:hover,
.lb-event-btn.kostenlos:hover {
    color: #4B0082 !important;
    text-decoration: underline !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.lb-event-btn:hover::after {
    transform: translateX(3px);
}

/* Kleine Category Badges wie im events-grid.php */
.lb-event-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    border: none;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    z-index: 3;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lb-event-category-badge:hover {
    background: rgba(0,0,0,.85);
    transform: scale(1.05);
    color: #fff;
    text-decoration: none;
}

/* Category Badge Colors - EXAKT WIE categories-carousel.php */
.lb-event-category-badge.color-0 { background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%); } /* KOMMUNIKATION - Grün */
.lb-event-category-badge.color-1 { background: linear-gradient(135deg, #FFF3E0 0%, #FFD1B3 100%); } /* KREATIVITÄT & AUSDRUCK - Orange */
.lb-event-category-badge.color-2 { background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%); } /* COACHING & SELBSTERKENNTNIS - Lila */
.lb-event-category-badge.color-3 { background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD9 100%); } /* BEWUSSTSEIN & ENERGIEARBEIT - Pink */
.lb-event-category-badge.color-4 { background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%); } /* UMWELT - GRÜNE ERDE - Grün */
.lb-event-category-badge.color-5 { background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%); } /* NATURHEILKRAFT - Grün */
.lb-event-category-badge.color-6 { background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%); } /* KÖRPERARBEIT - Blau */
.lb-event-category-badge.color-7 { background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%); } /* NAHRUNG ALS MEDIZIN - Rot */
.lb-event-category-badge.color-8 { background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%); } /* BEZIEHUNG & PARTNERSCHAFT - Lila */
.lb-event-category-badge.color-9 { background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%); } /* TRADITIONELLE METHODEN - Blau */
.lb-event-category-badge.color-10 { background: linear-gradient(135deg, #F5F5F5 0%, #E0E0E0 100%); } /* ERLEUCHTUNG - EGOTOD - Grau */

/* === BANNER STYLING === */
.lb-banner-slider,
.lb-banner-single {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-banner-slide,
.lb-banner-single {
    height: 100%;
}

.lb-banner-slide img,
.lb-banner-single img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
}

/* === PAGINATION === */
.lb-events-pagination {
    text-align: center;
    margin: 40px 0;
}

.lb-events-pagination .page-numbers {
    display: inline-flex;
    margin: 0 5px;
    padding: 8px 12px;
    background: transparent;
    color: #191970;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lb-events-pagination a.page-numbers:hover,
.lb-events-pagination span.page-numbers.current {
    background: #191970;
    color: white;
}

/* === LAZY LOADING === */
.lb-events-lazy-loading {
    text-align: center;
    padding: 40px 20px;
}

.lb-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F09819;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === RESPONSIVE === */

/* Laptop: 3 Spalten (zwischen 1025-1366px) */
@media (max-width: 1366px) {
    .lb-events-archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lb-event-card {
        min-height: 460px;
    }
}

/* Tablet: 2 Spalten */
@media (max-width: 1024px) {
    .lb-events-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lb-event-card {
        min-height: 440px;
    }

    .lb-banner-container.lb-banner-1x4,
    .lb-banner-container.lb-banner-right,
    .lb-banner-container.lb-banner-left {
        grid-column: 1 / span 2;
        grid-row: span 1;
        min-height: 440px;
    }

    .lb-event-image {
        height: 180px;
    }

    .lb-event-content {
        padding: 16px;
    }
}

/* Mobile: 1 Spalte */
@media (max-width: 768px) {
    .lb-events-archive-grid {
        grid-template-columns: 1fr;
    }

    .lb-event-card {
        min-height: 400px; /* Mindesthöhe für alle Cards */
        /* height entfernt - Cards wachsen mit Content */
    }

    .lb-banner-container.lb-banner-1x4 {
        grid-column: span 1; /* Spannt die einzige Spalte */
        grid-row: 2; /* Zweite Zeile */
        min-height: 300px;
        height: 300px; /* Banner braucht feste Höhe */
    }

    .lb-event-image {
        height: 160px; /* Feste Höhe für alle Bilder */
        min-height: 160px;
        max-height: 160px;
    }

    .lb-event-image img, .lb-event-image svg {
        height: 160px; /* Feste Höhe für alle Bilder */
        min-height: 160px;
        max-height: 160px;
    }

    .lb-event-content {
        padding: 14px;
    }

    .lb-event-title {
        font-size: 15px;
    }

    .lb-schwerpunkt-chips {
        gap: 5px;
        margin-bottom: 6px;
    }

    .lb-schwerpunkt-chip {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* === LOAD MORE BUTTON === */
.lb-load-more-wrapper {
    text-align: center;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.lb-load-more-button {
    background: #191970; /* Dunkelblau wie Profile Button */
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 25px; /* Runde Ecken wie Profile Button */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(25, 25, 112, 0.3);
}

.lb-load-more-button:hover {
    background: #4B0082; /* Dunkleres Violett beim Hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 0, 130, 0.4);
}

.lb-load-more-button:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lb-load-more-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.lb-load-more-info {
    font-size: 14px;
    color: #666;
}

.lb-load-more-info .lb-loaded-count,
.lb-load-more-info .lb-total-count {
    font-weight: 600;
    color: #191970;
}

/* Loading Animation */
.lb-load-more-button.lb-loading {
    position: relative;
    pointer-events: none;
}

.lb-load-more-button.lb-loading::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: lb-spin 0.8s linear infinite;
}

@keyframes lb-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Grid Loading State */
.lb-events-archive-grid.lb-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Legacy Lazy Loading Spinner (für Rückwärtskompatibilität) */
.lb-events-lazy-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.lb-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #191970;
    border-radius: 50%;
    animation: lb-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

