/*
Theme Name: Tech Money Blog
Theme URI: https://example.com/tech-money-blog
Author: Your Name
Author URI: https://example.com
Description: Theme WordPress chuyên nghiệp cho blog cá nhân chia sẻ kiến thức về máy tính và cách kiếm tiền online. Thiết kế hiện đại, tối ưu SEO và responsive.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tech-money-blog
Tags: blog, two-columns, right-sidebar, custom-header, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: var(--white);
    margin-left: 15px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 0.8;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.site-description {
    color: var(--text-light);
    font-size: 14px;
    margin: 5px 0 0 0;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s;
    position: relative;
}

.main-navigation a:hover,
.main-navigation a.current {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.main-navigation a:hover::after,
.main-navigation a.current::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.hero-section p {
    font-size: 18px;
    opacity: 0.9;
}

/* Main Content Area */
.site-content {
    padding: 40px 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Posts */
.posts-list {
    display: grid;
    gap: 30px;
}

.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-content {
    padding: 25px;
}

.post-categories {
    margin-bottom: 12px;
}

.post-category {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-right: 8px;
    transition: background 0.3s;
}

.post-category:hover {
    background: var(--primary-color);
    color: var(--white);
}

.post-category.tech {
    background: #dbeafe;
    color: #1e40af;
}

.post-category.money {
    background: #d1fae5;
    color: #047857;
}

.post-title {
    font-size: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

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

.post-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.read-more:hover {
    background: #1e40af;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    justify-content: space-between;
}

.widget ul li a:hover {
    color: var(--primary-color);
}

.widget ul li span {
    color: var(--text-light);
    font-size: 14px;
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 10px;
}

.search-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.search-submit {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.search-submit:hover {
    background: #1e40af;
}

/* Single Post */
.single-post .post-header {
    text-align: center;
    margin-bottom: 30px;
}

.single-post .post-title {
    font-size: 36px;
    margin-bottom: 20px;
}

.single-post .post-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 30px;
}

.single-post .entry-content {
    font-size: 18px;
    line-height: 1.8;
}

.single-post .entry-content h2 {
    font-size: 28px;
    margin: 30px 0 15px;
    color: var(--text-dark);
}

.single-post .entry-content h3 {
    font-size: 24px;
    margin: 25px 0 12px;
    color: var(--text-dark);
}

.single-post .entry-content p {
    margin-bottom: 20px;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.single-post .entry-content li {
    margin-bottom: 10px;
}

.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.single-post .entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    background: var(--bg-light);
    margin: 20px 0;
    font-style: italic;
}

.single-post .entry-content code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.single-post .entry-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.single-post .entry-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Comments */
.comments-area {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 2px solid var(--border-color);
}

.comments-title {
    font-size: 28px;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
}

.comment {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

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

.comment-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.comment-reply-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: var(--white);
}

.site-info {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-numbers {
    padding: 10px 15px;
    background: var(--white);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 6px;
    transition: all 0.3s;
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 20px;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    .hero-section p {
        font-size: 16px;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .single-post .post-title {
        font-size: 28px;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 22px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 26px;
    }
    
    .post-content {
        padding: 20px;
    }
}
