/* ===================================
   公共样式 - Common Styles
   北京硕宸行科技有限公司官网
   =================================== */

/* ===== 颜色变量 ===== */
:root {
    --primary-color: #392b53;      /* 主色调-深紫色 */
    --secondary-color: #e7d4b9;    /* 辅助色-金色 */
    --text-dark: #333333;          /* 深灰文字 */
    --text-medium: #666666;        /* 中灰文字 */
    --text-light: #999999;         /* 浅灰文字 */
    --bg-white: #FFFFFF;           /* 白色背景 */
    --bg-light: #F5F5F5;           /* 浅灰背景 */
    --border-color: #E5E5E5;       /* 边框颜色 */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
}

/* ===== 容器布局 ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-fluid {
    width: 100%;
    padding: 0 24px;
}

/* ===== 导航栏样式 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Logo 区域 */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo-img {
    height: 60px;
    width: auto;
}

.navbar-logo-text {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 导航菜单 */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.navbar-menu a {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.navbar-menu a.active {
    color: var(--primary-color);
}

/* 移动端菜单按钮 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== 页脚样式 ===== */
.footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 64px 0 32px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 24px;
    color: var(--secondary-color);
}

.footer-section p,
.footer-section li {
    font-size: 14px;
    line-height: 1.8;
    color: #cccccc;
    margin-bottom: 12px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #cccccc;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid #333333;
    text-align: center;
    font-size: 14px;
    color: #999999;
}

.footer-bottom p {
    margin-bottom: 8px;
}

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

.footer-icp a {
    color: #999999;
    transition: color 0.3s ease;
}

.footer-icp a:hover {
    color: var(--secondary-color);
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-medium);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* ===== 通用按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: #234a85;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

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

.btn-secondary:hover {
    background-color: #b89630;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

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

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

/* ===== 通用标题样式 ===== */
.section-title {
    text-align: center;
    margin-bottom: 64px;
}

.section-title h2 {
    font-size: 40px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-title .subtitle {
    font-size: 18px;
    color: var(--text-medium);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 24px auto 0;
    border-radius: 2px;
}

/* ===== 区块样式 ===== */
.section {
    padding: 96px 0;
}

.section-light {
    background-color: var(--bg-white);
}

.section-dark {
    background-color: var(--bg-light);
}

/* ===== 卡片样式 ===== */
.card {
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px var(--shadow-medium);
}

.card-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.card-body {
    padding: 32px;
}

.card-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.card-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-medium);
}

/* ===== 栅格系统 ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col {
    flex: 1;
    padding: 0 12px;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ===== 间距工具类 ===== */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }

.pt-8 { padding-top: 8px; }
.pt-16 { padding-top: 16px; }
.pt-24 { padding-top: 24px; }
.pt-32 { padding-top: 32px; }
.pt-48 { padding-top: 48px; }
.pt-64 { padding-top: 64px; }

.pb-8 { padding-bottom: 8px; }
.pb-16 { padding-bottom: 16px; }
.pb-24 { padding-bottom: 24px; }
.pb-32 { padding-bottom: 32px; }
.pb-48 { padding-bottom: 48px; }
.pb-64 { padding-bottom: 64px; }

/* ===== 文本工具类 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-dark { color: var(--text-dark); }
.text-medium { color: var(--text-medium); }
.text-light { color: var(--text-light); }

/* ===== 响应式设计 ===== */

/* 平板端 (768px - 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

/* 平板竖屏 (768px - 992px) */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .navbar-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 32px 24px;
        gap: 24px;
        transition: left 0.3s ease;
        box-shadow: 0 4px 12px var(--shadow-light);
    }

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

    .navbar-toggle {
        display: flex;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .section {
        padding: 64px 0;
    }

    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 移动端 (< 768px) */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 16px;
    }

    .navbar-container {
        height: 64px;
        padding: 0 16px;
    }

    .navbar-logo-text {
        font-size: 16px;
    }

    .navbar-logo-img {
        height: 40px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .section-title .subtitle {
        font-size: 16px;
    }

    .section {
        padding: 48px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        right: 16px;
        bottom: 16px;
        font-size: 20px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .card-body {
        padding: 24px;
    }

    /* 移动端列布局 */
    [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 小屏手机 (< 576px) */
@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .section {
        padding: 40px 0;
    }
}

/* ===== 动画类 ===== */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== 工具类 ===== */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
