/* === EVENTS ARCHIVE GRID === */
.lb-events-archive-wrapper {
    /* CSS-Variablen für dynamische Werte werden inline gesetzt */
}

.lb-events-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--lb-grid-gap, 20px);
    margin-bottom: 40px;
}

/* === GRID LAYOUT SYSTEM === */
.lb-event-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 #e8e8e8;
    min-height: 480px; /* Mindesthöhe für alle Cards - erhöht für Button-Platz */
    height: 480px; /* Feste Höhe für alle Cards - erhöht für Button-Platz */
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

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

/* Banner positioning in grid - 1x4 Layout (eine Zeile hoch, 2 Spalten breit, immer rechts) */
.lb-banner-container.lb-banner-1x4 {
    /* background: #f8f9fa; */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* border: 1px solid #e8e8e8; */
    transition: all 0.3s ease;
    min-height: 480px; /* Gleiche Höhe wie Event-Cards */
    height: 480px; /* Gleiche Höhe wie Event-Cards */
    /* Grid-Positionierung wird per JavaScript gesetzt basierend auf data-after-post */
}

.lb-banner-container.lb-banner-1x4:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 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%;
}

.lb-banner-pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.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 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.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: translateY(0);
    opacity: 1;
}

.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: 160px; /* Feste Höhe für alle Bilder */
    min-height: 160px; /* Mindesthöhe */
    max-height: 160px; /* Maximale Höhe */
    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: 160px; /* Feste Höhe für alle Bilder */
    min-height: 160px;
    max-height: 160px;
    object-fit: cover; /* Bild wird zugeschnitten, um Container zu füllen */
    object-position: center; /* Bild wird zentriert zugeschnitten */
    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: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    min-height: 0; /* Wichtig für Flexbox mit overflow */
}

.lb-event-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #191970; /* Dunkelblau wie events-grid.php */
}

.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.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0; /* Verhindert, dass Beschreibung zu viel Platz nimmt */
    max-height: 2.8em; /* Maximal 2 Zeilen (1.4 line-height * 2) */
}

.lb-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 8px; /* Zusätzlicher Abstand oben */
    flex-shrink: 0; /* Verhindert, dass Footer schrumpft */
    min-height: 50px; /* Mindesthöhe für Button-Bereich */
}

.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 */
}

/* Buttons in Blautönen wie events-grid.php */
.lb-event-btn {
    padding: 10px 18px; /* Mehr Padding für bessere Darstellung */
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    min-height: 38px; /* Mindesthöhe für Button */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Verhindert, dass Button schrumpft */
}

/* Verschiedene Blautöne für Buttons */
.lb-event-btn.anmelden {
    background: #191970; /* Dunkelblau wie events-grid.php */
}

.lb-event-btn.teilnehmen {
    background: #191970; /* Dunkelblau wie events-grid.php */
}

.lb-event-btn.kostenlos {
    background: #191970; /* Dunkelblau wie events-grid.php */
}

.lb-event-btn:hover {
    background: #4B0082; /* Dunkelviolett beim Hover wie events-grid.php */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

/* 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;
}

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

.lb-banner-slide img,
.lb-banner-single img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* === 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 */
@media (max-width: 1366px) {
    .lb-events-archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lb-event-card {
        min-height: 460px; /* Mindesthöhe für alle Cards */
        height: 460px; /* Feste Höhe für alle Cards */
    }
    
    .lb-banner-container.lb-banner-1x4 {
        grid-column: 2 / span 2; /* Startet bei Spalte 2, spannt 2 Spalten (rechts) */
        grid-row: 2; /* Zweite Zeile */
        min-height: 460px; /* Gleiche Höhe wie Event-Cards */
        height: 460px; /* Gleiche Höhe wie Event-Cards */
    }
}

/* Tablet: 2 Spalten */
@media (max-width: 1024px) {
    .lb-events-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lb-event-card {
        min-height: 440px; /* Mindesthöhe für alle Cards */
        height: 440px; /* Feste Höhe für alle Cards */
    }
    
    .lb-banner-container.lb-banner-1x4 {
        grid-column: 1 / span 2; /* Spannt beide Spalten */
        grid-row: 2; /* Zweite Zeile */
        min-height: 440px; /* Gleiche Höhe wie Event-Cards */
        height: 440px; /* Gleiche Höhe wie Event-Cards */
    }
    
    .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-banner-container.lb-banner-1x4 {
        grid-column: span 1; /* Spannt die einzige Spalte */
        grid-row: 2; /* Zweite Zeile */
        min-height: 420px; /* Gleiche Höhe wie Event-Cards */
        height: 420px; /* Gleiche Höhe wie Event-Cards */
    }
    
    .lb-event-card {
        min-height: 420px; /* Mindesthöhe für alle Cards */
        height: 420px; /* Feste Höhe für alle Cards */
    }
    
    .lb-banner-container.lb-banner-1x4 {
        min-height: 420px; /* Gleiche Höhe wie Event-Cards */
        height: 420px; /* Gleiche Höhe wie Event-Cards */
    }
    
    .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;
}

