/* ========================================
   博睿科教建站 - 全局样式文件
   儿童启蒙风：亮黄 + 浅绿 + 浅蓝
   ======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #FFF9E6 0%, #E8F5E9 50%, #E3F2FD 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(255, 224, 102, 0.3);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(255, 249, 230, 0.98);
    box-shadow: 0 4px 30px rgba(255, 224, 102, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFB300;
    text-shadow: 2px 2px 4px rgba(255, 179, 0, 0.2);
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(255, 224, 102, 0.4);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    position: relative;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 500;
    color: #555;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #FFE066, #A5D6A7, #81D4FA);
    transition: left 0.4s ease;
    z-index: -1;
    opacity: 0;
}

.nav-link:hover::before {
    left: 0;
    opacity: 1;
}

.nav-link:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 224, 102, 0.4);
}

.nav-link.active {
    background: linear-gradient(135deg, #FFE066, #FFB300);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 224, 102, 0.5);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #FFB300;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   磁贴式瀑布流布局
   ======================================== */
.masonry-container {
    max-width: 1400px;
    margin: 120px auto 60px;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-flow: dense;
    gap: 2rem;
}

.masonry-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    cursor: pointer;
}

.masonry-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(255, 224, 102, 0.3);
}

.masonry-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.masonry-item.medium {
    grid-column: span 2;
}

.masonry-item.tall {
    grid-row: span 2;
}

.masonry-card {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.masonry-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1rem;
    transition: transform 0.4s ease;
}

.masonry-item:hover .masonry-image {
    transform: scale(1.05);
}

.masonry-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.masonry-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    flex-grow: 1;
}

.masonry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #FFE066;
    font-size: 0.85rem;
    color: #999;
}

/* ========================================
   Banner 区域
   ======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE066 50%, #A5D6A7 100%);
    margin-top: 0;
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.hero-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #FFB300, #FFE066);
    color: #fff;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(255, 179, 0, 0.4);
    transition: all 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 179, 0, 0.6);
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: #81D4FA;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: #A5D6A7;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: #FFE066;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* ========================================
   核心优势板块
   ======================================== */
.features-section {
    padding: 5rem 2rem;
    background: #fff;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FFE066, #A5D6A7, #81D4FA);
    border-radius: 2px;
}

.features-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, #FFF9E6, #fff);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 3px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: #FFE066;
    box-shadow: 0 15px 50px rgba(255, 224, 102, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #FFE066, #FFB300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 6px 20px rgba(255, 224, 102, 0.4);
}

.feature-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-desc {
    color: #666;
    line-height: 1.8;
}

/* ========================================
   快速入口
   ======================================== */
.quick-access {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #E8F5E9, #E3F2FD);
}

.access-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.access-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.access-card:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 15px 50px rgba(165, 214, 167, 0.4);
}

.access-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.access-title {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.access-desc {
    color: #666;
    font-size: 0.9rem;
}

/* ========================================
   资讯列表
   ======================================== */
.news-section {
    padding: 5rem 2rem;
    background: #fff;
}

.news-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(129, 212, 250, 0.3);
}

.news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image {
    transform: scale(1.08);
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px dashed #A5D6A7;
    font-size: 0.85rem;
    color: #999;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #FFE066;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #FFE066;
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ecf0f1;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #FFE066;
    transform: translateX(5px);
}

.footer-contact p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* ========================================
   内页通用样式
   ======================================== */
.page-header {
    background: linear-gradient(135deg, #FFE066, #A5D6A7);
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-title {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.page-subtitle {
    font-size: 1.3rem;
    color: #fff;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.content-card h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #FFE066;
}

.content-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .masonry-item.large,
    .masonry-item.medium {
        grid-column: span 1;
    }
    
    .masonry-item.tall {
        grid-row: span 1;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        padding: 3rem 2rem;
        transition: left 0.4s ease;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .masonry-container {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .access-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .masonry-container,
    .page-content {
        padding: 0 1rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
}

/* ========================================
   滚动条美化
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFE066, #A5D6A7);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFB300, #81C784);
}
