/*
Theme Name: tutorstarter Child
Template: tutorstarter
Version: 1.0.1 // 必须和functions.php中的子主题版本号一致
Description: Child theme for TutorStarter with custom styles
Author: 速豹堂
*/

/* 1. 全局基础样式重置与优化 */
:root {
    --primary-color: #175CFF;    /* 主色调：科技蓝 */
    --accent-color: #00d084;     /* 强调色：生机绿 */
    --text-dark: #0A083B;       /* 深色文字 */
    --text-light: #57586E;      /* 次要文字 */
    --bg-light: #F7F9FA;        /* 浅色背景 */
    --transition: all 0.3s ease;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;    
}

/* 2. 顶部工具栏 (WordPress Admin Bar) 调整 */
#wpadminbar {
    background: rgba(10, 8, 59, 0.95) !important;
    backdrop-filter: blur(5px);
}

/* 2.1 页面顶部间距：无管理栏时紧贴顶部，有管理栏时 #page 紧贴 wpadminbar 下方。
   子主题通过 JS 根据 #wpadminbar 是否实际显示动态设置 html 的 margin-top，
   故外联 CSS 或控制台将 #wpadminbar 设为 display:none 时，下方 #page 也会上移。 */
html {
    margin-top: 0;
}
#page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 3. 导航栏美化 (Navbar) - 深蓝渐变、白色文字、现代简约 */
.header-default {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to right, #1a365d 0%, #2c5282 50%, #2a4365 100%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 0 0 0;
    transition: var(--transition);
}
.navbar {
    padding: 0px 30px !important;
}
.navbar-brand img {
    max-height: 80px !important;
    transition: var(--transition);
}

/* 头部导航链接：a 与 a:visited 均设为白色（仅一级菜单，子菜单保持深色） */
.navbar-nav > .menu-item > a,
.navbar-nav > .menu-item > a:visited,
#menu-online-learning-lms-primary-menu > li > a,
#menu-online-learning-lms-primary-menu > li > a:visited {
    color: #ffffff !important;
    font-weight: 500 !important;
    padding: 10px 15px !important;
    position: relative !important;
    transition: var(--transition) !important;
}

.navbar-nav > .menu-item > a:hover,
.navbar-nav > .menu-item > a:visited:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 导航悬浮下划线效果 */
.navbar-nav .menu-item a::after {
    content: '';
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition) !important;
    transform: translateX(-50%) !important;
}

.navbar-nav .menu-item:hover a::after {
    width: 70%;
}

/* 4. 下拉菜单 (Sub-menu) 美化 - 深色头部下保持浅色下拉 */
.sub-menu {
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    padding: 10px !important;
    background: #fff !important;
}

.sub-menu .menu-item a {
    color: var(--text-dark) !important;
    border-radius: 4px;
    font-size: var(--header-font-size) !important;
}

.sub-menu .menu-item a:hover {
    background-color: rgba(23, 92, 255, 0.08);
    color: var(--primary-color) !important;
}
.tutor-submenu-links ul .profile-name {
    display: none !important;
}
.tutor-submenu-links {
    padding-left: 10px !important;
}
.tutor-header-profile-menu-items .tutor-header-submenu {
    width: 150px !important;
    top: 55px !important;
    right: -45px !important;
    background-color: #fff;
}
.tutor-header-submenu .tutor-submenu-links ul li a {
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #1b2d5f !important;
    line-height: 32px !important;
    padding-left: 10px !important;
}
.tutor-header-submenu .tutor-submenu-links ul li a:hover {
    color: #f9f9fb !important;
    background-color: #0e4275;
}
/* 5. 搜索框优化 - 深色头部下的白色风格 */
.search-field input {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    transition: var(--transition);
    width: 200px;
}

.search-field input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-field input:focus {
    width: 250px;
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* 5.1 头部用户下拉、关闭按钮等文字为白色 */
.header-default .tutor-header-profile-content .text-black-80,
.header-default .navbar-utils,
.header-default .btn-nav-close .close-btn,
.header-default .nav-close button {
    color: #ffffff !important;
}

.header-default .tutor-header-profile-content [role="button"] {
    color: #ffffff !important;
}

.header-default .navbar-toggler .toggle-icon span,
.header-default .navbar-toggler .toggle-icon span::before,
.header-default .navbar-toggler .toggle-icon span::after {
    background-color: #ffffff !important;
}

/* 5.2 仪表盘头部：隐藏头像 */
.tutor-dashboard-header-avatar {
    display: none !important;
}

/* 5.3 仪表盘头部容器：顶部间距 */
.tutor-container {
    padding-top: 15px;
}
.tutor-frontend-dashboard-header {
    display: none !important;
}
/* 5.4 移动端：在学课程文本卡 */
@media (max-width: 767px) {
    .tutor-card-body, .course-card-body {        
        width: 100% !important;
    }
}

/* 6. 购物车图标美化 */
.navbar .navbar-utils .btn-cart {
    display: none !important;
}

/* 7. Elementor 内容区容器优化 */
.elementor-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.elementor-column-gap-default > .elementor-column > .elementor-element-populated {
    padding: 15px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* 8. 响应式移动端调整 - 保持深色背景与白色文字 */
@media (max-width: 991px) {
    .navbar-toggler {
        border: none;
        background: transparent;
    }
    
    .header-default .navbar-nav {
        background: linear-gradient(to right, #1a365d 0%, #2c5282 50%, #2a4365 100%) !important;
        padding: 20px;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    
    /* 移动端导航链接保持白色 */
    .header-default .navbar-nav .menu-item a,
    .header-default .navbar-nav .menu-item a:hover {
        color: #ffffff !important;
    }
    
    .header-default .navbar-nav .nav-close .close-btn,
    .header-default .navbar-nav .nav-close button,
    .header-default .navbar-nav .btn-nav-close {
        color: #ffffff !important;
    }
}
@media screen and (max-width: 782px) {
    html #wpadminbar {
        display: none;
    }
}

/* 9. 按钮通用美化 */
.wp-block-button__link, .tutor-btn {
    background: linear-gradient(135deg, var(--primary-color), #0044cc) !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(23, 92, 255, 0.3) !important;
    transition: var(--transition) !important;
}

.wp-block-button__link:hover, .tutor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 92, 255, 0.4) !important;
}
/* 10. footer通用美化 */
/* 强制覆盖底部容器样式 */
section.footer-widgets {
    display: none !important;
}
.site-footer {
    /* 使用深色线性渐变：从深蓝黑到极深灰 */
    background: linear-gradient(135deg, #1f2a44 0%, #1e2c41 50%, #0f172a 100%) !important;    
    /* 添加一个微弱的顶部边框，增加高级感 */
    border-top: 1px solid rgba(255, 255, 255, 0.05);    
    /* 增加内阴影，让颜色看起来有深度 */
    box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.3);    
    position: relative;
    overflow: hidden;
    margin-top: 30px;
}
/* 隐藏翻页 */
.etlms-course-list-pagination-wrap {
    display: none;
}

/* 确保底部文字颜色为浅色以保证可读性 */
.site-footer, 
.site-footer p, 
.site-footer a, 
.site-footer .widget-title {
    color: rgba(255, 255, 255, 0.7) !important;
}

.site-footer a:hover {
    color: #ffffff !important;
}

.footer-bottom-container span.copyright
 {
    color: var(--footer-bottom-text-color);
    margin: 20px auto !important;
    float: none;
    text-align: center;
}
.copyright-container {
    margin: 20px auto;
    text-align: center;
}
.site-info {
    display: none !important;
}
/* 課程列表按鈕 */
.list-item-button a {
    color:lavender;
}
.tutor-btn {
    color: #edf1fb !important;
}
/* 列表页样式 */
/* 统一美化页面中所有的 Elementor 标题组件 */
.e-con .elementor-widget.elementor-widget { 
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.elementor-widget-heading .elementor-heading-title {
    font: 600 22px "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #2782A8;
    margin: 20px 0;
    padding-left: 15px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
    transform: translateX(5px);
    width: 200px;
}
.etlms-pagination span, .etlms-pagination a {
    padding-top: 20px;
}

/* 通用的左侧蓝色装饰条 */
.elementor-widget-heading .elementor-heading-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: #5d8aa8;
}

/* 通用的底部短横线 */
.elementor-widget-heading .elementor-heading-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;             /* 初始宽度与文字同宽 */
    height: 2px;
    background-color: #dee2e6; /* 初始浅灰色 */
    transition: all 0.4s ease;
}

/* 统一的悬停交互效果 */
.elementor-widget-heading:hover {
    color: #5d8aa8;
    transform: translateX(5px); /* 向右轻微位图，增加灵动感 */
    width: 150%;
}

.elementor-widget-heading:hover .elementor-heading-title::after {
    width: 150%; /* 悬停时下划线伸长 */
    background-color: #5d8aa8;
}
.tutor-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 课程页面样式 */
.tutor-color-secondary p {
    margin: 20px 0 20px 0;
    font-size: 1.1rem;
    line-height: 2.2rem;
}
.tutor-color-secondary p strong {
    color: #0044cc;
}
/* 彻底重构 TutorStarter 移动端顶部布局 (991px及以下) */
@media (max-width: 991.98px) {

    /* 1. 将 Header 容器改为 Flex 布局并允许换行 */
    .navbar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 15px !important;
        grid-gap: 0 !important; /* 取消网格间距 */
    }

    /* 2. Logo 强制排在左侧 */
    .navbar-brand {
        order: 1 !important;
        display: block !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }
    
    .navbar-brand img {
        max-height: 40px !important; /* 确保 Logo 大小合适 */
        width: auto !important;
    }

    /* 3. 工具栏 (navbar-utils) 强制排在右侧 */
    .navbar-utils {
        order: 2 !important;
        display: flex !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }

    /* 4. 菜单容器强制排在下一行，宽度 100% */
    .tutorstarter-main-menu-wrap,
    .menu-online-learning-lms-primary-menu-container {
        order: 3 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        
        /* 样式粉碎：移除白色背景、阴影和圆角 */
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 20px 0 0 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        display: block !important;
    }

    /* 5. 导航列表 (ul) 样式重置：横向滚动、无背景 */
    #menu-online-learning-lms-primary-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        background: transparent !important; 
        padding: 5px 0 !important;
        margin: 0 !important;
        border-top: 1px solid rgba(0,0,0,0.05); 
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 隐藏列表项的底边框（父主题自带的） */
    #menu-online-learning-lms-primary-menu > li {
        border: none !important;
        flex: 0 0 auto !important;
    }

    /* 菜单链接文字样式：强制白色（含 a、a:visited），移动端子菜单已隐藏 */
    #menu-online-learning-lms-primary-menu > li > a,
    #menu-online-learning-lms-primary-menu > li > a:visited {
        white-space: nowrap !important;
        padding: 10px 15px !important;
        color: #ffffff !important; 
        font-size: 14px !important;
    }

    /* 隐藏滚动条但保留功能 */
    #menu-online-learning-lms-primary-menu::-webkit-scrollbar {
        display: none;
    }

    /* 彻底隐藏不需要的元素：切换按钮和关闭按钮 */
    .navbar-toggler, 
    .nav-close, 
    .tutorstarter-menu-close {
        display: none !important;
    }
}

/* 适配超小屏幕 (500px以下) 的微调 */
@media (max-width: 500px) {
    .navbar {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
/* 针对 TutorStarter 移动端导航细节深度清理 (991px及以下) */
@media (max-width: 991.98px) {
    .e-con.e-flex>.e-con-inner {
        flex-wrap: nowrap !important;
    }

    /* 1. 彻底切断所有容器的阴影、圆角和背景限制 */
    .tutorstarter-main-menu-wrap,
    .menu-online-learning-lms-primary-menu-container,
    #tutorstarter-main-menu,
    .navbar-collapse {
        background: transparent !important;
        box-shadow: none !important;      /* 取消外阴影 */
        border-radius: 0 !important;      /* 取消外圆角 */
        border: none !important;
        overflow: hidden !important;      /* 配合您在控制台的有效尝试 */
        height: 45px !important;          /* 强制固定一个合适的高度，请根据字体大小微调 */
        min-height: unset !important;
    }

    /* 2. 彻底禁止二级菜单弹出 */
    /* 无论点击还是默认状态，所有的子菜单都不允许显示 */
    #menu-online-learning-lms-primary-menu .sub-menu,
    #menu-online-learning-lms-primary-menu .children,
    #menu-online-learning-lms-primary-menu .tutor-submenu,
    .dropdown-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        pointer-events: none !important; /* 禁止交互 */
    }

    /* 3. 取消“有二级菜单链接”的下拉小三角 */
    /* TutorStarter 通常使用 :after 伪元素来显示三角 */
    #menu-online-learning-lms-primary-menu li.menu-item-has-children > a::after,
    #menu-online-learning-lms-primary-menu li.tutor-menu-item-has-children > a::after {
        display: none !important;
        content: none !important;
    }

    /* 4. 修正链接的宽度和间距，并强制白色文字 */
    /* 取消因为有三角而产生的多余右边距 */
    #menu-online-learning-lms-primary-menu li > a,
    #menu-online-learning-lms-primary-menu li > a:visited {
        padding-right: 15px !important;  /* 恢复正常的左右对称间距 */
        padding-left: 15px !important;
        line-height: 45px !important;    /* 与容器高度一致，实现垂直居中 */
        display: inline-block !important;
        white-space: nowrap !important;
        background: transparent !important;
        color: #ffffff !important;
    }

    /* 5. 确保 ul 列表本身没有多余的背景和阴影 */
    #menu-online-learning-lms-primary-menu {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        height: 100% !important;
        align-items: center !important;
    }

    /* 6. 移除点击时可能出现的任何“展开”类名带来的样式变化 */
    /* 强制锁定 li 的宽度，不随子菜单展开而变宽 */
    #menu-online-learning-lms-primary-menu li {
        width: auto !important;
        background: transparent !important;
    }
    .navbar-nav>.menu-item:last-child {
        margin-bottom: 0 !important;
    }
}
@media (max-width: 991.98px) {
    /* 移除所有带子菜单链接后的伪元素图标（小箭头） */
    .navbar-nav li.menu-item-has-children > a::after,
    .navbar-nav li.menu-item-has-children > a::before,
    .navbar-nav li.tutor-menu-item-has-children > a::after,
    .navbar-nav li.tutor-menu-item-has-children > a::before {
        display: none !important;
        content: none !important;
    }

    /* 某些主题可能会通过 icon 类名添加背景图或字体图标 */
    .navbar-nav li.menu-item-has-children.icon > a::after {
        display: none !important;
    }

    /* 确保带有子菜单的一级链接右侧没有多余的填充（由于原本要放箭头留下的位置） */
    .navbar-nav li.menu-item-has-children > a {
        padding-right: 15px !important; /* 与其他链接保持一致 */
        position: relative;
    }
    .tutor-course-details-header {
        margin-bottom: 0px !important;
    }
    .tutor-single-course-sidebar {
        margin-top: 0px !important;
    }
}

@media (max-width: 991.98px) {    
    .tutor-course-list .tutor-meta {
        display: none !important;
    }
    .tutor-course-details-top {
        display: none !important;
    }
    .single-courses .site-content {
        padding: 0 !important;
    }
}
.tutor-course-details-content .tutor-fs-5 {
    display: none !important;
}
.tutor-course-details-page .tutor-course-thumbnail {
    display: none !important;
}
.tutor-course-details-tab {
    margin-top: 0 !important;
}
.tutor-course-details-header {
    margin-bottom: 10px !important;
}
.tutor-col-auto {
    display: none !important;
}
.tutor-course-details-instructors {
    display: none !important;
}
.tutor-single-course-sidebar {
    margin-top: 40px;
}


/* 排行榜样式 */
/* 1. 基础容器与布局优化 */
.elementor-shortcode {    
    background: #ffffff;    
    margin: 20px 0;
}

.tutor-leaderboard {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 2. 深色渐变表头 - 重点优化部分 */
.tutor-leaderboard tr:first-child {
    /* 使用深色线性渐变 */
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

.tutor-leaderboard th {
    color: #ffffff !important; /* 文字改为纯白 */
    font-weight: 600 !important;
    font-size: 14px;
    letter-spacing: 1.5px;
    padding: 18px 15px !important;
    border: none !important;
    text-align: center !important; /* 居中对齐更有仪式感 */
}

/* 表头圆角处理 */
.tutor-leaderboard th:first-child {
    border-radius: 12px 0 0 12px;
}
.tutor-leaderboard th:last-child {
    border-radius: 0 12px 12px 0;
}

/* 3. 数据行样式 */
.tutor-leaderboard tr:not(:first-child) {
    background-color: #f8fafc !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutor-leaderboard td {
    padding: 16px !important;
    border: none !important;
    color: #475569;
    font-size: 15px;
    text-align: center;
}

/* 4. 悬停交互 */
.tutor-leaderboard tr:not(:first-child):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    background-color: #ffffff !important;
    cursor: default;
}

/* 5. 单元格细节 */
.tutor-leaderboard td:first-child {
    border-radius: 12px 0 0 12px;
    font-weight: 800;
}

.tutor-leaderboard td:last-child {
    border-radius: 0 12px 12px 0;
    color: #3b82f6; /* 学习时长使用明亮的蓝色 */
    font-weight: 700;
}

/* 6. 前三名特殊奖励色 */
/* 第一名：淡金色背景 */
.tutor-leaderboard tr:nth-child(2) {
    background: linear-gradient(90deg, #fffbeb, #fef3c7) !important;
}
.tutor-leaderboard tr:nth-child(2) td:first-child {
    color: #d97706;
}
.tutor-leaderboard tr:nth-child(2) td:first-child::before {
    content: "🏆 ";
}

/* 第二名 */
.tutor-leaderboard tr:nth-child(3) td:first-child::before {
    content: "🥈 ";
}

/* 第三名 */
.tutor-leaderboard tr:nth-child(4) td:first-child::before {
    content: "🥉 ";
}

/* 响应式适配 */
@media (max-width: 768px) {
    .tutor-leaderboard th, .tutor-leaderboard td {
        padding: 12px 10px !important;
        font-size: 13px;
    }
}




/* ==== 定义选项卡背景色和文字颜色 ==== */
/* 1. 定义激活状态下的背景色和文字颜色 */
.e-n-tab-title[aria-selected="true"] {
    background-color: #006400 !important; /* 深绿色 */
    transition: all 0.3s ease; /* 添加平滑过渡动画 */
}

/* 2. 确保激活状态下的文字颜色为白色（以便在深绿背景上清晰显示） */
.e-n-tab-title[aria-selected="true"] .e-n-tab-title-text {
    color: #ffffff !important;
}

/* 3. (可选) 鼠标悬停在未激活标签上时的效果，增强交互感 */
.e-n-tab-title:hover {
    background-color: #004d00; 
    color: #fff;
}

/* 4. 去除激活时的默认边框或下划线（如果主题自带的话） */
.e-n-tab-title[aria-selected="true"] {
    border-color: transparent !important;
}
/* 标题主体样式 */
.entry-header {
    padding: 30px 0 0 0;
    text-align: center; /* 居中对齐 */
}
.entry-header h1.entry-title {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 22px;
    font-weight: bold;
    color: #46558f; /* 深蓝色基调 */
    text-align: center;
    display: inline-block;
    padding: 30px 0 10px 0 !important;
    line-height: 1.8rem;
    cursor: default;
    transition: all 0.3s ease; /* 平滑过渡动画 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

/* 互动性：动态下划线效果 */
.entry-header .entry-title::after {
    content: '';
    position: absolute;
    width: 0px;
    height: 4px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, #1a2a6c, #b21f1f); /* 深蓝到深红的渐变，增加高级感 */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 鼠标悬停时的互动反馈 */
.entry-header .entry-title:hover {
    color: #003366; /* 悬停时颜色加深 */
    transform: translateY(-5px); /* 向上轻微浮动 */
    text-shadow: 0 10px 20px rgba(0, 51, 102, 0.15); /* 增加投影深度 */
}

/* 悬停时展开下划线 */
.entry-header .entry-title:hover::after {
    width: 100%; /* 展开宽度 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    .entry-header .entry-title {
        font-size: 1.8rem;
    }
}

/* 针对移动端的自适应优化 */
@media screen and (max-width: 768px) {
    .tutor-leaderboard {
        /* 关键：恢复表格布局特性，确保 width: 100% 生效 */
        display: table !important; 
        width: 100% !important;
        min-width: 100% !important;
        
        /* 如果非要保留 block 特性来实现滚动，请将样式加在父级 div 上 */
        /* 但如果只想解决宽度问题，请尝试删除 display: block 和 white-space: nowrap */
    }

    /* 如果内容确实太多导致换行难看，非要滑动，请用下面这个组合 */
    .elementor-shortcode {
        overflow-x: auto; /* 在父级容器上开启滚动 */
        -webkit-overflow-scrolling: touch;
    }
}

.tutor-card-body .tutor-course-name {
    font-size: 1rem;
}

/* 缩略图：强制16:9 */
.course-card-thumb-base {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.course-card-thumb-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.course-card-thumb-img {
    transform: scale(1.08);
}

/* 内容区 */
.course-card-body {
    padding: 10px 15px;
}

.course-card-text-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    height: 40px; /* 固定高度确保对齐 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 进度条样式 */
.course-card-progress-bar-bg {
    background: #eee;
    height: 6px;
    border-radius: 10px;
    margin-bottom: 6px;
    overflow: hidden;
}

.course-card-progress-bar-fill {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    height: 100%;
    border-radius: 10px;
}

.course-card-progress-label {
    font-size: 12px;
    color: #888;
}

/* =========== 移动端课程列表美化 ============== */
/* 针对移动端（通常为 767px 以下）的课程列表布局修改 */
@media (max-width: 767px) {
    /* 1. 课程外层容器：改为 Flex 布局，横向排列 */
    .tutor-course-list {
        row-gap: 20px !important;
    }
    .tutor-courses-wrap {
        width: 100% !important;
        max-width: 100% !important;
    }
    .etlms-course-list-col {
        display: flex !important;
        width: 100%;    
        background: #fff;
        overflow: hidden;
        align-items: stretch; /* 确保左右高度一致 */
        border-top: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: #cdcfd5 1px solid;
        border-radius: 0;
    }
    .tutor-course-card {
        width: 100%;
        border: none !important;
        flex-direction: row !important;
        gap:15px;
    }

    /* 2. 缩略图容器：固定宽度，防止被挤压 */
    .etlms-course-list-col .tutor-course-thumbnail, .course-card-thumb-base {
        flex: 1 1 0%;
        width: 40% !important;
        margin-bottom: 10px !important; /* 移除原本的底部间距 */
               
    }
    .tutor-course-card .tutor-course-thumbnail {
        flex: 1 1 0%;
        width: 40% !important;
        border-radius: 6px !important;
    }
    

    /* 强制缩略图在左侧填满高度并保持比例 */
    .etlms-course-list-col .tutor-course-thumbnail img, .course-card-thumb-base img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* 自动裁剪，填满容器 */
    }

    /* 3. 课程信息内容区：占满剩余宽度 */
    .tutor-course-bookmark {
        display: none;
    }

    .tutor-card-body, .course-card-body {
        flex: 1 !important;
        width: 50%;
        padding: 20px 20px 10px 20px !important;
        display: flex;
        flex-direction: column;
    }

    /* 4. 调整标题样式：减小字号以适应窄屏，限制行数 */
    .etlms-course-list-col .tutor-course-title,
    .etlms-course-list-col .tutor-course-title a,
    .tutor-course-name
    {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin: 0 0 8px 0 !important;
        /* 超过两行显示省略号 */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 5. 隐藏或缩小次要信息（如课程元数据、进度条等）以节省空间 */
    .etlms-course-list-col .tutor-course-loop-meta {
        font-size: 11px !important;
        gap: 5px !important;
    }

    /* 如果有进度条，调整其边距 */
    .etlms-course-list-col .tutor-loop-course-container {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 当子容器etlms-pagination.prev-next为空时，设置父容器tutor-mt-32的margin-top为0 */
    .tutor-mt-32 {
        margin-top: 0 !important;
    }
    .site-footer {    
        margin-top: 30px;
    }
}

/* ========== 定义分类页样式 ============*/
@media (max-width: 767px) {
    .tutor-pagination-wrapper-replaceable {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .tutor-card-footer {
        margin: 0;
        padding: 0;
        display: none;
    }
    .tutor-btn {
        padding: 10px !important;
        font-size: 0.9rem;
        border-radius: 15px !important;
    }
    .tutor-mt-40 {
        margin-top: 0 !important;
    }
}

/* =============================================================================
   最近学习列表排行榜样式 (PC/移动端适配)
   ============================================================================= */

/* 容器布局 */
.custom-recent-learning {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.recent-learning-title {
    font: 600 22px "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #2782A8;
    margin: 20px 0 30px 0;
    padding-left: 15px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
    transform: translateX(5px);
    width: 150px;
}

/* 左侧装饰短线 */
.recent-learning-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: #5d8aa8;
}

/* 底部动态长线 */
.recent-learning-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;             /* 初始宽度与文字同宽 */
    height: 2px;
    background-color: #dee2e6; /* 初始浅灰色 */
    transition: all 0.4s ease;
}

/* 悬停动效 */
.recent-learning-title:hover::after {
    width: 150%;             /* 延长 */
    background-color: #5d8aa8; /* 变色 */
}

/* 网格系统：PC端一排4个 */
.recent-learning-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* 卡片基础样式 */
.learning-card {
    background: #fff;
    border: 1px solid #cdcfd5;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.learning-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.learning-card-link {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column; /* PC端上下布局 */
}

/* 图片处理 */
.learning-card-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.learning-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例填充 */
    display: block;
}

/* 内容区域 */
.learning-card-content {
    padding: 15px;
}

/* 课程标题样式 */
.learning-card-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    line-height: 1.4;
    height: 42px; /* 限制两行高度 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
}

/* 进度条样式 */
.learning-progress-container {
    display: block;
}

.learning-progress-bar {
    background: #f0f0f0;
    height: 6px;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.learning-progress-fill {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.learning-progress-text {
    font-size: 12px;
    color: #2ecc71;
    font-weight: 600;
}

/* =============================================================================
   移动端适配 (屏宽 < 768px)
   ============================================================================= */
@media (max-width: 768px) {
    .recent-learning-grid {
        grid-template-columns: 1fr; /* 每行显示一个 */
        gap: 25px;
    }
    .learning-card {
        padding: 0;
        border: 0;      
    }

    .learning-card-link {        
        align-items: center;
        display: flex;
        flex-direction: row;
        gap: 20px
    }

    .learning-card-thumb {
        width: 45%;
        flex: 1 1 0%;
        flex-shrink: 0;
        margin-left: 0;
        border-radius: 8px;
    }

    .learning-card-content {
        padding: 0;
        width: 50%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 0;
    }

    .learning-card-title {
        height: auto;
        margin-bottom: 8px;
        font-size: 14px;
        -webkit-line-clamp: 1; /* 移动端标题限一行 */
    }

    .learning-progress-bar {
        margin: 0 20px 4px 0;
    }
}

/* =============================================================================
   --- 去除视频顶部按钮栏显示 --- 
   ============================================================================= */
.tutor-course-topic-single-header {
    display: none !important;
}

/* =============================================================================
   --- 侧边栏折叠功能样式 --- 
   ============================================================================= */
/* =============================================================================
   1. PC端侧边栏折叠逻辑 (屏幕宽度 > 991px)
   ============================================================================= */
@media (min-width: 992px) {
    .tutor-lesson-sidebar {
        position: relative !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        width: 300px !important; 
        overflow: hidden; 
        display: flex;
        flex-direction: column;
        z-index: 10;
    }

    /* 按钮：位于侧边栏内部顶部 */
    .tutor-custom-sidebar-toggle-btn {
        width: 100%;
        height: 45px;
        background: #3e64de;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 11;
        font-size: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* 折叠状态：侧边栏缩窄，仅保留按钮宽度 */
    body.sidebar-collapsed .tutor-lesson-sidebar {
        width: 60px !important;
        min-width: 60px !important;
        flex: 0 0 60px !important;
    }

    /* 折叠后隐藏文字，只留箭头 */
    body.sidebar-collapsed .tutor-custom-sidebar-toggle-btn .toggle-text {
        display: none;
    }

    /* 折叠后隐藏课程目录内容 */
    body.sidebar-collapsed .tutor-lesson-sidebar > *:not(.tutor-custom-sidebar-toggle-btn) {
        opacity: 0;
        pointer-events: none;
    }

    /* 播放器区域自动拉伸 */
    .tutor-lesson-content-area {
        flex: 1;
        transition: all 0.4s ease !important;
    }
}

/* =============================================================================
   2. 移动端彻底隐藏侧边栏 (屏幕宽度 <= 991px)
   ============================================================================= */
@media (max-width: 991px) {
    /* 彻底隐藏侧边栏容器 */
    .tutor-lesson-sidebar {
        display: none !important;
    }

    /* 确保内容区域（播放器）在侧边栏消失后占满全屏 */
    .tutor-lesson-content-area {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 同时隐藏我们添加的自定义切换按钮（以防万一） */
    .tutor-custom-sidebar-toggle-btn {
        display: none !important;
    }
}
/* =============================================================================
   发布视频显示全名
   ============================================================================= */
.css-1gl65wi {
    -webkit-line-clamp: 0 !important;
}
/* =============================================================================
   设置已观看列表样式
   ============================================================================= */
/* --- 课程列表页：已播放项的样式定义 --- */

/* 1. 强制修改眼睛图标颜色为绿色 */
.tutor-course-content-list-item.is-watched-completed .tutor-icon-eye-line,
.tutor-course-topic-item-lesson.is-watched-completed .tutor-icon-eye-line {
    /* 使用 !important 覆盖 tutor-color-muted 的默认灰色 */
    color: #1ed760 !important; 
    opacity: 1 !important;
}

/* 2. 可选：让已学习的文字稍微变淡，以示区分 */
.tutor-course-content-list-item.is-watched-completed .tutor-course-content-list-item-title a {
    color: #777 !important;
}

/* 3. 可选：鼠标悬停在已播放项时的反馈 */
.tutor-course-content-list-item.is-watched-completed:hover {
    background-color: rgba(30, 215, 96, 0.05) !important;
}

/* 4. 动画效果（让变色更平滑） */
.tutor-icon-eye-line {
    transition: color 0.3s ease;
}

/* =============================================================================
   现代简约风格优化 - 全局美化
   ============================================================================= */
:root {
    --minimal-radius: 8px;
    --minimal-radius-sm: 6px;
    --minimal-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --minimal-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
    --minimal-border: 1px solid rgba(0, 0, 0, 0.06);
    --minimal-spacing: 24px;
}

/* 用户头像下拉菜单 - 简约风格 */
.tutor-header-profile-menu-items,
.tutor-header-profile-content,
.tutor-header-profile-submenu {
    border-radius: var(--minimal-radius) !important;
}
.profile-name a,
.tutor-header-profile-submenu a {
    padding: 10px 16px !important;
    font-size: 14px !important;
    color: #333 !important;
    transition: background 0.2s ease, color 0.2s ease;
}
.profile-name a:hover,
.tutor-header-profile-submenu a:hover {
    background: rgba(23, 92, 255, 0.06) !important;
    color: var(--primary-color) !important;
}
.tutor-header-profile-submenu {
    box-shadow: var(--minimal-shadow) !important;
    border: var(--minimal-border) !important;
    padding: 6px 0 !important;
}

/* 卡片与容器 - 简约圆角与阴影 */
.tutor-card,
.tutor-course-card,
.elementor-widget-container {
    border-radius: var(--minimal-radius) !important;
    box-shadow: var(--minimal-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.tutor-card:hover,
.tutor-course-card:hover {
    box-shadow: var(--minimal-shadow-hover);
}

/* 输入框与表单 - 简约边框 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    border-radius: var(--minimal-radius-sm) !important;
    border: var(--minimal-border) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(23, 92, 255, 0.1);
}

/* 仪表盘与课程区域 - 留白与间距 */
.tutor-dashboard-content-inner,
.tutor-dashboard-content {
    padding: var(--minimal-spacing) 0 !important;
}
.tutor-dashboard-nav-item {
    border-radius: var(--minimal-radius-sm) !important;
    margin-bottom: 4px !important;
}
.tutor-dashboard-nav-item:hover,
.tutor-dashboard-nav-item.active {
    background: rgba(23, 92, 255, 0.08) !important;
}

/* 移动端简约优化 */
@media (max-width: 991.98px) {
    :root {
        --minimal-spacing: 16px;
    }
    .tutor-header-profile-submenu {
        max-width: 90vw !important;
    }
}
@media (max-width: 767px) {
    .tutor-card,
    .tutor-course-card {
        border-radius: var(--minimal-radius-sm) !important;
    }
}