/*
Theme Name: CodePencil
Description: A modern, clean WordPress theme designed for developers and content creators. Features a minimalist design with focus on readability and code presentation.
Version: 1.0.0
Author: CodePencil Team
Text Domain: codepencil
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, custom-colors, custom-header, custom-logo, custom-menu, featured-images, flexible-header, full-width-template, one-column, responsive-design, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, two-columns
*/

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

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

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

/* Header Styles */
.site-header {
    background-color:#fff;
    color:#000;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.site-title:hover {
    color: #3498db;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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


/* Post Styles */
.post {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.post-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

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

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

.post-title a:hover {
    color: #3498db;
}

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

.post-content {
    padding: 1.5rem;
}

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

.post-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

.post-content pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 0.5rem;
}

.widget a {
    color: #666;
    text-decoration: none;
}

.widget a:hover {
    color: #3498db;
}

/* Footer */
.site-footer {
    background-color:#fff;
    color: #000;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.menu-toggle-icon span {
    width: 20px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

.menu-toggle.active .menu-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .menu-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
