/* static/css/style.css */

/* 导航栏样式优化 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed; /* 改为 fixed */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    margin: 0;
    color: #007bff;
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 0;
}

nav ul li a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 20px 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

nav ul li a:hover,
nav ul li a.active {
    color: #007bff;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 70%;
}

/* 响应式导航栏 */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* 在小屏幕上隐藏导航项 */
@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    nav ul.show {
        transform: translateY(0);
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    nav ul li a {
        padding: 15px 20px;
    }
    
    nav ul li a::after {
        display: none;
    }
}

/* 首页服务卡片图片样式 */
.service-card .service-image {
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.service-card .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 服务页面横幅图片样式 */
.service-header {
    position: relative;
    margin-bottom: 20px;
}

.service-banner {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
}

/* 关于我们页面公司图片 */
.company-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 团队成员头像 */
.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 其他现有样式保持不变 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #333;
    color: white;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #555;
}

.hero {
    background-color: #f4f4f4;
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.services-preview {
    padding: 60px 0;
}

.services-preview h2 {
    text-align: center;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.service-card h3 {
    margin-top: 0;
}

.cta {
    background-color: #e9ecef;
    padding: 60px 0;
    text-align: center;
}

.btn-secondary {
    background-color: #28a745;
}

.btn-secondary:hover {
    background-color: #1e7e34;
}

.services-hero {
    background-color: #f4f4f4;
    padding: 60px 0;
    text-align: center;
}

.services-list {
    padding: 60px 0;
}

.service-item {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.service-item h3 {
    margin-top: 0;
}

.about-hero {
    background-color: #f4f4f4;
    padding: 60px 0;
    text-align: center;
}

.company-info {
    padding: 60px 0;
}

.info-content {
    max-width: 800px;
    margin: 0 auto;
}

.team {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.team h2 {
    text-align: center;
    margin-bottom: 40px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.team-member h3 {
    margin-bottom: 5px;
}

.position {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 15px;
}

.contact-hero {
    background-color: #f4f4f4;
    padding: 60px 0;
    text-align: center;
}

.contact-content {
    padding: 60px 0;
}

.contact-content .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info .info-item {
    margin-bottom: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
}

/* 联系页面地图样式 */
.map-container {
    margin-top: 30px;
}

.location-map {
    width: 20px;          /* 再小一点 */
    height: auto;         /* 保持原图比例 */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

/* 默认图片占位符样式 */
.service-image img,
.service-banner,
.company-image,
.member-avatar img,
.location-map {
    /* 当图片不存在时的默认背景 */
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
}

/* 服务页面视频样式 */
.video-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #000;
}

.service-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    outline: none;
}

/* 响应式视频 */
@media (max-width: 768px) {
    .video-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .video-container {
        height: 200px;
    }
}

/* 视频播放按钮样式 */
.video-container::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    /* 添加渐变背景 */
    background: linear-gradient(135deg, rgba(0,123,255,0.8) 0%, rgba(0,86,179,0.8) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* 文字水平居中调整 */
    padding-left: 5px;
}

/* 悬停效果 */
.video-container:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* 视频播放时隐藏播放按钮 */
.video-container.video-playing::after {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

/* 视频加载动画 */
.video-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: none;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 视频加载时显示加载动画 */
.video-container:not(.video-loaded)::before {
    display: block;
}

/* 字体样式优化 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* 标题样式优化 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #2c3e50;
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* 导航栏文字样式 */
nav ul li a {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 英雄区域文字 */
.hero h2 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 30px;
}

/* 服务页面标题 */
.services-hero h2 {
    font-size: 2.5rem;
    color: #2c3e50;
}

/* 关于我们页面 */
.about-hero h2 {
    font-size: 2.5rem;
    color: #2c3e50;
}

/* 联系我们页面 */
.contact-hero h2 {
    font-size: 2.5rem;
    color: #2c3e50;
}

/* 团队成员姓名 */
.team-member h3 {
    font-size: 1.4rem;
    color: #2c3e50;
}

/* 职位信息 */
.position {
    font-size: 1.1rem;
    color: #666;
}

/* 服务卡片标题 */
.service-card h3 {
    font-size: 1.4rem;
    color: #2c3e50;
}

/* 服务项目标题 */
.service-item h3 {
    font-size: 1.6rem;
    color: #2c3e50;
}

/* 联系信息标题 */
.contact-info h3 {
    font-size: 1.6rem;
    color: #2c3e50;
}

/* 表单标签 */
.contact-form label {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
}

/* 按钮文字 */
.btn {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 页脚文字 */
footer {
    font-size: 1rem;
    color: #fff;
}

/* 响应式字体大小 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .services-hero h2,
    .about-hero h2,
    .contact-hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .services-hero h2,
    .about-hero h2,
    .contact-hero h2 {
        font-size: 1.7rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

