﻿/*
Theme Name: Tin Tuc Classic Theme
Author: Admin
Version: 1.1
*/

:root {
    --primary-color: #2b78e4; /* Đổi sang xanh hiện đại */
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-gray: #f8f9fa;
    --border-color: #edf2f7;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-gray);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* HEADER */
.header {
    border-bottom: 2px solid var(--border-color);
    padding: 18px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary-color);
}

/* LAYOUT MAIN */
.main {
    padding: 30px;
}

.news-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 35px;
}

/* TITLES */
.page-title, .sidebar-title {
    color: var(--text-color);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    letter-spacing: 0.5px;
}

/* CATEGORY & POST LIST */
.category-item {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-2px);
}

.category-item .post-thumb {
    flex: 0 0 180px;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    background: #f0f0f0;
}

.category-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item .post-info h2 {
    font-size: 17px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.category-item .post-info h2 a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
}

.category-item .post-info h2 a:hover {
    color: var(--primary-color);
}

.post-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.post-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* SIDEBAR STYLING */
.sidebar-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.sidebar-post-item .post-thumb {
    flex: 0 0 85px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}

.sidebar-post-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-item .post-info h4 {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.sidebar-post-item .post-info a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.sidebar-post-item .post-info a:hover {
    color: var(--primary-color);
}

/* FOOTER */
.footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}
/* PAGINATION STYLING */
.pagination {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    transition: all 0.2s ease-in-out;
}

.pagination a.page-numbers:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #f0f7ff;
}

.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(43, 120, 228, 0.3);
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}
/* SINGLE POST META STYLING */
.single-post-meta,
.post-meta,
.post-date {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin: 10px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

/* Style riêng cho link danh mục */
.single-post-meta a,
.post-meta a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    background-color: #f0f7ff;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.single-post-meta a:hover,
.post-meta a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}
/* RESPONSIVE FOR MOBILE & TABLET */
@media screen and (max-width: 768px) {
    /* Khung ngoài không bị tràn */
    body {
        overflow-x: hidden;
    }

    .container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
    }

    /* Header cuộn ngang nhẹ hoặc xuống dòng gọn */
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
    }

    .nav {
        display: flex;
        gap: 15px;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }

    .nav a {
        margin-left: 0;
        font-size: 14px;
    }

    /* Layout chuyển về 1 cột */
    .main {
        padding: 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Tiêu đề bài viết responsive font chữ */
    .single-post-title, 
    h1 {
        font-size: 20px !important;
        line-height: 1.3;
    }

    /* Fix bài viết danh mục dạng hàng dọc trên mobile */
    .category-item {
        flex-direction: column;
        gap: 10px;
    }

    .category-item .post-thumb {
        flex: none;
        width: 100%;
        height: 200px;
    }

    /* Fix ảnh trong nội dung bài viết không tràn viewport */
    .entry-content img,
    .post-thumb img,
    article img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }

    /* Căn chỉnh phân trang ra giữa */
    .pagination .nav-links {
        justify-content: center;
    }
}
/* COMMENTS SECTION STYLING */
#comments {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.comments-title, 
.comment-reply-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.comment-body {
    background: var(--bg-gray);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.comment-author {
    font-weight: 700;
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* FORM BÌNH LUẬN */
.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
}

.comment-form input[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form input[type="submit"]:hover {
    background: #1d63c6;
}
/* --- TỐI ƯU GIAO DIỆN BÌNH LUẬN (COMMENTS) --- */

/* Bỏ số thứ tự 1., 2. và chấm tròn danh sách */
.comment-list, 
.comment-list ol, 
.comment-list ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 20px 0 !important;
}

/* Thẻ chứa mỗi comment */
.comment-list .comment {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 15px;
    position: relative;
}

/* Comment con (trả lời) */
.comment-list .children {
    list-style: none !important;
    padding-left: 20px !important;
    margin-top: 15px !important;
    border-left: 2px solid #cbd5e1;
}

/* Avatar và thông tin tác giả */
.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.comment-author .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Thời gian đăng bình luận */
.comment-meta, 
.comment-metadata {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 10px 0;
}

.comment-meta a, 
.comment-metadata a {
    color: #64748b;
    text-decoration: none;
}

.comment-meta a:hover, 
.comment-metadata a:hover {
    text-decoration: underline;
}

/* Nội dung bình luận */
.comment-content, 
.comment-body p {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    margin: 8px 0;
}

/* Nút Trả lời (Reply) */
.reply a, 
.comment-reply-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 6px;
    transition: all 0.2s ease;
}

.reply a:hover, 
.comment-reply-link:hover {
    background: var(--primary-color);
    color: #ffffff;
}

/* Form gửi bình luận */
.logged-in-as {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.logged-in-as a {
    color: var(--primary-color);
    text-decoration: none;
}

.logged-in-as a:hover {
    text-decoration: underline;
}
/* Khung phản hồi bình luận phong cách báo chí hiện đại (Light Mode) */
		.comment-respond {
			font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
			background: #ffffff; /* Nền trắng tinh tế */
			border: 1px solid #e2e8f0; /* Viền xám nhạt nhẹ nhàng */
			border-radius: 12px;
			padding: 2rem;
			width: 100%;
			max-width: 650px;
			box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); /* Đổ bóng siêu nhẹ sang trọng */
			box-sizing: border-box;
			text-align: left; /* Căn trái đúng chuẩn các trang tin tức lớn */
			animation: fadeInUp 0.5s ease-out;
		}

		/* Tiêu đề bình luận */
		.comment-reply-title {
			color: #0f172a; /* Màu chữ tiêu đề đen xám đậm */
			font-size: 1.15rem;
			font-weight: 700;
			margin: 0 0 1.25rem 0;
			letter-spacing: -0.01em;
			display: flex;
			align-items: center;
			border-left: 3px solid #e11d48; /* Thanh đỏ lề trái đặc trưng báo chí */
			padding-left: 10px;
			line-height: 1.2;
		}

		/* Link hủy trả lời bình luận */
		#cancel-comment-reply-link {
			color: #64748b;
			font-size: 0.8rem;
			text-decoration: none;
			margin-left: auto; /* Đẩy link hủy về góc phải */
			font-weight: 400;
			transition: color 0.2s ease;
		}

		#cancel-comment-reply-link:hover {
			color: #ef4444;
		}

		/* Hộp thông báo đăng nhập */
		.must-log-in {
			color: #475569; /* Màu chữ xám dễ đọc */
			font-size: 0.925rem;
			line-height: 1.7;
			margin: 0;
			background: #f8fafc; /* Nền xám nhạt dịu mắt */
			border: 1px solid #f1f5f9;
			padding: 1.25rem 1.5rem;
			border-radius: 8px;
			box-sizing: border-box;
			border-left: 4px solid #cbd5e1; /* Điểm nhấn viền trái */
		}

		/* Đường dẫn đăng nhập kiểu chữ nổi bật */
		.must-log-in a {
			color: #e11d48 !important; /* Màu đỏ thương hiệu */
			font-weight: 600;
			text-decoration: none !important;
			border-bottom: 2px solid rgba(225, 29, 72, 0.25);
			padding-bottom: 1px;
			transition: all 0.2s ease;
		}

		/* Hiệu ứng hover đường dẫn đăng nhập */
		.must-log-in a:hover {
			color: #be123c !important;
			border-bottom-color: #be123c;
			background-color: rgba(225, 29, 72, 0.04);
			border-radius: 2px;
			padding-left: 4px;
			padding-right: 4px;
		}

		/* Hoạt ảnh hiển thị */
		@keyframes fadeInUp {
			from {
				opacity: 0;
				transform: translateY(15px);
			}
			to {
				opacity: 1;
				transform: translateY(0);
			}
		}

		/* Tương thích di động */
		@media (max-width: 480px) {
			body {
				padding: 1rem;
			}

			.comment-respond {
				padding: 1.5rem 1.25rem;
				border-radius: 10px;
			}

			.comment-reply-title {
				font-size: 1.05rem;
			}

			.must-log-in {
				font-size: 0.875rem;
				padding: 1rem;
			}
		}
.post-thumbnail img {
    max-width: 740px;
    object-fit: contain;
}