/* === EXPERTS ARCHIVE GRID WRAPPER === */
.lb-experts-archive-wrapper {
    margin: 40px 0;
}

/* === EXPERTS SECTIONS === */
.lb-experts-section {
    margin-bottom: 60px;
}

.lb-experts-section:last-of-type {
    margin-bottom: 40px;
}

.lb-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #191970;
    margin-bottom: 30px;
    text-align: left;
}

.lb-newest-section .lb-section-title {
    color: #F09819;
}

.lb-experts-archive-grid {
    display: grid;
    /* 4 Spalten - alle gleich groß mit minmax für konsistente Größe */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-gap: 20px;
    margin-bottom: 40px;
    align-items: stretch; /* Alle Cards auf gleiche Höhe */
    width: 100%; /* Stelle sicher, dass Grid die volle Breite nutzt */
}

/* Grid Items - stellen sicher, dass alle Spalten gleich groß sind */
.lb-experts-archive-grid > .lb-grid-item {
    min-width: 0; /* Wichtig für Grid: erlaubt Shrinking */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex; /* Flex für gleichmäßige Höhe */
    flex-direction: column;
}

/* Sicherstellen dass die Expert Card die volle Grid-Item Höhe nutzt */
.lb-experts-archive-grid > .lb-grid-item > .lb-expert-card {
    flex: 1 1 auto;
    height: auto;
}

/* Banner Container als Grid-Item behandeln */
.lb-experts-archive-grid > .lb-banner-container {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Banner nimmt 2 Spalten und NUR 1 Zeile ein */
    grid-column: span 2;
    grid-row: span 1;
}

/* === RESPONSIVE === */

/* Desktop/Laptop bis 1200px: weiterhin 4 Spalten */
@media (max-width: 1200px) {
    .lb-experts-archive-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-gap: 15px;
    }
}

/* Laptop unter 1024px: 3 Spalten */
@media (max-width: 1024px) {
    .lb-experts-archive-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-gap: 15px;
    }
    
    .lb-banner-container.lb-banner-1x1 {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Tablet: 2 Spalten */
@media (max-width: 768px) {
    .lb-experts-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-gap: 15px;
    }

    .lb-expert-card {
        min-height: 620px !important; /* Erhöht für 7 Schwerpunkte */
        height: 100%;
    }
    
    .lb-expert-image {
        height: 180px;
    }
    
    .lb-expert-content {
        padding: 16px;
    }
}

/* Mobile: 1 Spalte */
@media (max-width: 768px) {
    .lb-experts-archive-grid {
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }
    
    .lb-banner-container.lb-banner-1x1 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .lb-expert-card {
        min-height: 580px !important; /* Erhöht für 7 Schwerpunkte */
        height: 100%;
    }
    
    .lb-expert-image {
        height: 160px;
    }
    
    .lb-expert-content {
        padding: 14px;
    }
    
    .lb-expert-name {
        font-size: 15px;
    }
}

/* === BANNER POSITIONING IN GRID === */
.lb-banner-container.lb-banner-1x1 {
    /* background: #f8f9fa; */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* border: 1px solid #e8e8e8; */
    transition: all 0.3s ease;
    min-height: 460px; /* Gleiche Höhe wie Expert Cards - erhöht für 7 Schwerpunkte */
}

/* === BANNER LINKS/RECHTS POSITIONIERUNG === */
/* Die Positionierung wird via JavaScript gesteuert (grid-column) */
/* Diese Klassen dienen als Fallback und für Styling-Zwecke */

.lb-banner-container.lb-banner-position-left,
.lb-banner-container.lb-banner-position-right {
    /* Position wird via JS gesetzt */
}

.lb-banner-container.lb-banner-1x1: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-single img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.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;
}

/* Banner Pagination Dots */
.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);
}

/* === EXPERT CARD - OPTIMIERT für bessere Anzeige (1:1 KOPIE von experts-carousel.php) === */
.lb-expert-card {
    background: white;
    border-radius: var(--lb-radius, 12px);
    box-shadow: 0 4px 20px var(--lb-shadow, rgba(0, 0, 0, 0.1));
    overflow: hidden;
    /* WICHTIG: Nur spezifische Eigenschaften animieren - NICHT "all"!
       "all" verursacht Animations-Verzögerung beim initialen Layout */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    width: 100%;
    max-width: 100%; /* Stelle sicher, dass Card nicht breiter als Spalte wird */
    min-width: 0; /* Wichtig für Grid: erlaubt Shrinking */
    margin: 0;
    height: 100%; /* Alle Cards auf gleiche Höhe durch Grid */
    min-height: 620px !important; /* Erhöht für 7 Schwerpunkte */
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box; /* Stelle sicher, dass Padding in Breite enthalten ist */
}

.lb-expert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Card-Link Overlay - macht gesamte Card klickbar */
.lb-expert-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-expert-card .lb-favorite-button-container {
    z-index: 10;
}

.lb-expert-card .lb-profile-button,
.lb-expert-card .lb-expert-name a,
.lb-expert-card .lb-expert-image-link {
    position: relative;
    z-index: 2;
}

.lb-expert-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

/* Anklickbares Bild */
.lb-expert-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.lb-expert-image-link:hover {
    text-decoration: none;
}

/* 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: 2px solid #ffffff !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-expert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lb-expert-card:hover .lb-expert-image img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.05);
}

.lb-expert-content {
    padding: 18px; /* Etwas weniger Padding für mehr Platz */
    flex: 1; /* Nimmt verfügbaren Platz ein */
    display: flex;
    flex-direction: column;
}

.lb-expert-header {
    margin-bottom: 5px;
    position: relative; /* Für Rating-Position */
}

/* RATING rechts oben - KEIN HINTERGRUND */
.lb-expert-rating {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #4B0082; /* Dunkleres Violett */
}

.lb-expert-rating i {
    color: #FFD700; /* Gold - wie gewünscht */
    font-size: 10px;
}

.lb-expert-name {
    margin: 0 0 6px 0; /* Weniger Abstand */
    font-size: 20px; /* Kleiner für mehr Platz */
    font-weight: 600;
    color: #191970; /* Dunkelblau */
    line-height: 1.2; /* Kompakter */
}

.lb-expert-services {
    margin: 0 0 6px 0; /* Weniger Abstand */
    font-size: 14px; /* Kleiner */
    font-weight: 500;
    color: #4B0082; /* Dunkleres Violett */
    line-height: 1.3;
}

.lb-expert-location {
    margin: unset;
    font-size: 13px; /* Etwas kleiner */
    color: #999999; /* Helleres Grau */
    display: flex;
    align-items: center;
    gap: 4px;
}

.lb-expert-location i {
    font-size: 12px;
    color: #999999; /* Helleres Grau */
}

.lb-expert-specialties {
    margin-bottom: 5px; /* Weniger Abstand */
    display: flex;
    flex-wrap: wrap;
    gap: 6px; /* Kleinere Gaps */
    max-height: 120px; /* Begrenze Höhe - erhöht für 7 Tags */
    overflow: hidden; /* Verstecke überflüssige Tags */
}

.lb-specialty-tag {
    background: #4B0082; /* Dunkleres Violett */
    color: white;
    padding: 3px 6px; /* Kompakter */
    border-radius: var(--lb-radius-small, 6px);
    font-size: 11px; /* Kleiner */
    font-weight: 500;
    line-height: 1.2;
    max-width: 300px; /* Begrenze Breite - erhöht für längere Texte */
    white-space: nowrap; /* Kein Zeilenumbruch */
    overflow: hidden; /* Verstecke überflüssigen Text */
    text-overflow: ellipsis; /* ... für abgeschnittenen Text */
}

.lb-specialty-tag.lb-more-tag {
    background: #999999; /* Helleres Grau für "+X mehr" */
    font-style: italic;
}

/* SPEZIALISIERUNGEN-TAGS (unterschiedlich zu Schwerpunkten) */
.lb-expert-specializations {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 40px; /* Begrenze Höhe */
    overflow: hidden; /* Verstecke überflüssige Tags */
}

.lb-specialization-tag {
    background: #FF6B35; /* Orange für Spezialisierungen */
    color: white;
    padding: 3px 6px;
    border-radius: var(--lb-radius-small, 6px);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    max-width: 80px; /* Begrenze Breite */
    white-space: nowrap; /* Kein Zeilenumbruch */
    overflow: hidden; /* Verstecke überflüssigen Text */
    text-overflow: ellipsis; /* ... für abgeschnittenen Text */
}

.lb-specialization-tag.lb-more-tag {
    background: #999999; /* Helleres Grau für "+X mehr" */
    font-style: italic;
}

.lb-expert-bio {
    margin-bottom: 12px; /* Weniger Abstand */
    flex: 1; /* Nimmt verfügbaren Platz */
}

.lb-expert-bio p {
    margin: 0;
    font-size: 13px; /* Kleiner */
    line-height: 1.4; /* Kompakter */
    color: #888888; /* Mittleres Grau */
}

.lb-expert-action {
    margin-top: auto; /* Bleibt unten */
    padding-top: 15px;
}

.lb-profile-button {
    display: block;
    width: 100%;
    background: #191970; /* Dunkelblau */
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 25px; /* Runde Ecken */
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lb-profile-button:hover {
    background: #4B0082; /* Dunkleres Violett beim Hover */
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* === RESPONSIVE GRID - ZUSÄTZLICHE BREAKPOINTS === */
/* Hinweis: Hauptregeln für Responsive Grid sind oben definiert */

@media (max-width: 480px) {
    .lb-experts-archive-grid {
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }
}

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

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

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

/* === 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-experts-archive-grid.lb-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* === AUTO-LOAD SPINNER === */
.lb-load-more-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
}

.lb-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E8E8E8;
    border-top-color: #191970;
    border-radius: 50%;
    animation: lb-spin 0.8s linear infinite;
}

/* Alle geladen Info */
.lb-all-loaded-info {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    font-size: 14px;
}

