/* 全局样式 */
:root {
    --primary-color: #DAA520;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-text: #fff;
    --dark-bg: #000;
    --gray-bg: #1a1a1a;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--dark-bg);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(218, 165, 32, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 英雄区域样式 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/main.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--light-text);
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.primary-btn,
.secondary-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.primary-btn {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.secondary-btn {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.primary-btn:hover {
    background: #b8860b;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

/* 展示区域样式 */
.showcase {
    padding: 5rem 0;
    background: var(--gray-bg);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.showcase-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
}

.showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.showcase-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--light-text);
}

.showcase-item:hover img {
    transform: scale(1.1);
}

.showcase-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* 关于我们部分 */
.about {
    padding: 5rem 0;
    background: var(--dark-bg);
    color: var(--light-text);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 1.2rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
    background: rgba(218, 165, 32, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(218, 165, 32, 0.2);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255,255,255,0.8);
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 服务项目部分 */
.services {
    padding: 5rem 0;
    background: var(--gray-bg);
    color: var(--light-text);
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.services-header {
    text-align: center;
    margin-bottom: 4rem;
}

.services-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-item {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 2.5rem;
    transition: var(--transition);
    border: 1px solid rgba(218, 165, 32, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(218, 165, 32, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(218, 165, 32, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.service-item:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.service-item p {
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.service-features {
    list-style: none;
    position: relative;
    z-index: 1;
}

.service-features li {
    padding: 0.5rem 0;
    color: rgba(255,255,255,0.7);
    position: relative;
    padding-left: 1.5rem;
    transition: var(--transition);
}

.service-features li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    transition: var(--transition);
}

.service-item:hover .service-features li {
    color: rgba(255,255,255,0.9);
    transform: translateX(5px);
}

/* 合作伙伴部分 */
.partners {
    padding: 5rem 0;
    background: var(--dark-bg);
}

.partners-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.partners-header {
    text-align: center;
    margin-bottom: 3rem;
}

.partners-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.partners-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.partner-row {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 20px;
    align-items: center;
}

.partner-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3);
}

.partner-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .partner-row {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .partner-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .partner-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .partner-item {
        aspect-ratio: 3/2;
    }
}

/* 联系我们部分 */
.contact {
    padding: 5rem 0;
    background: var(--gray-bg);
    color: var(--light-text);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-text h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-text p {
    color: rgba(255,255,255,0.8);
}

.contact-map {
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
}

/* 页脚 */
.footer {
    background: var(--dark-bg);
    color: var(--light-text);
    padding: 4rem 0 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-column a,
.footer-column p {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-content,
    .services-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-item {
        padding: 2rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 10px;
    }
    
    .close-modal {
        right: 15px;
        top: -5px;
    }
}

@media (max-width: 480px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close-modal:hover {
    color: #000;
}

/* =====================
   PDF弹窗右上角控制按钮，按钮一行显示且全屏时不遮挡PDF工具栏
   ===================== */
.modal-controls {
    position: absolute;
    top: 1px;
    right: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 1002;
    height: 40px;
    background: none;
}
.fullscreen-btn, .close-modal {
    background: none;
    border: none;
    color: #666;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.close-modal {
    font-size: 28px;
    font-weight: bold;
}

/* =====================
   服务项目Tab栏与内容区
   ===================== */
.services-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
    border-bottom: 2px solid #222;
    overflow-x: auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
}
.services-tabs .tab {
    padding: 8px 28px;
    cursor: pointer;
    font-size: 16px;
    color: #e0e0e0;
    border: none;
    background: none;
    outline: none;
    transition: color 0.2s, border-bottom 0.2s, background 0.2s;
    margin-right: 2px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    border-radius: 0;
}
.services-tabs .tab.active {
    color: #fff;
    border-bottom: 3px solid #00bfff;
    font-weight: bold;
    background: none;
}
.services-tab-content {
    width: 100%;
    background: none;
    border-radius: 0;
    box-shadow: none;
    color: #222;
    padding: 0px 24px 0px 24px;
}
.tab-pane {
    display: none;
    animation: fadeIn 0.4s;
}
.tab-pane.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.tab-content-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    justify-content: space-between;
}
.tab-content-text {
    flex: 1 1 340px;
    min-width: 280px;
    max-width: 480px;
}
.tab-content-img {
    flex: 1 1 420px;
    min-width: 320px;
    max-width: 700px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
}
.tab-content-img img {
    max-width: 100%;
    width: 100%;
    min-width: 260px;
    max-height: 420px;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    object-fit: contain;
    background: #f5f5f5;
}

/* =====================
   服务项目内容区动画与响应式
   ===================== */
@media (max-width: 1100px) {
    .tab-content-flex {
    flex-direction: column;
        gap: 24px;
    }
    .tab-content-img {
        justify-content: center;
        max-width: 100vw;
    }
    .tab-content-img img {
        max-width: 90vw;
        min-width: 0;
    }
}

/* =====================
   服务项目内容区标题与链接
   ===================== */
.tab-content-text h3, .tab-content-text p {
    color: #fff;
    font-weight: bold;
}
.service-link {
    display: inline-block;
    color: #00bfff;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 12px;
    transition: color 0.2s;
}
.service-link:hover {
    color: #fff;
    text-decoration: none;
}

/* PDF弹窗全屏时内容和PDF填满窗口，并为按钮留出空间 */
.modal-content.fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    max-width: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    padding-top: 38px !important; /* 给顶部按钮留空间，避免和PDF工具栏重叠 */
}
.modal-content.fullscreen #pdfViewer {
    width: 100vw !important;
    height: calc(100vh - 38px) !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0 !important;
}
.modal-content.fullscreen .modal-controls {
    top: 16px;
}

@media (max-width: 600px) {
    .about-container {
        padding: 0 1.2rem;
    }
    .about-content {
        grid-template-columns: 1fr !important;
        padding: 0;
    }
    .about-text p {
        text-align: left;
        padding: 0;
        margin: 0 0 1.2rem 0;
    }
    .about-stats {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
    .stat-item {
        flex: 1 1 0;
        width: 100%;
        min-width: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        margin: 0;
        padding: 1.2rem 0.2rem;
    }
    .stat-number {
        font-size: 1.8rem;
    }
    .services-tabs {
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    .services-tabs .tab {
        min-width: 90px;
        font-size: 15px;
        padding: 8px 16px;
    }
}

/* 轮播图样式 for 服务项目 */
.carousel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    min-width: 320px;
    height: 420px;
}
.carousel-images {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.carousel-img {
    display: none;
    max-width: 100%;
    max-height: 420px;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    object-fit: contain;
    background: #f5f5f5;
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    margin: auto;
}
.carousel-img.active {
    display: block;
    position: relative;
}
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    z-index: 2;
}
.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bbb;
    display: inline-block;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}
@media (max-width: 1100px) {
    .carousel-container {
        max-width: 90vw;
        height: 260px;
    }
    .carousel-img {
        max-height: 260px;
    }
}

/* 图片预览弹窗样式 */
#imgPreviewModal.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.img-modal-content {
    position: relative;
    background: none;
    box-shadow: none;
    border-radius: 0;
    width: 90vw;
    max-width: 800px;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#imgPreviewModal img#imgPreview {
    max-width: 100%;
    max-height: 76vh;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    background: #fff;
    margin: 0 48px;
}
.close-img-modal {
    position: absolute;
    top: 10px;
    right: 18px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}
.img-modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    font-size: 2.2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.img-modal-btn.left { left: 10px; }
.img-modal-btn.right { right: 10px; }
.img-modal-btn:hover { background: rgba(218,165,32,0.7); color: #222; }
@media (max-width: 600px) {
    .img-modal-content { width: 98vw; height: 60vh; }
    #imgPreviewModal img#imgPreview { max-width: 98vw; max-height: 54vh; margin: 0 8vw; }
    .img-modal-btn.left { left: 2vw; }
    .img-modal-btn.right { right: 2vw; }
}