/* 名师风采页特有样式 - 与资质荣誉完全独立的类名 */

/* ========== 内页基础布局（从honors页迁移） ========== */

/* 内页Banner */
.inner-banner {
    width: 100%;
    height: 400px;
    margin-top: 120px;
    position: relative;
    overflow: hidden;
}

.inner-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 主内容区域 */
.main-content {
    padding: 52px 0 var(--section-spacing) 0;
    background-color: var(--white);
}

.content-container {
    display: flex;
    gap: 40px;
}

/* 左侧导航栏 */
.sidebar {
    flex: 0 0 250px;
    position: relative;
}

.sidebar-nav {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: visible;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    background: url('../images/sidebar-title-bg.jpg') no-repeat center center;
    background-size: cover;
    color: var(--white);
    font-size: 30px;
    font-weight: 700;
    padding: 25px;
    text-align: center;
    position: relative;
    z-index: 3;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(173, 15, 25, 0);
    z-index: -1;
}

.sidebar-menu-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.sidebar-menu {
    list-style: none;
    position: relative;
    z-index: 3;
    background-color: var(--white);
    flex: 1;
    padding-bottom: 0;
    margin-bottom: 0;
}

.menu-item {
    border-bottom: 1px solid var(--light-gray);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-link {
    display: block;
    padding: 18px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    background-color: var(--white);
}

.menu-link:hover {
    background-color: rgba(173, 15, 25, 0.05);
    color: var(--primary-color);
    padding-left: 25px;
}

.menu-link.active {
    background-color: rgba(234, 148, 37, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
    padding-left: 30px;
}

.menu-link.active:before {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

/* 侧边栏底部图片 */
.sidebar-image-container {
    position: relative;
    width: 100%;
    height: 380px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
    margin-top: 20px;
}

.sidebar-bg {
    width: 100%;
    height: 100%;
    background: url('../images/sidebar-bottom-bg.jpg') no-repeat center center;
    background-size: cover;
    z-index: 5;
    display: block;
}

/* 右侧内容区域 */
.content-area {
    flex: 1;
    position: relative;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
}

.content-title {
    font-size: 32px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.breadcrumb-right {
    font-size: 16px;
    color: var(--dark-gray);
    margin-right: 0;
    text-align: right;
}

.breadcrumb-right a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-right a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: var(--medium-gray);
}

.breadcrumb-current {
    color: var(--secondary-color);
    font-weight: 500;
}

/* 移动端折叠侧边栏 */
.mobile-sidebar {
    display: none;
    background-color: var(--white);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.mobile-sidebar-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    width: 100%;
    height: 60px;
}

.mobile-sidebar-title {
    font-size: 20px;
    font-weight: 700;
}

.mobile-sidebar-toggle {
    font-size: 18px;
    transition: var(--transition);
}

.mobile-sidebar-toggle.active {
    transform: rotate(180deg);
}

.mobile-sidebar-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sidebar-content.active {
    max-height: 500px;
}

.mobile-sidebar-menu {
    list-style: none;
    padding: 0;
}

.mobile-sidebar-item {
    border-bottom: 1px solid var(--light-gray);
}

.mobile-sidebar-item:last-child {
    border-bottom: none;
}

.mobile-sidebar-link {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    background-color: var(--white);
}

.mobile-sidebar-link:hover {
    background-color: rgba(173, 15, 25, 0.05);
    color: var(--primary-color);
    padding-left: 25px;
}

.mobile-sidebar-link.active {
    background-color: rgba(234, 148, 37, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

.mobile-sidebar-link.active:before {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

/* ========== 讲师列表（全新类名） ========== */

/* 讲师列表容器 - CMS会生成ul/li嵌套结构，flex加在ul上 */
.instructor-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* CMS生成的ul/ol作为实际flex容器，确保一行四个 */
.instructor-list > ul,
.instructor-list > ol {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 讲师卡片 - 照片撑满卡片，只在标题处留边 */
.instructor-card {
    flex: 0 0 calc((100% - 120px) / 4);
    max-width: calc((100% - 120px) / 4);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 0 0 15px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-align: center;
    box-sizing: border-box;
    list-style: none;
    overflow: hidden;
}

.instructor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 讲师照片容器 - 撑满卡片宽度，竖版比例 */
.instructor-photo-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    flex-shrink: 0;
}

.instructor-photo-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.instructor-card:hover .instructor-photo-wrap img {
    transform: scale(1.05);
}

/* 照片悬停遮罩 - 仅颜色，无图标 */
.instructor-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(173, 15, 25, 0.6);
    opacity: 0;
    transition: var(--transition);
    border-radius: 10px 10px 0 0;
}

.instructor-card:hover .instructor-photo-overlay {
    opacity: 1;
}

/* 讲师信息区域 */
.instructor-info {
    width: 100%;
    padding: 10px 12px 0;
}

.instructor-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    transition: var(--transition);
}

.instructor-card:hover .instructor-name {
    color: var(--primary-color);
}

.instructor-desc {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-top: 5px;
}

/* 隐藏箭头（竖向布局不需要） */
.instructor-arrow {
    display: none;
}

/* 隐藏CMS生成的非卡片元素（注释节点、script等由JS处理） */
.instructor-list > script,
.instructor-list > .gallery-track {
    display: none;
}

/* 确保instructor-list的直接子元素都参与flex布局 */
.instructor-list > * {
    box-sizing: border-box;
}

/* ========== 图片放大模态框 ========== */
.instructor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instructor-modal.active {
    display: flex;
    opacity: 1;
}

.instructor-modal-body {
    position: relative;
    width: 90%;
    max-width: 650px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.instructor-modal-img-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 30px;
    min-height: 400px;
}

.instructor-modal-img-box img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease;
}

.instructor-modal-footer {
    width: 100%;
    padding: 20px 30px;
    background: var(--white);
    border-top: 1px solid var(--light-gray);
    text-align: center;
}

.instructor-modal-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* 模态框关闭按钮 */
.instructor-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.instructor-modal-close:hover {
    background: var(--secondary-color);
    transform: rotate(90deg);
}

/* 模态框导航按钮 */
.instructor-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(173, 15, 25, 0.3);
    z-index: 10;
}

.instructor-modal-nav:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.instructor-modal-prev {
    left: 20px;
}

.instructor-modal-next {
    right: 20px;
}

/* ====== 修复：Font Awesome被拦截，用CSS伪元素绘制弹窗图标 ====== */

/* 关闭按钮：X */
.instructor-modal-close::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    transform: rotate(45deg);
}

.instructor-modal-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    transform: rotate(-45deg);
}

.instructor-modal-close i,
.instructor-modal-close svg {
    display: none !important;
}

/* 上一张按钮：左箭头 */
.instructor-modal-prev::before {
    content: '';
    width: 10px;
    height: 10px;
    border-left: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(45deg);
    margin-left: 4px;
}

/* 下一张按钮：右箭头 */
.instructor-modal-next::before {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 3px solid currentColor;
    border-top: 3px solid currentColor;
    transform: rotate(45deg);
    margin-right: 4px;
}

.instructor-modal-nav i,
.instructor-modal-nav svg {
    display: none !important;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    /* 内页布局响应式 */
    .main-content {
        padding-top: 10px;
    }

    .content-container {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .mobile-sidebar {
        display: block;
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }

    .mobile-sidebar-header {
        width: 100%;
    }

    .sidebar-image-container {
        display: none;
    }

    .sidebar-menu-container {
        padding-bottom: 0;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .breadcrumb-right {
        align-self: flex-end;
    }

    .content-title {
        font-size: 28px;
    }

    .sidebar-title {
        background: var(--primary-color) !important;
    }

    /* 讲师列表响应式 */
    .instructor-list > ul,
    .instructor-list > ol {
        gap: 16px;
        justify-content: center;
    }

    .instructor-card {
        flex: 0 0 calc((100% - 32px) / 3);
        max-width: calc((100% - 32px) / 3);
        padding: 0 0 12px;
    }

    .instructor-name {
        font-size: 16px;
    }

    /* 模态框响应式 */
    .instructor-modal-nav {
        display: none;
    }

    .instructor-modal-body {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 0;
    }

    .inner-banner {
        height: 300px;
    }

    .content-title {
        font-size: 24px;
    }

    .breadcrumb-right {
        font-size: 14px;
    }

    /* 移动端照片稍小 */
    .instructor-list > ul,
    .instructor-list > ol {
        justify-content: center;
        gap: 12px;
    }

    .instructor-card {
        flex: 0 0 calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
        padding: 0 0 10px;
    }

    .instructor-name {
        font-size: 16px;
    }

    .instructor-desc {
        font-size: 13px;
    }

    /* 模态框响应式 */
    .instructor-modal-img-box {
        min-height: 250px;
        padding: 15px;
    }

    .instructor-modal-name {
        font-size: 18px;
    }

    .instructor-modal-footer {
        padding: 15px 20px;
    }

    .instructor-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .mobile-sidebar {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
}