/**
 * 南京天昱翔网站样式表
 * 主色调：科技蓝 #0056B3，商务灰 #333333
 * CTA按钮色：橙色 #FF6600
 */

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

:root {
    --primary-color: #0056B3;
    --secondary-color: #333333;
    --accent-color: #FF6600;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --font-family: "Microsoft YaHei", "微软雅黑", "Source Han Sans CN", "思源黑体", Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 导航栏 */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-list > li {
    position: relative;
}

.nav-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    padding: 5px 0;
}

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

/* 子菜单 */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    min-width: 180px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    padding: 0;
}

.submenu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    transition: background 0.3s ease;
}

.submenu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.header-phone a {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

/* 移动端菜单切换 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* 主视觉Banner */
.hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #003d7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

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

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

/* 服务区域 */
.services-section {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--text-color);
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.service-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.service-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 10px;
}

.service-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* B站logo特殊处理，确保可见性 - 红色背景 */
.service-icon img[alt*="B站"],
.service-icon img[alt*="bilibili"],
.service-icon img[src*="bilibili"] {
    background: #FB7299 !important;
    padding: 12px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(251, 114, 153, 0.3) !important;
    border: 1px solid #FB7299 !important;
    min-width: 60px;
    min-height: 60px;
    display: block;
}

.service-item h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* 特色增值服务 */
.extra-services-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.extra-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.extra-service-item {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.extra-service-item h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.extra-service-item p {
    color: var(--text-light);
    line-height: 1.8;
}

/* 页脚 */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white);
}

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

.footer-column ul li {
    margin-bottom: 10px;
}

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

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

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

/* 右侧浮动联系栏 */
.fixed-contact-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: all 0.3s ease;
    border-radius: 8px 0 0 8px;
}

.fixed-contact-bar.collapsed {
    width: 60px;
}

.fixed-contact-bar.collapsed .contact-bar-content {
    display: none;
}

.fixed-contact-bar.collapsed .contact-bar-header h3 {
    display: none;
}

/* 移动端折叠状态下的样式 */
@media (max-width: 768px) {
    .fixed-contact-bar.collapsed {
        width: 50px;
    }

    .fixed-contact-bar.collapsed .contact-bar-header {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        padding: 10px 5px;
        justify-content: center;
    }

    .fixed-contact-bar.collapsed .contact-bar-header h3 {
        display: block;
        font-size: 14px;
        margin: 0;
        white-space: nowrap;
    }

    .fixed-contact-bar.collapsed .contact-bar-toggle {
        display: none;
    }
}

.contact-bar-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 0 0 0;
}

.contact-bar-header h3 {
    font-size: 18px;
    margin: 0;
}

.contact-bar-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-bar-content {
    padding: 20px;
}

.contact-person {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.contact-person:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.contact-person h4 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-person p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.contact-person a {
    color: var(--primary-color);
    text-decoration: none;
}

.qr-code {
    width: 100px;
    height: 100px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
    padding: 5px;
}

.qr-code img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 移动端菜单样式 */
@media (max-width: 968px) {
    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: var(--white);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

    .nav.mobile-open {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }

    .nav-list > li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list > li > a {
        display: block;
        padding: 15px 20px;
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--bg-light);
        padding: 0;
        display: none;
    }

    .has-submenu:hover .submenu,
    .has-submenu.active .submenu {
        display: block;
    }

    .submenu a {
        padding: 12px 40px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

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

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

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .header-phone {
        display: none;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .service-items {
        grid-template-columns: 1fr;
    }

    .extra-services-grid {
        grid-template-columns: 1fr;
    }

    .fixed-contact-bar {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 500px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

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

    .services-section,
    .extra-services-section {
        padding: 60px 0;
    }

    .fixed-contact-bar {
        width: 50px;
        right: 0;
        top: auto;
        bottom: 80px;
        transform: none;
        border-radius: 8px 0 0 8px;
    }

    .fixed-contact-bar:not(.collapsed) {
        width: 240px;
    }

    .fixed-contact-bar.collapsed .contact-bar-header {
        padding: 10px;
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }

    .fixed-contact-bar.collapsed .contact-bar-header h3 {
        display: block;
        font-size: 14px;
        margin: 0;
    }

    .fixed-contact-bar.collapsed .contact-bar-toggle {
        display: none;
    }

    .fixed-contact-bar:not(.collapsed) .contact-bar-toggle {
        display: flex;
    }

    .fixed-contact-bar:not(.collapsed) .contact-bar-header {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
    }

    .fixed-contact-bar:not(.collapsed) .contact-bar-header h3 {
        display: block;
    }
}

@media (max-width: 480px) {
    .fixed-contact-bar {
        width: 45px;
        right: 0;
        bottom: 60px;
    }

    .fixed-contact-bar:not(.collapsed) {
        width: 200px;
    }

    .fixed-contact-bar.collapsed .contact-bar-header {
        padding: 8px;
    }

    .fixed-contact-bar.collapsed .contact-bar-header h3 {
        font-size: 12px;
    }

    .contact-bar-header h3 {
        font-size: 16px;
    }

    .page-hero h1 {
        font-size: 28px;
    }

    .page-hero p {
        font-size: 16px;
    }
}