/*
Theme Name: Mega Blog Theme
Theme URI: https://www.mega.pk
Author: Mega.pk
Author URI: https://www.mega.pk
Description: A custom WordPress theme designed to match the Mega.pk e-commerce site design with red header and clean layout
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mega-blog
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Header Styles - Matching Main Site */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-header {
    background-color: #e31e24;
    color: #fff;
    padding: 12px 0;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.site-logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 700;
    font-size: 24px;
    color: #fff;
}

.site-logo .since {
    font-size: 12px;
    font-weight: 400;
}

.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-form {
    display: flex;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 8px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-form button {
    background: #000;
    border: none;
    color: #fff;
    padding: 8px 15px;
    cursor: pointer;
}

.header-cart {
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

/* Main Navigation */
.main-navigation {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.main-navigation .container {
    display: flex;
    align-items: center;
    padding: 12px 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-menu li a {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #e31e24;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #999;
}

.breadcrumbs a {
    color: #666;
}

.breadcrumbs a:hover {
    color: #e31e24;
}

/* Main Content Area */
.site-main {
    background: #fff;
    padding: 40px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    min-width: 0;
}

/* Blog Posts Listing */
.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
}

.page-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

.blog-posts {
    display: grid;
    gap: 30px;
}

.post-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-thumbnail {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-title a {
    color: #000;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #e31e24;
}

.post-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    background: #e31e24;
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.read-more:hover {
    background: #c41a1f;
}

/* Single Post Styles */
.single-post {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.single-post .post-thumbnail {
    height: 400px;
}

.single-post .post-content {
    padding: 40px;
}

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

.post-content-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.post-content-body h2 {
    font-size: 28px;
    margin: 30px 0 15px;
    color: #000;
}

.post-content-body h3 {
    font-size: 22px;
    margin: 25px 0 12px;
    color: #000;
}

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

.post-content-body img {
    margin: 25px 0;
    border-radius: 8px;
}

.post-content-body ul,
.post-content-body ol {
    margin: 20px 0 20px 30px;
}

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

.post-content-body blockquote {
    border-left: 4px solid #e31e24;
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #666;
}

/* Sidebar */
.sidebar {
    background: #fff;
}

.widget {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e31e24;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.widget ul li a {
    color: #333;
    display: block;
    transition: color 0.3s;
}

.widget ul li a:hover {
    color: #e31e24;
    padding-left: 5px;
}

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

.pagination a,
.pagination span {
    padding: 8px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    background: #e31e24;
    color: #fff;
    border-color: #e31e24;
}

/* Footer */
.site-footer {
    background: #2c2c2c;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

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

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

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

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

.footer-widget ul li a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-widget ul li a:hover {
    color: #e31e24;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .single-post .post-content {
        padding: 30px 25px;
    }
}

@media (max-width: 768px) {
    .top-header .container {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 10px 0 0 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .single-post .post-title {
        font-size: 28px;
    }
    
    .post-thumbnail {
        height: 200px;
    }
    
    .single-post .post-thumbnail {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .post-content {
        padding: 20px;
    }
    
    .single-post .post-content {
        padding: 25px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Comments Section */
.comments-area {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 2px solid #e5e5e5;
}

.comments-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
}

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

.comment {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.comment-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.comment-reply-link {
    font-size: 13px;
    color: #e31e24;
}

/* Comment Form */
.comment-form {
    margin-top: 30px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: inherit;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background: #e31e24;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
}

.comment-form input[type="submit"]:hover {
    background: #c41a1f;
}

