/* PyGrow 英雄轮播图 - 大屏冲击效果 */

/* 全屏英雄区域 - 调整为适中大小 */
.hero-section {
    position: relative;
    height: 70vh; /* 从100vh调整为70vh */
    min-height: 600px; /* 从800px调整为600px */
    max-height: 800px; /* 增加最大高度限制 */
    overflow: hidden;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2); /* 简洁的半透明深色背景 */
}

/* 全屏轮播容器 */
.hero-carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#heroCarousel {
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative; /* 确保定位上下文 */
}

/* 轮播项目 */
.carousel-inner {
    height: 100%;
    border-radius: 0;
}

.carousel-item {
    height: 100%;
    background: #000;
    position: relative;
    overflow: hidden;
    /* 禁用Bootstrap默认过渡效果 - 防止图片跳跃 */
    transition: none !important;
}

/* 简化的纯色蒙版效果 - 简洁干净 */
.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* 简单的半透明黑色蒙版 */
    z-index: 2;
    transition: all 0.3s ease;
}

.carousel-item.active::before {
    background: rgba(0, 0, 0, 0.3); /* 活动状态稍微透明一些 */
}

/* 移除额外的蒙版层 - 保持简洁 */
.carousel-item::after {
    display: none; /* 完全移除第二层蒙版 */
}

/* 背景图片优化 - 修复定位冲突 */
.carousel-item img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translate(-50%, -50%); /* 统一使用这个定位方式 */
    z-index: 1;
    /* 禁用过渡效果 - 防止定位跳跃 */
    transition: none !important;
    /* 图片质量优化 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    /* 抗锯齿 */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    /* 避免模糊 - 移除冲突的transform */
    -webkit-filter: blur(0);
    filter: blur(0);
}

/* 移除活动状态的缩放动画 */
.carousel-item.active img {
    transform: translate(-50%, -50%); /* 保持一致的定位 */
}

/* 确保轮播切换时图片定位稳定 */
.carousel-item.carousel-item-next img,
.carousel-item.carousel-item-prev img,
.carousel-item.carousel-item-next.carousel-item-start img,
.carousel-item.carousel-item-prev.carousel-item-end img {
    transform: translate(-50%, -50%) !important;
    transition: none !important;
}

/* Bootstrap 5 轮播切换状态 - 确保图片定位稳定 */
.carousel-item.carousel-item-start img,
.carousel-item.carousel-item-end img {
    transform: translate(-50%, -50%) !important;
    transition: none !important;
}

/* 防止任何轮播项目的transform被覆盖 */
.carousel-item[class*="carousel-item"] img {
    transform: translate(-50%, -50%) !important;
    transition: none !important;
}

/* Picture元素优化 */
.carousel-item picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 图片加载优化 */
.carousel-item img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.carousel-item img[loading="lazy"].loaded,
.carousel-item img[loading="eager"] {
    opacity: 1;
}

/* 内容区域 - 提高层级确保在蒙版之上 */
.hero-content {
    position: relative;
    z-index: 30; /* 大幅提高层级，确保在蒙版之上 */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none; /* 让点击事件穿透到下层 */
}

.hero-content .container {
    position: relative;
    z-index: 35; /* 进一步提高 */
    pointer-events: auto; /* 恢复内容区域的点击事件 */
}

/* 文字内容动画 - 确保在最顶层显示清晰 */
.hero-text {
    max-width: 800px;
    color: white;
    text-shadow: 
        0 2px 10px rgba(0,0,0,0.8),
        0 4px 20px rgba(0,0,0,0.4),
        0 1px 3px rgba(0,0,0,0.9);
    position: relative;
    z-index: 40; /* 确保文字在最顶层 */
}

.hero-title {
    font-size: 3.5rem; 
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease 0.3s forwards;
    /* 简洁的白色文字 */
    color: #ffffff;
    /* 简单清晰的阴影 */
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
    position: relative;
    z-index: 45;
}

.hero-subtitle {
    font-size: 1.5rem; 
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease 0.6s forwards;
    /* 简洁的浅灰色文字 */
    color: #f0f0f0;
    /* 简单清晰的阴影 */
    text-shadow: 0 1px 5px rgba(0,0,0,0.7);
    position: relative;
    z-index: 45;
}

.hero-description {
    font-size: 1.1rem; 
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 1s ease 0.9s forwards;
    /* 简洁的半透明背景 */
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 1.2rem 1.8rem;
    border-radius: 8px;
    border-left: 4px solid #4CAF50; /* 简单的绿色边框 */
    /* 简单的阴影 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    /* 简单的文字阴影 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    position: relative;
    z-index: 45;
}

/* 为描述框添加特殊动画 - 移除重复的slideInUp */
/* 已在后面定义了slideInUp动画，这里不需要重复定义 */

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 1s ease 1.2s forwards;
    position: relative;
    z-index: 45; /* 按钮在最顶层 */
}

/* 按钮样式优化 - 确保在最顶层 */
.hero-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 2px solid transparent;
    position: relative;
    z-index: 50; /* 确保按钮在最顶层，与控制按钮同级 */
    cursor: pointer; /* 确保显示指针 */
}

.hero-btn-primary {
    background: #4CAF50; /* 简洁的绿色背景 */
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-btn-primary:hover {
    background: #45a049; /* 深绿色悬停 */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: white;
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.15); /* 简单的半透明背景 */
    color: #ffffff; /* 白色文字 */
    border: 2px solid rgba(255, 255, 255, 0.3); /* 简单的白色边框 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25); /* 稍微加深的背景 */
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 轮播标题优化 - 简洁风格 */
.carousel-caption {
    position: absolute;
    bottom: 2rem; 
    left: 2rem; 
    right: auto;
    top: auto;
    text-align: left;
    background: rgba(0, 0, 0, 0.4); /* 简单的半透明黑色背景 */
    padding: 1.2rem 1.8rem; 
    border-radius: 8px;
    border-left: 4px solid #4CAF50; /* 简单的绿色边框 */
    max-width: 350px; 
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease 1.5s forwards;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    z-index: 20;
}

.carousel-caption h5 {
    font-size: 1.3rem; 
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #ffffff; /* 简洁的白色标题 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.carousel-caption p {
    font-size: 0.9rem; 
    margin-bottom: 0;
    color: #f0f0f0; /* 简洁的浅灰色文字 */
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* 指示器优化 - 确保在最顶层 */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    display: flex;
    gap: 1rem;
    z-index: 50; /* 大幅提高层级，确保在所有蒙版之上 */
}

.carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    opacity: 1;
    transition: all 0.4s ease;
    transform: scale(1);
}

.carousel-indicators button.active {
    background: white;
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

.carousel-indicators button:hover {
    border-color: white;
    transform: scale(1.2);
}

/* 控制按钮优化 - 确保在最顶层 */
.carousel-control-prev,
.carousel-control-next {
    width: 80px;
    height: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    opacity: 0.8;
    transition: all 0.4s ease;
    z-index: 50; /* 大幅提高层级，确保在所有蒙版之上 */
    cursor: pointer; /* 确保有指针样式 */
}

.carousel-control-prev {
    left: 2rem;
}

.carousel-control-next {
    right: 2rem;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255,255,255,0.2);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
    background-size: 30px;
}

/* 动画定义 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 视差滚动效果 */
.parallax-bg {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
}

/* 移除装饰元素 - 保持简洁 */
.hero-decoration {
    display: none; /* 完全移除装饰元素 */
}

.hero-decoration::before {
    display: none; /* 移除伪元素装饰 */
}

/* 移除呼吸动画 */
@keyframes breathe {
    /* 移除动画定义 */
}

/* =================================== */
/* 其他页面区域样式优化 */
/* =================================== */

/* 特色功能区域 */
.features-section {
    position: relative;
    overflow: hidden;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%234CAF50" fill-opacity="0.03"><circle cx="20" cy="20" r="2"/></g></svg>') repeat;
    z-index: 1;
}

.features-section .container {
    position: relative;
    z-index: 2;
}

.feature-icon {
    transition: transform 0.3s ease;
}

.hover-card:hover .feature-icon {
    transform: translateY(-5px) scale(1.1);
}

.hover-card {
    transition: all 0.4s ease;
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.hover-card:hover {
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.1);
}

/* 学习路径区域 */
.learning-path-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #4CAF50, #81C784);
    transform: translateX(-50%);
    border-radius: 1.5px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-icon {
    position: absolute;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transform: translateX(-50%);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    border: 4px solid white;
}

.timeline-content {
    width: calc(50% - 50px);
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

/* 统计数据区域 */
.stats-section {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="3"/></g></svg>') repeat;
    animation: rotateBackground 30s linear infinite;
    z-index: 1;
}

@keyframes rotateBackground {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.stats-section .container {
    position: relative;
    z-index: 2;
}

.stat-item {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-item i {
    opacity: 0.9;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover i {
    transform: scale(1.2);
}

/* CTA区域 */
.cta-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

/* 响应式设计 - 移除图片动画 */
@media (max-width: 1200px) {
    .hero-section {
        height: 65vh; 
        min-height: 550px; 
    }
    
    .hero-title {
        font-size: 3rem; 
    }
    
    .hero-subtitle {
        font-size: 1.3rem; 
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 992px) {
    .hero-section {
        height: 60vh; 
        min-height: 500px; 
    }
    
    .hero-title {
        font-size: 2.5rem; 
    }
    
    .hero-subtitle {
        font-size: 1.2rem; 
    }
    
    .hero-description {
        font-size: 1rem; 
        padding: 0.8rem 1.2rem; 
    }
    
    /* 时间线响应式保持不变 */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-icon {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 55vh; 
        min-height: 450px; 
    }
    
    .hero-title {
        font-size: 2rem; 
    }
    
    .hero-subtitle {
        font-size: 1.1rem; 
    }
    
    .hero-description {
        font-size: 0.95rem; 
        padding: 0.7rem 1rem; 
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        padding: 0.8rem 1.8rem; 
        font-size: 0.95rem; 
        width: 100%;
        max-width: 280px; 
        justify-content: center;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 45px; 
        height: 45px; 
    }
    
    .carousel-control-prev {
        left: 0.8rem; 
    }
    
    .carousel-control-next {
        right: 0.8rem; 
    }
    
    .carousel-caption {
        display: none;
    }
    
    .carousel-indicators {
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 400px; 
    }
    
    .hero-title {
        font-size: 1.8rem; 
    }
    
    .hero-subtitle {
        font-size: 1rem; 
    }
    
    .hero-description {
        font-size: 0.9rem; 
        padding: 0.6rem 0.8rem;
    }
}

/* 性能优化 */
.carousel-item img {
    will-change: transform;
}

.hero-content * {
    will-change: transform, opacity;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .carousel-caption {
        background: rgba(0,0,0,0.3);
        border-color: rgba(255,255,255,0.1);
    }
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    .carousel-item img,
    .hero-title,
    .hero-subtitle,
    .hero-description,
    .hero-buttons,
    .carousel-caption {
        animation: none;
        transition: none;
    }
    
    .carousel-item img {
        transform: translate(-50%, -50%) scale(1.03);
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-description,
    .hero-buttons,
    .carousel-caption {
        opacity: 1;
        transform: none;
    }
} 