/*
Theme Name: WP Minimal Theme - Pdfcult
Theme URI: https://pdfcult.com/blog
Author: Pdfcult Team
Author URI: https://pdfcult.com
Description: A minimalist WordPress theme matching the Pdfcult.com design.
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, minimalist, custom-menu, responsive-layout, pdfcult
Text Domain: wp-minimal-theme
*/

:root {
    --primary-color: #2563eb; /* Blue matching main site */
    --accent-color: #dc2626; /* Red accent matching main site */
    --secondary-color: #6b7280; /* Gray-500 */
    --background-color: #f9fafb; /* Gray-50 */
    --surface-color: #ffffff; /* White surface for cards/sections */
    --border-color: #e5e7eb; /* Gray-200 */
    --text-color: #374151; /* Gray-700 */
    --heading-color: #1f2937; /* Gray-800 */
    --code-bg: #282c34; /* VS Code dark theme background */
    --code-text: #abb2bf; /* VS Code text color */
    --code-comment: #5c6370;
    --code-keyword: #c678dd;
    --code-string: #98c379;
    --code-function: #61afef;
    --code-variable: #e06c75;

    /* Using system fonts to match Tailwind defaults */
    --font-heading: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* General Body Styles */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 1.2em;
    margin-bottom: 0.4em;
    line-height: 1.1;
}

.breadcrumb
{
    margin-bottom: 10px;
}

h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.4em; }
h4 { font-size: 1.2em; }

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

p {
    margin-bottom: 1em;
    line-height: 1.6;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-area ul {
    list-style: disc;
    padding-left: 2em;
    margin: 1em 0;
}

.content-area ol {
    list-style: decimal;
    padding-left: 2em;
    margin: 1em 0;
}

/* Override old navbar styles - using new Tailwind header from header.php */
.navbar.old-navbar {
    display: none;
}

/* Dropdown styles from main site (if needed for future use) */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.dropdown:hover .dropdown-menu {
    display: grid !important;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a,
.dropdown-menu button {
    white-space: nowrap;
}

/* Main Wrapper & Layout */
.main-wrapper {
    display: flex;
    flex-grow: 1;
    max-width: 1100px;
    margin: 15px auto;
    padding: 0 15px;
}

/* Sidebar */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    margin-left: 20px;
    background-color: var(--surface-color);
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    padding: 15px;
    align-self: flex-start;
    position: sticky;
    top: 60px;
    z-index: 999;
}

.sidebar h3 {
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--heading-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section ul li {
    margin-bottom: 8px;
}

.sidebar-section ul li a {
    color: var(--text-color);
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
    font-size: 0.9em;
}

.sidebar-section ul li a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-section.categories ul li a {
    position: relative;
    padding-left: 12px;
}

.sidebar-section.categories ul li a::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.sidebar-section.categories ul li a:hover::before {
    transform: translateX(4px);
    color: var(--primary-color);
}

.sidebar-section.categories .sub-menu {
    display: none;
    padding-left: 15px;
}

.sidebar-section.categories .expandable > a {
    position: relative;
}

.sidebar-section.categories .expandable > a::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 1.2em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.sidebar-section.categories .expandable.open > a::after {
    content: '-';
}

.sidebar-section.categories .expandable.open > .sub-menu {
    display: block;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    color: var(--secondary-color);
    font-size: 0.8em;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag:hover {
    color: var(--surface-color);
    border-color: var(--primary-color);
}

/* Main Content Area */
.content-area {
    flex-grow: 1;
    background-color: var(--surface-color);
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    padding: 20px;
}

/* Blog Header */
.blog-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.blog-title {
    font-size: 2.2em;
    margin-bottom: 8px;
    color: var(--heading-color);
    margin-top: 0;
}

.blog-description {
    font-size: 1em;
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.post-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--surface-color);
    transition: all 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.post-item-header {
    margin-bottom: 12px;
}

.post-item-title {
    font-size: 1.6em;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.post-item-title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.post-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85em;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

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

.post-item-meta i {
    color: var(--primary-color);
}

.post-item-meta a {
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

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

.post-item-excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 15px;
}

.post-item-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--surface-color) !important;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background-color: #1d4ed8;
    transform: translateX(4px);
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(4px);
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

.no-posts i {
    display: block;
    margin: 0 auto 1em;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

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

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: var(--surface-color);
    border-color: var(--primary-color);
}

.pagination .current {
    background-color: var(--primary-color);
    color: var(--surface-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination .dots {
    border: none;
    padding: 8px 4px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: var(--background-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb .fas.fa-home {
    color: var(--primary-color);
}

.breadcrumb .fas.fa-chevron-right {
    font-size: 0.7em;
    color: var(--border-color);
}

.breadcrumb .current {
    color: var(--secondary-color);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Single Post Styles */
.single-post {
    max-width: 100%;
}

.single-post .entry-title {
    font-size: 2.2em;
    margin-bottom: 12px;
    margin-top: 0;
    color: var(--heading-color);
    line-height: 1.2;
}

.single-post .metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85em;
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

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

.single-post .metadata i {
    color: var(--primary-color);
}

.single-post .metadata a {
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

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

.post-thumbnail {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post .entry-content {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-color);
}

.single-post .entry-content p {
    margin-bottom: 1.2em;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    color: var(--heading-color);
}

.single-post .entry-content h2 {
    font-size: 1.8em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.single-post .entry-content h3 {
    font-size: 1.4em;
}

.single-post .entry-content h4 {
    font-size: 1.2em;
}

.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

/* Post Tags */
.post-tags {
    margin: 25px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.post-tags i {
    color: var(--primary-color);
    margin-right: 8px;
}

.post-tags a {
    display: inline-block;
    background-color: var(--background-color);
    color: var(--secondary-color);
    padding: 4px 12px;
    margin: 4px;
    border-radius: 15px;
    font-size: 0.85em;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.post-tags a:hover {
    background-color: var(--primary-color);
    color: var(--surface-color);
    border-color: var(--primary-color);
    text-decoration: none;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
    padding: 25px 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.post-navigation > div {
    padding: 15px;
    background-color: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.post-navigation > div:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.post-navigation .nav-label {
    display: block;
    font-size: 0.8em;
    color: var(--secondary-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.post-navigation a {
    font-size: 1em;
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

@media (max-width: 768px) {
    .post-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
    }
}

/* Table of Contents */
.toc {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.toc h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.1em;
    margin-bottom: 10px;
    border-bottom: none;
    padding-bottom: 0;
}

.toc li {
    margin-bottom: 6px;
}

.toc a {
    color: var(--text-color);
    transition: all 0.2s ease;
    display: block;
    padding: 2px 0;
    font-size: 0.9em;
}

.toc a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.toc a.active {
    font-weight: 700;
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Code Snippet Styling */
pre {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 0.8em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
    font-family: var(--font-code);
    font-size: 0.85em;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

code {
    font-family: var(--font-code);
    color: var(--code-text);
}

pre code {
    display: block;
}

/* Override old footer styles - using new Tailwind footer from footer.php */
.footer.old-footer {
    display: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
        margin-right: 15px;
        padding: 10px;
    }

    .content-area {
        padding: 15px;
    }

    .navbar .search-box {
        max-width: 250px;
    }

    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
}

@media (max-width: 768px) {
    .navbar .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 55px;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border-color);
        padding: 8px 0;
    }

    .navbar .nav-menu.active {
        display: flex;
    }
    .navbar .nav-menu li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    .navbar .nav-menu li:last-child { border-bottom: none; }
    .navbar .nav-menu a {
        padding: 10px 15px;
        display: block;
    }
    .navbar .nav-menu a::after { display: none; }
    .navbar .hamburger-menu { display: block; }

    .main-wrapper {
        flex-direction: column;
        margin-top: 10px;
    }

    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 20px;
        position: static;
    }

    /* Blog listing responsive */
    .blog-title {
        font-size: 1.8em;
    }

    .post-item {
        padding: 15px;
    }

    .post-item-title {
        font-size: 1.3em;
    }

    .post-item-meta {
        font-size: 0.8em;
        gap: 10px;
    }

    .read-more-btn {
        width: 100%;
        justify-content: center;
    }

    /* Breadcrumb responsive */
    .breadcrumb {
        font-size: 0.8em;
        padding: 10px 12px;
        gap: 6px;
    }

    .breadcrumb .current {
        max-width: 200px;
    }

    /* Single post responsive */
    .single-post .entry-title {
        font-size: 1.8em;
    }

    .single-post .entry-content h2 {
        font-size: 1.5em;
    }

    .single-post .entry-content h3 {
        font-size: 1.3em;
    }

    .content-area {
        padding: 15px;
    }
}
