﻿/* ==================================================
   product-hero
   ================================================== */
.product-hero {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    padding: 100px 0 60px;
    color: #212529;
}

    .product-hero h1,
    .product-hero .lead {
        color: #212529;
    }

    .product-hero .btn-outline-dark {
        color: #212529;
        border-color: #6c757d;
    }

        .product-hero .btn-outline-dark:hover {
            background-color: #6c757d;
            color: #fff;
        }

/* ==================================================
   product-content
   ================================================== */
.product-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    color: #0a4b6e;
    border-right: 4px solid #BE0626;
    padding-right: 15px;
}

.product-content ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

    .product-content ul li {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 20px 20px 20px 25px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
        direction: rtl;
        text-align: justify;
    }

        .product-content ul li::before {
            content: "";
            position: absolute;
            right: 0;
            top: 20px;
            bottom: 20px;
            width: 4px;
            background: #F2B6B6;
            border-radius: 0 4px 4px 0;
        }

        .product-content ul li:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        }

    /* ==================================================
   Reset for table-of-contents list
   ================================================== */
    .product-content ul.toc-list {
        display: block;
        grid-template-columns: none;
        list-style: disc;
        padding-right: 20px;
        margin: 1rem 0;
        gap: 0;
    }

        .product-content ul.toc-list li {
            background: none;
            border-radius: 0;
            padding: 5px 0;
            box-shadow: none;
            position: static;
            transition: none;
            text-align: right;
        }

            .product-content ul.toc-list li::before {
                content: none;
            }

            .product-content ul.toc-list li:hover {
                transform: none;
                box-shadow: none;
            }

.product-content figure {
    margin: 2rem auto;
    max-width: 80%;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

    .product-content figure img {
        display: block;
        width: 100%;
    }

.product-content figcaption {
    font-size: 0.9em;
    color: #666;
    padding: 10px;
}

.product-content p {
    line-height: 1.9;
    text-align: justify;
}

.product-content li,
.product-hero .lead {
    text-align: justify;
}

/* ==================================================
   CTA Section
   ================================================== */
.cta-section {
    background: #f0f4f8;
    border-radius: 20px;
}

/* ==================================================
   Buttons
   ================================================== */
.btn-anar {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.5rem 1.5rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 50rem;
    border: 2px solid transparent;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-anar-primary {
    background-color: #BE0626;
    color: #fff;
    border-color: #BE0626;
}

    .btn-anar-primary:hover {
        background-color: #9a041e;
        border-color: #9a041e;
        color: #fff;
    }

.btn-anar-outline-dark {
    color: #212529;
    border-color: #6c757d;
    background-color: transparent;
}

    .btn-anar-outline-dark:hover {
        background-color: #6c757d;
        color: #fff;
    }

.btn-anar-blue {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

    .btn-anar-blue:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
        color: #fff;
    }

.btn-anar-lg {
    padding: 0.5rem 2rem;
    font-size: 1.25rem;
}

.btn-download {
    display: inline-block;
    background: #BE0626;
    color: #fff;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

    .btn-download:hover {
        background: #9a041e;
        color: #fff;
    }

/* ==================================================
   General Content
   ================================================== */
.content-general {
    padding-top: 100px;
    padding-bottom: 60px;
    background: #f9fafb;
}

/* ==================================================
   Content Card
   ================================================== */
.content-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    padding: 25px;
    margin-bottom: 30px;
}

    .content-card h1 {
        font-size: 20px !important;
        font-weight: 700;
        color: #0a4b6e;
        border-right: 5px solid #BE0626;
        padding-right: 15px;
        margin-bottom: 25px;
        line-height: 1.4;
    }

.content-summary-box {
    background: #fdf2f2;
    border-right: 4px solid #BE0626;
    padding: 20px 25px;
    border-radius: 12px;
    font-style: italic;
    color: #333;
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.content-card img,
.content-card video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin: 20px 0;
}

/* ==================================================
   Post Text (محتوای اصلی مقاله)
   ================================================== */
.content-card .post-text {
    font-size: 14px;
    line-height: 2.2;
    text-align: justify;
    color: #222;
}

    /* تیترهای داخلی */
    .content-card .post-text h2 {
        text-align: right !important;
        font-size: 1.4rem;
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
        color: #0a4b6e;
        border-right: 4px solid #BE0626;
        padding-right: 12px;
    }

    .content-card .post-text h3 {
        text-align: right !important;
        font-size: 1.2rem;
        margin-top: 1.4rem;
        margin-bottom: 0.4rem;
        line-height: 1.5;
        color: #0a4b6e;
        border-right: 4px solid #f2b6b6;
        padding-right: 12px;
    }

    .content-card .post-text h4 {
        text-align: right !important;
        font-size: 1.05rem;
        margin-top: 1.2rem;
        margin-bottom: 0.3rem;
        line-height: 1.5;
        color: #0a4b6e;
        border-right: 1px solid #f2b6b6;
        padding-right: 12px;
    }

    /* حذف تگ خالی strong */
    .content-card .post-text p > strong:only-child:empty {
        display: none;
    }

    /* ==================================================
   Table Styles (جداول داخل مقاله)
   ================================================== */
    .content-card .post-text table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        margin: 20px 0;
        font-size: 0.95rem;
        background: #fff;
        border: none;
        border-radius: 2px;
        box-shadow: 0 0 0 2px #f2b6b6, 0 4px 12px rgba(0,0,0,0.03);
    }

    .content-card .post-text thead th {
        text-align: center;
        background: #f2b6b6;
        color: #000;
        font-weight: 600;
        padding: 12px 15px;
        border: 1px solid #f2b6b6;
        transition: all 0.2s ease;
    }

    .content-card .post-text tbody th {
        text-align: right;
        background: #f2b6b6;
        color: #000;
        font-weight: 600;
        padding: 12px 15px;
        border: 1px solid #f2b6b6;
        transition: all 0.2s ease;
    }

    .content-card .post-text th:hover {
        background: #BE0626;
        color: #fff;
    }

    .content-card .post-text td {
        padding: 10px 15px;
        border: 1px solid #f2b6b6;
        text-align: right;
        color: #333;
    }

    .content-card .post-text tbody tr:nth-child(odd) {
        background: #ffffff;
    }

    .content-card .post-text tbody tr:nth-child(even) {
        background: #f5f5f5;
    }

/* ==================================================
   Sidebar (ستون کناری)
   ================================================== */
.sidebar-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    padding: 20px;
    position: sticky;
    top: 120px;
}

    .sidebar-card h4 {
        font-size: 1.1rem;
        font-weight: 700;
        color: #0a4b6e;
        margin-bottom: 15px;
        position: relative;
    }

        .sidebar-card h4::after {
            content: '';
            display: block;
            width: 50px;
            height: 4px;
            background: #BE0626;
            margin-top: 10px;
            border-radius: 2px;
        }

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sidebar-list li {
        padding: 12px 0;
        border-bottom: 1px solid #eee;
        transition: all 0.2s;
    }

        .sidebar-list li:last-child {
            border-bottom: none;
        }

        .sidebar-list li:hover {
            background: #f8f9fa;
            padding-right: 8px;
            border-radius: 8px;
            padding-left: 8px;
        }

    .sidebar-list .date {
        display: block;
        font-size: 0.65rem;
        color: #999;
        margin-bottom: 4px;
        font-weight: 500;
    }

    .sidebar-list a {
        color: #333;
        font-weight: 600;
        font-size: 0.8rem;
        line-height: 1.9;
        text-decoration: none;
        transition: color 0.2s;
    }

        .sidebar-list a:hover {
            color: #BE0626;
        }

/* ==================================================
   Publish Date
   ================================================== */
.content-publish-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 3px solid #BE0626;
}

    .content-publish-date .date-icon {
        font-size: 1.2rem;
    }

    .content-publish-date .date-text {
        font-size: 0.95rem;
        color: #6c757d;
        font-weight: 500;
    }

/* ==================================================
   Container
   ================================================== */
.container {
    max-width: 1300px;
}

/* ==================================================
   Mobile Styles
   ================================================== */
@media (max-width: 767.98px) {
    .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .content-card {
        padding: 15px;
    }

        .content-card h1 {
            line-height: 1.35;
            margin-bottom: 15px;
        }

        .content-card .post-text {
            font-size: 13px;
            line-height: 2.1;
        }

            .content-card .post-text h2 {
                font-size: 1.25rem;
            }

            .content-card .post-text h3 {
                font-size: 1.1rem;
            }

    .sidebar-card {
        padding: 15px;
    }

    .sidebar-list a {
        font-size: 0.75rem;
    }

    .content-card .post-text table {
        font-size: 0.85rem;
    }
}
