@font-face {
            font-family: 'VazirFont';
            src: url('../fonts/Vazir-Medium.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.banner-slider {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    /* نسبت ابعاد واکنش‌گرا با aspect-ratio */
}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* بدون دفرمه شدن پر می‌کند */
    border-radius: 12px;
}

/* فلش‌ها */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s, background 0.3s;
}

.slider-arrow:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

#prev-slide {
    left: 10px;
}

#next-slide {
    right: 10px;
}

/* نقطه‌ها */
.dots-container {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.scroll-line {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 12px 0;
}

.scroll-line::-webkit-scrollbar {
    height: 6px;
}

.scroll-line::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.article-card {
    flex: 0 0 250px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.article-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.article-card h3 {
    margin: 8px 0;
    font-size: 16px;
}


.keywords {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #80808052;
    padding: 10px 15px;
    margin-bottom: 20px;
}

.keyword {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.banner-slider {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    /* نسبت ابعاد واکنش‌گرا با aspect-ratio */
}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* بدون دفرمه شدن پر می‌کند */
    border-radius: 12px;
}

/* فلش‌ها */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s, background 0.3s;
}

.slider-arrow:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

#prev-slide {
    left: 10px;
}

#next-slide {
    right: 10px;
}

/* نقطه‌ها */
.dots-container {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}


:root {
    --green-deep: #0f5132; /* سبز یشمی تیره */
    --green: #1b6f4e; /* سبز یشمی */
    --green-soft: #2a8f67; /* سبز میانه */
    --gold: #c9a227; /* طلایی سنتی */
    --cream: #f6f2e7; /* کرم روشن */
    --brown: #5a4a3b; /* قهوه‌ای تیره برای تیترها */
    --text: #222; /* متن اصلی */
    --muted: #666; /* متن کم‌رنگ */
    --card-bg: #fff; /* زمینه کارت */
    --border: #e4dcc5; /* حاشیه لطیف */
    --shadow: 0 6px 18px rgba(16, 55, 38, 0.08);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 18px;
    --container: 1200px;
}

/* ریست سبک‌ها و پایه */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}



body {
    margin: 0;
    font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, var(--cream), #fbf9f3 60%, #fdfcf8);
    color: var(--text);
    line-height: 1.75;
}

a {
    color: var(--green-soft);
    text-decoration: none;
}

a:hover {
    color: var(--green);
    text-decoration: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

/* هدر */
header {
    background: radial-gradient(1200px 1200px at 110% -20%, rgba(201, 162, 39, 0.12), transparent 60%),
    linear-gradient(90deg, #0e4830, var(--green-deep));
    color: #fff;
    border-bottom: 3px solid rgba(201, 162, 39, 0.25);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    margin-right: 10px;
}

/* آیکن هندسی اسلامی (SVG) */
.brand-icon svg {
    width: 24px;
    height: 24px;
    fill: #143f2b;
}

.brand-name {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0.2px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

nav a {
    color: #fefefe;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: saturate(1.2) blur(0.5px);
    transition: background 0.2s ease, border-color 0.2s ease;
    font-weight: 500;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.30);
    text-decoration: none;
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 22px;
    cursor: pointer;
    z-index: 10000;
    margin-left: 10px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #0f5132;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
}

.mobile-nav a {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* بنر */
.banner {
    margin: 10px auto;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(130deg, rgba(255, 255, 255, 0.08), rgba(201, 162, 39, 0.10)),
    linear-gradient(90deg, #0f5132 0%, #17694a 60%, #1d7b57 100%);
    color: #fff;
}

.banner-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 12px;
    padding: 24px;
}

.banner-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
}

.banner-desc {
    color: #e9f7f2;
    margin: 0 0 16px;
}

.banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 14px;
}

.chip svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    opacity: 0.9;
}

/* سه کارت دسترسی سریع */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0 8px;
}

.quick-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 55, 38, 0.12);
}

.quick-card .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--brown);
    margin-bottom: 8px;
}

.quick-card .title .badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: radial-gradient(120% 120% at 30% 30%, #dfc778, var(--gold));
    box-shadow: inset 0 0 0 2px rgba(201, 162, 39, 0.45);
}

.quick-card p {
    margin: 0;
    color: var(--muted);
}

/* بخش ربات‌ها */
.section {
    margin: 10px auto;
    box-shadow: 1px 2px 5px #00000085;
    border-radius: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title {
    font-weight: 800;
    color: var(--green-deep);
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-title .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
}

.card .icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: #eaf5f1;
    border: 1px solid #cfe8dd;
    text-align: center;
}

.card .icon img {
    width: 70px;
    height: 70px;
}


.card h4 {
    margin: 0;
    font-size: 15px;
    color: var(--brown);
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

/* دکمه نمایش بیشتر پایین-چپ */
.more-row {
    display: flex;
    justify-content: flex-start; /* راست به چپ: پایین سمت چپ یعنی شروع سطر */
    margin-top: 12px;
}

.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff7e0;
    color: #5b4a28;
    border: 1px solid #ecd79a;
    font-weight: 600;
    transition: background 0.18s ease, transform 0.18s ease;
}

.btn-more:hover {
    background: #fff1c7;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-more svg {
    width: 16px;
    height: 16px;
    fill: #8a6d1f;
}

/* کارت‌های مقالات و اخبار */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-thumb {
    height: 120px;
    background: conic-gradient(from 130deg, #f0e7cf, #e8dcba, #f0e7cf);
    display: grid;
    place-items: center;
}

.post-thumb svg {
    width: 46px;
    height: 46px;
    fill: #bca163;
    opacity: 0.9;
}

.post-body {
    padding: 14px;
    display: grid;
    gap: 8px;
}

.post-title {
    margin: 0;
    font-weight: 800;
    color: var(--brown);
    font-size: 16px;
}

.post-excerpt {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.post-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--green-soft);
    background: #f8f6ef;
    font-weight: 600;
}

.btn:hover {
    background: #f3efdd;
    text-decoration: none;
}

/* فوتر */
footer {
    margin-top: 36px;
    background: var(--green-deep);
    color: #e9f7f2;
    border-top: 3px solid rgba(201, 162, 39, 0.25);
}

.footer-inner {
    padding: 16px 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    color: #e9f7f2;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}

.footer-links a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.45);
}


/*articl page*/
.section-article {
    border: 1px solid #f1db81;
    border-radius: 10px;
    box-shadow: 1px 1px 20px rgba(63, 63, 11, 0.59);
    margin: 20px auto;
    padding: 20px;
}
.section h2 {
    text-align: center;
}

/*all-articels*/
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 24px 0;
}

.article-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.article-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
}

.article-card h3 {
    margin: 12px 0 6px;
    font-size: 18px;
}

.article-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    overflow-y: auto;
    height: 50px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    background: #fff7e0;
    border: 1px solid #ecd79a;
    color: #5b4a28;
    text-decoration: none;
}

.pagination .current {
    background: #f0e4b0;
    font-weight: bold;
}


.title-page {
    font-size: 18px;
    text-align: center;
}

/*صفحه نمایش متن مقاله*/
.article-detail h1 {
    margin-top: 24px;
    font-size: 28px;
    color: #143f2b;
    text-align: center;
}

.article-detail p {
    margin-top: 4px;
    font-size: 14px;
    color: black;
}
.text-muted{
    color: gray;
    font-size: 12px;
}
.read-time {
    font-size: 14px;
    color: gray !important;
    margin-bottom: 12px;
    text-align: center;
}



.keyword {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    color: #333;
}

.keyword:hover {
    background: #ddd;
}

.article-body {
    margin: 20px 0;
    line-height: 1.8;
    font-size: 16px;
    border: 1px solid black;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 1px 10px 10px #7a704d;
}

.related-articles h2 {
    margin: 20px 0;
}

.article-card {
    flex: 0 0 250px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.article-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.article-card h3 {
    margin: 8px 0;
    font-size: 16px;
}

.comments-list {
    margin-top: 10px;
    border: 1px solid black;
    border-radius: 5px;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.54);
    padding: 25px;
}

.comments h2 {
    margin: 5px;
}

.comments form textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
}

.comments form button {
    background: #0f5132;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.comments-list .comment {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.comments-list .author {
    font-weight: bold;
}

.admin-reply {
    background: #f9f9f9;
    border-left: 3px solid #0f5132;
    padding: 8px;
    margin-top: 6px;
}

/*************  صفحه نمایش یک مقاله  ************/
.container-image-article-detail {
    display: flex;
    justify-content: center; /* مرکز افقی */
    align-items: center; /* مرکز عمودی */
    width: 100%; /* پهنای کامل */
    margin: 0;
    padding: 0;
}

.container-image-article-detail img {
    max-width: 30%; /* حداکثر عرض عکس (برای ریسپانسیو) */
    max-height: 80vh; /* تا خیلی بزرگ نشه */
    border-radius: 8px; /* اختیاری: گوشه‌های گرد */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* ظاهر بهتر */
}


.send-comments-article-detail {
    margin-top: 10px;
    border: 1px solid black;
    border-radius: 5px;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.54);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.send-comments-article-detail h2 {
    text-align: center;
}

.input-name-article-detail {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.send-comments-article-detail-btn {
    margin-top: 5px;
    background: rgb(201 162 39 / 12%);
    border-radius: 5px;
    font-family: Vazir, serif;
    padding: 5px;
    width: 100px;
    align-self: center;
}

.send-comments-article-detail-btn:hover {
    background: rgb(201 162 39 / 32%);
}

/********** base.html **********/
* {
    font-family: "VazirFont", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; /* ضروری برای flex */
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
}

.page-wrapper {
    min-height: 100vh; /* حداقل ارتفاع: تمام صفحه */
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1; /* این بخش فضای خالی را پر می‌کند */
    padding: 20px;
}


/* واکنش‌گرا */
@media (max-width: 1024px) {
    nav {
        display: none;
    }

    .hamburger {
        display: none;
    }

    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-inner {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }


}

@media (max-width: 768px) {
    nav {
        gap: 6px 8px;
    }

    .hamburger {
        display: block;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .brand-name {
        font-size: 20px;
    }

    .banner-title {
        font-size: 20px;
    }

    .main-content {
        padding: 10px;
    }

    .container {
        padding: 0 8px;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }


}

@media (max-width: 420px) {
    nav {
        display: none;
    }

    .hamburger {
        display: block
    }

    .brand-name {
        font-size: 18px;
    }

    .banner-inner {
        padding: 18px;
    }

    .post-thumb {
        height: 100px;
    }

    .main-content {
        padding: 5px;
    }

    .container {
        padding: 0 3px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .container-image-article-detail img {
        max-width: 90%;
    }
}


/* محدود کردن ارتفاع ویرایشگر */
.trumbowyg-editor-wrapper {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ظرف اصلی ویرایشگر */
.trumbowyg-editor-wrapper .trumbowyg-editor {
    min-height: 400px !important;
    max-height: 500px;
    height: auto !important;
    overflow-y: auto;
    padding: 10px;
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
}

/* جلوگیری از کشیده شدن بدون کنترل */
#editor {
    min-height: 400px !important;
    height: auto !important;}

.description-top-article{
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    justify-content: center;
}
.date-created-article,
.view-count-article{
    color: gray;
    font-size: 12px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 5px;
    box-shadow: 1px 1px 5px rgba(128, 128, 128, 0.45);
    padding:3px 5px;

}
