/* ==================================================
   CSS for Blog Page (page-blog.css)
   ================================================== */

/* --- 1. HERO SECTION --- */
.blog-hero {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/wp-content/themes/base/assets/images/blog-hero-bg.jpg'); /* Thay bằng ảnh của bạn */
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14, 34, 59, 0.6); /* Lớp phủ màu tối */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 48px;
    margin: 0 0 15px 0;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    height: 55px;
    border-radius: 30px;
    border: 1px solid #ced4da;
    padding: 0 25px 0 50px;
    font-size: 16px;
}

.search-bar i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.filter-tags .tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    margin: 5px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.filter-tags .tag:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- 2. GENERAL SECTION STYLING --- */
.blog-section {
    padding: 80px 40px;
}

.section-header {
    text-align: center;
    margin: 0 auto 50px auto;
    max-width: 700px;
}

.section-header h2 {
    font-size: 36px;
    color: #212529;
    margin-bottom: 10px;
}

.section-header p {
    font-size: 18px;
    color: #6c757d;
    line-height: 1.6;
}

.section-footer {
    text-align: center;
    margin-top: 50px;
}

.cta-button-dark {
    background-color: #26324d;
    color: white;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}
.cta-button-dark:hover {
    opacity: 0.9;
}

/* --- 3. POSTS GRID & CARDS --- */
.posts-grid {
    display: grid;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.posts-grid.six-columns { grid-template-columns: repeat(3, 1fr); }
.posts-grid.three-columns { grid-template-columns: repeat(3, 1fr); }

.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.2s;
}
.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    position: relative;
    height: 180px;
}
.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.post-tag.visa { background-color: #845ef7; }
.post-tag.part-time { background-color: #f76707; }

.post-content {
    padding: 20px;
}
.post-content h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.post-content p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}
.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #adb5bd;
}
.post-meta i {
    margin-right: 5px;
}

/* For featured posts */
.post-card.large .post-thumbnail { height: 220px; }
.post-card.large .post-content h3 { font-size: 20px; }
.post-card.large .post-content p { font-size: 15px; }
.post-card.large .read-more { color: #2563eb; text-decoration: none; font-weight: 600; }
.post-card.large .read-more i { margin-left: 4px; }

/* --- 4. TOPICS SECTION --- */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.topic-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 25px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.topic-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: #e7f5ff;
    color: #339af0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 24px;
}
.topic-card h4 { font-size: 16px; margin: 0 0 8px 0; }
.topic-card p { font-size: 14px; color: #6c757d; margin: 0 0 15px 0; }
.topic-card span { font-size: 13px; color: #adb5bd; }

/* --- 5. AUTHORS SECTION --- */
.authors-section {
    background-color: #f8f9fa;
}
.authors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.author-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
}
.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px auto;
    border: 3px solid #dee2e6;
}
.author-card h3 { font-size: 20px; margin: 0; }
.author-title {
    color: #2563eb;
    font-weight: 500;
    margin: 5px 0 15px 0;
    display: block;
}
.author-card p {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 25px;
}
.author-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
    color: #495057;
}
.author-stats i { color: #fcc419; margin-right: 6px; }
.author-link {
    color: #212529;
    text-decoration: none;
    font-weight: 600;
}
.author-link i { margin-left: 5px; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .posts-grid.six-columns, .posts-grid.three-columns, .authors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .topics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-section { padding: 60px 20px; }
    .hero-content h1 { font-size: 36px; }
    .section-header h2 { font-size: 30px; }
    .posts-grid.six-columns, .posts-grid.three-columns, .authors-grid, .topics-grid {
        grid-template-columns: 1fr;
    }
}