/* 
 * 酷克斯互联科技有限公司 - 全局样式
 * 益智教育风 | 亮蓝 + 亮红 + 亮黄
 */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    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;
}

/* 颜色变量 */
:root {
    --bright-blue: #2E86FF;
    --bright-red: #FF4757;
    --bright-yellow: #FFC312;
    --dark-blue: #1e3a5f;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray-light: #e9ecef;
    --gray: #6c757d;
}

/* 顶部导航栏 */
.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(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(46, 134, 255, 0.98);
    box-shadow: 0 4px 30px rgba(46, 134, 255, 0.3);
}

.header.scrolled .nav-link {
    color: var(--white);
}

.header.scrolled .logo-text {
    color: var(--white);
}

.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: 12px;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bright-blue);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-blue);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bright-red), var(--bright-yellow));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--bright-blue);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--bright-yellow);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--bright-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header.scrolled .hamburger span {
    background: var(--white);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--dark-blue) 0%, #2c3e50 100%);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--bright-yellow);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--bright-red);
}

.footer-section p,
.footer-section li {
    font-size: 0.9rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: var(--bright-yellow);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 通用动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* 滚动渐入 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bright-blue), #1e5fbf);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(46, 134, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 134, 255, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bright-red), #c0392b);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5);
}

/* 卡片样式 */
.card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 24px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark-blue);
}

.card-text {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        padding: 40px 20px;
        transition: left 0.4s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 16px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--gray-light);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }
}
