/* 重置基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体 */
body {
    padding-top: 80px;
    /* 根据导航栏高度调整 */
    font-family: 'Noto Sans TC', sans-serif;
    overflow-x: hidden;
}

/* 确保所有文本元素都使用思源黑体 */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
button,
input,
select,
textarea,
.nav-menu li a,
.dropdown-menu li a,
.card-content p,
.banner-text,
.footer-text,
.copyright {
    font-family: 'Noto Sans TC', sans-serif;
}

/* 导航栏样式 */
.header {
    background: #f8f9fa;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 修改背景图片容器样式 */
.background-decoration {
    position: absolute;
    /* 使用absolute定位 */
    right: -140px;
    bottom: -85px;
    width: 500px;
    height: 500px;
    z-index: 0;
    /* 调整层级，确保在内容之下 */
    pointer-events: none;
}

.background-decoration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
}

/* 确保main有相对定位 */
main {
    position: relative;
    /* 添加相对定位，作为背景图片的定位父元素 */
}

/* 为内容添加顶部边距，补偿固定导航栏的高度 */

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    padding-left: 40px;
}

.logo img {
    height: 50px;
    margin-right: -40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin-left: 50px;
}

.nav-menu li a {
    text-decoration: none;
    color: #333;
    font-size: 20px;
    padding: 8px 15px;
    display: block;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-menu li.active a {
    background: #14213d;
    color: white;
}

.nav-menu li:not(.active):hover a {
    background: rgba(20, 33, 61, 0.1);
    color: #14213d;
}

/* 下拉菜单样式 */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #f8f9fa;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 8px 8px;
    list-style: none;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: bold;
}

.dropdown-menu li a:hover {
    background: #f5f5f5;
}

.dropdown-menu li.active a {
    background: #14213d;
    color: white;
}

.dropdown-menu li:not(.active):hover a {
    background: rgba(20, 33, 61, 0.1);
    color: #14213d;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }

    main {
        overflow: hidden;
    }

    .background-decoration {
        right: -60px !important;
        bottom: -30px !important;
    }

    .nav-container {
        padding: 10px 15px;
        position: relative;
        /* 为菜单按钮提供定位上下文 */
    }

    .logo img {
        height: 30px;
        margin: -10px;
    }

    /* 显示菜单按钮 */
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* 菜单按钮动画效果 */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* 移动端导航菜单 */
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #f8f9fa;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    nav.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        gap: 5px;
        margin-left: 0;
    }

    .nav-menu li a {
        font-size: 16px;
        /* 减小字体大小 */
        padding: 10px 15px;
    }

    /* 移动端下拉菜单 */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 15px;
        margin-top: 5px;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }

    /* 移动端卡片样式调整 */
    .card-grid {
        grid-template-columns: 1fr;
        /* 单列显示 */
        gap: 20px;
        padding: 0 15px;
    }

    .card-header {
        padding: 15px;
    }

    .logo-container img {
        height: 80px;
        margin: -20px 10px -20px 0;
    }

    .age-group {
        font-size: 14px;
        margin-right: 15px;
    }

    /* 移动端图片和内容调整 */
    .banner-image,
    .message-image,
    .footer-image {
        height: 200px;
    }

    /* 移动端文本内容调整 */
    .about-content p,
    .card-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* 移动端标题调整 */
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    /* 移动端间距调整 */
    .section {
        padding: 30px 0;
    }

    .container {
        padding: 0 15px;
    }
}

/* 小屏幕设备额外调整 */
@media (max-width: 576px) {
    .logo img {
        height: 20px;
        margin: -5px;
    }

    .nav-container {
        padding: 8px 10px;
    }

    .banner-image,
    .message-image,
    .footer-image {
        height: 150px;
    }
}

/* Banner通用样式 */
.hero-banner {
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 700px;
    object-fit: cover;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.hero-banner::before {
    content: '';
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.lego-education-logo {
    height: 60px;
    margin-bottom: 30px;
}

.banner-content h1 {
    font-size: 3em;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-text {
    margin: 30px 0;
}

.banner-text h2 {
    font-size: 2.2em;
    margin: 10px 0;
}

.banner-text h3 {
    font-size: 1.8em;
    color: rgba(255, 255, 255, 0.9);
}

.banner-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

.banner-logos img {
    height: 80px;
}

.banner-organizers {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 50px;
}

.organizer-groups{
	padding: 50px 0 150px 0;
}

.organizer-group {
    text-align: left;
}


.organizer-group span {
    display: block;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.organizer-group img {
    height: 100px;
}
.organizer-group h2{
	text-align: left;
	text-indent: 20px;
}

.co-organizers {
 
    gap: 20px;
	
}

/* 响应式调整 */
@media (max-width: 768px) {
    .banner-content h1 {
        font-size: 2.5em;
    }

    .banner-text h2 {
        font-size: 1.8em;
    }

    .banner-text h3 {
        font-size: 1.5em;
    }

    .banner-logos {
        flex-direction: column;
        align-items: center;
    }

    .banner-organizers {
        flex-direction: column;
        gap: 30px;
    }

    .banner-image {
        height: 200px;
    }
}

/* Footer样式 */
.footer {
    background: #142d56;
    color: white;
    /*padding: 40px 0;*/
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-image {
    width: 100%;
    height: 400px;
    /* 设置固定高度 */
    display: block;
    object-fit: contain;
    /* 保持图片比例并居中显示 */
    margin: 0 auto;
    /* 水平居中 */
}

.message-image {
    width: 100%;
    height: 400px;
    /* 设置固定高度 */
    display: block;
    object-fit: contain;
    /* 保持图片比例并居中显示 */
    margin: 0 auto;
    /* 水平居中 */
}

.partner-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.partner-logo {
    height: 60px;
}

.footer-text {
    font-size: 18px;
    margin-bottom: 30px;
}

.brand-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.brand-logo {
    height: 50px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-link img {
    width: 30px;
    height: 30px;
}

.copyright {
    font-size: 14px;
    color: #999;
}

/* Footer响应式 */
@media (max-width: 768px) {

    .partner-logos,
    .brand-logos {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .partner-logo {
        height: 50px;
    }

    .brand-logo {
        height: 40px;
    }

    .footer-text {
        font-size: 16px;
        padding: 0 20px;
    }

    .footer-image {
        height: 200px;
        /* 移动端更小的高度 */
    }
}

/* 添加竖线样式 */
.age-group {
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-align: right;
    line-height: 1.2;
}

.age-range {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    position: relative;
}

.age-range::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 20px;
    background-color: white;
    margin: 0 5px;
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
}

/* 为特定文字设置样式 */
.stat-label {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
    font-weight: bold;
    font-family: 'Noto Sans TC', sans-serif;
}

.stat-desc {
    font-size: 14px;
    color: #666;
    font-weight: bold;
    font-family: 'Noto Sans TC', sans-serif;
}

/* 器材介绍样式 */
.material-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.material-section-title {
    font-size: 20px;
    color: #14213d;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #14213d;
}

.material-info {
    color: #333;
}

.material-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.sub-title {
    font-size: 16px;
    color: #14213d;
    margin: 20px 0 10px;
}

.feature-list {
    list-style-type: none;
    padding-left: 20px;
}

.feature-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.feature-list li::before {
    content: "•";
    color: #14213d;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.feature-list li strong {
    color: #14213d;
}

/* 比赛卡片样式 */
.competition-card {
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.competition-card.discover {
    background: #662e89;
}

.competition-card.explore {
    background: #009e51;
}

.competition-card.challenge {
    background: #e51c24;
}

/* 卡片头部样式 */
.card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    height: 140px;
}

/* 卡片图片样式 */
.card-image {
    width: 100%;
    height: 190px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 卡片内容区域 */
.card-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    color: white;
    position: relative;
}

/* 卡片文字区域 */
.card-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    height: 110px;
    /* 固定文字区域高度 */
    overflow: auto;
    /* 如果文字超出则显示滚动条 */
    font-size: 15px;
}

/* 下载按钮样式 */
.card-btn {
    display: block;
    padding: 12px;
    text-align: center;
    background: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s ease;
    bottom: 15px;
    /* 统一按钮位置 */
    left: 20px;
    right: 20px;
    cursor: pointer;
}

/* 不同类型卡片的按钮颜色 */
.discover .card-btn {
    color: #662e89;
}

.explore .card-btn {
    color: #009e51;
}

.challenge .card-btn {
    color: #e51c24;
}

/* 关于部分布局 */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.about-container h2 {
    font-size: 32px;
    color: #333;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: left;
    /* 确保标题左对齐 */
}

.about-content {
    margin-top: 20px;
}

.about-content p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        gap: 20px;
    }

    .about-header {
        flex: none;
    }

    .about-header h2 {
        position: static;
        margin-bottom: 20px;
    }

    .card-content {
        padding: 15px;
        height: 180px;
        /* 调整移动端内容区域高度 */
    }

    .card-content p {
        margin-bottom: 15px;
        font-size: 14px;
        height: 100px;
        /* 调整移动端文字区域高度 */
    }

    .card-btn {
        padding: 10px;
        bottom: 10px;
        left: 15px;
        right: 15px;
    }



    .card-header {
        height: 120px;
        /* 移动端调整头部高度 */
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 15px;
    font-size: 14px;
    color: #666;
}

.page-btn.active {
    background: #14213d;
    color: white;
    border-color: #14213d;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: #666;
    font-size: 14px;
    margin: 0 15px;
}
.footer .footer-groups{
	padding: 80px 0 0 0;
	 display: flex;
	 justify-content: space-between;
}

.footer .friends{
}

.footer .friend{
	text-align: left;
}

.footer .friend img{
	height: 40px;
	margin: 0 15px 20px 0;
}
.footer .unions{
	max-width: 380px;
}
.footer .unions h5{
	font-weight: normal;
	
}
.footer .union{
	margin-top: 20px;
	background-color: #fff;
	display: flex;
	justify-content: space-between;
	padding: 20px 20px;
	
}
.footer .union img{
	height: 38px;
}
.footer .other{
	border-top:1px solid #63738E;
	margin-top: 20px;
}
.footer .other h5{
	color:#63738E ;
	font-weight: normal;
	text-align: left;
	padding: 10px 0;
}



@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .page-info {
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 10px;
    }
	.footer .unions{
		max-width: 100%;
	}

	.footer .footer-groups{
		padding: 80px 0 0 0;
		 display: grid;
		 justify-content: center;
	}

}