
/**
 * Theme Name: iMperial
 * Theme URI: 
 * Author: 
 * Author URI: 
 * Description: A modern WordPress theme
 * Version: 1.3.0
 * Text Domain: imperial
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Tags: 
 */

/* تعریف متغیرهای CSS با مقادیر پیش‌فرض */
:root {
    --imperial-primary: #007cba;
    --imperial-header-bg: #f8f9fa;
    --imperial-text: #333;
    --imperial-link: #007cba;
    --imperial-footer-bg: #343a40;
    --imperial-section-bg: #f8f9fa;
    --imperial-border: #dee2e6;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Arial, sans-serif;
    line-height: 1.6;
    color: var(--imperial-text);
    background-color: #fff;
}

/* Main layout styles */
.site-header {
    background: var(--imperial-header-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--imperial-border);
}

.main-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.site-footer {
    background: var(--imperial-footer-bg);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

/* استایل‌های مشترک برای تمام صفحات */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.page-section {
    padding: 3rem 0;
}

.page-section.alternate {
    background-color: var(--imperial-section-bg);
}

.section-title {
    text-align: center;
    color: var(--imperial-primary);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--imperial-primary);
    margin: 1rem auto;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* کاردهای مشترک */
.card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--imperial-border);
}

.card-title {
    color: var(--imperial-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.card-text {
    line-height: 1.7;
    color: #555;
}

/* گرید مشترک */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* لینک‌ها */
a {
    color: var(--imperial-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* دکمه‌های مشترک */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--imperial-primary);
    color: white;
    border-color: var(--imperial-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--imperial-primary);
}

.btn-secondary {
    background-color: transparent;
    color: var(--imperial-primary);
    border-color: var(--imperial-primary);
}

.btn-secondary:hover {
    background-color: var(--imperial-primary);
    color: white;
}

/* متن‌ها و تایپوگرافی */
.text-center {
    text-align: center;
}

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

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

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid var(--imperial-border);
    text-decoration: none;
    border-radius: 4px;
}

.page-numbers.current {
    background: var(--imperial-primary);
    color: white;
    border-color: var(--imperial-primary);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .page-section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
    }
}



/* استایل‌های جدید برای صفحه اصلی */

/* Layout با سایدبار */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* گرید ۲ تایی برای مطالب */
.posts-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* کارد پست‌ها در صفحه اصلی */
.post-card {
    background: var(--imperial-card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--imperial-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

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

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

.post-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* سایدبار */
.sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar .widget {
    background: var(--imperial-card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--imperial-border);
}

.sidebar .widget-title {
    color: var(--imperial-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--imperial-border);
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .posts-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .post-image {
        height: 180px;
    }
    
    .post-content {
        padding: 1rem;
    }
}

/* استایل‌های مربوط به سیستم کامنت */

.comments-area {
    margin-top: 3rem;
    padding: 2rem;
}

.comments-title {
    color: var(--imperial-primary);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--imperial-border);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment {
    background: var(--imperial-card-bg);
    border: 1px solid var(--imperial-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.comment-body {
    display: flex;
    gap: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--imperial-text);
}

.comment-meta {
    margin-bottom: 1rem;
}

.comment-metadata {
    font-size: 0.9rem;
    color: #666;
}

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

.comment-metadata a:hover {
    color: var(--imperial-primary);
}

.comment-content {
    line-height: 1.7;
    color: var(--imperial-text);
}

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

.comment-awaiting-moderation {
    color: #ff6b35;
    font-style: italic;
    margin-bottom: 1rem;
    display: block;
}

.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    background: var(--imperial-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.comment-reply-link:hover {
    background: transparent;
    color: var(--imperial-primary);
    text-decoration: none;
}

/* فرم ارسال کامنت */
.comment-form {
    margin-top: 2rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--imperial-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--imperial-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--imperial-primary);
}

.comment-form .form-submit {
    margin-top: 1.5rem;
}

.comment-form .comment-notes {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.comment-form-comment {
    margin-bottom: 1.5rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 1rem;
}

/* کامنت‌های کودکان */
.children {
    list-style: none;
    margin: 1.5rem 0 0 2rem;
    padding: 0;
    border-left: 2px solid var(--imperial-border);
    padding-left: 1.5rem;
}

.children .comment {
    background: rgba(248, 249, 250, 0.5);
    border: 1px solid rgba(222, 226, 230, 0.5);
}

/* ناوبری کامنت‌ها */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.comment-navigation .nav-previous,
.comment-navigation .nav-next {
    flex: 1;
}

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

.comment-navigation a {
    background: var(--imperial-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.comment-navigation a:hover {
    background: transparent;
    color: var(--imperial-primary);
    text-decoration: none;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    background: var(--imperial-section-bg);
    border-radius: 8px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .comments-area {
        padding: 1rem;
        margin-top: 2rem;
    }
    
    .comment-body {
        flex-direction: column;
    }
    
    .comment-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .children {
        margin-left: 1rem;
        padding-left: 1rem;
    }
    
    .comment-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .comment-navigation .nav-previous,
    .comment-navigation .nav-next {
        text-align: center;
    }
}

