/* === EVENTS GRID/CAROUSEL CSS === */
/* CSS-Variablen für dynamische Werte werden inline gesetzt */

.lb-events-carousel-wrapper {
    margin: 40px 0;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 30px;
}

.lb-events-section-title {
    font-size: var(--lb-section-title-font-size, 18px);
    font-weight: 500;
    color: var(--lb-section-title-color, #191970);
    text-align: center;
    margin: 0 0 30px 0;
    line-height: 1.4;
}

.lb-events-carousel-container {
    position: relative;
    margin-bottom: 30px;
}

.lb-events-swiper {
    overflow: hidden;
    padding: 0 0px 60px 0px; /* Space for pagination */
}

.lb-event-card {
    background: var(--lb-card-background, #ffffff);
    border-radius: var(--lb-card-border-radius, 12px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--lb-card-border-color, #e8e8e8);
    min-height: 530px !important;
    height: var(--lb-card-height, 520px);
    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);
}

/* 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-favorite-button-container {
    z-index: 10;
}

.lb-event-card .lb-event-btn,
.lb-event-card .lb-event-title a,
.lb-event-card .lb-schwerpunkt-chip {
    position: relative;
    z-index: 2;
}

.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;
    padding: 0;
    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; /* 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 */
}

/* Kleine Category Badges */
.lb-event-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    text-decoration: none;
    transition: all 0.3s ease;
}

.lb-event-category-badge:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
    color: white;
    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 */

.lb-event-content {
    padding: var(--lb-content-padding, 16px);
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Füllt verfügbaren Platz aus */
    justify-content: space-between; /* Verteilt Content gleichmäßig */
    min-height: 0; /* Wichtig für Flexbox mit overflow */
}

.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-title {
    font-size: var(--lb-title-font-size, 16px);
    font-weight: 600;
    color: var(--lb-title-color, #191970);
    margin: 0 0 8px 0;
    line-height: 1.4;
    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; /* Verhindert, dass Titel zu viel Platz nimmt */
}

.lb-event-title a {
    color: inherit;
    text-decoration: none;
}

.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 - gleich wie im Archive */
.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: 4 !important;
    line-clamp: 4 !important;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    flex-shrink: 0; /* Verhindert, dass Beschreibung zu viel Platz nimmt */
    min-height: calc(13px * 1.5 * 4); /* 4 Zeilen Mindesthöhe */
    /* KEIN flex-grow - damit Footer immer am unteren Rand bleibt */
}

.lb-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto; /* Wichtig: drückt Footer nach unten */
    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 experts */
}

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

/* Verstecke nur die ::after Pseudo-Elemente der Standard Swiper Navigation */
.lb-events-carousel-container .swiper-button-prev::after,
.lb-events-carousel-container .swiper-button-next::after {
    display: none !important;
}

/* Navigation Arrows */
.lb-events-prev,
.lb-events-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: linear-gradient(to right, #EDDE5D 0%, #F09819 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: white;
    box-shadow: 0 2px 8px rgba(92, 122, 89, 0.3);
}

.lb-events-prev {
    left: -22px;
}

.lb-events-next {
    right: -22px;
}

.lb-events-prev:hover,
.lb-events-next:hover {
    background: linear-gradient(to right, #F09819 0%, #EDDE5D 100%);
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 3px 10px rgba(92, 122, 89, 0.3);
}

.lb-events-prev.swiper-button-disabled,
.lb-events-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Pagination */
.lb-events-pagination {
    bottom: 20px !important;
    text-align: center;
}

.lb-events-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

.lb-events-pagination .swiper-pagination-bullet-active {
    background: #F09819;
    transform: scale(1);
}

/* All Events Button */
.lb-all-events-button-wrapper {
    text-align: center;
    margin-top: 20px;
}

.lb-all-events-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #191970;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.lb-all-events-btn:hover {
    background: #4B0082;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(25, 118, 210, 0.3);
    color: white;
    text-decoration: none;
}

/* Fallback CSS für Events ohne Swiper */
.lb-events-carousel-container.fallback {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.lb-events-carousel-container.fallback .swiper-wrapper {
    display: flex;
    gap: 20px;
    padding: 0 10px;
}

.lb-events-carousel-container.fallback .swiper-slide {
    flex: 0 0 auto;
    width: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lb-events-prev,
    .lb-events-next {
        width: 36px;
        height: 36px;
    }
    
    .lb-events-prev {
        left: -18px;
    }
    
    .lb-events-next {
        right: -18px;
    }
    
    .lb-event-card {
        height: 420px;
    }
    
    .lb-event-content {
        padding: 14px;
    }
    
    .lb-event-title {
        font-size: 15px;
    }
    
    .lb-events-section-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lb-events-swiper {
        padding: 0 5px 60px 5px;
    }
    
    .lb-events-prev,
    .lb-events-next {
        display: none; /* Hide on very small screens, use swipe */
    }
    
                .lb-event-card {
                    height: 400px;
                }
    
    .lb-event-image {
        height: 140px;
        min-height: 140px;
        max-height: 140px;
    }
    
    .lb-event-image img, .lb-event-image svg {
        height: 140px;
        min-height: 140px;
        max-height: 140px;
    }
    
    .lb-event-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .lb-event-btn {
        align-self: stretch;
        text-align: center;
    }
    
    .lb-events-section-title {
        font-size: 15px;
        margin-bottom: 20px;
    }
}
