/* ============================================ */
/* استایل‌های عمومی */
/* ============================================ */
.tutorial-detail {
    padding: 2rem 0 4rem;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================ */
/* استایل Breadcrumb */
/* ============================================ */
.tutorial-breadcrumb {
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

    .tutorial-breadcrumb .container {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .tutorial-breadcrumb a {
        color: #0d6efd;
        text-decoration: none;
        font-size: 0.9rem;
    }

        .tutorial-breadcrumb a:hover {
            text-decoration: underline;
        }

    .tutorial-breadcrumb .separator {
        color: #6c757d;
        font-size: 0.9rem;
    }

    .tutorial-breadcrumb .current {
        color: #1a1a2e;
        font-weight: 600;
        font-size: 0.9rem;
    }

/* ============================================ */
/* استایل اصلی */
/* ============================================ */
.tutorial-detail-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.tutorial-main {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.tutorial-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================ */
/* استایل هدر آموزش */
/* ============================================ */
.tutorial-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.tutorial-title-main {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.tutorial-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .meta-item .badge {
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
    }

.badge-success {
    background: #28a745;
    color: #fff;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-danger {
    background: #dc3545;
    color: #fff;
}

.badge-secondary {
    background: #6c757d;
    color: #fff;
}

.badge-primary {
    background: #0d6efd;
    color: #fff;
}

.badge-info {
    background: #17a2b8;
    color: #fff;
}

/* ============================================ */
/* استایل ویدیو - اصلاح شده */
/* ============================================ */
.tutorial-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
    margin-bottom: 2rem;
}

    .tutorial-video-container iframe,
    .tutorial-video-container video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        border: none;
        border-radius: 12px;
        background: #000;
    }

.tutorial-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 12px;
    background: #000;
}

/* ============================================ */
/* استایل توضیحات */
/* ============================================ */
.tutorial-description-box {
    margin-bottom: 2rem;
}

.section-title-small {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .section-title-small i {
        color: #0d6efd;
    }

.description-content {
    color: #495057;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ============================================ */
/* استایل پیوست‌ها */
/* ============================================ */
.tutorial-attachments {
    margin-bottom: 2rem;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

    .attachment-item:hover {
        background: #e9ecef;
        text-decoration: none;
        color: #1a1a2e;
    }

    .attachment-item i {
        font-size: 1.2rem;
        color: #0d6efd;
    }

.attachment-name {
    flex: 1;
    font-size: 0.9rem;
}

.attachment-size {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ============================================ */
/* استایل برچسب‌ها */
/* ============================================ */
.tutorial-tags {
    margin-bottom: 2rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.3rem 0.8rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #495057;
    transition: all 0.3s;
}

    .tag-item:hover {
        background: #0d6efd;
        color: #fff;
    }

/* ============================================ */
/* استایل اشتراک‌گذاری */
/* ============================================ */
.tutorial-share {
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

    .share-btn i {
        font-size: 1rem;
    }

    .share-btn.whatsapp {
        background: #25d366;
        color: #fff;
    }

        .share-btn.whatsapp:hover {
            background: #1da851;
            color: #fff;
            text-decoration: none;
        }

    .share-btn.telegram {
        background: #0088cc;
        color: #fff;
    }

        .share-btn.telegram:hover {
            background: #006699;
            color: #fff;
            text-decoration: none;
        }

    .share-btn.email {
        background: #6c757d;
        color: #fff;
    }

        .share-btn.email:hover {
            background: #5a6268;
            color: #fff;
            text-decoration: none;
        }

    .share-btn.copy {
        background: #1a1a2e;
        color: #fff;
    }

        .share-btn.copy:hover {
            background: #2d2d4a;
            color: #fff;
            text-decoration: none;
        }

/* ============================================ */
/* استایل سایدبار */
/* ============================================ */
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.sidebar-card-header {
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

    .sidebar-card-header i {
        color: #0d6efd;
    }

.sidebar-card-body {
    padding: 1.25rem;
}

.category-name {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.9rem;
}

    .category-link:hover {
        text-decoration: underline;
    }

    .category-link i {
        font-size: 0.8rem;
        transition: transform 0.3s;
    }

    .category-link:hover i {
        transform: translateX(-4px);
    }

/* استایل آمار */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

    .stat-item:last-child {
        border-bottom: none;
    }

.stat-label {
    color: #6c757d;
}

.stat-value {
    color: #1a1a2e;
    font-weight: 500;
}

/* ============================================ */
/* استایل محصول مرتبط در سایدبار */
/* ============================================ */
.related-product {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-product-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

    .related-product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

        .related-product-image img:hover {
            transform: scale(1.05);
        }

.related-product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

    .related-product-title a {
        color: #1a1a2e;
        text-decoration: none;
        transition: color 0.3s;
    }

        .related-product-title a:hover {
            color: #0d6efd;
            text-decoration: underline;
        }

.related-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #0d6efd;
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    width: fit-content;
}

    .related-product-btn:hover {
        background: #0a58ca;
        color: #fff;
        text-decoration: none;
        gap: 0.75rem;
    }

    .related-product-btn i {
        font-size: 0.75rem;
        transition: transform 0.3s;
    }

    .related-product-btn:hover i {
        transform: translateX(-4px);
    }

/* ============================================ */
/* استایل آموزش‌های مشابه */
/* ============================================ */
.related-tutorials {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.section-title.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .section-title.related-title i {
        color: #0d6efd;
    }

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

    .related-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    }

.related-image {
    height: 160px;
    overflow: hidden;
    background: #f0f0f0;
}

    .related-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 1rem;
}

.related-category {
    font-size: 0.75rem;
    color: #6c757d;
}

.related-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.5rem 0;
    line-height: 1.3;
}

    .related-title a {
        color: #1a1a2e;
        text-decoration: none;
    }

        .related-title a:hover {
            color: #0d6efd;
        }

.related-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

    .related-meta span {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

/* ============================================ */
/* استایل‌های ریسپانسیو */
/* ============================================ */
@media (max-width: 992px) {
    .tutorial-detail-wrapper {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tutorial-detail {
        padding: 1rem 0 2rem;
    }

    .tutorial-main {
        padding: 1rem;
    }

    .tutorial-title-main {
        font-size: 1.5rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-meta-top {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }
}
