/*!
Theme Name: 智搭教育
Description: 专业的科技教育主题，支持WordPress区块编辑器和传统模板。支持机器人、编程、科技创新、航模无人机等课程展示。代码已优化整理，性能更佳。
Version: 2.1.0
Author: 智搭教育
Text Domain: magao-education
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* 重置样式 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    background: #1e88e5;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.site-title a {
    color: #1e88e5;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #1e88e5;
}

.contact-phone {
    color: #333;
    font-weight: 700;
    font-size: 16px;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* 轮播图样式 */
.hero-carousel,
.wp-block-group.hero-carousel,
.wp-block-group.alignfull.hero-carousel {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.carousel-container,
.hero-carousel .carousel-container,
.wp-block-group.hero-carousel .carousel-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide,
.hero-carousel .carousel-slide,
.wp-block-group.hero-carousel .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    z-index: 1;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.carousel-slide.active,
.hero-carousel .carousel-slide.active,
.wp-block-group.hero-carousel .carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.carousel-text h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.carousel-text p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    line-height: 1.8;
}

/* 成就展示样式 */
.carousel-text .achievement-list {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.carousel-text .achievement-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 12px 0;
    font-size: 18px;
    line-height: 1.6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.carousel-text .achievement-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.carousel-text .achievement-percentage {
    color: #FFD700;
    font-weight: 700;
    font-size: 22px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 课程特色样式 */
.carousel-text .course-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.carousel-text .feature-item {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.carousel-text .feature-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.carousel-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    color: #1e88e5;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
}

.carousel-btn {
    display: inline-block;
    background: #1e88e5;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.carousel-btn:hover {
    background: #42a5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

/* 导航按钮已移除 */

/* 首页样式 */
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
}

.title-separator {
    width: 60px;
    height: 3px;
    background: #1e88e5;
    margin: 0 auto 50px auto;
}

/* 政策区域样式 */
.policy-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.policy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.policy-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.policy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.policy-card h3 {
    color: #1e88e5;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.policy-btn {
    display: inline-block;
    background: #1e88e5;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.policy-btn:hover {
    background: #42a5f5;
    transform: translateY(-2px);
}

/* 成功案例样式 */
.success-section {
    padding: 60px 0;
    background: #ffffff;
}

.success-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.success-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e5e9;
}

.success-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.success-image {
    margin-bottom: 20px;
}

.success-placeholder {
    font-size: 48px;
    margin-bottom: 10px;
}

.success-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.success-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.success-date {
    color: #999;
    font-size: 14px;
    display: block;
    margin-bottom: 15px;
}

.success-btn {
    display: inline-block;
    background: #42a5f5;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.success-btn:hover {
    background: #1e88e5;
    transform: translateY(-2px);
}

/* 页脚样式 */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #1e88e5;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #1e88e5;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

/* 课程页面样式 */
.course-hero {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.course-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.course-features,
.course-content,
.course-signup {
    padding: 60px 0;
}

.course-features {
    background: #f8f9fa;
}

.features-grid,
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: #1e88e5;
    margin-bottom: 15px;
}

.content-column h3 {
    color: #1e88e5;
    margin-bottom: 20px;
}

.course-list {
    list-style: none;
    padding-left: 0;
}

.course-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.course-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #1e88e5;
    font-weight: bold;
}

.course-signup {
    background: #f8f9fa;
    text-align: center;
}

.signup-desc {
    color: #666;
    margin-bottom: 40px;
    font-size: 18px;
}

.signup-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.signup-btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.signup-btn.primary {
    background: #1e88e5;
    color: white;
}

.signup-btn.primary:hover {
    background: #42a5f5;
    transform: translateY(-2px);
}

.signup-btn.secondary {
    background: #42a5f5;
    color: white;
}

.signup-btn.secondary:hover {
    background: #1e88e5;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .course-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .signup-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.carousel-dots,
.hero-carousel .carousel-dots,
.wp-block-group.hero-carousel .carousel-dots {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
}

.dot,
.hero-carousel .dot,
.wp-block-group.hero-carousel .dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dot.active,
.dot:hover,
.hero-carousel .dot.active,
.hero-carousel .dot:hover,
.wp-block-group.hero-carousel .dot.active,
.wp-block-group.hero-carousel .dot:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.4);
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* 标题分隔线样式 */
.title-separator {
    width: 60px;
    height: 3px;
    margin: 0 auto 50px auto;
}

/* 政策卡片样式 */
.policy-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.policy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.policy-list {
    list-style: none;
    padding-left: 0;
}

.policy-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.policy-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #1e88e5;
    font-weight: bold;
    font-size: 16px;
}

/* 成功案例卡片样式 */
.success-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid #e1e5e9;
}

.success-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* 页面样式 */
.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.8), rgba(66, 165, 245, 0.6));
    z-index: 1;
}

.page-hero .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}

/* 赛事卡片样式 */
.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.event-list {
    list-style: none;
    padding-left: 0;
}

.event-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.event-list li:before {
    content: "📅";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
}

/* 赛事时间表样式 */
.event-schedule table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.event-schedule th {
    background: #1e88e5;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.event-schedule td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e5e9;
}

.event-schedule tr:hover {
    background: #f8f9fa;
}

/* 指导列表样式 */
.guide-list {
    list-style: none;
    padding-left: 0;
}

.guide-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.guide-list li:before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
}

/* 阶段卡片样式 */
.stage-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid #e1e5e9;
}

.stage-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stage-list {
    list-style: none;
    padding-left: 0;
}

.stage-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.stage-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #1e88e5;
    font-weight: bold;
    font-size: 16px;
}

/* 申请列表样式 */
.application-list {
    list-style: none;
    padding-left: 0;
}

.application-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.application-list li:before {
    content: "📋";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
}

/* 时间线样式 */
.timeline-item {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 优势卡片样式 */
.advantage-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* 统计卡片样式 */
.stats-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e5e9;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 课程卡片样式 */
.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* 特色卡片样式 */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 文章卡片样式 */
.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e5e9;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 按钮样式增强 */
.wp-block-button__link {
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

/* 自定义列表样式 */
.custom-list {
    list-style: none;
    padding-left: 0;
}

.custom-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
}

.custom-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #1e88e5;
    font-weight: bold;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端隐藏电话号码 */
    .header-contact,
    .wp-block-group.header-contact {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column {
        flex-basis: 100% !important;
        margin-bottom: 30px;
    }
    
    /* 轮播图响应式 */
    .carousel-container {
        height: 60vh;
        min-height: 450px;
    }
    
    .carousel-text h1 {
        font-size: 32px !important;
    }
    
    .carousel-text p {
        font-size: 16px !important;
    }
    
    .carousel-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item {
        padding: 15px 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    /* 导航按钮已移除 */
}

/* 无障碍访问 */
.wp-block-button__link:focus,
.wp-block-navigation-item__content:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .navbar,
    .wp-block-button,
    .wp-block-navigation {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card,
.feature-card,
.post-card {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .course-card,
    .feature-card,
    .post-card {
        border: 2px solid #000;
    }
    
    .wp-block-button__link {
        border: 2px solid currentColor;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}