/* ================================
   正奥石业官网 - 主样式文件
   包含：全局变量、基础样式、导航、页脚
   ================================ */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础变量 - 正奥石业色彩方案 */
:root {
    /* 主色系统 */
    --primary-color: #2D3436;      /* 深灰 - 主色 */
    --secondary-color: #F5F5F0;    /* 大理石灰 - 辅助色 */
    --accent-color: #4A90E2;       /* 石纹蓝 - 强调色 */
    --dark-color: #1A1A1A;         /* 深黑 - 最深色 */
    --light-color: #F8F9FA;        /* 浅灰 - 浅背景 */
    --text-color: #333333;         /* 文字色 */
    --text-muted: #666666;         /* 辅助文字色 */
    --border-color: #E0E0E0;       /* 边框色 */
    --bg-white: #F7F3EF;           /* 米白色背景 */

    /* 阴影系统 */
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);

    /* 间距系统 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* 圆角系统 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* 动画 */
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

.container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 50px;
}

/* ====================
   导航栏
   ==================== */
.header {
    background: rgb(255, 255, 255);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease-out, background 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.nav-container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    display: inline-flex;
    align-items: center;
    height: 70px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.86;
}

.site-logo {
    display: block;
    width: auto;
    height: 46px;
    max-width: 260px;
    object-fit: contain;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* ====================
   通用按钮
   ==================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-color);
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* ====================
   页脚
   ==================== */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

/* 快速链接居中 */
.footer-section:nth-child(2) {
    text-align: center;
}

/* 联系我们整体向右，但文本左对齐 */
.footer-section:nth-child(3) {
    margin-left: auto;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-tagline {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-tagline:last-child {
    margin-bottom: 0;
}

.footer-links,
.footer-contact {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.8rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--accent-color);
}

.footer-contact i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--accent-color);
}

/* ====================
   动画
   ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================
   滚动行为
   ==================== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* ====================
   页面头部
   ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #1A1A1A);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 副标题 */
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

/* 文本居中工具类 */
.text-center {
    text-align: center;
}

/* ====================
   响应式设计 - 基础
   ==================== */
@media screen and (max-width: 768px) {
    .site-logo {
        height: 40px;
        max-width: 210px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .site-logo {
        height: 34px;
        max-width: 170px;
    }

    .container {
        padding: 0 15px;
    }

    .page-header {
        padding: 80px 0 50px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 1rem;
    }
}
