﻿@font-face {
    font-family: 'IRANSans';
    src: url('/fonts/iran-sans/IRANSansWebFaNum.woff2') format('woff2'), url('/fonts/iran-sans/IRANSansWebFaNum.woff') format('woff');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/fonts/iran-sans/IRANSansWebFaNum.woff2') format('woff2'), url('/fonts/iran-sans/IRANSansWebFaNum.woff') format('woff');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/fonts/iran-sans/IRANSansWebFaNum.woff2') format('woff2'), url('/fonts/iran-sans/IRANSansWebFaNum.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/fonts/iran-sans/IRANSansWebFaNum.woff2') format('woff2'), url('/fonts/iran-sans/IRANSansWebFaNum.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/fonts/iran-sans/IRANSansWebFaNum.woff2') format('woff2'), url('/fonts/iran-sans/IRANSansWebFaNum.woff') format('woff');
    font-weight: bold;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/fonts/iran-sans/IRANSansWebFaNum.woff2') format('woff2'), url('/fonts/iran-sans/IRANSansWebFaNum.woff') format('woff');
    font-weight: 900;
    font-display: swap;
}




html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    padding: 0 0 60px; /* فضای فوتر */
    font-family: 'IRANSans', 'Vazirmatn', Tahoma, Arial, sans-serif !important;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* =========================================
   فرم‌ها و دکمه‌ها
   ========================================= */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
    outline: none;
    font-family: 'IRANSans', 'Vazirmatn', Tahoma, sans-serif !important;
}

.form-check-label {
    cursor: pointer;
}

/* =========================================
   Navbar
   ========================================= */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* =========================================
   Alerts
   ========================================= */
.alert {
    border-radius: 0.5rem;
}

/* =========================================
   CKEditor
   ========================================= */
.ck-editor__editable {
    min-height: 500px !important;
    max-height: none;
    overflow-y: auto;
    padding: 0.8rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.6;
    font-family: 'IRANSans', 'Vazirmatn', sans-serif !important;
}

/* =========================================
   Slug
   ========================================= */
#slug-preview {
    font-weight: bold;
    color: #0d6efd;
}

/* =========================================
   تصاویر
   ========================================= */
img.img-fluid.rounded {
    max-height: 200px;
    height: auto;
}

/* =========================================
   کارت‌ها
   ========================================= */
.card {
    display: flex;
    flex-direction: column;
    height: 100%; /* برای هم‌ارتفاع شدن */
}

.card-img-top {
    height: 220px;
    object-fit: cover;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 52px;
    line-height: 1.7;
    color: #555;
}

.card-body {
    display: flex;
    flex-direction: column;
}

    .card-body .mt-auto {
        margin-top: auto !important;
    }

/* =========================================
   مقاله جزئیات
   ========================================= */
/*.article-container {
    padding: 40px 0;
}*/

.article-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.article-date {
    color: #777;
    display: block;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/*.article-header-image {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
}*/

.article-content {
    line-height: 1.9;
    font-size: 1.1rem;
    color: #333;
}

/* موبایل */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.6rem;
    }

    .article-content {
        font-size: 1rem;
    }
}

/* =========================================
   Footer
   ========================================= */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* =========================================
   Container عمومی برای جلوگیری از سفید شدن صفحه
   ========================================= */
main.container {
    min-height: calc(100vh - 60px - 80px); /* 60px padding-bottom body + 80px footer */
}
