/* ایمپورت فونت IRANYekan */
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/IRANYekanXVF.woff2') format('woff2'),
         url('../fonts/IRANYekanXVF.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #1B3A5C;
    --secondary-color: #2E6B9E;
    --accent-color: #0F2A44;
    --text-color: #1A2B3C;
    --light-gray: #F4F7FA;
    --medium-gray: #E2E8F0;
    --dark-gray: #64748B;
    --white: #fff;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(15, 42, 68, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'IRANYekan', 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    direction: rtl;
    font-weight: normal;
	overflow-x: hidden; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* هدر */
.site-header {
    background: linear-gradient(135deg, #1B3A5C, #2E6B9E);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(15, 42, 68, 0.15);
    position: static !important;
    z-index: 1000;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo img {
    height: 100px;
    width: 120px;
    border-radius: 8px;
    transition: var(--transition);
}

.site-logo img:hover {
    transform: scale(1.05);
}

.site-title-wrap {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.site-title a:hover {
    color: rgba(255,255,255,0.9);
}

.site-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    margin-top: 0.25rem;
}

/* منوی اصلی */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 500;
    border: 2px solid transparent;
}

.main-navigation a:hover,
.main-navigation a:focus {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.main-navigation .current-menu-item a {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}

/* محتوای اصلی */
.site-main {
    padding: 2rem 0;
    min-height: 60vh;
}

/* Hot Topics */
.hot-topics {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1B3A5C, #0F2A44);
    color: white;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.hot-topics-label {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 0.75rem 1rem;
    min-width: 160px;
    border-left: 1px solid rgba(255,255,255,0.15);
}

.hot-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.hot-topics-content {
    flex: 1;
    padding: 0.75rem 1rem;
    overflow: hidden;
}

.topics-scroll {
    display: flex;
    gap: 1rem;
    animation: scrollTopics 40s linear infinite;
}

.topic-item {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    font-weight: 500;
}

.topic-item:hover {
    background: rgba(255,255,255,0.18);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.15);
}

@keyframes scrollTopics {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Featured Posts Section */
.featured-posts-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--medium-gray);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.featured-item {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 42, 68, 0.06);
    transition: var(--transition);
    border: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
}

.featured-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(15, 42, 68, 0.12);
    border-color: var(--primary-color);
}

.featured-thumbnail {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #2E6B9E, #1B3A5C);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.featured-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-item:hover .featured-thumbnail img {
    transform: scale(1.08);
}

.featured-thumbnail .no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-thumbnail .no-thumbnail svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
    opacity: 0.8;
}

.featured-content {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
        text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: -0.1px;
}

.featured-title {
    font-size: 0.8rem;
    line-height: 1.3;
    font-weight: 600;
    text-align: right;
	        text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: -0.1px;
}

.featured-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: -0.1px;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    line-height: 1.5;
}
.featured-title a:hover {
    color: var(--primary-color);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-color);
    position: relative;
    padding-right: 1rem;
    border-right: 4px solid var(--primary-color);
}

.view-options {
    display: flex;
    gap: 0.5rem;
    background: var(--light-gray);
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn svg {
    fill: var(--dark-gray);
    transition: var(--transition);
}

.view-btn.active {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(15, 42, 68, 0.1);
}

.view-btn.active svg {
    fill: var(--primary-color);
}

.view-btn:hover:not(.active) {
    background: rgba(255,255,255,0.5);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(15, 42, 68, 0.15);
}

.news-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #2E6B9E, #1B3A5C);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.news-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.08);
    opacity: 0;
    transition: var(--transition);
}

.news-item:hover .news-thumbnail::before {
    opacity: 1;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-item:hover .news-thumbnail img {
    transform: scale(1.05);
}

.news-thumbnail svg {
    width: 80px;
    height: 80px;
    fill: var(--white);
    opacity: 0.9;
    transition: var(--transition);
}

.news-item:hover .news-thumbnail svg {
    transform: scale(1.1);
    opacity: 1;
}

.news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--medium-gray);
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-meta svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.news-category a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.news-category a:hover {
    color: var(--accent-color);
}

.news-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-weight: 600;
		    text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: -0.1px;
}

.news-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

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

.news-excerpt {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
	    text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: -0.1px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
}

.news-views {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--dark-gray);
}

.news-views svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.news-comments {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--dark-gray);
}

.news-comments svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.news-time {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(15, 42, 68, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-time svg {
    width: 10px;
    height: 10px;
    fill: white;
}

/* List View */
.list-view {
    grid-template-columns: 1fr !important;
}

.list-view .news-item {
    flex-direction: row;
    gap: 1.5rem;
}

.list-view .news-thumbnail {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
}

.list-view .news-content {
    flex: 1;
}

/* محتوای بدون عکس */
.no-content {
    text-align: center;
    padding: 3rem 1rem;
    grid-column: 1 / -1;
}

.no-content svg {
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-content h3 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.no-content p {
    color: var(--dark-gray);
    opacity: 0.8;
}

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

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination .page-numbers {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    font-weight: 500;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination .page-numbers.dots {
    border: none;
    background: none;
}

.pagination .page-numbers.dots:hover {
    transform: none;
    background: none;
    color: var(--text-color);
}

/* فوتر */
.site-footer {
    background: linear-gradient(135deg, #0F2A44, #1B3A5C);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget {
    padding: 0 1rem;
}

.footer-widget h3 {
    color: #7EB8E0;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: #7EB8E0;
}

.footer-widget p {
    line-height: 1.7;
    opacity: 0.9;
	text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: -0.1px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-widget svg {
    width: 16px;
    height: 16px;
    fill: #7EB8E0;
    flex-shrink: 0;
}

.footer-widget a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-widget a:hover {
    color: #7EB8E0;
    opacity: 1;
    padding-right: 5px;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* ریسپانسیو */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-branding {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hot-topics {
        flex-direction: column;
    }
    
    .hot-topics-label {
        min-width: auto;
        width: 100%;
        justify-content: center;
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-posts-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .featured-thumbnail {
        height: 90px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .list-view .news-item {
        flex-direction: column;
    }
    
    .list-view .news-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .topics-scroll {
        gap: 0.5rem;
    }
    
    .topic-item {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .featured-posts-section {
        padding: 1rem;
    }
    
    .featured-content {
        padding: 0.6rem;
    }
    
    .featured-thumbnail {
        height: 80px;
    }
    
    .featured-title {
        font-size: 0.75rem;
		    text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: -0.1px;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .main-navigation a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .hot-topics-label {
        padding: 0.5rem 0.75rem;
    }
    
    .hot-text {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

.related-posts {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
    color: #1A2B3C;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.related-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 42, 68, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(15, 42, 68, 0.15);
}

.related-post-thumbnail {
    height: 200px;
    overflow: hidden;
    background: #F4F7FA;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #F4F7FA;
}

.related-post-item:hover .related-post-thumbnail img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 20px;
}

.related-post-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.related-post-title a {
    color: #1A2B3C;
    text-decoration: none;
}

.related-post-title a:hover {
    color: #1B3A5C;
}

.related-post-meta {
    font-size: 14px;
    color: #64748B;
}

.related-post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-title {
        font-size: 20px;
    }
}
/* تنظیمات کلی برای لیست‌ها */
ul, ol {
    margin: 1rem 0;
    padding-right: 2rem;
    line-height: 1.8;
}

li {
    margin-bottom: 0.5rem;
    position: relative;
}

/* لیست‌های تودرتو */
ul ul, ol ol, ul ol, ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-right: 1.5rem;
}

/* استایل برای لیست‌های داخل محتوا */
.entry-content ul,
.entry-content ol,
.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-right: 2.5rem;
}

.entry-content li,
.post-content li {
    margin-bottom: 0.75rem;
    padding-right: 0.5rem;
}
.entry-content {
	margin-top: 2rem; 
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    text-justify: inter-word;
    direction: rtl;
    word-spacing: normal;
    letter-spacing: -0.01em;
    color: #1A2B3C;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* پاراگراف‌ها */
.entry-content p {
    margin-bottom: 1.8em;
    text-align: justify;
    line-height: 1.8;
    text-indent: 0;
    orphans: 3;
    widows: 3;
}

/* اولین پاراگراف بعد از عنوان */
.entry-content > p:first-of-type {
    margin-top: 0.5em;
}

/* پاراگراف آخر */
.entry-content > p:last-of-type {
    margin-bottom: 0;
}