/* ========================================
   山东电子政务网 - 全局样式表
   研学专业风 | 天蓝 + 纯白 + 浅灰
   ======================================== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f4fc 100%);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   顶部导航栏
   ======================================== */
.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(30, 136, 229, 0.1);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(30, 136, 229, 0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e88e5;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #1e88e5;
    background: rgba(30, 136, 229, 0.08);
}

.nav-menu .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(30, 136, 229, 0.15);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-menu li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.submenu li:last-child a {
    border-bottom: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1e88e5;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========================================
   磁贴式瀑布流布局
   ======================================== */
.mosaic-container {
    max-width: 1400px;
    margin: 120px auto 60px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-rows: masonry;
    gap: 30px;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.mosaic-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(30, 136, 229, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.mosaic-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(30, 136, 229, 0.15);
}

.mosaic-item.large {
    grid-column: span 8;
    min-height: 500px;
}

.mosaic-item.medium {
    grid-column: span 6;
    min-height: 380px;
}

.mosaic-item.small {
    grid-column: span 4;
    min-height: 280px;
}

.mosaic-item.tall {
    grid-column: span 4;
    grid-row: span 2;
    min-height: 600px;
}

.mosaic-item.wide {
    grid-column: span 12;
    min-height: 350px;
}

/* ========================================
   卡片样式
   ======================================== */
.card {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mosaic-item:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 25px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e88e5;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.card-date {
    font-size: 13px;
    color: #999;
}

.card-link {
    font-size: 14px;
    color: #1e88e5;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-link:hover {
    gap: 10px;
}

/* ========================================
   Banner 区域
   ======================================== */
.banner-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 50%, #64b5f6 100%);
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: url('../images/pattern.png');
    background-size: cover;
    background-position: center;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 900px;
    padding: 0 40px;
}

.banner-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 2px;
    animation: fadeInUp 1s ease;
}

.banner-subtitle {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.banner-btn {
    display: inline-block;
    padding: 16px 45px;
    background: #fff;
    color: #1e88e5;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease 0.4s both;
}

.banner-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================
   核心优势板块
   ======================================== */
.advantages-section {
    padding: 100px 0;
    background: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: #1e88e5;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.advantage-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f4fc 100%);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
}

.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(30, 136, 229, 0.15);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: #1e88e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advantage-icon img {
    width: 45px;
    height: 45px;
}

.advantage-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.advantage-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* ========================================
   快速入口
   ======================================== */
.quick-access {
    padding: 80px 0;
    background: linear-gradient(135deg, #e8f4fc 0%, #f5f7fa 100%);
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.access-item {
    background: #fff;
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(30, 136, 229, 0.08);
    transition: all 0.3s ease;
}

.access-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.15);
}

.access-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.access-icon img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

.access-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* ========================================
   资讯列表
   ======================================== */
.news-section {
    padding: 100px 0;
    background: #fff;
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.news-tab {
    padding: 12px 30px;
    background: #f5f7fa;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-tab.active,
.news-tab:hover {
    background: #1e88e5;
    color: #fff;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.news-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(30, 136, 229, 0.08);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(30, 136, 229, 0.15);
}

.news-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-item-image img {
    transform: scale(1.1);
}

.news-item-content {
    padding: 25px;
}

.news-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e88e5;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.news-item-date {
    font-size: 13px;
    color: #999;
}

.news-item-more {
    font-size: 14px;
    color: #1e88e5;
    font-weight: 600;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: #fff;
    padding: 80px 0 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 25px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #64b5f6;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.85;
    margin-bottom: 20px;
}

.footer-contact {
    font-size: 14px;
    line-height: 2;
    opacity: 0.85;
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    color: #64b5f6;
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: #64b5f6;
    padding-left: 8px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .mosaic-item.large {
        grid-column: span 12;
    }
    
    .mosaic-item.medium {
        grid-column: span 6;
    }
}

@media (max-width: 992px) {
    .nav-container {
        padding: 0 25px;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #fff;
        flex-direction: column;
        padding: 30px;
        gap: 10px;
        transition: left 0.4s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .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);
    }
    
    .banner-title {
        font-size: 42px;
    }
    
    .mosaic-grid {
        padding: 0 25px;
    }
    
    .mosaic-item.large,
    .mosaic-item.medium,
    .mosaic-item.small {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .banner-title {
        font-size: 32px;
    }
    
    .banner-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .advantages-grid,
    .news-list {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .logo-text {
        font-size: 18px;
    }
    
    .banner-title {
        font-size: 26px;
    }
    
    .access-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
