/*
Theme Name: Storyteller
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A clean, content-focused theme for storytelling and worldbuilding blogs targeting TTRPG fans and writers.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: storyteller
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    background-color: #f9f9f9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #222;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

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

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

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Header */
.site-header {
    background-color: #2c5f8d;
    color: #fff;
    padding: 1.5rem 2rem;
    border-bottom: 4px solid #1a3a5a;
}

.site-title {
    margin: 0;
    font-size: 2rem;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

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

.site-description {
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
    font-style: italic;
    color: #e0e0e0;
}

/* Navigation */
.main-navigation {
    background-color: #1a3a5a;
    padding: 0;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    display: block;
    padding: 1rem 1.5rem;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background-color: #2c5f8d;
}

/* Content Area */
.content-wrapper {
    display: flex;
    padding: 2rem;
    gap: 2rem;
}

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

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ==========================================================================
   Posts
   ========================================================================== */

.post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

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

.post-header {
    margin-bottom: 1.5rem;
}

.post-title {
    margin-bottom: 0.5rem;
}

.post-title a {
    color: #222;
}

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

.post-meta {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.post-meta a {
    color: #666;
}

.post-content {
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    margin: 1.5rem 0;
    border-radius: 4px;
}

.post-content ul,
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.post-tags {
    margin-top: 1.5rem;
}

.post-tags a {
    display: inline-block;
    background-color: #e8e8e8;
    padding: 0.3rem 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #555;
}

.post-tags a:hover {
    background-color: #2c5f8d;
    color: #fff;
    text-decoration: none;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #2c5f8d;
    color: #fff;
    border-radius: 3px;
}

.read-more:hover {
    background-color: #1a3a5a;
    text-decoration: none;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar-widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2c5f8d;
}

/* Archive Widget */
.archive-list {
    list-style: none;
}

.archive-year {
    margin-bottom: 1rem;
}

.year-toggle {
    cursor: pointer;
    font-weight: bold;
    padding: 0.5rem;
    background-color: #e0e0e0;
    border-radius: 3px;
    user-select: none;
}

.year-toggle:hover {
    background-color: #d0d0d0;
}

.year-toggle::before {
    content: '▼ ';
    display: inline-block;
    transition: transform 0.2s;
}

.year-toggle.collapsed::before {
    transform: rotate(-90deg);
}

.month-list {
    list-style: none;
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.month-list li {
    margin-bottom: 0.3rem;
}

.month-list a {
    color: #555;
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 2px;
}

.month-list a:hover {
    background-color: #e8e8e8;
    text-decoration: none;
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 1rem;
}

.search-submit {
    padding: 0.5rem 1rem;
    background-color: #2c5f8d;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.search-submit:hover {
    background-color: #1a3a5a;
}

/* Tag Cloud */
.tagcloud a {
    display: inline-block;
    margin: 0.3rem;
    padding: 0.4rem 0.8rem;
    background-color: #e8e8e8;
    border-radius: 3px;
    font-size: 0.9rem !important;
}

.tagcloud a:hover {
    background-color: #2c5f8d;
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #333;
    color: #ccc;
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer a {
    color: #fff;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    background-color: #e8e8e8;
    border-radius: 3px;
    color: #555;
}

.pagination a:hover {
    background-color: #2c5f8d;
    color: #fff;
    text-decoration: none;
}

.pagination .current {
    background-color: #2c5f8d;
    color: #fff;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .site-header {
        padding: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
    }
    
    body {
        font-size: 16px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}
