/*
Theme Name: StoryScope Custom Theme
Author: Story Scope
Version: 1.0
*/
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; background: #f9f9f9; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { background: #fff; padding: 20px 0; border-bottom: 1px solid #ddd; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.search-filter { display: flex; gap: 10px; }

/* Intro Block */
.intro-block { background: #fff; padding: 40px 0; text-align: center; margin-bottom: 30px; border-bottom: 1px solid #eee; }

/* Grid Post */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.post-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.post-img img { width: 100%; height: 200px; object-fit: cover; }
.post-info { padding: 15px; }
.cat-tag { font-size: 12px; color: #ff4757; text-transform: uppercase; font-weight: bold; }
.post-info h2 { font-size: 18px; margin: 10px 0; }
.post-info h2 a { text-decoration: none; color: #2f3542; }

/* Footer */
footer { background: #2f3542; color: #fff; padding: 30px 0; margin-top: 50px; text-align: center; }
/* Căn giữa vùng nội dung chính */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Layout Grid 3 cột */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Chia 3 cột bằng nhau */
    gap: 30px; /* Khoảng cách giữa các bài */
    margin-top: 40px;
}

/* Responsive: 2 cột trên Tablet, 1 cột trên Mobile */
@media (max-width: 992px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* CSS cho từng card bài viết */
.post-item { background: #fff; border: 1px solid #eee; padding: 15px; border-radius: 5px; }
.post-thumbnail img { width: 100%; height: 200px; object-fit: cover; margin-bottom: 15px; }
.post-title { font-size: 1.2rem; margin: 10px 0; }
.post-title a { text-decoration: none; color: #333; }
.cat { font-size: 0.8rem; color: #ff4757; font-weight: bold; }

/* CSS cho Phân trang */
.pagination-wrapper {
    margin-top: 50px;
    text-align: center;
    padding-bottom: 50px;
}
.pagination-wrapper .nav-links { display: flex; justify-content: center; gap: 10px; }
.pagination-wrapper a, .pagination-wrapper span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}
.pagination-wrapper .current { background: #0073aa; color: #fff; border-color: #0073aa; }
/* Container chung */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px 0;
}

/* Style cho từng Card bài viết */
.post-item {
    background: #ffffff;
    border-radius: 15px; /* Bo tròn góc card */
    overflow: hidden;    /* Để ảnh không tràn ra ngoài góc bo */
    display: flex;
    flex-direction: column;
    
    /* Hiệu ứng nổi khối (Shadow) */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); 
    
    /* Hiệu ứng mượt mà khi di chuột */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0; /* Viền mờ cho sang */
}

/* Hiệu ứng khi di chuột vào Card (Hover) */
.post-item:hover {
    transform: translateY(-10px); /* Nhảy nhẹ lên trên */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); /* Đổ bóng đậm hơn */
}

/* Hình ảnh trong Card */
.post-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover; /* Giữ tỉ lệ ảnh không bị bóp méo */
    border-bottom: 1px solid #f0f0f0;
}

/* Nội dung chữ trong Card */
.post-info-container {
    padding: 20px;
}

.cat {
    font-size: 11px;
    background: #ff4757;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

.post-title {
    font-size: 1.3rem;
    margin: 10px 0;
    line-height: 1.4;
}

.post-title a {
    text-decoration: none;
    color: #2d3436;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #636e72;
    line-height: 1.6;
}
