/* ========================================
   睿拓拓网络 - 全局样式表
   影视复古风：黑色 + 银灰 + 暗红
======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: #0a0a0a;
    color: #c0c0c0;
    line-height: 1.6;
    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 {
    --color-black: #0a0a0a;
    --color-dark: #1a1a1a;
    --color-darker: #252525;
    --color-silver: #c0c0c0;
    --color-gray: #808080;
    --color-red: #8b1a1a;
    --color-red-bright: #a52a2a;
    --color-red-dark: #6b1515;
    --color-white: #f5f5f5;
    --color-gold: #b8860b;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部导航栏
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(26,26,26,0.9) 100%);
    border-bottom: 2px solid var(--color-red-dark);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: linear-gradient(180deg, rgba(10,10,10,0.98) 0%, rgba(15,15,15,0.95) 100%);
    box-shadow: 0 4px 20px rgba(139, 26, 26, 0.3);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-silver);
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.logo-text span {
    color: var(--color-red-bright);
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 18px;
    color: var(--color-silver);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-red-dark) 0%, var(--color-red) 100%);
    border-color: var(--color-red-bright);
    box-shadow: 0 2px 10px rgba(139, 26, 26, 0.4);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-red-bright);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

/* 汉堡菜单 - 仅在移动端显示 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--color-silver);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.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);
}

/* 桌面端导航 - 强制横向排列 */
@media (min-width: 993px) {
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        gap: 8px;
    }
    
    .nav-menu li {
        display: inline-block;
    }
    
    .hamburger {
        display: none !important;
    }
}

/* 移动端导航 */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: linear-gradient(180deg, var(--color-dark) 0%, var(--color-black) 100%);
        flex-direction: column;
        padding: 30px 20px;
        gap: 5px;
        transition: left 0.4s ease;
        overflow-y: auto;
        display: flex;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 15px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--color-darker);
    }
}

/* ========================================
   页脚
======================================== */
.footer {
    background: linear-gradient(180deg, var(--color-darker) 0%, var(--color-black) 100%);
    border-top: 3px solid var(--color-red-dark);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--color-silver);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-red);
    display: inline-block;
}

.footer-section p {
    color: var(--color-gray);
    line-height: 1.8;
    margin-bottom: 10px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-gray);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-red-bright);
    padding-left: 8px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-gray);
    margin-bottom: 12px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--color-darker);
    color: var(--color-gray);
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   通用动画
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   按钮样式
======================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(139, 26, 26, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-red-bright) 0%, var(--color-red) 100%);
    box-shadow: 0 6px 20px rgba(139, 26, 26, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-silver);
    border: 2px solid var(--color-silver);
}

.btn-secondary:hover {
    background: var(--color-silver);
    color: var(--color-black);
}

/* ========================================
   卡片样式
======================================== */
.card {
    background: linear-gradient(145deg, var(--color-darker) 0%, var(--color-dark) 100%);
    border: 1px solid var(--color-darker);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--color-red);
    box-shadow: 0 10px 30px rgba(139, 26, 26, 0.3);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-title {
    color: var(--color-silver);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.card-text {
    color: var(--color-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-gray);
    font-size: 0.85rem;
}

/* ========================================
   版块标题
======================================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--color-silver);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-red-dark), var(--color-red), var(--color-red-dark));
}

.section-title p {
    color: var(--color-gray);
    font-size: 1.1rem;
    margin-top: 25px;
}

/* ========================================
   Grid 布局
======================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}
