/* 
 * 北京尧图网络科技有限公司 - 高端定制建站官网
 * 主样式表 - 潮鞋ins风 (亮红 + 黑色 + 浅灰)
 * 阶梯式向下流动布局
 */

:root {
    --primary-red: #E63946;
    --deep-black: #1A1A1A;
    --soft-gray: #F5F5F5;
    --medium-gray: #8D8D8D;
    --light-white: #FFFFFF;
    --gradient-red: linear-gradient(135deg, #E63946 0%, #D62839 100%);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-bold: 0 8px 30px rgba(230, 57, 70, 0.25);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    background-color: var(--soft-gray);
    color: var(--deep-black);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航栏 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition-smooth);
    padding: 20px 0;
}

.header.scrolled {
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--light-white);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-link {
    color: var(--light-white);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    opacity: 0.9;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    opacity: 1;
    color: var(--primary-red);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--light-white);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== 首页 Banner ========== */
.hero-banner {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background: var(--deep-black);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--light-white);
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: 2px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-subtitle {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.6s;
}

.hero-btn {
    display: inline-block;
    padding: 16px 45px;
    background: var(--gradient-red);
    color: var(--light-white);
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: var(--shadow-bold);
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards 0.9s;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(230, 57, 70, 0.4);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 阶梯式区块 ========== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-alt {
    background: var(--light-white);
}

.section-dark {
    background: var(--deep-black);
    color: var(--light-white);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

.section-desc {
    font-size: 18px;
    color: var(--medium-gray);
    max-width: 700px;
    margin: 25px auto 0;
    line-height: 1.8;
}

.section-dark .section-desc {
    color: rgba(255, 255, 255, 0.7);
}

/* ========== 核心服务卡片 ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--light-white);
    padding: 40px 35px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-red);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-bold);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
    border-radius: 12px;
    background: rgba(230, 57, 70, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 40px;
    height: 40px;
}

.service-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--deep-black);
}

.service-desc {
    font-size: 15px;
    color: var(--medium-gray);
    line-height: 1.8;
}

/* ========== 案例展示 ========== */
.cases-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.case-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.case-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.case-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: var(--light-white);
    transform: translateY(100%);
    transition: var(--transition-smooth);
}

.case-item:hover .case-img {
    transform: scale(1.1);
}

.case-item:hover .case-overlay {
    transform: translateY(0);
}

.case-category {
    font-size: 13px;
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.case-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.case-client {
    font-size: 14px;
    opacity: 0.8;
}

/* ========== 新闻资讯 ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--light-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-bold);
}

.news-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.news-card:hover .news-img {
    transform: scale(1.08);
}

.news-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-red);
    color: var(--light-white);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.news-content {
    padding: 25px;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 15px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.news-time {
    font-size: 13px;
    color: var(--medium-gray);
}

.news-link {
    font-size: 14px;
    color: var(--primary-red);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-link::after {
    content: '→';
    transition: var(--transition-smooth);
}

.news-link:hover::after {
    transform: translateX(5px);
}

/* ========== 页脚 ========== */
.footer {
    background: var(--deep-black);
    color: var(--light-white);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.7;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-red);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-red);
    padding-left: 8px;
}

.footer-contact p {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .cases-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--deep-black);
        flex-direction: column;
        padding: 100px 40px;
        gap: 25px;
        transition: var(--transition-smooth);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .cases-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
}

/* ========== 滚动渐入动画 ========== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
