/* start 1. 区域1 的样式 */
/* --- 1. 调整 Hero Section 整体高度 --- */
.hero-section {
    background: linear-gradient(135deg, #889ba4 0%, #bcbcbd 100%);
    /* 将原本 120px 的 padding 缩小，甚至设为 0，靠高度控制 */
    padding: 15px 0; 
    color: #1e293b;
    overflow: hidden;
    /* 核心：设置最小高度为视口的 35% (约 1/3) */
    min-height: 35vh; 
    display: flex;
    align-items: center; /* 确保内容在 1/3 高度内垂直居中 */
}

/* --- 2. 缩小标题和文字，以适应更小的高度 --- */
.main-title {
    font-size: 42px; /* 原本 64px 太大，在 1/3 高度里会显得拥挤 */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #0f172a;
}

.sub-text {
    font-size: 16px; /* 稍微缩小字号 */
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 500px;
}

/* --- 3. 关键：同步缩小图片宽度 --- */
.hero-image-area .image-wrapper {
    position: relative;
    /* 限制图片容器的最大宽度，防止图片过大撑开高度 */
    max-width: 450px; 
    margin-left: auto;
}

.hero-image-area img {
    width: 100%;
    /* 确保图片高度不会超过容器，且保持比例 */
    height: auto; 
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    /* 这一步确保图片随容器同步缩小 */
    display: block; 
}

/* 如果有装饰性的小元素，也需要适当调整位置或缩小 */
.floating-card {
    /* 缩小浮动卡片的大小，避免在窄高度下挡住主图 */
    transform: scale(0.8); 
}

/* --- 核心：左右留白控制 --- */
.hero-container {
    max-width: 1280px;      /* 常见的网页内容宽度 */
    margin: 0 auto;         /* 水平居中 */
    padding: 0 60px;        /* 关键：在小屏幕或特定宽度下，确保左右有 60px 的空隙 */
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右平分 */
    gap: 80px;                      /* 增加左右两个模块之间的间距 */
    align-items: center;
}

/* --- 左侧文字控制 --- */
.hero-text-area {
    padding-right: 20px;    /* 稍微给左侧文字增加右边距，避免紧贴图片 */
}


.gold {
    color: #2563eb; 
}


/* --- 右侧图片及对角线定位 --- */
.hero-image-area {
    display: flex;
    justify-content: flex-end; /* 让图片整体靠右对齐容器边界 */
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;       /* 稍微缩小图片容器，让整体更精致 */
}

.main-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}

/* 对角线卡片：沿用之前的 translate 逻辑，但在比例上更克制 */
.diagonal-card {
    position: absolute;
    background: white;
    color: #1e293b;
    padding: 16px 20px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 10;
}

.top-right {
    top: 0;
    right: 0;
    transform: translate(20%, -30%); /* 精准对角线外移 */
    text-align: center;
}

.bottom-left {
    bottom: 0;
    left: 0;
    transform: translate(-10%, 30%); /* 精准对角线外移 */
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 轮播图 */
/* --- 轮播图核心容器 --- */
.slider-container {
    position: relative;
    width: 100%;
    border-radius: 30px;
    overflow: hidden; /* 隐藏超出部分 */
    box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}

.slider-wrapper {
    display: flex;
    width: 300%; /* 3张图就300%，4张就400% */
    animation: slide-animation 12s infinite ease-in-out; /* 12秒一个循环 */
}

.slide {
    width: 100.333%; /* 确保每张图占满容器 */
}

.slide img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* --- 轮播动画逻辑 --- */
/* 3张图：0-30% 看第一张，33-63% 看第二张，66-96% 看第三张 */
@keyframes slide-animation {
    0%, 30% { transform: translateX(0); }
    33%, 63% { transform: translateX(-33.333%); }
    66%, 96% { transform: translateX(-66.666%); }
    100% { transform: translateX(0); }
}

/* --- 指示点样式 --- */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* 使用动画同步点亮的简单模拟 */
.dot:nth-child(1) { animation: dot-active-1 12s infinite; }
.dot:nth-child(2) { animation: dot-active-2 12s infinite; }
.dot:nth-child(3) { animation: dot-active-3 12s infinite; }

@keyframes dot-active-1 {
    0%, 30% { background: #fff; transform: scale(1.3); }
    33%, 100% { background: rgba(255, 255, 255, 0.4); }
}
@keyframes dot-active-2 {
    0%, 30% { background: rgba(255, 255, 255, 0.4); }
    33%, 63% { background: #fff; transform: scale(1.3); }
    66%, 100% { background: rgba(255, 255, 255, 0.4); }
}
@keyframes dot-active-3 {
    0%, 63% { background: rgba(255, 255, 255, 0.4); }
    66%, 96% { background: #fff; transform: scale(1.3); }
    100% { background: rgba(255, 255, 255, 0.4); }
}

/* 覆盖原有样式：移除旧 main-img 的阴影，交给容器处理 */
.main-img {
    box-shadow: none !important; 
}

/* 2. 顶部公告条样式 */
.announcement-bar {
    background: #ff4d4f; /* 醒目的红色或橙色 */
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
}


.btn-group { display: flex; gap: 20px; }
.btn-white {
    background: white; color: #1d4ed8; padding: 16px 36px;
    border-radius: 14px; font-weight: 700; text-decoration: none;
}
.btn-outline {
    border: 1px solid rgba(255,255,255,0.4); color: white;
    padding: 16px 36px; border-radius: 14px; font-weight: 700;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .hero-container { padding: 0 30px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 100px; }
    .hero-text-area { padding-right: 0; }
    .sub-text { margin-left: auto; margin-right: auto; }
    .btn-group { justify-content: center; }
}

/* 母卡片容器 */
.announcement-card-box {
    background: rgb(203 25 25 / 31%); /* 半透明背景 */
    backdrop-filter: blur(10px);          /* 毛玻璃 */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;                       /* 上下留白 */
    margin-bottom: 5px;
    overflow: hidden;
}

/* 每一行公告 */

.notice-item-row {
    display: flex;
    align-items: center;
    /* padding: 12px 5px; */
    border-left: 4px solid transparent; /* 左侧色块 */
    transition: all 0.3s ease;
}
.notice-item-row:hover {
    background: rgba(15, 211, 100, 0.2);
}

/* 图标处理 */
.notice-icon-wrapper {
    width: 24px;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    color: #fff;
}

/* 针对 reward 类型特殊提亮图标颜色 */
.notice-item-row.reward .notice-icon-wrapper i {
    color: #ffcc00; /* 亮金色 */
}

/* 针对 system 类型使用蓝色图标 */
.notice-item-row.system .notice-icon-wrapper i {
    color: #00d2ff; /* 亮蓝色 */
}

/* 文字内容 */
.notice-text-content {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

/* 内部分割线 */
.notice-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    margin: 0 15px;
}

/* 兼容你之前设置的数字高亮 */
.notice-text-content strong {
    color: #ffcc00;
    margin: 0 4px;
    font-weight: 700;
}
/* end 1. 区域1 的样式 */

/* ---START公告图标闪烁样式START--- */
/* 1. 图标容器：增加相对定位，用于承载闪烁效果 */
.notice-icon-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    z-index: 1;
}

/* 2. 核心动画：定义呼吸闪烁效果 */
@keyframes notice-icon-pulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.15);
        text-shadow: 0 0 15px rgba(255, 204, 0, 0.8), 0 0 25px rgba(255, 204, 0, 0.4);
        filter: brightness(1.3); /* 变亮 */
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
        filter: brightness(1);
    }
}

/* 3. 应用闪烁到图标 */
.notice-item-row .notice-icon-wrapper i {
    font-size: 18px;
    animation: notice-icon-pulse 2s infinite ease-in-out;
}

/* 4. 增加一个“感叹号”角标 (利用伪元素，不需要改HTML) */
/*
.notice-item-row .notice-icon-wrapper::after {
    content: "!";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #ff4d4f; 
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #2a49c9; 
    box-shadow: 0 0 5px rgba(255, 77, 79, 0.5);
}
*/

/* 针对不同类型的公告，颜色微调 */
.notice-item-row.reward .notice-icon-wrapper i {
    color: #ffcc00; /* 奖励用金黄色 */
}

.notice-item-row.system .notice-icon-wrapper i {
    color: #00d2ff; /* 系统用青蓝色 */
    animation-delay: 0.5s; /* 错开闪烁时间，更有层次感 */
}
/* ---END公告图标闪烁样式END--- */

/* start 2. 区域2 的样式 */
/* --- 数据统计区域样式 --- */
.stats-section {
    background-color: #ffffff;
    padding: 80px 0; /* 上下留白，与首屏产生区分 */
}

/* 统计项网格：四列等分布局 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 图标容器：浅蓝色圆角背景 */
.stat-icon-box {
    width: 60px;
    height: 60px;
    background-color: #f0f7ff; /* 极其浅的蓝色 */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-icon-box {
    transform: translateY(-5px); /* 悬停时微动，增加互动感 */
}

.stat-icon-box i {
    font-size: 24px;
    color: #2563eb; /* 品牌主色 */
    font-style: normal;
}

/* 数字样式 */
.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b; /* 深色文字 */
    margin-bottom: 8px;
    font-family: 'Arial Black', sans-serif; /* 确保数字看起来够厚重 */
}

/* 标签样式 */
.stat-label {
    font-size: 16px;
    color: #64748b; /* 灰色辅助文字 */
    font-weight: 500;
}

/* --- 响应式适配 --- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr); /* 平板端变为两行两列 */
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr; /* 手机端单列显示 */
        gap: 50px;
    }
    .stat-number {
        font-size: 32px;
    }
}
/* end 2. 区域2 的样式 */

/* start 3. 区域3 的样式 */
/* --- 第三个区域样式 --- */
.why-choose-section {
    background-color: #f8fafc; /* 使用极浅灰色背景，与上方白色区域做切分 */
    padding: 10px 0;
}

/* 标题区居中排版 */
.section-header {
    text-align: center;
    margin-bottom: 10px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* 6 宫格网格控制 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 标准三列布局 */
    gap: 10px; /* 卡片之间的间距 */
}

/* 单个卡片样式 */
.feature-card {
    background: white;
    padding: 10px 5px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
}

/* 卡片内部元素 */
.card-icon-box {
    width: 48px;
    height: 48px;
    background-color: #f0f7ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card-icon-box .icon {
    font-size: 20px;
    font-style: normal;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

/* --- 响应式适配 --- */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* 平板端二列 */
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr; /* 手机端一列 */
    }
    .section-title {
        font-size: 28px;
    }
}
/* end 3. 区域3 的样式 */

/* start 4. 区域4 的样式 */
/* --- 第四个区域样式 --- */
.popular-courses-section {
    background-color: #ffffff; /* 与上一层灰底区分 */
    padding: 10px 0;
}

/* 顶部标题行对齐 */
.courses-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}

.section-title-sm {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.section-subtitle-sm {
    font-size: 16px;
    color: #64748b;
}

.view-all-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s;
}

.view-all-link:hover { opacity: 0.8; }

/* 课程网格 */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* 课程卡片主体 */
.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden; /* 确保图片圆角 */
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* 图片区域 */
.course-thumb {
    position: relative;
    height: 200px;
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2563eb;
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.category-tag.blue { background: #3b82f6; }
.category-tag.dark { background: #1e40af; }

/* 内容区域 */
.course-body {
    padding: 15px;
}

.course-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 0px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f1f5f9;
}

.rating {
    color: #fbbf24;
    font-weight: 700;
}

.price {
    font-size: 22px;
    font-weight: 800;
    color: #2563eb;
}
/* 价格容器，让价格垂直或水平对齐 */
.price-wrapper {
    display: flex;
    flex-direction: column; /* 垂直排列，如果想水平并排改为 row */
    gap: 2px;
}

/* 原价样式 */
.original-price {
    font-size: 16px;
    color: #999;           /* 灰色 */
    text-decoration: line-through; /* 关键：添加中划线 */
    margin-left: 0;        /* 如果是水平排列，这里可以加 5px */
}

/* 调整 footer 布局，确保价格和按钮对齐 */
.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* 让价格底部和按钮对齐 */
}

.enroll-link {
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

/* 响应式 */
@media (max-width: 1024px) {
    .courses-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .courses-grid { grid-template-columns: 1fr; }
    .courses-header { flex-direction: column; align-items: flex-start; gap: 15px; }
}
/* end 4. 区域4 的样式 */

/* start 5. 区域5 的样式 */
/* --- 第五个区域样式 --- */
.testimonials-section {
    background-color: #f8fafc; /* 使用和第三区域相同的浅灰色，形成视觉节奏 */
    padding: 10px 0;
}

/* 评价网格 */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* 评价卡片主体 */
.testimonial-card {
    background: white;
    padding: 15px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.stars {
    color: #fbbf24;
    font-size: 16px;
    margin-bottom: 20px;
}

.comment {
    font-size: 16px;
    color: #1e293b;
    line-height: 1.8;
    margin-bottom: 15px;
    flex-grow: 1; /* 确保评论内容撑开卡片，让底部用户信息对齐 */
}

/* 用户信息区域 */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-details .name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.user-details .result {
    font-size: 13px;
    color: #2563eb;
    font-weight: 500;
    margin-top: 2px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .testimonials-grid { grid-template-columns: 1fr; }
    .testimonial-card { padding: 30px; }
}
/* end 5. 区域5 的样式 */

