/**
 * 自定义样式 - 折叠/展开功能增强
 */

/* 禁用自定义字体，使用系统默认字体避免404错误 */
/* 原网站的字体文件不完整，使用系统字体可以避免显示问题 */

/* 重置整体样式，避免放大效果 */
html {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* 折叠容器基础样式 */
.m-showhide {
    margin: 20px 0;
}

/* 折叠按钮样式 */
.m-showhide__control {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px 0;
    width: 100%;
    text-align: left;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: none;
}

/* 禁止所有链接的跳转功能，但保持原有样式 */
a {
    pointer-events: none !important;
}

.m-showhide__control:hover {
    opacity: 0.8;
}

.m-showhide__control:focus {
    outline: 2px solid #004fb6;
    outline-offset: 2px;
}

/* 按钮标题 */
.m-showhide__control-heading {
    font-weight: bold;
    flex: 1;
}

/* 展开/收起文字 */
.m-showhide__control-desc {
    font-size: 14px;
    color: #666;
}

/* 展开状态 */
.m-showhide.is-expanded .m-showhide__control {
    margin-bottom: 10px;
}

/* 内容区域默认隐藏 */
.m-showhide__content {
    overflow: hidden;
    transition: none;
}

/* ==================== 隐藏不需要的元素 ==================== */

/* 隐藏抄本 */
.m-showhide.m-showhide--transcript {
    display: none !important;
}

/* 隐藏联系我们链接 */
.m-site-contact-us {
    display: none !important;
}

/* 隐藏登录链接 */
.o-masthead__login-link {
    display: none !important;
}

/* 隐藏页脚社交媒体部分 */
.m-footer__group--social {
    display: none !important;
}

/* JavaScript动态隐藏的元素样式 */
.js-hidden-element {
    display: none !important;
    visibility: hidden !important;
}

/* ==================== 简化版FRF弹窗样式 ==================== */
/* 简化版弹窗遮罩 */
.frf-simple-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    opacity: 0;
    transition: none;
}

.frf-simple-modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* 简化版弹窗主体 */
.frf-simple-modal {
    background: white;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
    transform: none;
    transition: none;
}

.frf-simple-modal-overlay.active .frf-simple-modal {
    transform: scale(1);
}

/* 简化版弹窗关闭按钮 */
.frf-simple-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #333;
}

.frf-simple-modal-close:hover {
    background: rgba(240, 240, 240, 1);
    transform: rotate(90deg);
}

/* 简化版弹窗头部 */
.frf-simple-modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px 40px;
    text-align: center;
}

.frf-simple-modal-logo {
    font-size: 32px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 简化版弹窗内容区域 */
.frf-simple-modal-content {
    padding: 40px;
    max-height: calc(85vh - 120px);
    overflow-y: auto;
}

/* 自定义滚动条 - 简化版 */
.frf-simple-modal-content::-webkit-scrollbar {
    width: 8px;
}

.frf-simple-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.frf-simple-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.frf-simple-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

/* 简化版弹窗标题 */
.frf-simple-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 24px;
    line-height: 1.4;
    text-align: center;
}

/* 简化版弹窗段落 */
.frf-simple-modal-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    text-align: justify;
}

/* 简化版弹窗小标题 */
.frf-simple-modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2a5298;
    margin-top: 30px;
    margin-bottom: 16px;
    padding-left: 15px;
    border-left: 4px solid #667eea;
}

/* 简化版弹窗列表 */
.frf-simple-modal-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.frf-simple-modal-content ul li {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
    padding-left: 30px;
    position: relative;
}

.frf-simple-modal-content ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 18px;
}

.frf-simple-modal-content ul li strong {
    color: #1e3c72;
    font-weight: 600;
}

/* 响应式设计 - 简化版 */
@media (max-width: 768px) {
    .frf-simple-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .frf-simple-modal-header {
        padding: 20px 24px;
    }
    
    .frf-simple-modal-logo {
        font-size: 24px;
    }
    
    .frf-simple-modal-content {
        padding: 24px;
    }
    
    .frf-simple-modal-title {
        font-size: 20px;
    }
    
    .frf-simple-modal-content h3 {
        font-size: 18px;
    }
    
    .frf-simple-modal-content p,
    .frf-simple-modal-content ul li {
        font-size: 15px;
    }
}

/* ==================== 移动端页面固定和轮播优化 ==================== */
@media (max-width: 768px) {
    /* 禁止页面整体左右滑动 */
    html, body {
        overscroll-behavior-x: none;
        overflow-x: hidden;
        touch-action: pan-y;
        width: 100%;
        max-width: 100vw;
        position: relative;
    }
    
    /* 轮播容器样式 - 允许左右滑动 */
    .carousel__content {
        touch-action: pan-x pan-y !important;
        -webkit-overflow-scrolling: touch !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
    }
    
    /* 新闻列表横向布局 */
    .m-list-of-cards {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        padding: 0 12px 16px 12px !important;
        box-sizing: border-box !important;
        touch-action: pan-x pan-y !important;
        -webkit-overflow-scrolling: touch !important;
        width: max-content !important;
    }
    
    /* 每个新闻卡片尺寸控制 */
    .m-list-of-cards > li {
        flex: 0 0 85vw !important;
        min-width: 85vw !important;
        max-width: 85vw !important;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    /* 卡片图片容器 - 16:9比例缩小版 */
    .m-list-of-cards > li .m-card-image {
        width: 100% !important;
        height: auto !important;
        max-height: 180px !important;
        overflow: hidden !important;
        border-radius: 8px !important;
    }
    
    /* 卡片图片 - 保持16:9比例 */
    .m-list-of-cards > li .m-card-image img {
        width: 100% !important;
        height: auto !important;
        max-height: 180px !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    /* 卡片内容区域优化 */
    .m-list-of-cards > li .m-card-content {
        padding: 16px !important;
    }
    
    /* 卡片标题字体缩小 */
    .m-list-of-cards > li .m-card-heading {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin: 8px 0 !important;
    }
    
    /* 卡片分类和日期字体 */
    .m-list-of-cards > li .a-text-tagline,
    .m-list-of-cards > li .m-card-date {
        font-size: 12px !important;
    }
    
    /* 整个卡片高度控制 */
    .m-list-of-cards > li.m-card {
        height: auto !important;
        max-height: 450px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* 隐藏横向滚动条 */
    .carousel__content::-webkit-scrollbar {
        display: none;
    }
    
    .carousel__content {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* ==================== 轮播分页指示器 ==================== */
.carousel-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    margin-top: 16px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: none;
}

.carousel-dot.active {
    width: 24px;
    border-radius: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.carousel-dot:hover {
    background: #999;
}

.carousel-dot.active:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

/* 桌面端隐藏分页指示器 */
@media (min-width: 769px) {
    .carousel-pagination {
        display: none;
    }
}

/* 隐藏股价下跌箭头 */
.icon--arrow-down,
.share-price-card__change-icon.icon--arrow-down,
.masthead-share-price__change-icon.icon--arrow-down {
    display: none !important;
    visibility: hidden !important;
    background-image: none !important;
}

/* 修复首页banner图片显示 */
/* 确保Hero容器正常显示 */
.m-hero {
    display: flex !important;
    position: relative !important;
    width: 100% !important;
    min-height: 400px !important;
}

/* Hero图片区域 - 强制显示 */
.m-hero__image {
    position: relative !important;
    display: block !important;
    flex: 1 1 50% !important;
    min-width: 50% !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
}

.m-hero__image picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

/* 隐藏外部source，使用本地img */
.m-hero__image picture source {
    display: none !important;
}

.m-hero__image picture img,
.m-hero__image > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Hero文字区域 */
.m-hero-message {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 1 !important;
    flex: 1 1 50% !important;
}

/* 隐藏RequireJS错误 */
body::before {
    content: none !important;
}

/* 确保视频封面显示 */
#local-video-player[poster] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ==================== 文字内容替换 ==================== */

/* 修改欢迎标题 */
.m-hero-message h1.a-heading.a-heading-display::after {
    content: 'FRF × Aviva' !important;
    display: block;
    font-size: 1.2em;
    margin-top: 10px;
}

.m-hero-message h1.a-heading.a-heading-display {
    font-size: 0;
}

.m-hero-message h1.a-heading.a-heading-display::before {
    content: 'Win-win cooperation';
    font-size: 4rem;
    display: block;
    line-height: 1.2;
}

/* 修改欢迎副标题 */
.m-hero-message .a-heading.a-heading--3 {
    font-size: 0 !important;
    position: relative;
}

.m-hero-message .a-heading.a-heading--3::after {
    content: 'FRF Group collaborates with Aviva Insurance to provide comprehensive protection for user funds, creating a safer, more transparent, and stable investment environment.';
    font-size: 1.5rem !important;
    display: block;
    line-height: 1.6;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* 修改视频标题 */
/* 视频标题容器 - 完全居中 */
h2.a-heading.a-heading-display.a-heading-display--md.l-section__heading {
    font-size: 0 !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

/* 视频标题文本 - 完全居中显示 */
h2.a-heading.a-heading-display.a-heading-display--md.l-section__heading::after {
    content: 'Watch the introduction of FRF Group';
    font-size: 2.5rem;
    display: inline-block;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.brightcove-video h3.brightcove-video__header {
    display: none !important;
}

/* ==================== 弹窗样式 ==================== */

/* 遮罩层 */
.frf-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    animation: none;
}

.frf-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗容器 */
.frf-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: none;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 关闭按钮 */
.frf-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: none;
    z-index: 10;
}

.frf-modal-close:hover {
    background: rgba(255, 217, 0, 0.9);
    color: #000;
    transform: rotate(90deg);
}

/* 弹窗头部图片 */
.frf-modal-header {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #FFD900 0%, #FFA500 100%);
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.frf-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(30deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1)),
        linear-gradient(150deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1)),
        linear-gradient(30deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1)),
        linear-gradient(150deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}

.frf-modal-logo {
    font-size: 5rem;
    font-weight: 900;
    color: #000;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
    letter-spacing: 0.5rem;
}

/* 弹窗内容 */
.frf-modal-content {
    padding: 40px;
    color: #fff;
}

.frf-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #FFD900;
    margin-bottom: 20px;
    text-align: center;
}

.frf-modal-subtitle {
    font-size: 1.2rem;
    color: #aaa;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.frf-modal-section {
    margin-bottom: 30px;
}

.frf-modal-section h3 {
    font-size: 1.5rem;
    color: #FFD900;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid #FFD900;
}

.frf-modal-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 15px;
}

.frf-modal-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.frf-modal-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(255, 217, 0, 0.1);
    border-left: 3px solid #FFD900;
    font-size: 1rem;
    line-height: 1.6;
    color: #fff;
}

.frf-modal-list li strong {
    color: #FFD900;
}

/* 滚动条样式 */
.frf-modal::-webkit-scrollbar {
    width: 8px;
}

.frf-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.frf-modal::-webkit-scrollbar-thumb {
    background: #FFD900;
    border-radius: 10px;
}

.frf-modal::-webkit-scrollbar-thumb:hover {
    background: #FFA500;
}

/* ==================== 新闻卡片样式修复 ==================== */

/* 确保了解更多按钮样式与阅读更多一致 */
.m-card-readmore {
    display: inline-block !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.m-card-readmore:hover {
    text-decoration: underline !important;
}

/* ==================== 视频样式重写 - 确保16:9完全填充 ==================== */

/* 视频外层容器 - 居中显示 */
.brightcove-video {
    max-width: 1280px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 隐藏旧的Brightcove播放器 */
.brightcove-video__player,
.video-js[data-video-id="6376646957112"] {
    display: none !important;
    visibility: hidden !important;
}

/* 视频播放器容器 - 强制16:9比例 */
.brightcove-video__player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 = 9/16 = 56.25% */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* 本地视频播放器 - 绝对定位填充整个容器 */
#local-video-player {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    object-fit: fill !important;
    object-position: center center !important;
    background: #000;
    display: block !important;
}

/* 抄本按钮左对齐 */
.m-showhide.m-showhide--transcript {
    text-align: left;
}

.m-showhide__heading {
    text-align: left !important;
}

.m-showhide__control {
    justify-content: flex-start;
}

/* ==================== 视频播放按钮美化 ==================== */

/* 大播放按钮覆盖层 - 居中显示（缩小版本） */
.brightcove-video__player-container::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: #FFD900;
    background: rgba(0, 0, 0, 0.75);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    pointer-events: auto;
    transition: none;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    padding-left: 6px; /* 调整播放图标位置 */
    box-shadow: 0 4px 30px rgba(255, 217, 0, 0.3);
    border: 3px solid rgba(255, 217, 0, 0.5);
}

/* 悬停效果 */
.brightcove-video__player-container:hover::after {
    background: rgba(255, 217, 0, 0.9);
    color: #000;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 40px rgba(255, 217, 0, 0.5);
}

/* 视频播放时隐藏大按钮 */
.brightcove-video__player-container.playing::after {
    opacity: 0;
    pointer-events: none;
}

/* 视频控制条美化样式 */
#local-video-player::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 隐藏左下角的播放按钮 */
#local-video-player::-webkit-media-controls-play-button {
    display: none !important;
    visibility: hidden !important;
}

/* 移除所有可能影响视频大小的样式 */
.brightcove-video__player-container > * {
    border-radius: 12px;
}

/* 确保video标签没有额外的margin/padding */
video {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: top;
}

/* 强制覆盖任何可能的外部样式 */
.brightcove-video video#local-video-player,
.brightcove-video__player-container video#local-video-player {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
}

/* 视频加载指示器 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
}

/* 视频错误样式 */
.video-error {
    padding: 40px;
    text-align: center;
    background: #f5f5f5;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .m-showhide__control {
        font-size: 14px;
    }
    
    .brightcove-video__header {
        font-size: 20px;
    }
}

