/**
 * 产品教程页面样式
 * Product Tutorials Page Styles
 *
 * 包含：
 * - 教程列表页样式（顶部导航 + 卡片网格）
 * - 教程详情页样式
 * - 响应式设计
 *
 * 使用 root.css 中定义的自定义属性保证项目样式统一
 */

/* ============================================
   教程列表页样式 - 新布局
   ============================================ */

/* 页面容器 */
.tutorials-page-wrapper {
    /* 教程列表页基础容器直接使用 V2 页面层级，不再借旧变量兜底。 */
    background: linear-gradient(to bottom, var(--v2-bg-functional) 0%, var(--v2-bg-primary) 100%);
    padding: 40px 0;
    min-height: 60vh;
}

/* ====== 顶部导航筛选栏 ====== */
.tutorials-nav-filters {
    background: var(--v2-bg-primary);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 搜索框容器 */
.tutorials-search-wrapper {
    margin-bottom: 30px;
}

.tutorials-search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.tutorials-search-box input {
    width: 100%;
    padding: 16px 60px 16px 24px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--v2-bg-content);
    color: var(--v2-text-body);
}

.tutorials-search-box input:focus {
    outline: none;
    border-color: var(--v2-primary-500);
    background: var(--v2-bg-primary);
    box-shadow: 0 0 0 4px rgba(var(--v2-primary-500-rgb), 0.1);
}

.tutorials-search-box input::placeholder {
    color: var(--v2-text-secondary);
}

.tutorials-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--v2-primary-500);
    color: var(--v2-text-inverse);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorials-search-btn:hover {
    background: var(--v2-primary-600);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(var(--v2-primary-500-rgb), 0.3);
}

.tutorials-search-btn i {
    font-size: 16px;
}

/* 分类导航 */
.tutorials-nav-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tutorials-nav-category {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--v2-bg-content);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--v2-text-body);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--thm-font, 'Poppins', sans-serif);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 图标样式 - Font Awesome 图标（All Tutorials） */
.tutorials-nav-category i {
    color: var(--v2-primary-500);
    font-size: 16px;
}

/* 图片图标样式 - 产品分类图片 */
.tutorials-nav-category img {
    height: 32px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 48px;
}

.tutorials-nav-category:hover {
    background: rgba(var(--v2-primary-500-rgb), 0.08);
    border-color: rgba(var(--v2-primary-500-rgb), 0.2);
    transform: translateY(-2px);
}

.tutorials-nav-category:hover img {
    transform: scale(1.1);
}

.tutorials-nav-category.active {
    background: var(--v2-primary-500);
    border-color: var(--v2-primary-500);
    color: var(--v2-text-inverse);
}

.tutorials-nav-category.active i {
    color: var(--v2-text-inverse);
}

.tutorials-nav-category.active img {
    transform: scale(1.05);
}

/* 筛选和排序栏 */
.tutorials-filter-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.tutorials-filters-group {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.tutorials-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-text-body);
    text-transform: none;
    letter-spacing: 0.5px;
    margin-right: 12px;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

/* 难度筛选 */
.tutorials-difficulty-filter,
.tutorials-type-filter {
    display: flex;
    align-items: center;
}

.tutorials-difficulty-options {
    display: flex;
    gap: 8px;
}

.difficulty-option {
    padding: 8px 16px;
    background: var(--v2-bg-content);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--v2-text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.difficulty-option:hover {
    background: rgba(var(--v2-primary-500-rgb), 0.08);
    border-color: rgba(var(--v2-primary-500-rgb), 0.2);
    color: var(--v2-primary-500);
}

.difficulty-option.active {
    background: var(--v2-primary-500);
    border-color: var(--v2-primary-500);
    color: var(--v2-text-inverse);
}

/* 类型筛选 */
.tutorials-type-options {
    display: flex;
    gap: 8px;
}

.type-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--thm-fb, #f6f6f6);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--thm-gray, #8e8e8e);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.type-option i {
    font-size: 14px;
}

.type-option:hover {
    background: rgba(58, 151, 255, 0.08);
    border-color: rgba(58, 151, 255, 0.2);
    color: var(--thm-color, #3A97FF);
}

.type-option.active {
    background: var(--thm-color, #3A97FF);
    border-color: var(--thm-color, #3A97FF);
    color: var(--color-white, #fff);
}

/* 排序组 */
.tutorials-sort-group {
    display: flex;
    align-items: center;
}

.tutorials-sort-select {
    padding: 8px 16px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-size: 14px;
    background: var(--thm-fb, #f6f6f6);
    color: var(--thm-p, #0b2336);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.tutorials-sort-select:focus {
    outline: none;
    border-color: var(--thm-color, #3A97FF);
    background: var(--color-white, #fff);
}

/* 结果统计 */
.tutorials-results-count {
    margin-bottom: 25px;
    font-size: 15px;
    color: var(--thm-gray, #8e8e8e);
    font-weight: 500;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.tutorials-results-count span {
    color: var(--thm-color, #3A97FF);
    font-weight: 700;
    font-size: 18px;
}

.tutorials-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--thm-gray, #8e8e8e);
    font-size: 16px;
}

.tutorials-loading i {
    display: block;
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--thm-color, #3A97FF);
}

/* Bootstrap 栅格间距调整 - 确保每行卡片等高 */
#tutorialsGrid {
    display: flex;
    flex-wrap: wrap;
}

#tutorialsGrid > div {
    margin-bottom: 24px;
    display: flex;
}

/* 空状态样式优化 */
.no-tutorials {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--thm-fb, #f8f9fa) 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
}

.no-tutorials i {
    font-size: 64px;
    color: var(--thm-color, #3A97FF);
    margin-bottom: 24px;
    opacity: 0.6;
}

.no-tutorials h3 {
    font-size: 24px;
    color: var(--thm-p, #0b2336);
    margin-bottom: 12px;
    font-weight: 600;
}

.no-tutorials p {
    font-size: 16px;
    color: var(--thm-gray, #8e8e8e);
    margin-bottom: 32px;
    font-weight: 400;
}

.no-tutorials-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.no-tutorials .btn {
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.no-tutorials .btn i {
    margin-right: 8px;
}

/* ====== 教程卡片 ====== */
.tutorial-card {
    background: var(--thm-fb, #f8f9fa);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.tutorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    border-color: var(--thm-color, #3A97FF);
    background: var(--color-white, #ffffff);
}

/* 卡片图片区 - 上图 */
.tutorial-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--thm-fb, #f6f6f6) 0%, var(--thm-f3, #f3f3f3) 100%);
    flex-shrink: 0;
}

/* 图片骨架屏加载动画 */
.tutorial-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        var(--thm-fb, #f6f6f6) 0%,
        var(--thm-f3, #f3f3f3) 50%,
        var(--thm-fb, #f6f6f6) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    z-index: 1;
}

.tutorial-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    opacity: 0;
}

/* 图片加载完成后显示 */
.tutorial-card-image img.loaded {
    opacity: 1;
}

/* 图片加载后隐藏骨架屏 */
.tutorial-card-image img.loaded ~ ::before {
    display: none;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.tutorial-card:hover .tutorial-card-image img {
    transform: scale(1.08);
}

/* 类型徽章 */
.tutorial-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(8px);
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.tutorial-type-badge.article {
    background: rgba(58, 151, 255, 0.92);
    color: var(--color-white, #fff);
}

.tutorial-type-badge.video {
    background: rgba(255, 59, 48, 0.92);
    color: var(--color-white, #fff);
}

/* 卡片内容区 - 下字 */
.tutorial-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* 卡片元数据 */
.tutorial-card-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tutorial-card-difficulty {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.5px;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.tutorial-card-difficulty.beginner {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.tutorial-card-difficulty.intermediate {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #f57c00;
}

.tutorial-card-difficulty.advanced {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

.tutorial-card-category {
    font-size: 12px;
    color: var(--thm-gray, #8e8e8e);
    font-weight: 500;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.tutorial-card-category i {
    margin-right: 5px;
    color: var(--thm-color, #3A97FF);
}

/* 卡片标题 */
.tutorial-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--thm-p, #0b2336);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.tutorial-card:hover .tutorial-card-title {
    color: var(--thm-color, #3A97FF);
}

/* 卡片摘要 */
.tutorial-card-excerpt {
    font-size: 14px;
    color: var(--thm-gray, #8e8e8e);
    line-height: 1.7;
    margin-bottom: 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

/* 卡片链接 - 包裹整个卡片 */
.tutorial-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.tutorial-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.tutorial-card-link:focus {
    outline: none;
}

.tutorial-card-link:focus .tutorial-card {
    box-shadow: 0 0 0 3px rgba(58, 151, 255, 0.3);
}

/* 卡片底部信息 */
.tutorial-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 12px;
    color: var(--thm-ase, #afb2bf);
}

.tutorial-card-footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tutorial-card-footer-item i {
    color: var(--thm-color, #3A97FF);
    font-size: 14px;
}

/* ====== 分页样式 ====== */
.tutorials-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 12px 20px;
    background: var(--color-white, #ffffff);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    color: var(--thm-p, #0b2336);
    text-decoration: none;
    font-weight: 500;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.pagination-btn:hover {
    background: var(--thm-color, #3A97FF);
    border-color: var(--thm-color, #3A97FF);
    color: var(--color-white, #fff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 151, 255, 0.3);
}

.pagination-btn.active {
    background: var(--thm-color, #3A97FF);
    border-color: var(--thm-color, #3A97FF);
    color: var(--color-white, #fff);
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover {
    background: var(--color-white, #ffffff);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--thm-p, #0b2336);
    transform: none;
    box-shadow: none;
}

/* ============================================
   教程详情页样式（保持原有功能）
   ============================================ */

/* 侧边栏样式 */
.tutorial-detail-sidebar {
    position: sticky;
    top: 130px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    min-height: 400px; /* 确保侧边栏有最小高度 */
    display: block !important; /* 强制显示 */
    visibility: visible !important;
}

.sidebar-widget {
    background: var(--thm-fb, #f8f9fa);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-widget-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--thm-p, #0b2336);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--thm-color, #3A97FF);
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

/* 目录导航样式 */
.tutorial-toc {
    max-height: 400px;
    overflow-y: auto;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
}

.toc-item.toc-h3 {
    padding-left: 20px;
}

.toc-link {
    display: block;
    padding: 10px 16px;
    color: var(--thm-p, #0b2336);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
    font-size: 15px;
    font-weight: 500;
}

.toc-link:hover {
    background: rgba(58, 151, 255, 0.1);
    color: var(--thm-color, #3A97FF);
    transform: translateX(4px);
}

/* 相关产品列表 */
.related-products-items,
.related-tutorials-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-product-item,
.related-tutorial-item {
    margin-bottom: 16px;
}

.related-product-item:last-child,
.related-tutorial-item:last-child {
    margin-bottom: 0;
}

.product-link,
.tutorial-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 12px;
    border-radius: 8px;
    background: var(--color-white, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.product-link:hover,
.tutorial-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--thm-color, #3A97FF);
}

.product-thumb,
.tutorial-thumb {
    position: relative;
    width: 80px;
    height: 100%;
    min-height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--thm-f3, #f3f3f3);
    /* 高度占满元素高度 */
    align-self: stretch;
}

.product-thumb img,
.tutorial-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info,
.tutorial-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-name,
.tutorial-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--thm-p, #0b2336);
    margin-bottom: 6px;
    font-family: var(--thm-font, 'Poppins', sans-serif);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    /* 确保标题字号不超过 22px */
    max-width: 100%;
}

/* 确保标题字号不超过 22px */
@media (min-width: 992px) {
    .product-name,
    .tutorial-title {
        /* 基础字号保持 13px，但确保在任何情况下不超过 22px */
        font-size: clamp(12px, 13px, 22px);
    }
}

/* 额外的保护措施，确保大屏下也不超过 22px */
@media (min-width: 1200px) {
    .tutorial-title {
        font-size: min(13px, 22px) !important;
    }
}

.product-model,
.tutorial-excerpt {
    font-size: 13px;
    color: var(--thm-gray, #8e8e8e);
    margin-bottom: 8px;
    line-height: 1.4;
}

.tutorial-date {
    font-size: 12px;
    color: var(--thm-ase, #afb2bf);
    display: flex;
    align-items: center;
    gap: 6px;
}

.products-loading,
.tutorials-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--thm-gray, #8e8e8e);
}

.products-loading i,
.tutorials-loading i {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--thm-color, #3A97FF);
}

.no-items {
    text-align: center;
    padding: 30px 20px;
    color: var(--thm-gray, #8e8e8e);
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 30px 20px;
    color: #ff0000;
    font-size: 14px;
}

.tutorial-detail-page {
    background: var(--color-white, #ffffff);
}

/* 教程元数据头部（在 banner 下方） */
.tutorial-meta-header {
    background: var(--color-white, #fff);
    padding: 30px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tutorial-meta-header .tutorial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.tutorial-meta-header .tutorial-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(58, 151, 255, 0.1);
    color: var(--thm-color, #3A97FF);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.tutorial-meta-header .tutorial-category i {
    font-size: 16px;
}

.tutorial-type-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.tutorial-type-badge-inline.video {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.tutorial-type-badge-inline.article {
    background: rgba(58, 151, 255, 0.1);
    color: var(--thm-color, #3A97FF);
}

.tutorial-meta-header .tutorial-read-time,
.tutorial-meta-header .tutorial-video-duration-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--thm-fb, #f8f9fa);
    color: var(--thm-gray, #8e8e8e);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.tutorial-meta-header .tutorial-excerpt {
    font-size: 16px;
    color: var(--thm-p, #0b2336);
    line-height: 1.7;
    margin: 0;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

/* 面包屑导航 */
.tutorial-breadcrumb {
    background: var(--thm-fb, #f6f6f6);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tutorial-breadcrumb .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.tutorial-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: '>';
    padding: 0 10px;
    color: var(--thm-gray, #8e8e8e);
}

.tutorial-breadcrumb .breadcrumb-item a {
    color: var(--thm-p, #0b2336);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.tutorial-breadcrumb .breadcrumb-item a:hover {
    color: var(--thm-color, #3A97FF);
}

.tutorial-breadcrumb .breadcrumb-item.active {
    color: var(--thm-gray, #8e8e8e);
}

/* 教程头部 */
.tutorial-header {
    padding: 50px 0 40px;
}

/* 视频教程页面头部优化（已移除，使用统一 banner） */

.tutorial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.tutorial-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--thm-fb, #f6f6f6);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.tutorial-meta span i {
    margin-right: 8px;
}

.tutorial-category {
    color: var(--thm-color, #3A97FF);
}

.tutorial-difficulty {
    color: var(--thm-p, #0b2336);
}

.tutorial-difficulty.beginner {
    background: #e8f5e9;
    color: #2e7d32;
}

.tutorial-difficulty.intermediate {
    background: #fff3e0;
    color: #f57c00;
}

.tutorial-difficulty.advanced {
    background: #ffebee;
    color: #c62828;
}

.tutorial-type {
    color: var(--thm-p, #0b2336);
}

.tutorial-read-time {
    color: var(--thm-p, #0b2336);
}

.tutorial-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--thm-black, #000);
    margin-bottom: 20px;
    line-height: 1.3;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.tutorial-excerpt {
    font-size: 18px;
    color: var(--thm-gray, #8e8e8e);
    line-height: 1.6;
    margin-bottom: 25px;
}

.tutorial-footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, 0.06);
}

.tutorial-footer-meta > div {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--thm-gray, #8e8e8e);
}

.tutorial-footer-meta > div i {
    margin-right: 8px;
    color: var(--thm-color, #3A97FF);
}

/* 教程特色图片 */
.tutorial-featured-image {
    padding: 30px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tutorial-featured-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* 视频播放器 */
.tutorial-video-player {
    margin-bottom: 30px;
    background: var(--color-black, #000);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-duration {
    background: rgba(0, 0, 0, 0.8);
    color: var(--color-white, #fff);
    padding: 10px 20px;
    font-size: 14px;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.video-duration i {
    margin-right: 8px;
    color: var(--thm-color, #3A97FF);
}

/* 教程内容区 */
.tutorial-content-section {
    padding: 50px 0;
}

/* 确保内容区的 row 使用 flex 布局 */
.tutorial-content-section .row {
    display: flex;
    flex-wrap: wrap;
}

.tutorial-content-section .row > div {
    display: flex;
    flex-direction: column;
}

/* 视频播放器包装器 */
.tutorial-video-player-wrapper {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 视频元数据栏 */
.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.video-duration {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(58, 151, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(58, 151, 255, 0.2);
}

.video-duration i {
    color: var(--thm-color, #3A97FF);
    font-size: 16px;
}

.btn-watch-youtube {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--thm-font, 'Poppins', sans-serif);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-watch-youtube:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, #e60000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.btn-watch-youtube:active {
    transform: translateY(0);
}

.btn-watch-youtube i {
    font-size: 20px;
}

/* 教程内容 */
.tutorial-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--thm-p, #0b2336);
}

.tutorial-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--thm-black, #000);
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.tutorial-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--thm-black, #000);
    margin: 30px 0 15px;
}

.tutorial-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--thm-black, #000);
    margin: 25px 0 12px;
}

.tutorial-content p {
    margin-bottom: 15px;
}

.tutorial-content ul,
.tutorial-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.tutorial-content li {
    margin-bottom: 10px;
}

.tutorial-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* ============================================
   教程标签样式
   ============================================ */

.tutorial-tags {
    margin-top: 40px;
    padding: 30px;
    background: var(--thm-fb, #f6f6f6);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.tutorial-tags h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--thm-p, #0b2336);
    margin-bottom: 20px;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tags-list .tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-white, #fff);
    color: var(--thm-color, #3A97FF);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(58, 151, 255, 0.2);
    transition: all 0.3s ease;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.tags-list .tag:hover {
    background: var(--thm-color, #3A97FF);
    color: var(--color-white, #fff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 151, 255, 0.3);
}

/* ============================================
   分享按钮样式
   ============================================ */

.tutorial-share {
    margin-top: 30px;
    padding: 30px;
    background: var(--thm-fb, #f6f6f6);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.tutorial-share h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--thm-p, #0b2336);
    margin-bottom: 20px;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: var(--color-white, #fff);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.share-btn.share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.share-btn.share-facebook:hover {
    background: linear-gradient(135deg, #1a85ff 0%, #0e6ee8 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

.share-btn.share-twitter {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-btn.share-twitter:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #4d4d4d 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.share-btn.share-linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.share-btn.share-linkedin:hover {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 119, 181, 0.4);
}

.share-btn.share-email {
    background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%);
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

.share-btn.share-email:hover {
    background: linear-gradient(135deg, #f55344 0%, #d93025 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(234, 67, 53, 0.4);
}

/* ============================================
   教程导航样式
   ============================================ */

.tutorial-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--thm-color, #3A97FF);
    color: var(--color-white, #fff);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--thm-base, #2d76c0);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(58, 151, 255, 0.3);
    color: var(--color-white, #fff);
}

.nav-btn i {
    font-size: 16px;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 991px) {
    .tutorials-nav-categories {
        justify-content: flex-start;
    }

    .tutorials-filter-sort-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .tutorials-filters-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .tutorials-sort-group {
        width: 100%;
    }

    .tutorials-sort-select {
        width: 100%;
    }

    .tutorial-title {
        font-size: 28px;
    }

    .tutorial-header {
        padding: 30px 0 20px;
    }

    .tutorial-content-section {
        padding: 30px 0;
    }
}

@media (max-width: 767px) {
    .tutorials-page-wrapper {
        padding: 30px 0;
    }

    .tutorials-nav-filters {
        padding: 20px;
        margin-bottom: 30px;
        border-radius: 12px;
    }

    .tutorials-nav-categories {
        gap: 8px;
    }

    .tutorials-nav-category {
        padding: 10px 16px;
        font-size: 13px;
    }

    .tutorials-filter-label {
        font-size: 12px;
    }

    .tutorial-title {
        font-size: 24px;
    }

    .tutorial-excerpt {
        font-size: 16px;
    }

    .tutorial-meta {
        gap: 10px;
    }

    .tutorial-meta span {
        font-size: 12px;
        padding: 6px 12px;
    }

    .tutorial-content h2 {
        font-size: 22px;
    }

    .tutorial-content h3 {
        font-size: 18px;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   教程详情页内容样式优化
   ============================================ */

/* 阅读进度条 */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    z-index: 9999;
    pointer-events: none;
}

.reading-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--color-orange, #8c3743);
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(140, 55, 67, 0.5);
}

/* 教程内容主容器 */
.tutorial-content {
    max-width: 100%;
}

/* 教程介绍区 */
.tutorial-intro {
    background: linear-gradient(135deg, var(--thm-f6, #F1F8FF) 0%, rgba(58, 151, 255, 0.05) 100%);
    border-left: 4px solid var(--thm-color, #3A97FF);
    padding: 24px 28px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 40px;
}

.tutorial-intro h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--thm-black, #000);
    margin: 0 0 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(58, 151, 255, 0.15);
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.tutorial-intro p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--thm-p, #0b2336);
    margin: 0;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

/* 教程章节区块 */
.tutorial-section {
    margin-bottom: 50px;
}

.tutorial-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--thm-black, #000);
    margin: 0 0 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

/* 步骤块样式 */
.step-block {
    background: var(--color-white, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.step-block:hover {
    box-shadow: 0 4px 16px rgba(58, 151, 255, 0.1);
    border-color: rgba(58, 151, 255, 0.2);
}

.step-block p {
    margin-bottom: 12px;
}

.step-block p:last-child {
    margin-bottom: 0;
}

/* 步骤编号样式 */
.step-number {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--thm-color, #3A97FF);
    margin: 0 0 16px;
    font-family: var(--thm-font, 'Poppins', sans-serif);
}

.step-number::before {
    content: '';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--thm-color, #3A97FF) 0%, var(--thm-base, #2d76c0) 100%);
    color: var(--color-white, #fff);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 为每个步骤自动编号 */
.step-block:nth-child(1) .step-number::before { content: '1'; }
.step-block:nth-child(2) .step-number::before { content: '2'; }
.step-block:nth-child(3) .step-number::before { content: '3'; }
.step-block:nth-child(4) .step-number::before { content: '4'; }
.step-block:nth-child(5) .step-number::before { content: '5'; }

/* 平台特定内容块 */
.platform-block {
    background: var(--thm-fb, #f8f9fa);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border-left: 3px solid var(--thm-color, #3A97FF);
}

.platform-block:last-child {
    margin-bottom: 0;
}

.platform-block h5 {
    font-size: 17px;
    font-weight: 600;
    color: var(--thm-black, #000);
    margin: 0 0 16px;
    font-family: var(--thm-font, 'Poppins', sans-serif);
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-block h5::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--thm-color, #3A97FF);
    border-radius: 2px;
}

/* 登录凭据列表 */
.credential-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    background: var(--color-white, #fff);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.credential-list li {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 15px;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

.credential-list li:last-child {
    border-bottom: none;
}

.credential-list code {
    background: rgba(58, 151, 255, 0.1);
    color: var(--thm-color, #3A97FF);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    font-weight: 600;
}

/* 教程图片样式 */
.tutorial-image {
    margin: 24px 0;
    text-align: center;
}

.tutorial-image picture {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    /*box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);*/
    /*border: 1px solid rgba(0, 0, 0, 0.08);*/
    /*background: var(--thm-f3, #f3f3f3);*/
}

.tutorial-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.tutorial-image img:hover {
    transform: scale(1.02);
}

.tutorial-image figcaption {
    margin-top: 12px;
    font-size: 14px;
    color: var(--thm-gray, #8e8e8e);
    font-style: italic;
    font-family: var(--thm-font2, 'Roboto', sans-serif);
}

/* 响应式优化 */
@media (max-width: 767px) {
    .tutorial-intro {
        padding: 20px;
        margin-bottom: 30px;
    }

    .tutorial-intro h2 {
        font-size: 20px;
    }

    .tutorial-intro p {
        font-size: 15px;
    }

    .tutorial-section h3 {
        font-size: 18px;
    }

    .step-block {
        padding: 20px;
    }

    .step-number {
        font-size: 15px;
    }

    .platform-block {
        padding: 16px 18px;
    }

    .platform-block h5 {
        font-size: 16px;
    }

    .credential-list li {
        font-size: 14px;
        padding: 10px 16px;
    }

    .tutorial-image {
        margin: 20px 0;
    }

    .tutorial-image figcaption {
        font-size: 13px;
    }
}

/* ============================================================
   V2 Tutorials Overrides
   说明：
   - 教程页的筛选栏、搜索框和分类胶囊统一切到 V2。
   ============================================================ */

.tutorials-page-wrapper {
    background: linear-gradient(180deg, var(--v2-bg-functional) 0%, var(--v2-bg-primary) 100%);
}

.tutorials-nav-filters {
    background: var(--v2-bg-primary);
    border: 1px solid var(--v2-bg-divider);
    border-radius: var(--v2-radius-lg);
    box-shadow: var(--v2-shadow-card);
}

.tutorials-search-box input {
    border-color: var(--v2-bg-divider);
    background: var(--v2-bg-content);
    color: var(--v2-text-body);
}

.tutorials-search-box input:focus {
    border-color: var(--v2-primary-500);
    box-shadow: 0 0 0 4px rgba(var(--v2-primary-500-rgb), 0.12);
    background: var(--v2-bg-primary);
}

.tutorials-search-btn,
.tutorials-nav-category.active,
.difficulty-option.active,
.type-option.active {
    background: var(--v2-primary-500);
    border-color: var(--v2-primary-500);
}

.tutorials-nav-category:hover,
.difficulty-option:hover,
.type-option:hover {
    background: rgba(var(--v2-primary-500-rgb), 0.05);
    border-color: var(--v2-primary-500);
    color: var(--v2-primary-500);
}

/* ============================================================
   V2 Tutorials Final Alignment
   说明：
   - 教程页已有第一轮 V2 覆盖，但卡片、徽标、分页和侧栏仍有旧渐变与旧变量残留。
   - 这里统一教程列表页和教程详情页的卡片层级、标签色、分页和面包屑。
   ============================================================ */

.tutorials-page-wrapper {
    background: var(--v2-bg-content);
}

.tutorials-nav-category,
.difficulty-option,
.type-option,
.tutorials-sort-select,
.pagination-btn {
    border-radius: var(--v2-radius-md);
}

.tutorials-nav-category,
.difficulty-option,
.type-option,
.tutorials-sort-select {
    background: var(--v2-bg-content);
    border-color: var(--v2-bg-divider);
    color: var(--v2-text-body);
}

.tutorials-nav-category i,
.tutorials-filter-label,
.tutorial-card-category i,
.tutorial-card-footer-item i {
    color: var(--v2-primary-500);
}

.tutorial-card,
.sidebar-widget,
.tutorial-content-wrapper,
.tutorial-navigation-card,
.tutorial-resources-card {
    background: var(--v2-bg-primary);
    border: 1px solid var(--v2-bg-divider);
    border-radius: var(--v2-radius-lg);
    box-shadow: var(--v2-shadow-card);
}

.tutorial-card-image,
.tutorial-card-image::before {
    border-radius: var(--v2-radius-lg) var(--v2-radius-lg) 0 0;
}

.tutorial-card-content,
.tutorial-card-footer,
.sidebar-widget,
.tutorial-content-wrapper {
    color: var(--v2-text-body);
}

.tutorial-card-title,
.sidebar-widget-title,
.tutorial-detail-title,
.tutorial-content-wrapper h2,
.tutorial-content-wrapper h3,
.tutorial-content-wrapper h4 {
    color: var(--v2-text-heading);
}

.tutorial-type-badge,
.tutorial-type-badge-inline,
.tutorial-card-difficulty,
.tags-list .tag {
    border-radius: var(--v2-radius-pill);
}

.tutorial-type-badge,
.tutorial-type-badge-inline {
    background: rgba(var(--v2-primary-500-rgb), 0.10);
    color: var(--v2-primary-600);
    border: 1px solid rgba(var(--v2-primary-500-rgb), 0.16);
}

.tutorial-card-difficulty.beginner,
.tutorial-card-difficulty.intermediate,
.tutorial-card-difficulty.advanced,
.tags-list .tag,
.tutorial-card-category {
    background: var(--v2-bg-content);
    border: 1px solid var(--v2-bg-divider);
    color: var(--v2-text-body);
}

.pagination-btn {
    background: var(--v2-bg-primary);
    border-color: var(--v2-bg-divider);
    color: var(--v2-text-body);
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--v2-primary-500);
    border-color: var(--v2-primary-500);
    color: var(--v2-text-inverse);
}

.tutorial-breadcrumb .breadcrumb-item a,
.tutorial-breadcrumb .breadcrumb-item.active {
    color: var(--v2-text-secondary);
}

/* Phase 8 visual-spec alignment for tutorial list cards and controls. */
.tutorials-page-wrapper .tutorials-nav-filters,
.tutorials-page-wrapper .tutorials-search-box input,
.tutorials-page-wrapper .tutorials-search-btn,
.tutorials-page-wrapper .tutorials-nav-category,
.tutorials-page-wrapper .type-option,
.tutorials-page-wrapper .tutorials-sort-select,
.tutorials-page-wrapper .pagination-btn,
.tutorials-page-wrapper .no-tutorials,
.tutorials-page-wrapper .tutorial-card {
    border-radius: 8px;
}

.tutorials-page-wrapper .tutorial-card-image,
.tutorials-page-wrapper .tutorial-card-image::before {
    border-radius: 8px 8px 0 0;
}

.tutorials-page-wrapper .tutorial-type-badge,
.tutorials-page-wrapper .tutorial-card-difficulty {
    border-radius: 6px;
}

.tutorials-page-wrapper .tutorials-search-box input,
.tutorials-page-wrapper .tutorials-results-count,
.tutorials-page-wrapper .tutorial-card-excerpt {
    font-size: 16px;
    line-height: 24px;
}

.tutorials-page-wrapper .tutorial-card-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

@media (max-width: 767px) {
    .tutorials-page-wrapper .tutorial-card-title {
        font-size: 20px;
        line-height: 28px;
        font-weight: 500;
    }
}

/* Phase 8 visual-spec alignment for tutorial detail pages. */
.tutorial-detail-page .tutorial-meta-header .tutorial-category,
.tutorial-detail-page .tutorial-type-badge-inline,
.tutorial-detail-page .tutorial-read-time,
.tutorial-detail-page .tutorial-video-duration-inline,
.tutorial-detail-page .tutorial-video-player-wrapper,
.tutorial-detail-page .video-container,
.tutorial-detail-page .video-meta,
.tutorial-detail-page .video-duration,
.tutorial-detail-page .btn-watch-youtube,
.tutorial-detail-page .tutorial-featured-image img,
.tutorial-detail-page .tutorial-tags,
.tutorial-detail-page .tutorial-share,
.tutorial-detail-page .tutorial-navigation .nav-btn,
.tutorial-detail-page .sidebar-widget,
.tutorial-detail-page .product-link,
.tutorial-detail-page .tutorial-link {
    border-radius: 8px;
}

.tutorial-detail-page .btn-watch-youtube {
    border-radius: 22px;
}

.tutorial-detail-page .tags-list .tag {
    border-radius: 6px;
}

.tutorial-detail-page .tutorial-meta-header .tutorial-excerpt,
.tutorial-detail-page .tutorial-content p,
.tutorial-detail-page .tutorial-content li {
    font-size: 16px;
    line-height: 24px;
}

.tutorial-detail-page .tutorial-content h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 500;
}

.tutorial-detail-page .tutorial-content h3,
.tutorial-detail-page .sidebar-widget-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

.tutorial-detail-page .tutorial-content h4,
.tutorial-detail-page .tutorial-tags h4,
.tutorial-detail-page .tutorial-share h4 {
    font-size: 20px;
    line-height: 28px;
    font-weight: 500;
}

.tutorial-detail-page .tutorial-detail-sidebar .tutorial-title,
.tutorial-detail-page .tutorial-detail-sidebar .product-name {
    font-size: 16px !important;
    line-height: 22px;
    font-weight: 600;
}

.tutorial-detail-page .tutorial-date,
.tutorial-detail-page .tutorial-detail-sidebar .product-model {
    font-size: 14px;
    line-height: 20px;
}

@media (max-width: 767px) {
    .tutorial-detail-page .tutorial-content h2 {
        font-size: 24px;
        line-height: 32px;
        font-weight: 500;
    }

    .tutorial-detail-page .tutorial-content h3,
    .tutorial-detail-page .sidebar-widget-title,
    .tutorial-detail-page .tutorial-content h4,
    .tutorial-detail-page .tutorial-tags h4,
    .tutorial-detail-page .tutorial-share h4 {
        font-size: 20px;
        line-height: 28px;
        font-weight: 500;
    }
}

body.functional-banner-page .atf-Subscribe-area .atf-subscribe-panel,
body.functional-banner-page .atf-Subscribe-area .atf-subscribe-form,
body.functional-banner-page .atf-Subscribe-area .atf-subscribe-input,
body.functional-banner-page .atf-Subscribe-area .atf-subscribe-btn {
    border-radius: 8px;
}

.tutorial-detail-page + .atf-Subscribe-area .atf-subscribe-panel,
.tutorial-detail-page + .atf-Subscribe-area .atf-subscribe-form,
.tutorial-detail-page + .atf-Subscribe-area .atf-subscribe-input,
.tutorial-detail-page + .atf-Subscribe-area .atf-subscribe-btn {
    border-radius: 8px;
}

.tutorials-page-wrapper .tutorial-card.wow {
    visibility: visible !important;
}

body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-page-heading-title {
    color: var(--v2-text-heading) !important;
    font-size: clamp(36px, 3vw, 42px) !important;
    line-height: 1.15 !important;
    max-width: min(720px, 100%);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left {
    height: auto;
    min-height: 720px;
    background-color: var(--v2-bg-primary);
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
}

body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left > .container {
    height: auto;
    min-height: 720px;
    justify-content: flex-start;
    padding-top: clamp(300px, 25vw, 480px);
    padding-bottom: 32px;
}

body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-page-heading-in {
    position: static;
    transform: none;
}

body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-post-label {
    background: rgba(255, 255, 255, 0.86) !important;
    border: 1px solid rgba(var(--v2-text-heading-rgb), 0.08) !important;
    border-radius: 8px !important;
    box-shadow: var(--v2-shadow-sm) !important;
    color: var(--v2-text-body) !important;
}

body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-post-label > span,
body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-post-label > span a,
body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-post-label > span:last-child,
body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-post-label > span:not(:has(a)),
body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-post-label > span:not(:last-child)::after {
    color: var(--v2-text-body) !important;
}

body.functional-banner-dark:has(.tutorial-detail-page) .atf-page-heading.atf-align-left:not(:has(.banner-center-btn)):not(:has(.btn-banner-center)):not(:has(#buy_btn)) .atf-post-label > span,
body.functional-banner-dark:has(.tutorial-detail-page) .atf-page-heading.atf-align-left:not(:has(.banner-center-btn)):not(:has(.btn-banner-center)):not(:has(#buy_btn)) .atf-post-label > span a,
body.functional-banner-dark:has(.tutorial-detail-page) .atf-page-heading.atf-align-left:not(:has(.banner-center-btn)):not(:has(.btn-banner-center)):not(:has(#buy_btn)) .atf-post-label > a,
body.functional-banner-dark:has(.tutorial-detail-page) .atf-page-heading.atf-align-left:not(:has(.banner-center-btn)):not(:has(.btn-banner-center)):not(:has(#buy_btn)) .atf-post-label > span:last-child,
body.functional-banner-dark:has(.tutorial-detail-page) .atf-page-heading.atf-align-left:not(:has(.banner-center-btn)):not(:has(.btn-banner-center)):not(:has(#buy_btn)) .atf-post-label > span:not(:has(a)),
body.functional-banner-dark:has(.tutorial-detail-page) .atf-page-heading.atf-align-left:not(:has(.banner-center-btn)):not(:has(.btn-banner-center)):not(:has(#buy_btn)) .atf-post-label > span:not(:last-child)::after {
    color: var(--v2-text-body) !important;
}

@media (max-width: 767px) {
    body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left {
        min-height: 560px;
    }

    body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left > .container {
        min-height: 560px;
        padding-top: clamp(220px, 58vw, 445px);
        padding-bottom: 24px;
    }

    body:has(.tutorial-detail-page) .atf-page-heading.atf-align-left .atf-page-heading-title {
        font-size: 24px !important;
        line-height: 32px !important;
    }

    .tutorial-detail-page .btn-watch-youtube {
        border-radius: 21px;
    }
}
@media (max-width: 767px) {
    .tutorials-nav-categories {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tutorials-nav-categories::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .tutorials-nav-category {
        flex: 0 0 auto;
        width: auto;
        white-space: nowrap;
        scroll-snap-align: start;
    }
}
