/*
Theme Name: WordStack
Theme URI: https://clue.stream 
Author: Clue Stream
Author URI: https://clue.stream 
Description: A clean, minimalist WordPress theme inspired by Substack's aesthetic with sidebar support and header widget area
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html 
Text Domain: wordstack
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #191919;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s;
}

a:hover {
    border-bottom-color: #000;
}

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

.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header - Compact & Left Aligned */
.site-header {
    padding: 20px 0;
    border-bottom: 1px solid #e6e6e6;
}

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

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

.site-branding .custom-logo-link {
    display: block;
    line-height: 0;
    border: none;
}

.site-branding .custom-logo {
    max-height: none;
    height: auto;
    width: auto;
    border: none;
}

.site-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: #000;
    border: none;
}

.site-description {
    font-size: 14px;
    color: #666;
    font-weight: 400;
    margin: 0;
}

/* Primary Navigation - Right Side */
.main-navigation {
    position: relative;
}

.menu-toggle {
    display: none;
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 1001;
}

.menu-toggle:hover {
    opacity: 0.8;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
}

.main-navigation a {
    color: #666;
    font-size: 15px;
    border: none;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: #000;
}

/* Header Widget Area */
.header-widget-area {
    border-bottom: 1px solid #e6e6e6;
    padding: 20px 0;
}

.header-widget-area .widget {
    margin: 0 0 20px 0;
}

.header-widget-area .widget:last-child {
    margin-bottom: 0;
}

.header-widget-area .widget-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #333;
}

.header-widget-area ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.header-widget-area li {
    margin: 0;
}

.header-widget-area a {
    color: #666;
    font-size: 14px;
    border: none;
    transition: color 0.2s;
}

.header-widget-area a:hover {
    color: #000;
}

/* Main Content */
.site-main {
    padding: 40px 0;
    min-height: 60vh;
}

/* Post Listings - Compact with Square Image Right */
.post-list {
    margin-bottom: 40px;
}

article.post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e6e6e6;
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 24px;
    align-items: start;
}

article.post:last-child {
    border-bottom: none;
}

.post-content-wrapper {
    min-width: 0;
}

.post-thumbnail-wrapper {
    order: 2;
}

.post-thumbnail-wrapper img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.entry-header {
    margin-bottom: 12px;
}

.entry-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.entry-title a {
    color: #000;
    border: none;
}

.entry-title a:hover {
    opacity: 0.7;
}

.entry-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.entry-meta a {
    color: #666;
    border: none;
}

.entry-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.entry-content p {
    margin-bottom: 12px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.entry-content h1 { font-size: 32px; }
.entry-content h2 { font-size: 28px; }
.entry-content h3 { font-size: 24px; }

.entry-content blockquote {
    border-left: 3px solid #000;
    padding-left: 24px;
    margin: 24px 0;
    font-style: italic;
    color: #666;
}

.entry-content ul,
.entry-content ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.entry-content li {
    margin-bottom: 8px;
}

.entry-content img {
    margin: 24px 0;
    border-radius: 4px;
}

.more-link {
    display: inline-block;
    padding: 8px 16px;
    background: #000;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    transition: opacity 0.2s;
}

.more-link:hover {
    opacity: 0.8;
}

/* Single Post */
.single article.post,
.page article {
    display: block;
    border: none;
    grid-template-columns: 1fr;
}

.single .entry-header,
.page .entry-header {
    margin-bottom: 24px;
}

.single .entry-title,
.page .entry-title {
    font-size: 36px;
    margin-bottom: 12px;
}

.single .entry-content,
.page .entry-content {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.single .post-thumbnail-wrapper,
.page .post-thumbnail-wrapper {
    margin-bottom: 32px;
    order: 0;
}

.single .post-thumbnail-wrapper img,
.page .post-thumbnail-wrapper img {
    height: auto;
    max-height: 500px;
    width: 100%;
    object-fit: cover;
}

/* Sidebar - Right Side */
.sidebar {
    font-size: 15px;
}

.sidebar .widget {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e6e6e6;
}

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

.sidebar .widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar a {
    color: #666;
    font-size: 14px;
}

.sidebar a:hover {
    color: #000;
}

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

.pagination a,
.pagination span {
    padding: 8px 16px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    font-size: 14px;
}

.pagination .current {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Comments */
.comments-area {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid #e6e6e6;
}

.comments-title {
    font-size: 24px;
    margin-bottom: 32px;
}

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

.comment {
    margin-bottom: 32px;
}

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

.comment-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.comment-content p {
    margin-bottom: 12px;
}

/* Comment Form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 16px;
}

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

.comment-form input[type="submit"] {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.2s;
}

.comment-form input[type="submit"]:hover {
    opacity: 0.8;
}

/* Footer */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid #e6e6e6;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.site-footer a {
    color: #666;
    border: none;
}

/* Responsive - Mobile */
@media (max-width: 968px) {
    .content-sidebar-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .sidebar {
        order: 2;
    }
    
    /* Mobile menu toggle for main navigation */
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: #fff;
        border: 1px solid #e6e6e6;
        border-radius: 4px;
        padding: 20px;
        margin-top: 10px;
        min-width: 200px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .main-navigation.active ul {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation ul li {
        margin: 0;
        padding: 0;
    }
    
    .header-widget-area ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .site-header {
        padding: 15px 0;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .site-main {
        padding: 30px 0;
    }
    
    article.post {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 30px;
        padding-bottom: 30px;
    }
    
    .post-thumbnail-wrapper {
        order: -1;
    }
    
    .post-thumbnail-wrapper img {
        width: 100%;
        height: 200px;
    }
    
    .entry-title {
        font-size: 20px;
    }
    
    .single .entry-title,
    .page .entry-title {
        font-size: 28px;
    }
    
    .entry-content {
        font-size: 16px;
    }
    
    .single .entry-content,
    .page .entry-content {
        font-size: 17px;
    }
}