* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: \"IranSans\", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #22c55e;
    --primary-dark: #4338ca;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gray-color: #64748b;
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
}

body {
    background-color: #f9fafb;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: row-reverse;
}

.container1 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    flex: 1;
    padding-top: 40px;
}

.blog-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.blog-description {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.blog-container {
    display: flex;
    gap: 30px;
}

.posts-container {
    flex: 1;
    min-width: 300px;
}

.sidebar {
    width: 300px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    top: 20px;
    height: fit-content;
    overflow-y: auto;
    padding-top: 40px;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

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

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.post-meta i {
    margin-left: 5px;
}

.post-excerpt {
    margin-bottom: 15px;
    color: var(--gray-color);
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: var(--transition);
}

.read-more:hover {
    background: var(--primary-dark);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: white;
    color: var(--dark-color);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: white;
}

.single-post {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.single-post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    display: block;
}

.single-post-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.single-post-content {
    white-space: normal !important;
    line-height: 1.8 !important;
    font-family: \"IranSans\", Tahoma, Geneva, Verdana, sans-serif;
    text-align: justify;
}

.single-post-content p {
    margin-bottom: 1.5em !important;
    display: block !important;
    text-align: justify;
}

.single-post-content br {
    display: none !important;
}

.single-post-content * {
    line-height: inherit !important;
}

.comments-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.comment {
    padding: 20px;
    margin-bottom: 20px;
    background: var(--light-color);
    border-radius: 10px;
    border-right: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.comment-author {
    font-weight: 500;
    color: var(--dark-color);
}

.comment-form {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn {
    padding: 12px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-dark);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.captcha-code {
    background: linear-gradient(45deg, #22c55e, #3b82f6);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
    min-width: 120px;
}

.captcha-input {
    flex: 1;
}

.guest-fields {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (max-width: 992px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 30px;
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }
    
    .single-post-title {
        font-size: 1.6rem;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .captcha-container {
        flex-direction: column;
    }
}

.nscoblog-header {
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    padding: 30px 0;
    margin-bottom: 40px;
}

.nscoblog-title {
    font-size: 2.8rem;
    text-align: center;
    background: linear-gradient(to right, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    font-weight: 800;
}

.nscoblog-tagline {
    text-align: center;
    color: #e0e7ff;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.social-share {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-3px);
}

.image-placeholder {
    width: 100%;
    height: 200px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

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

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    color: var(--dark-color);
}

.sidebar-post {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.sidebar-post-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-left: 10px;
}

.sidebar-post-title {
    font-size: 0.9rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    flex: 1;
}

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

.user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding: 10px;
    background: #eef2ff;
    border-radius: 5px;
}

.user-name {
    margin-right: 10px;
    font-weight: 500;
}

.logout-btn {
    padding: 5px 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8rem;
}

.login-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
}

h1 {
    text-align: center;
    color: #333;
}

.chart {
    display: flex;
    height: 300px;
    align-items: flex-end;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
}

.bar {
    width: 14%;
    margin: 0 0.5%;
    background: linear-gradient(to top, #3498db, #2980b9);
    position: relative;
    transition: height 0.5s ease;
}

.bar:nth-child(2n) {
    background: linear-gradient(to top, #e74c3c, #c0392b);
}

.bar-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8em;
    color: #555;
    white-space: nowrap;
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    color: #333;
}

.chart-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid #eee;
    font-size: 0.85em;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 5px;
}

.legend-item:nth-child(even) .legend-color {
     background: linear-gradient(to top, #e74c3c, #c0392b);
}

.legend-item:nth-child(odd) .legend-color {
     background: linear-gradient(to top, #3498db, #2980b9);
}

.infographic {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
    border-top: 1px solid #eee;
}

.infographic-item {
    width: 45%;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    text-align: center;
}

.infographic-item h3 {
    color: #333;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.infographic-item p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    .chart {
        height: 200px;
    }

    .bar-label {
        font-size: 0.6em;
    }

    .bar-value {
        font-size: 0.7em;
    }
     .infographic-item {
        width: 100%;
    }

    .chart-legend {
        flex-direction: column;
        align-items: flex-start;
    }

    .legend-item {
        margin-bottom: 5px;
    }

    .legend-color {
        width: 10px;
        height: 10px;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border: 1px solid #ddd;
    font-size: 0.95em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

th {
    background: #34495e;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #2c3e50;
}

td {
    padding: 12px;
    text-align: right;
    border: 1px solid #ddd;
}

tr:nth-child(even) {
    background: #f8f9fa;
}

h1, h2, h3, h4, h5 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

h1 { font-size: 1.8em; font-weight: 800; }
h2 { font-size: 1.5em; font-weight: 700; }
h3 { font-size: 1.3em; font-weight: 700; }

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #eee;
}

.admin-reply {
    background: #f0f9ff;
    border-right: 3px solid #3b82f6;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    position: relative;
}

.admin-reply:before {
    content: "پاسخ مدیریت";
    position: absolute;
    top: -10px;
    right: 15px;
    background: #3b82f6;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.comment-email {
    direction: ltr;
    text-align: left;
}
.single-post-content img {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 8px;
}