﻿
.blog-hero {
    background:
        radial-gradient(circle at top right, rgba(30, 64, 175, 0.14), transparent 28%),
        linear-gradient(135deg, #eef4ff 0%, #f8fbff 55%, #fff7ed 100%);
    padding: 48px 0;
    border-bottom: 1px solid var(--border-light);
}

.blog-hero-inner {
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 24px;
    align-items: center;
}

.blog-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(30, 64, 175, .08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.blog-hero h1 {
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.25;
    margin-bottom: 14px;
}

.blog-hero p {
    max-width: 760px;
    color: var(--text-muted);
    line-height: 1.9;
}

.blog-search {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(191, 219, 254, .8);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow-lg);
}

.blog-search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    margin-bottom: 12px;
}

.blog-search button {
    width: 100%;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    font-weight: 700;
    padding: 13px 16px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 40px 0;
}

.home-blog-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
    gap: 24px;
    align-items: stretch;
}

.home-blog-hero-copy {
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(191, 219, 254, .9);
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.home-blog-hero-copy h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.35;
    margin-bottom: 14px;
}

.home-blog-hero-copy p {
    color: var(--text-muted);
    line-height: 2;
    margin-bottom: 22px;
}

.home-blog-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.home-blog-stat {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 16px;
}

.home-blog-stat strong {
    display: block;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 6px;
}

.home-blog-stat span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
}

.home-blog-search-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
    border: 1px solid rgba(191, 219, 254, .85);
    border-radius: 30px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.home-blog-search-head h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.home-blog-search-head p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 18px;
}

.home-blog-archive-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
}

.home-blog-feature-wrap {
    padding-top: 34px;
}

.home-blog-featured-post {
    margin-bottom: 0;
}

.home-blog-section {
    padding: 34px 0 8px;
}

.home-blog-leads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.home-blog-lead-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 26px;
    overflow: hidden;
    transition: var(--transition);
}

.home-blog-lead-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.home-blog-lead-image {
    min-height: 100%;
    background: var(--card-bg);
}

.home-blog-lead-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-blog-lead-body {
    padding: 22px;
}

.home-blog-lead-body h3 {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.home-blog-lead-body h3 a {
    color: var(--text);
}

.home-blog-lead-body h3 a:hover {
    color: var(--primary);
}

.home-blog-lead-body p {
    color: var(--text-muted);
    line-height: 1.95;
    margin-bottom: 18px;
}

.home-blog-layout {
    padding-top: 18px;
}

.home-blog-highlight-widget {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.home-blog-cta-widget {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    border: none;
    color: #fff;
}

.home-blog-cta-widget h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
}

.home-blog-cta-widget p {
    color: rgba(255,255,255,.82);
    line-height: 1.9;
    margin-bottom: 16px;
    font-size: 13px;
}

/* Featured Post */
.featured-post {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    margin-bottom: 30px;
    transition: var(--transition);
}

    .featured-post:hover {
        box-shadow: var(--shadow-xl);
        border-color: var(--primary-light);
    }

.featured-post-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--card-bg);
}

    .featured-post-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s;
    }

.featured-post:hover .featured-post-image img {
    transform: scale(1.05);
}

.featured-post-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--action);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
    width: fit-content;
}

.featured-post-content h2 {
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.5;
}

    .featured-post-content h2 a {
        color: var(--text);
    }

        .featured-post-content h2 a:hover {
            color: var(--primary);
        }

.post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-excerpt {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
    font-size: 14px;
}

.read-more {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    width: fit-content;
}

    .read-more:hover {
        gap: 10px;
    }

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.blog-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

    .blog-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }

.blog-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--card-bg);
    position: relative;
}

    .blog-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s;
    }

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-category {
    position: absolute;
    top: 14px;
    right: 14px;
    background: white;
    color: var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.blog-card-content {
    padding: 20px;
}

    .blog-card-content h3 {
        font-size: 17px;
        margin-bottom: 10px;
        line-height: 1.5;
        min-height: 50px;
    }

        .blog-card-content h3 a {
            color: var(--text);
        }

            .blog-card-content h3 a:hover {
                color: var(--primary);
            }

    .blog-card-content .post-excerpt {
        font-size: 13px;
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.blog-card-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.blog-card-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

/* Blog Sidebar */
.blog-sidebar {
    position: sticky;
    top: 160px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.sidebar-widget {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.sidebar-widget-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .sidebar-widget-title i {
        color: var(--primary);
    }

/* Search Widget */
.sidebar-search {
    position: relative;
}

    .sidebar-search input {
        width: 100%;
        padding: 10px 14px 10px 40px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        font-size: 13px;
    }

        .sidebar-search input:focus {
            outline: none;
            border-color: var(--primary);
        }

    .sidebar-search button {
        position: absolute;
        left: 6px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        border-radius: var(--radius-sm);
        background: var(--primary);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Categories */
.sidebar-categories li {
    margin-bottom: 6px;
}

.sidebar-categories li span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

    .sidebar-categories a:hover {
        background: var(--primary-bg);
        color: var(--primary);
    }

    .sidebar-categories a span {
        background: var(--card-bg);
        padding: 2px 8px;
        border-radius: var(--radius-full);
        font-size: 11px;
        color: var(--text-muted);
    }

/* Recent Posts */
.recent-post {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

    .recent-post:last-child {
        border-bottom: none;
    }

.recent-post-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--card-bg);
}

    .recent-post-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.recent-post-content h4 {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
}

    .recent-post-content h4 a {
        color: var(--text);
    }

        .recent-post-content h4 a:hover {
            color: var(--primary);
        }

.recent-post-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* Tags */
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-tag {
    padding: 6px 12px;
    background: var(--card-bg);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text);
    transition: var(--transition);
}

    .sidebar-tag:hover {
        background: var(--primary);
        color: white;
    }

.blog-empty {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 48px 24px;
    text-align: center;
}

.blog-empty i {
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 14px;
}

.blog-empty p {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
}

.pagination a.active,
.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.blog-article {
    padding: 40px 0 24px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
}

.article-main {
    min-width: 0;
}

.article-header {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 22px;
}

.article-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.35;
    margin-bottom: 16px;
}

.article-summary {
    color: var(--text-muted);
    line-height: 1.95;
    font-size: 15px;
}

.article-cover {
    margin-bottom: 22px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--border-light);
}

.article-cover img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.article-content {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 28px;
    padding: 32px;
    line-height: 2.1;
    font-size: 15px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin: 1.6em 0 .8em;
    line-height: 1.5;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
    margin-bottom: 1.1em;
}

.article-content img {
    max-width: 100%;
    border-radius: 18px;
}

.related-articles {
    padding: 16px 0 56px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 22px;
}

.section-title {
    font-size: 28px;
    line-height: 1.4;
}

@media (max-width: 991px) {
    .home-blog-hero,
    .home-blog-leads,
    .home-blog-lead-card,
    .blog-hero-inner,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .home-blog-stats {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero {
        padding: 36px 0;
    }

    .featured-post-content {
        padding: 20px;
    }

        .featured-post-content h2 {
            font-size: 18px;
        }

    .article-header,
    .article-content {
        padding: 22px;
        border-radius: 22px;
    }
}

/* ─── محصولات مرتبط داخل مقاله ─── */
.article-product-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 28px 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-bg, #EFF6FF), #DBEAFE);
    border: 1px solid var(--primary-light, #3B82F6);
    border-radius: var(--radius-lg, 14px);
}

.article-product-cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-product-cta-text strong {
    color: var(--primary, #1E40AF);
    font-size: 13px;
}

.article-product-cta-text span {
    font-weight: 700;
    font-size: 15px;
}

.article-products {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 2px solid var(--border-light, #E5E7EB);
}

.article-products h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.article-products h2 i {
    color: var(--primary, #1E40AF);
    margin-left: 6px;
}

.article-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.article-product-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border-light, #E5E7EB);
    border-radius: var(--radius-lg, 14px);
    overflow: hidden;
    transition: all .25s ease;
}

.article-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
    border-color: var(--primary-light, #3B82F6);
}

.article-product-image {
    aspect-ratio: 4/3;
    background: var(--card-bg, #F8FAFC);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748B);
    font-size: 34px;
    overflow: hidden;
}

.article-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-product-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.article-product-info h3 {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.article-product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.article-product-footer .badge-type {
    font-size: 11px;
    background: var(--card-bg, #F8FAFC);
    border: 1px solid var(--border-light, #E5E7EB);
    border-radius: 8px;
    padding: 3px 8px;
    color: var(--text-muted, #64748B);
}

.article-product-price {
    color: var(--primary, #1E40AF);
    font-size: 14px;
}

.article-products-more {
    margin-top: 18px;
    text-align: center;
}

@media (max-width: 767px) {
    .article-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-product-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .article-products-grid {
        grid-template-columns: 1fr;
    }
}
