@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f4f7f6;
    direction: rtl;
    text-align: right;
}

.bg-primary-custom {
    background-color: #1F4B43 !important;
}

.navbar-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.brand-text {
    line-height: 35px;
    vertical-align: middle;
}

.text-primary-custom {
    color: #1F4B43 !important;
}

.bg-gold {
    background-color: #C69C4E !important;
    color: white !important;
}

.btn-gold {
    background-color: #C69C4E;
    color: white;
    border: none;
}

.btn-gold:hover {
    background-color: #a37f3d;
    color: white;
}

.btn-primary-custom {
    background-color: #1F4B43;
    color: white;
    border: none;
}

.btn-primary-custom:hover {
    background-color: #163630;
    color: white;
}

.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #fff;
    border-left: 1px solid #e0e0e0;
    z-index: 100;
}

.nav-link-custom {
    padding: 12px 20px;
    color: #555;
    display: block;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 8px;
    margin-bottom: 5px;
}

.nav-link-custom:hover, .nav-link-custom.active {
    background-color: #1F4B43;
    color: #fff;
}

/* Chat Styles */
.chat-container {
    height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
}

.message-card {
    margin-bottom: 20px;
    max-width: 85%;
}

.message-card.user {
    margin-right: auto;
}

.message-card.ai {
    margin-left: auto;
}

.message-content {
    padding: 15px;
    border-radius: 15px;
}

.user .message-content {
    background-color: #1F4B43;
    color: white;
    border-top-left-radius: 0;
}

.ai .message-content {
    background-color: #f0f2f5;
    color: #333;
    border-top-right-radius: 0;
    border: 1px solid #e0e0e0;
}

/* Blog Styles */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-content h1, .blog-content h2, .blog-content h3 {
    color: #1F4B43;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.blog-content ul, .blog-content ol {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.blog-content blockquote {
    border-right: 4px solid #C69C4E;
    padding-right: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

.blog-content code {
    background-color: #f0f2f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.blog-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Pagination */
.page-link {
    color: #1F4B43;
    border-radius: 8px;
    margin: 0 2px;
}

.page-item.active .page-link {
    background-color: #1F4B43;
    border-color: #1F4B43;
}

.page-link:hover {
    background-color: #C69C4E;
    border-color: #C69C4E;
}

/* Like Button Animation */
.like-btn {
    transition: all 0.3s;
}

.like-btn:hover {
    transform: scale(1.1);
}

/* Category Badge */
.badge.bg-primary-custom {
    background-color: #1F4B43 !important;
}

/* ─── Card & Button Transitions ─────────────────────────────────────────── */
.card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.10) !important;
}

/* Buttons */
.btn {
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.bg-gold {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.bg-gold:hover {
    background-color: #a37f3d !important;
    box-shadow: 0 6px 18px rgba(198,156,78,0.35) !important;
}

/* Nav links */
.nav-link {
    transition: color 0.2s ease;
    position: relative;
}

.navbar-dark .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: #C69C4E;
    transition: width 0.25s ease;
}

.navbar-dark .nav-link:hover::after {
    width: 100%;
}

/* List group items */
.list-group-item-action {
    transition: background-color 0.2s ease, color 0.2s ease, padding-right 0.2s ease;
}

.list-group-item-action:hover {
    padding-right: 1.25rem !important;
}

/* ─── Skeleton Loader ────────────────────────────────────────────────────── */
@keyframes skeleton-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.skeleton {
    border-radius: 6px;
    background: linear-gradient(90deg, #e8edf0 25%, #d0d8de 50%, #e8edf0 75%);
    background-size: 600px 100%;
    animation: skeleton-shimmer 1.4s infinite linear;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.wide  { width: 85%; }
.skeleton-text.mid   { width: 65%; }
.skeleton-text.short { width: 40%; }

.skeleton-bubble {
    border-radius: 12px;
    padding: 16px;
}

/* ─── Hero Section ───────────────────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #f0f7f5 0%, #ffffff 60%, #fdf8ef 100%);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31,75,67,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(198,156,78,0.07) 0%, transparent 70%);
    pointer-events: none;
}

/* ─── Blog Cards ─────────────────────────────────────────────────────────── */
.blog-card-img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .blog-card-img {
    transform: scale(1.04);
}

.blog-card-img-wrap {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.blog-placeholder-img {
    height: 200px;
    background: linear-gradient(135deg, #e8f0ee 0%, #d4e4e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* Featured post */
.blog-featured-card .blog-card-img {
    height: 340px;
}

/* Reading time badge */
.reading-time {
    font-size: 0.75rem;
    color: #888;
}

/* ─── Stats Bar ──────────────────────────────────────────────────────────── */
.stats-bar {
    background: linear-gradient(90deg, #1F4B43 0%, #2a6257 100%);
}

.stats-bar .stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

/* ─── How It Works Steps ─────────────────────────────────────────────────── */
.step-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1F4B43, #2a6257);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 14px rgba(31,75,67,0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-circle:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 20px rgba(31,75,67,0.35);
}
