/**
 * Halkweb Yazarlar Listesi - Newspaper Teması Uyumlu
 * Modern, responsive yazarlar grid tasarımı
 */

/* Container */
.halkweb-authors-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Toolbar - Sıralama ve sayı */
.halkweb-authors-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.halkweb-authors-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.halkweb-authors-sort .sort-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.halkweb-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.halkweb-sort-btn:hover {
    border-color: #c41e3a;
    color: #c41e3a;
    transform: translateY(-1px);
}

.halkweb-sort-btn.active {
    background: #c41e3a;
    border-color: #c41e3a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25);
}

.halkweb-sort-btn svg {
    flex-shrink: 0;
}

.halkweb-authors-count {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    padding: 8px 16px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

/* Grid */
.halkweb-authors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Yazar Kartı */
.halkweb-author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.halkweb-author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c41e3a, #ff6b6b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.halkweb-author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.halkweb-author-card:hover::before {
    transform: scaleX(1);
}

/* Avatar */
.halkweb-author-avatar-link {
    display: block;
    text-decoration: none;
    margin-bottom: 15px;
}

.halkweb-author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.halkweb-author-card:hover .halkweb-author-avatar {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.2);
    border-color: #c41e3a;
}

.halkweb-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Yazar Bilgileri */
.halkweb-author-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.halkweb-author-name {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.3;
}

.halkweb-author-name:hover {
    color: #c41e3a;
}

.halkweb-author-latest-post {
    font-size: 13px;
    color: #6c757d;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.halkweb-author-latest-post:hover {
    color: #c41e3a;
}

.halkweb-author-no-post {
    font-size: 13px;
    color: #adb5bd;
    font-style: italic;
}

/* No Authors */
.halkweb-no-authors {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
}

/* Sayfalama */
.halkweb-authors-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.halkweb-pagination-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.halkweb-page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.halkweb-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.halkweb-page-btn:hover:not(.active):not(:disabled) {
    border-color: #c41e3a;
    color: #c41e3a;
}

.halkweb-page-btn.active {
    background: #c41e3a;
    border-color: #c41e3a;
    color: #fff;
}

.halkweb-page-btn.prev,
.halkweb-page-btn.next {
    padding: 0 10px;
}

.halkweb-page-dots {
    color: #6c757d;
    padding: 0 5px;
}

/* Yükleniyor */
.halkweb-authors-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 10;
    border-radius: 12px;
}

.halkweb-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #c41e3a;
    border-radius: 50%;
    animation: halkweb-spin 0.8s linear infinite;
}

@keyframes halkweb-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .halkweb-authors-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive - Küçük Tablet */
@media (max-width: 768px) {
    .halkweb-authors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .halkweb-authors-toolbar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .halkweb-authors-sort {
        justify-content: center;
    }
    
    .halkweb-sort-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .halkweb-author-card {
        padding: 20px 15px;
    }
    
    .halkweb-author-avatar {
        width: 80px;
        height: 80px;
    }
    
    .halkweb-author-name {
        font-size: 14px;
    }
    
    .halkweb-author-latest-post {
        font-size: 12px;
    }
}

/* Responsive - Mobil */
@media (max-width: 480px) {
    .halkweb-authors-container {
        padding: 15px 0;
    }
    
    .halkweb-authors-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .halkweb-author-card {
        flex-direction: row;
        text-align: left;
        padding: 15px;
        gap: 15px;
    }
    
    .halkweb-author-card::before {
        width: 4px;
        height: 100%;
        right: auto;
        bottom: 0;
        transform: scaleY(0);
    }
    
    .halkweb-author-card:hover::before {
        transform: scaleY(1);
    }
    
    .halkweb-author-avatar-link {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .halkweb-author-avatar {
        width: 70px;
        height: 70px;
    }
    
    .halkweb-author-info {
        align-items: flex-start;
    }
    
    .halkweb-sort-btn span {
        display: none;
    }
    
    .halkweb-sort-btn {
        padding: 10px;
    }
    
    .halkweb-page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .halkweb-pagination-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Dark mode desteği (opsiyonel) */
@media (prefers-color-scheme: dark) {
    .halkweb-authors-container.dark-mode .halkweb-author-card {
        background: #1e1e1e;
        border-color: #333;
    }
    
    .halkweb-authors-container.dark-mode .halkweb-author-name {
        color: #fff;
    }
}

/* Newspaper tema uyumu */
.td-page-content .halkweb-authors-container,
.tdb-block-inner .halkweb-authors-container {
    max-width: 100%;
}

/* Animasyonlar */
.halkweb-author-card {
    animation: halkweb-fadeIn 0.4s ease forwards;
    opacity: 0;
}

.halkweb-author-card:nth-child(1) { animation-delay: 0.05s; }
.halkweb-author-card:nth-child(2) { animation-delay: 0.1s; }
.halkweb-author-card:nth-child(3) { animation-delay: 0.15s; }
.halkweb-author-card:nth-child(4) { animation-delay: 0.2s; }
.halkweb-author-card:nth-child(5) { animation-delay: 0.25s; }
.halkweb-author-card:nth-child(6) { animation-delay: 0.3s; }
.halkweb-author-card:nth-child(7) { animation-delay: 0.35s; }
.halkweb-author-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes halkweb-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
