/* ========================================
   编程新知 - 首页专属样式
   上下对撞错位布局
   ======================================== */

/* Hero Banner - 错位叠加设计 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #fff9e6 50%, #f8f9fa 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 213, 79, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(45, 45, 45, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    padding: 60px 0;
}

.hero-badge {
    display: inline-block;
    padding: 10px 25px;
    background: var(--light-yellow);
    color: var(--deep-gray);
    font-size: 14px;
    font-weight: 600;
    border-radius: 30px;
    margin-bottom: 25px;
    border: 2px solid var(--accent-yellow);
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--deep-gray);
    line-height: 1.2;
    margin-bottom: 25px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, #ffb300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--medium-gray);
    line-height: 1.9;
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-main {
    width: 100%;
    max-width: 550px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image-main {
    transform: translateY(-10px);
}

.hero-image-decoration {
    position: absolute;
    width: 80%;
    height: 80%;
    border: 3px solid var(--accent-yellow);
    border-radius: 20px;
    top: 30px;
    left: 30px;
    z-index: 1;
    opacity: 0.5;
}

/* 浮动装饰元素 */
.floating-element {
    position: absolute;
    background: var(--primary-white);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-medium);
    padding: 20px;
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}

.floating-element-1 {
    top: 15%;
    right: 5%;
    animation-delay: 0s;
}

.floating-element-2 {
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .hero-content {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-wrapper {
        order: -1;
    }

    .floating-element {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-container {
        padding: 0 20px;
    }
}

/* ========================================
   核心优势板块 - 错位卡片
   ======================================== */
.features-section {
    padding: 120px 0;
    background: var(--primary-white);
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}

.feature-card {
    background: var(--secondary-white);
    padding: 50px 35px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-line);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    background: var(--primary-white);
    box-shadow: 0 20px 50px var(--shadow-medium);
    transform: translateY(-10px);
}

.feature-card:nth-child(even) {
    transform: translateY(30px);
}

.feature-card:nth-child(even):hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: var(--light-yellow);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    background: var(--accent-yellow);
    transform: rotate(10deg) scale(1.1);
}

.feature-icon img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--deep-gray);
    margin-bottom: 15px;
}

.feature-text {
    font-size: 14px;
    color: var(--medium-gray);
    line-height: 1.8;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-card:nth-child(even) {
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 35px 25px;
    }
}

/* ========================================
   快速入口板块
   ======================================== */
.quick-access {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--secondary-white) 0%, var(--primary-white) 100%);
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 25px;
}

.access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: var(--primary-white);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.access-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-medium);
    border-color: var(--accent-yellow);
}

.access-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    background: var(--light-yellow);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.access-item:hover .access-icon {
    background: var(--accent-yellow);
    transform: scale(1.1) rotate(5deg);
}

.access-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.access-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--deep-gray);
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 992px) {
    .access-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .access-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   首页资讯列表
   ======================================== */
.home-news {
    padding: 100px 0;
    background: var(--primary-white);
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.news-tab {
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    color: var(--medium-gray);
    background: var(--secondary-white);
    border: 2px solid transparent;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-tab:hover,
.news-tab.active {
    color: var(--deep-gray);
    background: var(--light-yellow);
    border-color: var(--accent-yellow);
}

.news-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--deep-gray);
    margin: 50px 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-yellow);
    display: inline-block;
}

/* ========================================
   关于我们预览
   ======================================== */
.about-preview {
    padding: 120px 0;
    background: var(--secondary-white);
    position: relative;
    overflow: hidden;
}

.about-preview::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, var(--light-yellow) 0%, transparent 100%);
    z-index: 0;
}

.about-preview-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-preview-image {
    position: relative;
}

.about-preview-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 30px 60px var(--shadow-medium);
}

.about-preview-content {
    padding: 40px 0;
}

.about-preview-label {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-yellow);
    color: var(--deep-gray);
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 20px;
}

.about-preview-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--deep-gray);
    line-height: 1.3;
    margin-bottom: 25px;
}

.about-preview-text {
    font-size: 16px;
    color: var(--medium-gray);
    line-height: 2;
    margin-bottom: 35px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: var(--primary-white);
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow-light);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: var(--medium-gray);
}

@media (max-width: 992px) {
    .about-preview-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-preview::before {
        width: 100%;
        height: 30%;
    }

    .about-preview-image {
        order: -1;
    }
}

@media (max-width: 576px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

    .about-preview-title {
        font-size: 32px;
    }
}
