/* Header Tác Giả */
.author-header {
    padding: 40px;
    border-radius: 16px;
    margin: 20px 0;
    background: #ffffff;
    color: #000000;
    border: 1px solid #e0e0e0;
}

.author-header-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
    text-align: center;
}

.author-avatar img {
    border-radius: 8px;
    width: 160px;
    height: 160px;
    object-fit: cover;
    display: block;
}

.author-avatar-initials {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: 700;
    text-transform: uppercase;
}

.author-details {
    flex: 1;
    min-width: 250px;
}

.author-details .author-name {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
}

.author-details .author-subtitle {
    color: #666666;
    font-size: 15px;
    margin: 0 0 20px 0;
}

.author-details .author-bio {
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 20px;
}

.author-details .author-bio p {
    margin: 0 0 10px 0;
}

.author-details .author-bio p:last-child {
    margin-bottom: 0;
}

.author-meta {
    font-size: 14px;
    color: #333333;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.author-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-meta .icons {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.author-meta .icons svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
    fill: none;
}

.author-meta .icons img {
    width: 100%;
    height: 100%;
    filter: brightness(0.6);
    display: block;
    object-fit: contain;
}

/* About Author Section */
.author-about-section {
    padding: 40px 0;
    margin-bottom: 40px;
    background: #ffffff;
    border-radius: 12px;
}

.author-about-content {
    padding: 0;
}

.author-about-section .section-title {
    font-size: 24px;
    margin: 0 0 30px 0;
    color: var(--primary-color);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.author-about-section .section-title .pill {
    display: inline;
}

.author-bio-card {
    background: transparent;
}

.author-bio-card .bio-text {
    font-size: 15px;
    color: #333333;
    line-height: 1.8;
    margin: 0;
}

.author-bio-card .bio-text p {
    margin: 0 0 15px 0;
    line-height: 1.8;
}

.author-bio-card .bio-text p:last-child {
    margin-bottom: 0;
}

/* Tiêu đề Section */
.author-posts-featured {
    margin-bottom: 50px;
}

.author-posts-featured h2,
.author-posts-rest h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: var(--primary-color);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

/* Posts Grid - 1 hàng 4 cột bằng CSS Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.post-grid-item {
    width: 100%;
}

/* 2 cột trên tablet */
@media (max-width: 991px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 1 cột trên mobile */
@media (max-width: 767px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.post-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    line-height: 1.1;
    font-weight: bold;
    min-width: 50px;
    z-index: 1;
}

.post-date-badge .day {
    display: block;
    font-size: 22px;
}

.post-date-badge .month {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
}

a.read-more {
    display: inline-block;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

a.read-more:hover {
    background: #bf171d;
}

.post-title {
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 6.4em;
}

.post-title a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #bf171d;
}

.post-meta {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.post-meta .dot {
    margin: 0 5px;
}

.post-meta a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card .post-thumbnail img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
}

.post-card .post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-excerpt {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.post-card .post-excerpt p {
    margin: 0;
}

.post-card .read-more {
    margin-top: auto;
}

/* Posts List - hiển thị theo hàng */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-list-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0;
}

.post-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-list-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-list-item .post-thumbnail {
    flex: 0 0 40%;
    min-width: 300px;
    overflow: hidden;
}

.post-list-item .post-thumbnail img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    display: block;
}

.post-list-item .post-content {
    flex: 1;
    padding: 30px;
}

.post-list-item .post-meta {
    margin-bottom: 5px;
}

.post-list-item .post-title {
    margin-top: 5px;
    margin-bottom: 10px;
}

.post-list-item .post-title a {
    font-size: 22px;
}

.post-list-item .post-excerpt {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.post-list-item .post-excerpt p {
    margin: 0;
}

/* Phân trang */
.pagination {
    margin: 30px 0 60px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary-color);
    transition: background 0.3s ease;
}

.pagination .page-numbers:hover {
    background: #f0f8ff;
    border-color: var(--primary-color);
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .page-numbers.dots {
    border: none;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    background: transparent;
}

@media (max-width: 768px) {
    .author-header {
        padding: 30px 20px;
    }
    
    .author-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
    
    .author-meta {
        justify-content: center;
        align-items: center;
    }

    .author-about-section {
        padding: 30px 20px;
    }
    
    .author-details .author-name {
        font-size: 26px;
    }

    .author-posts-featured h2,
    .author-posts-rest h2 {
        font-size: 24px;
    }
    
    .post-list-item {
        flex-direction: column;
    }
    
    .post-list-item .post-thumbnail {
        flex: 1;
        min-width: 100%;
        width: 100%;
    }
    
    .post-list-item .post-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .author-header {
        padding: 20px 15px;
    }

    .author-avatar img {
        width: 120px;
        height: 120px;
    }

    .author-details .author-name {
        font-size: 22px;
    }

    .author-details .author-subtitle {
        font-size: 14px;
    }
    
    .author-meta {
        align-items: flex-start; 
    }

    .author-about-section {
        padding: 30px 15px;
    }

    .post-card .post-content {
        padding: 15px;
    }
}

