/*
Theme Name: Classic Blog
Theme URI: https://example.com/classic
Author: Your Name
Description: A modern, responsive personal blog theme for Nextify CMS
Version: 1.1
*/

:root {
    --font-base: -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
    --text-color: #1a1a1a; /* Darker, more neutral text */
    --link-color: #3b82f6; /* Vibrant blue for links */
    --border: #d1d5db; /* Softer gray for borders */
    --radius: 10px; /* Slightly larger radius for modern look */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer, modern shadow */
    --bg-light: #f8fafc; /* Light, clean background */
    --bg-dark: #1e3a8a; /* Richer navy for headers */
    --highlight: #3b82f6; /* Matches link color for consistency */
    --bg-secondary: #e5e7eb; /* Secondary background for tags, buttons */
    --text-light: #ffffff; /* White text for dark backgrounds */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    font-size: 1rem; /* 16px */
    color: var(--text-color);
    background: var(--text-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: #1d4ed8; /* Darker blue on hover */
    text-decoration: underline;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--bg-dark, #1e3a8a), #2b6cb0);
    color: var(--text-light, #ffffff);
    width: 100%; /* Full width */
    padding: 2rem 0; /* Vertical padding only */
    text-align: center;
    box-shadow: var(--shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.site-header .container {
    max-width: 1240px; /* Matches container width in index.php */
    margin: 0 auto;
    padding: 0 1rem; /* Matches container padding */
}

.site-header a {
    color: var(--text-light, #ffffff);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    transition: transform 0.2s ease;
}

.site-header a:hover {
    text-decoration: none;
    transform: scale(1.02);
}

/* Category Menu */
.category-nav-wrapper {
    background: var(--bg-light, #f8fafc);
    border-bottom: 1px solid var(--border, #d1d5db);
    width: 100%; /* Full width */
    overflow-x: auto;
    padding: 0.75rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #d1d5db) transparent;
}

.category-nav-wrapper .container {
    max-width: 1240px; /* Matches container width in index.php */
    margin: 0 auto;
    padding: 0 1rem; /* Matches container padding */
}

.category-nav-wrapper::-webkit-scrollbar {
    height: 6px;
}

.category-nav-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.category-nav-wrapper::-webkit-scrollbar-thumb {
    background: var(--border, #d1d5db);
    border-radius: 3px;
}

.category-nav-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--link-color, #3b82f6);
}

.category-menu {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0; /* Adjusted to avoid double padding */
    list-style: none;
    margin: 0;
    white-space: nowrap;
}

.category-menu li a {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary, #e5e7eb);
    border-radius: var(--radius, 10px);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-color, #1a1a1a);
    transition: all 0.2s ease;
    box-shadow: var(--shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.category-menu li a:hover {
    background: var(--link-color, #3b82f6);
    color: var(--text-light, #ffffff);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.category-menu li a.active {
    background: var(--bg-dark, #1e3a8a);
    color: var(--text-light, #ffffff);
    font-weight: 600;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.category-menu li a:focus {
    outline: 2px solid var(--link-color, #3b82f6);
    outline-offset: 2px;
}

/* Container */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1240px; /* Slightly wider for modern screens */
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Main Content Area */
.main-content {
    flex: 1 1 70%;
    min-width: 300px;
}

/* Sidebar Area */
.sidebar {
    flex: 0 0 25%;
    min-width: 260px;
    background: #ffffff;
    border:0;
    border-left:1px solid rgb(245, 235, 235);
    padding: 1.5rem;
 
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-content,
    .sidebar {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Post */
.post {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    transition: transform 0.2s ease;
}

.post:hover {
}

.post .thumb img {
    width: 180px; /* Slightly larger for better visuals */
    height: auto;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.post-content h2 {
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-content h2 a {
    color: var(--text-color);
    transition: color 0.2s ease;
}

.post-content h2 a:hover {
    color: var(--link-color);
}

.post-meta {
    font-size: 0.875rem; /* 14px */
    color: #6b7280; /* Softer gray */
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1rem;
    color: #4b5563;
}

.read-more {
    display: inline-flex;
    padding: 5px 10px;
    color: var(--text-light);
    background: var(--link-color);
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.read-more:hover {
    background: #fff;
    text-decoration: none;
        padding: 5px 10px;
    transform: translateY(-2px);
    border: 1px solid var(--link-color);
}

/* Sidebar */
.sidebar h3 {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--highlight);
    padding-bottom: 0.5rem;
}

.nx-search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

.search-button {
    padding: 0.75rem 1.25rem;
    background: var(--highlight);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}
.share-box {
    margin-top: 1.5rem;
    display: flex;
    /* Ensure children align horizontally */
    flex-wrap: wrap;
    /* Wrap if needed, or use 'nowrap' */
    gap: 0.5rem;
    /* Optional: clean spacing */
}

.share-box a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    color: var(--link-color);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-box a:hover {
    background: var(--highlight);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Pagination */
.nx-pagination {
    margin: 2rem 0;
    text-align: center;
}

.nx-pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 0.5rem;
}

.nx-pagination li a,
.nx-pagination li span {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nx-pagination li a:hover {
    background: var(--link-color);
    color: var(--text-light);
}

.nx-pagination li.active span {
    background: var(--highlight);
    color: var(--text-light);
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg-dark);
    color: var(--text-light);
    margin-top: 3rem;
    font-size: 0.9375rem;
    border-top: 4px solid var(--highlight);
}

/* Article */
article {
    background: #ffffff;
    padding: 2rem;
    margin-bottom: 3rem;
}

article h1 {
    font-size: 2.25rem; /* 36px */
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-color);
    border-bottom: 3px solid var(--highlight);
    padding-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.post-meta a {
    color: var(--link-color);
}

.post-meta a:hover,
.post-meta a:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

.thumb {
    margin-bottom: 1.5rem;
}

.thumb img.post-thumbnail.full {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #374151;
    margin-bottom: 2rem;
    white-space: pre-line;
}

.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* Post Tags */
.post-tags {
    font-family: var(--font-base);
    font-size: 0.875rem;
    margin: 1.5rem 0;
    color: #4b5563;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tags::before {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.5rem;
}

.post-tags a {
    display: inline-flex;
    background: var(--bg-secondary);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
    border-radius: 50px; /* Pill shape for modern look */
    font-size: 0.8125rem; /* 13px */
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.post-tags a:hover,
.post-tags a:focus {
    background: var(--link-color);
    color: var(--text-light);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Comments Section */
.post-comments {
    margin-top: 3rem;
}

.nx-comments h3 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 3px solid var(--highlight);
    padding-bottom: 0.5rem;
    color: var(--text-color);
}

.nx-comments-list ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.nx-comment-thread {
    padding-left: 1.5rem;
    margin-top: 0.75rem;
    border-left: 2px solid var(--border);
}

.nx-comment {
    background: #f9fafb;
    border-left: 4px solid var(--highlight);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    transition: transform 0.2s ease;
}

.nx-comment:hover {
    transform: translateY(-2px);
}

.nx-comment-meta {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nx-comment-meta strong {
    font-weight: 700;
}

.nx-comment-content {
    font-size: 1rem;
    color: #374151;
    white-space: pre-wrap;
}

.nx-comment-form {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.nx-comment-form h4 {
    margin: 0 0 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.25rem;
}

.nx-comment-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nx-comment-form input[type="text"],
.nx-comment-form input[type="email"],
.nx-comment-form textarea {
    font-size: 0.9375rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    resize: vertical;
    transition: all 0.2s ease;
}

.nx-comment-form input[type="text"]:focus,
.nx-comment-form input[type="email"]:focus,
.nx-comment-form textarea:focus {
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.nx-comment-form button {
    align-self: flex-start;
    padding: 0.75rem 1.75rem;
    background: var(--highlight);
    color: var(--text-light);
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nx-comment-form button:hover,
.nx-comment-form button:focus {
    background: #1d4ed8;
    transform: translateY(-2px);
    outline: none;
}

/* Related Posts */
.related-post {
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.related-post:hover,
.related-post:focus-within {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.related-post a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.related-post a:hover,
.related-post a:focus {
    background: #f0f8ff;
    color: var(--link-color);
}

.related-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.related-thumb img.post-thumbnail.small {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.related-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    flex-grow: 1;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    article h1 {
        font-size: 1.75rem;
    }

    .post-meta {
        font-size: 0.8125rem;
    }

    .content {
        font-size: 1rem;
    }

    .nx-comment-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nx-comment-form button {
        width: 100%;
    }

    .post .thumb img {
        width: 100%;
    }

    .post {
        flex-direction: column;
    }

    .related-post a {
        flex-direction: column;
        align-items: flex-start;
    }

    .related-thumb {
        width: 100%;
        height: 180px;
        margin-bottom: 0.75rem;
    }

    .category-menu {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .category-menu li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
}