/*
Theme Name: Asad Blog
Theme URI: https://asadislam.info
Author: Asad Islam
Author URI: https://asadislam.info
Description: A clean, academic blog WordPress theme with category filtering and toggleable comments. No menu support — designed purely for blogging.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: asad-blog
Tags: blog, one-column, custom-colors, custom-header, featured-images, threaded-comments
*/

/* ============================
   CSS Reset & Base
   ============================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #1a3a6e;
    text-decoration: underline;
}

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

/* ============================
   Layout Container
   ============================ */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================
   Site Header / Branding
   ============================ */
.site-header {
    background: #ffffff;
    padding: 40px 0 20px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.site-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 8px;
}

.site-title a {
    color: #2c5aa0;
    text-decoration: none;
    text-transform: capitalize;
}

.site-title a:hover {
    color: #1a3a6e;
}

.site-description {
    font-size: 0.95rem;
    color: #6c757d;
    font-style: italic;
}

/* ============================
   Category Filter
   ============================ */
.category-filter {
    background: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.category-filter-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.category-filter-label {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
}

.category-filter a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: #e9ecef;
    color: #495057;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.category-filter a:hover,
.category-filter a.active {
    background: #2c5aa0;
    color: #ffffff;
}

/* ============================
   Section Header (Blogs)
   ============================ */
.section-header {
    background: #2c5aa0;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.section-header .icon {
    font-size: 1.2rem;
}

/* ============================
   Post Cards (Blog List)
   ============================ */
.posts-wrapper {
    background: #ffffff;
    padding: 30px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.post-card {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-title a {
    color: #2c5aa0;
    text-decoration: none;
}

.post-title a:hover {
    color: #1a3a6e;
    text-decoration: underline;
}

.post-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.post-meta a {
    color: #6c757d;
    text-decoration: underline;
}

.post-excerpt {
    color: #495057;
    line-height: 1.7;
    margin-bottom: 15px;
}

.post-excerpt p {
    margin-bottom: 10px;
}

.btn-read-more {
    display: inline-block;
    padding: 8px 20px;
    background: #2c5aa0;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.25s ease;
}

.btn-read-more:hover {
    background: #1a3a6e;
    text-decoration: none;
}

.btn-read-more::before {
    content: "\2192";
    margin-right: 6px;
}

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

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: #ffffff;
    color: #2c5aa0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #2c5aa0;
    color: #ffffff;
    border-color: #2c5aa0;
}

.pagination .current {
    background: #2c5aa0;
    color: #ffffff;
    border-color: #2c5aa0;
}

/* ============================
   Single Post
   ============================ */
.single-post {
    background: #ffffff;
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

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

.single-post .post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

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

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    color: #2c5aa0;
    margin: 30px 0 15px;
}

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

.single-post .post-content blockquote {
    border-left: 4px solid #2c5aa0;
    padding-left: 20px;
    margin: 25px 0;
    color: #555;
    font-style: italic;
}

.single-post .post-content img {
    border-radius: 4px;
    margin: 20px 0;
}

.back-to-blog {
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 500;
}

/* ============================
   Comments
   ============================ */
.comments-area {
    background: #ffffff;
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.comments-title {
    font-size: 1.4rem;
    color: #2c5aa0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

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

.comment {
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #2c5aa0;
}

.comment-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-content {
    line-height: 1.6;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.comment-form .form-submit input[type="submit"] {
    display: inline-block;
    padding: 10px 24px;
    background: #2c5aa0;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.25s ease;
}

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

/* ============================
   Footer
   ============================ */
.site-footer {
    background: #2c5aa0;
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 60px;
}

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

.footer-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
    text-transform: capitalize;
}

.footer-widget p,
.footer-widget a {
    font-size: 0.9rem;
    color: #d0d8e8;
    line-height: 1.7;
    text-decoration: none;
}

.footer-widget a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #ffffff;
    transition: background 0.25s ease;
}

.footer-social a:hover {
    background: rgba(255,255,255,0.3);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85rem;
    color: #b0c0d8;
}

.footer-bottom a {
    color: #ffffff;
    font-weight: 600;
}

/* ============================
   404 Page
   ============================ */
.error-404 {
    background: #ffffff;
    padding: 60px 40px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.error-404 h1 {
    font-size: 4rem;
    color: #2c5aa0;
    margin-bottom: 10px;
}

.error-404 h2 {
    font-size: 1.5rem;
    color: #495057;
    margin-bottom: 20px;
}

/* ============================
   Accessibility & Helpers
   ============================ */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.7rem;
    }

    .posts-wrapper,
    .single-post,
    .comments-area {
        padding: 25px 20px;
    }

    .single-post .post-title {
        font-size: 1.5rem;
    }

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

    .category-filter-inner {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.4rem;
    }

    .post-title {
        font-size: 1.15rem;
    }

    .btn-read-more {
        width: 100%;
        text-align: center;
    }
}
