/* Workbunch Authors Directory Pro - Comprehensive Styles */

/* CSS Variables for Dynamic Styling */
:root {
    --wb-primary-color: #0073aa;
    --wb-secondary-color: #f1f1f1;
    --wb-text-color: #333333;
    --wb-background-color: #ffffff;
    --wb-border-color: #e1e1e1;
    --wb-shadow-color: rgba(0, 0, 0, 0.1);
    --wb-border-radius: 8px;
    --wb-shadow-size: 10px;
    --wb-spacing: 20px;
    --wb-avatar-size: 200px;
    --wb-name-font: Arial, sans-serif;
    --wb-name-size: 18px;
    --wb-name-weight: 400;
    --wb-bio-font: Arial, sans-serif;
    --wb-bio-size: 14px;
    --wb-bio-weight: 400;
    --wb-line-height: 1.4;
    --wb-letter-spacing: 0px;
    --wb-animation-speed: 300ms;
}

/* Base Container Styles */
.wb-authors-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wb-spacing);
    margin: 20px 0;
    position: relative;
}

/* Author Card Base Styles */
.wb-author-card {
    background: var(--wb-background-color);
    border: 1px solid var(--wb-border-color);
    border-radius: var(--wb-border-radius);
    padding: 20px;
    text-align: center;
    transition: all var(--wb-animation-speed) ease;
    overflow: hidden;
    position: relative;
    box-shadow: 0 var(--wb-shadow-size) var(--wb-shadow-size) var(--wb-shadow-color);
}

.wb-author-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Avatar Styles */
.wb-author-avatar {
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    width: var(--wb-avatar-size, 200px);
    height: var(--wb-avatar-size, 200px);
}

.wb-author-avatar img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover;
    border: 3px solid var(--wb-secondary-color);
    transition: transform var(--wb-animation-speed) ease;
    display: block;
}

/* Modern Card Design - Based on User's Image */
.wb-modern-design .wb-author-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 280px;
}

.wb-modern-design .wb-author-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.wb-modern-design .wb-author-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    position: relative;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.wb-modern-design .wb-author-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wb-modern-design .wb-author-avatar::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    z-index: -1;
}

.wb-modern-design .wb-author-avatar::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wb-modern-design .wb-author-avatar:hover::after {
    opacity: 1;
}

.wb-modern-design .wb-author-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}

.wb-modern-design .wb-author-card h3 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-align: center;
    line-height: 1.2;
}

.wb-modern-design .wb-bio {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    margin: 0 20px;
    padding: 0 10px;
    border-top: 1px solid #e9ecef;
    background: rgba(233, 236, 239, 0.05);
}

/* Toolbar (Search, Sort, Toggle) */
.wb-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.wb-search-container {
    flex: 1;
    min-width: 250px;
}

.wb-search-form {
    display: flex;
    position: relative;
}

.wb-search-form input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid #e1e1e1;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wb-search-form input:focus {
    border-color: var(--wb-primary-color);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 115, 170, 0.1);
}

.wb-search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--wb-primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wb-sort-container select,
.wb-per-page-container select {
    padding: 10px 20px;
    border: 2px solid #e1e1e1;
    border-radius: 25px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wb-sort-container select:hover,
.wb-per-page-container select:hover {
    border-color: var(--wb-primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Post Count Badge */
.wb-load-more-btn {
    display: inline-block;
    padding: 12px 35px;
    background: var(--wb-primary-color);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.wb-load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    filter: brightness(1.1);
}

.wb-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wb-post-count {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f1f1;
    color: #666;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.wb-post-count span {
    color: var(--wb-primary-color);
}

/* Author Role Badge */
.wb-author-role {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0, 115, 170, 0.08);
    color: var(--wb-primary-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Social Links */
.wb-social-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex !important;
    flex-direction: row !important; /* Force horizontal */
    justify-content: center !important;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.wb-social-links a {
    color: #a0aec0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.wb-social-links a:hover {
    color: var(--wb-primary-color);
    background: #ffffff;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.15);
}

.wb-social-links .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wb-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wb-primary-color);
    color: white;
    font-size: calc(var(--wb-avatar-size, 200px) * 0.4);
    font-weight: bold;
    text-transform: uppercase;
}

/* Avatar Shapes */
.wb-avatar-circle {
    border-radius: 50%;
}

.wb-avatar-square {
    border-radius: 0;
}

.wb-avatar-rounded {
    border-radius: 15%;
}

.wb-avatar-hexagon {
    position: relative;
    margin: 0 auto;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

/* Typography */
.wb-author-card h3 {
    font-family: var(--wb-name-font);
    font-size: var(--wb-name-size);
    font-weight: var(--wb-name-weight);
    color: var(--wb-text-color);
    margin: 0 0 10px 0;
    line-height: var(--wb-line-height);
    letter-spacing: var(--wb-letter-spacing);
    transition: color var(--wb-animation-speed) ease;
}

.wb-author-card a:hover h3 {
    color: var(--wb-primary-color);
}

.wb-bio {
    font-family: var(--wb-bio-font);
    font-size: var(--wb-bio-size);
    font-weight: var(--wb-bio-weight);
    color: var(--wb-text-color);
    opacity: 0.8;
    line-height: var(--wb-line-height);
    letter-spacing: var(--wb-letter-spacing);
    margin: 10px 0 0 0;
}

/* Layout Styles */
.wb-authors-grid {
    display: grid;
    gap: var(--wb-spacing);
}

.wb-authors-grid.columns-1 { grid-template-columns: 1fr; }
.wb-authors-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.wb-authors-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.wb-authors-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.wb-authors-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.wb-authors-grid.columns-6 { grid-template-columns: repeat(6, 1fr); }

.wb-authors-list {
    display: flex;
    flex-direction: column;
    gap: var(--wb-spacing);
}

.wb-authors-list .wb-author-card {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 15px;
}

.wb-authors-list .wb-author-avatar {
    margin-right: 20px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.wb-authors-list .wb-author-avatar img {
    width: 80px;
    height: 80px;
}

.wb-authors-masonry {
    column-count: 3;
    column-gap: var(--wb-spacing);
}

.wb-authors-masonry .wb-author-card {
    break-inside: avoid;
    margin-bottom: var(--wb-spacing);
}

/* Carousel Layout */
.wb-authors-carousel {
    position: relative;
    overflow: hidden;
}

.wb-carousel-container {
    display: flex;
    transition: transform var(--wb-animation-speed) ease;
}

.wb-authors-carousel .wb-author-card {
    flex: 0 0 auto;
    margin-right: var(--wb-spacing);
}

.wb-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--wb-primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: background-color var(--wb-animation-speed) ease;
}

.wb-carousel-nav:hover {
    background: var(--wb-text-color);
}

.wb-carousel-prev {
    left: 10px;
}

.wb-carousel-next {
    right: 10px;
}

/* Isotope Layout */
.wb-authors-isotope {
    position: relative;
}

.wb-isotope-item {
    position: absolute;
    transition: all var(--wb-animation-speed) ease;
}

/* Card Styles */
.wb-card-default {
    background: var(--wb-background-color);
    border: 1px solid var(--wb-border-color);
    border-radius: var(--wb-border-radius);
    box-shadow: 0 var(--wb-shadow-size) var(--wb-shadow-size) var(--wb-shadow-color);
}

.wb-card-minimal {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 10px;
}

.wb-card-minimal .wb-author-avatar img {
    border: none;
}

.wb-card-modern {
    background: linear-gradient(135deg, var(--wb-primary-color) 0%, var(--wb-secondary-color) 100%);
    border: none;
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px var(--wb-shadow-color);
}

.wb-card-modern h3,
.wb-card-modern .wb-bio {
    color: white;
}

.wb-card-modern .wb-author-avatar img {
    border-color: rgba(255, 255, 255, 0.3);
}

.wb-card-classic {
    background: var(--wb-secondary-color);
    border: 2px solid var(--wb-border-color);
    border-radius: 5px;
    box-shadow: 0 4px 8px var(--wb-shadow-color);
}

.wb-card-classic .wb-author-avatar img {
    border-color: var(--wb-border-color);
}

.wb-card-elegant {
    background: var(--wb-background-color);
    border: 1px solid var(--wb-border-color);
    border-radius: var(--wb-border-radius);
    box-shadow: 0 8px 25px var(--wb-shadow-color);
    position: relative;
    overflow: hidden;
}

.wb-card-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--wb-primary-color), var(--wb-secondary-color));
}

.wb-card-creative {
    background: var(--wb-background-color);
    border: none;
    border-radius: 0;
    transform: rotate(-2deg);
    transition: transform var(--wb-animation-speed) ease;
    box-shadow: 0 5px 15px var(--wb-shadow-color);
}

.wb-card-creative:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Animation Effects */
.wb-hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px var(--wb-shadow-color);
}

.wb-hover-scale:hover {
    transform: scale(1.05);
}

.wb-hover-rotate:hover {
    transform: rotate(5deg);
}

.wb-hover-glow:hover {
    box-shadow: 0 0 20px var(--wb-primary-color);
}

.wb-hover-slide:hover {
    transform: translateX(10px);
}

.wb-hover-flip:hover {
    transform: rotateY(180deg);
}

/* Loading Animations */
.wb-fade-in {
    animation: fadeIn var(--wb-animation-speed) ease-in;
}

.wb-slide-up {
    animation: slideUp var(--wb-animation-speed) ease-out;
}

.wb-slide-down {
    animation: slideDown var(--wb-animation-speed) ease-out;
}

.wb-zoom {
    animation: zoomIn var(--wb-animation-speed) ease-out;
}

.wb-stagger > * {
    animation: fadeIn var(--wb-animation-speed) ease-in;
    animation-fill-mode: both;
}

.wb-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.wb-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.wb-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.wb-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.wb-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.wb-stagger > *:nth-child(6) { animation-delay: 0.6s; }

/* Scroll Animations */
.wb-scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--wb-animation-speed) ease;
}

.wb-scroll-fade-in.wb-visible {
    opacity: 1;
    transform: translateY(0);
}

.wb-scroll-slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all var(--wb-animation-speed) ease;
}

.wb-scroll-slide-up.wb-visible {
    opacity: 1;
    transform: translateY(0);
}

.wb-scroll-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all var(--wb-animation-speed) ease;
}

.wb-scroll-slide-left.wb-visible {
    opacity: 1;
    transform: translateX(0);
}

.wb-scroll-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all var(--wb-animation-speed) ease;
}

.wb-scroll-slide-right.wb-visible {
    opacity: 1;
    transform: translateX(0);
}

.wb-scroll-zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--wb-animation-speed) ease;
}

.wb-scroll-zoom-in.wb-visible {
    opacity: 1;
    transform: scale(1);
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .wb-authors-grid.columns-6 { grid-template-columns: repeat(5, 1fr); }
    .wb-authors-masonry { column-count: 2; }
}

@media (max-width: 992px) {
    .wb-authors-grid.columns-5,
    .wb-authors-grid.columns-6 { grid-template-columns: repeat(4, 1fr); }
    .wb-authors-masonry { column-count: 2; }
}

@media (max-width: 768px) {
    .wb-authors-grid.columns-3,
    .wb-authors-grid.columns-4,
    .wb-authors-grid.columns-5,
    .wb-authors-grid.columns-6 { grid-template-columns: repeat(2, 1fr); }
    
    .wb-authors-masonry { column-count: 1; }
    
    .wb-authors-list .wb-author-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .wb-authors-list .wb-author-card {
        flex-direction: column !important;
        text-align: center;
    }
    
    .wb-authors-list .wb-author-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .wb-author-avatar img {
        width: min(var(--wb-avatar-size), 150px) !important;
        height: min(var(--wb-avatar-size), 150px) !important;
    }
}

@media (max-width: 480px) {
    .wb-authors-grid.columns-1,
    .wb-authors-grid.columns-2,
    .wb-authors-grid.columns-3,
    .wb-authors-grid.columns-4,
    .wb-authors-grid.columns-5,
    .wb-authors-grid.columns-6 { grid-template-columns: 1fr; }
    
    .wb-author-card {
        padding: 15px;
    }
    
    .wb-author-avatar img {
        width: 120px !important;
        height: 120px !important;
    }
}

/* Related Authors Section */
.wb-related-authors {
    margin: 40px 0;
    padding: 30px;
    background: var(--wb-secondary-color);
    border-radius: var(--wb-border-radius);
}

.wb-related-authors h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--wb-text-color);
    font-family: var(--wb-name-font);
    font-size: calc(var(--wb-name-size) * 1.5);
    font-weight: var(--wb-name-weight);
}

.wb-all-authors-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--wb-primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--wb-border-radius);
    font-weight: bold;
    transition: all var(--wb-animation-speed) ease;
    font-family: var(--wb-name-font);
}

.wb-all-authors-btn:hover {
    background: var(--wb-text-color);
    color: white;
    transform: translateY(-2px);
}

/* Color Scheme Presets */
.wb-scheme-default {
    --wb-primary-color: #0073aa;
    --wb-secondary-color: #f1f1f1;
    --wb-text-color: #333333;
    --wb-background-color: #ffffff;
    --wb-border-color: #e1e1e1;
}

.wb-scheme-dark {
    --wb-primary-color: #00d4ff;
    --wb-secondary-color: #1a1a1a;
    --wb-text-color: #ffffff;
    --wb-background-color: #2d2d2d;
    --wb-border-color: #444444;
}

.wb-scheme-colorful {
    --wb-primary-color: #ff6b6b;
    --wb-secondary-color: #4ecdc4;
    --wb-text-color: #2d3436;
    --wb-background-color: #ffffff;
    --wb-border-color: #dfe6e9;
}

.wb-scheme-minimal {
    --wb-primary-color: #000000;
    --wb-secondary-color: #f8f9fa;
    --wb-text-color: #333333;
    --wb-background-color: #ffffff;
    --wb-border-color: #e9ecef;
}

.wb-scheme-elegant {
    --wb-primary-color: #6c5ce7;
    --wb-secondary-color: #fdcb6e;
    --wb-text-color: #2d3436;
    --wb-background-color: #ffffff;
    --wb-border-color: #dfe6e9;
}

/* Load More Button Styles */
.wb-load-more-btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--wb-primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--wb-border-radius);
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all var(--wb-animation-speed) ease;
    font-size: 16px;
    box-shadow: 0 5px 15px var(--wb-shadow-color);
}

.wb-load-more-btn:hover {
    background: var(--wb-text-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--wb-shadow-color);
}

.wb-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.wb-authors-container-wrapper {
    width: 100%;
    margin-bottom: 40px;
}

/* Pagination Styles */
.wb-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100%;
}

.wb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 5px;
    background: #ffffff;
    border: 1px solid var(--wb-border-color);
    border-radius: 50%;
    color: var(--wb-text-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.wb-pagination .page-numbers:hover {
    background: var(--wb-primary-color);
    color: #ffffff;
    border-color: var(--wb-primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.wb-pagination .page-numbers.current {
    background: var(--wb-primary-color);
    color: #ffffff;
    border-color: var(--wb-primary-color);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.wb-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    box-shadow: none;
}

.wb-pagination .page-numbers.prev,
.wb-pagination .page-numbers.next {
    width: auto;
    padding: 0 20px;
    border-radius: 20px;
}

/* Visibility Fix */
.wb-author-card {
    opacity: 1; /* Ensure visible by default */
}

/* If animations are enabled, they will handle opacity */
.wb-scroll-fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.wb-scroll-fade-in.wb-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
