:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #777;
    --navbar-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #fff; /* 将文字颜色改为白色 */
    background: #000; /* 将背景色改为黑色 */
    margin: 0;
    padding: 0;
}

/* 统一容器宽度 */
.container {
    width: 100%;
    max-width: 1400px; /* 统一设置最大宽度为1400px */
    margin: 0 auto;
    padding: 0 15px;
}

/* 主视觉区域宽度修正 */
.hero {
    width: 100%; /* 原100vw可能导致横向滚动 */
    min-height: 420px;
    position: relative;
    padding-bottom: 60px;
    background: #000;
}

/* 作品区容器宽度统一 */
.portfolio-page-container {
    width: 100%;
    max-width: 1800px; /* 与container保持一致 */
    margin: 48px auto;
    padding: 0 15px; /* 使用与container相同的内边距 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
    padding-left: 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* 导航栏样式 */
header {
    background: #000; /* 将背景色改为黑色 */
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1); /* 调整阴影颜色为白色调 */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 3px 0;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #fff; /* 将logo文字改为白色 */
}

nav ul li a {
    color: #fff; /* 将导航链接文字改为白色 */
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: #ccc; /* 悬停和激活状态改为浅灰色 */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 移除重复定义 */

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

/* 移除重复定义 */

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    .mobile-menu {
        display: block;
    }
}

/* 主视觉区域 */
.hero {
    width: 100vw;
    min-height: 420px;
    position: relative;
    padding-bottom: 60px;
    margin-top: 80px;
    background: #000; /* 将背景色改为黑色 */
}

.hero-image {
    flex: 1 1 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #000; /* 统一黑色背景 */
    aspect-ratio: auto;
}

.hero-container {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    padding: 0;
}



.hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: none;
}

.hero-content {
    flex: 1 1 50%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.hero-content h1 {
    font-size: 64px;
    margin-bottom: 24px;
    font-weight: bold;
    line-height: 1.15;
    letter-spacing: -2px;
}
.hero-content p {
    font-size: 28px;
    margin-bottom: 30px;
    color: #fff;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .hero-content h1 {
        font-size: 42px;
    }
    .hero-content p {
        font-size: 20px;
    }
}
@media (max-width: 800px) {
    .hero-container {
        flex-direction: column;
    }
    .hero-image, .hero-content {
        width: 100%;
        padding: 0;
    }
    .hero-content {
        padding: 30px 15px;
    }
}

.about-preview {
    padding: 80px 0;
    background: #000;
}
.about-preview .container {
    display: flex;
    align-items: center;
    gap: 40px;
}
.about-content {
    flex: 1;
    padding: 20px;
}
.about-content h2 {
    font-size: 36px;
    margin-bottom: 24px;
    color: #fff;
}
.about-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #fff;
}
.about-image {
    flex: 1;
}
.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 广告宣传作品模块 */
.advertising-works {
    padding: 60px 0;
    background-color: #000;
}
.advertising-works h2 {
    text-align: center;
    color: #fff;
    font-size: 32px;
    margin-bottom: 40px;
}
.work-containers-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.work-container {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
}

.work-image, .work-container-4 video {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    border: none;
    display: block;
    margin-bottom: 15px;
}

/* 客户图标网格布局 */
.client-logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
}
.logo-item {
    flex-basis: 100%;
    text-align: center;
    padding: 20px;
}
.logo-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

/* 瀑布流布局样式 */
.waterfall-grid {
    column-count: 2;
    column-gap: 15px;
    padding: 10px;
}

.waterfall-item {
    break-inside: avoid;
    margin-bottom: 15px;
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .waterfall-grid {
    column-count: 1;
}
}

/* 图片加载失败提示 */

/* 图片加载失败时显示的文本样式 */

.work-container-1, .work-container-2, .work-container-3 {
    flex: 1;
    min-width: 250px;
}
.work-container-4 {
    width: 100%;
}
.content-placeholder {
    height: 200px;
    background-color: #333;
    border-radius: 4px;
    margin-top: 15px;
}

/* 广告宣传片模块已移除 */

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    padding: 20px;
    width: 80%;
    max-width: 1200px;
    max-height: 80vh;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow-y: auto;
    box-sizing: border-box;
    margin: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #ff4d4f;
}

/* 1号容器：单张图展示 */
.single-image {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.single-image img {
    width: 100%;
    height: auto;
    cursor: pointer;
    display: block;
}

/* 2号容器：瀑布流网格 */
.masonry-grid {
    column-count: 2;
    column-gap: 20px;
    margin-top: 20px;
}
.masonry-item {
    border-radius: 8px;
    overflow: hidden;
    height: auto;
    background-color: rgba(255,255,255,0.1);
    break-inside: avoid;
    margin-bottom: 20px;
}
.masonry-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    overflow: hidden;
}
.masonry-item.tall {
    grid-row: span 2;
}
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.masonry-item.tall {
    grid-row: span 2;
}
.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.client-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}
.client-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* 3号容器：上下两张图 */
.stacked-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.stacked-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: block;
}

@media (max-width: 768px) {
    .promo-video {
        padding: 60px 0;
    }
    .promo-video h2 {
        font-size: 28px;
        margin-bottom: 25px;
    }
    .video-description {
        font-size: 16px;
        padding: 0 15px;
    }
}

/* 作品区 */
.portfolio {
    padding: 0;
    min-height: auto;
    background: inherit; /* 继承body背景色 */
    margin: 0;
}
.portfolio h2 {
    text-align: center;
    margin: 10px 0;
    font-size: 32px;
    color: white;
    padding: 0;
}

.portfolio-page-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

@media (max-width: 768px) {
    .portfolio-page-container {
        max-width: 90vw;
    }
}

@media (max-width: 576px) {
    .portfolio-page-container {
        max-width: 95vw;
        padding: 0 10px;
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(auto-fill, auto);
    gap: 0;
    justify-items: stretch;
    margin: 0;
    padding: 0;
    width: 100%;
}

@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-item {
    width: 100%;
    max-width: none;
    min-height: 0;
    height: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    margin: 0;
    padding: 0;
}

.portfolio-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.portfolio-item:hover .portfolio-inner,
.portfolio-inner.flip {
    transform: rotateY(180deg);
}

.portfolio-front,
.portfolio-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    backface-visibility: hidden;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portfolio-front {
    background: transparent;
}

.portfolio-back {
    background: rgba(0,0,0,0.8);
    color: white;
    transform: rotateY(180deg);
    justify-content: center;
    padding: 20px;
}

.portfolio-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    margin-bottom: 0;
    z-index: 1;
}
.portfolio-img-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    display: block;
}

.portfolio-item h3 {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 15px 0;
    z-index: 2 !important;
    box-sizing: border-box;
    height: auto;
}

.separator {
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    margin: 4px auto;
    border-radius: 2px;
}

.movie-info {
    font-size: 13px;
    color: #555;
    text-align: center;
    margin: 2px 0 8px;
}

.portfolio-pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 0;
    padding: 10px;
    background: rgba(0,0,0,0.5);
}

.portfolio-pagination-controls button {
    background: var(--light-color);
    border: 1px solid #ddd;
    color: var(--text-color);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-pagination-controls button:hover:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.portfolio-pagination-controls button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.portfolio-pagination-controls button:disabled {
    background: #eee;
    color: #aaa;
    border-color: #eee;
    cursor: not-allowed;
}

/* 特征和拼图（如果需要） */
.features {
    padding: 60px 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.copyright {
    text-align: center;
    padding: 20px 0;
}

.contact-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
}

.map-container {
    flex: 1;
    height: 300px;
    min-width: 300px;
}

.static-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
