/* 基础样式 */
:root {
    --primary-color: #1a237e;
    --secondary-color: #7986cb;
    --light-color: #f5f5f5;
    --dark-color: #121212;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.line {
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin-bottom: 20px;
}

/* 导航栏 */
.navbar {
    padding: 15px 0;
    transition: var(--transition);
    background-color: transparent;
}

.navbar.scrolled {
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.navbar-brand img {
    transition: var(--transition);
}

/* 导航栏选中效果 */
.navbar-light .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 8px 15px;
    position: relative;
    transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: #fff;
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    width: 70%;
}

.navbar.scrolled .navbar-nav .nav-link {
    color: rgba(0, 0, 0, 0.7);
}

.navbar.scrolled .navbar-nav .nav-link:hover,
.navbar.scrolled .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar.scrolled .navbar-nav .nav-link::after {
    background-color: var(--primary-color);
}

/* 轮播图 */
.carousel {
    height: 100vh;
    position: relative;
}

.carousel-item {
    height: 100vh;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

/* 关于我们 */
.about-img {
    position: relative;
    padding: 20px;
}

.about-img img {
    max-width: 80%;
    margin: 0 auto;
    display: block;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    margin-top: 30px;
}

.feature {
    flex: 1 0 33.33%;
    text-align: center;
    padding: 15px;
}

.feature i {
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature h4 {
    font-size: 18px;
    margin-bottom: 0;
}

/* 服务卡片 */
.service-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.service-card .icon {
    width: 70px;
    height: 70px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-card .icon i {
    font-size: 30px;
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

/* 团队卡片 */
.team-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.team-img {
    position: relative;
    overflow: hidden;
}

.team-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.team-card:hover .team-img img {
    transform: scale(1.1);
}

.team-info {
    padding: 20px;
    text-align: center;
}

.team-info h4 {
    font-size: 20px;
    margin-bottom: 5px;
}

.team-info p {
    color: #777;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 联系信息 */
.contact-info {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}

.info-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.info-item p {
    color: #777;
    margin-bottom: 0;
}

/* 联系表单 */
.contact-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-control {
    height: 50px;
    border-radius: 5px;
    border: 1px solid #eee;
    padding: 10px 15px;
    font-size: 16px;
}

textarea.form-control {
    height: auto;
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* 页脚 */
footer {
    background-color: var(--dark-color);
    color: #fff;
}

footer h5 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: #bbb;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

/* 作品展示 */
.portfolio-filter .btn {
    margin: 0 5px;
    padding: 8px 20px;
    border-radius: 30px;
    transition: var(--transition);
}

.portfolio-filter .btn.active,
.portfolio-filter .btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.portfolio-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.portfolio-img {
    position: relative;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-img .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-img .overlay {
    opacity: 1;
}

.portfolio-img .view-btn {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-img .view-btn {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-info {
    padding: 20px;
}

.portfolio-info h4 {
    font-size: 20px;
    margin-bottom: 5px;
}

.portfolio-info p {
    color: #777;
    margin-bottom: 0;
}

/* 技术栈 */
/* 技术栈图标样式 */
.tech-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.tech-card:hover .tech-icon {
    transform: scale(1.2);
    color: var(--secondary-color);
}

/* Flutter图标特殊处理 */
.tech-icon.flutter-icon:before {
    content: "\f3e2"; /* 使用mobile-alt图标作为替代 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.tech-icon.flutter-icon:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #54C5F8; /* Flutter蓝色 */
    transform: rotate(45deg);
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    z-index: -1;
}

.tech-card {
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    position: relative; /* 为Flutter图标定位添加 */
    overflow: hidden; /* 确保伪元素不溢出 */
}

.tech-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.tech-card h5 {
    font-size: 18px;
    margin-bottom: 0;
}

/* 摄影作品 */
.photo-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.photo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.photo-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.photo-card:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    opacity: 0;
    transition: var(--transition);
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay h4 {
    margin-bottom: 0;
    font-size: 20px;
}

.subscribe-form {
    position: relative;
    margin-top: 20px;
}

.subscribe-form input {
    width: 100%;
    height: 50px;
    border-radius: 30px;
    border: none;
    padding: 0 20px;
    padding-right: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.subscribe-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.subscribe-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background-color: var(--secondary-color);
}

/* 版权信息 */
.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.copyright p {
    margin-bottom: 0;
    color: #bbb;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* 页面加载动画 */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: #fff;
        padding: 15px;
        border-radius: 5px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-light .navbar-nav .nav-link {
        color: #333;
    }
    
    .carousel-caption h1 {
        font-size: 36px;
    }
    
    .carousel-caption p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .carousel-caption h1 {
        font-size: 28px;
    }
    
    .carousel-caption p {
        font-size: 14px;
    }
    
    .section-title h2 {
        font-size: 26px;
    }
    
    .about-img {
        margin-bottom: 30px;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
}

/* 自定义动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

/* 木质背景效果 */
.wood-bg {
    position: relative;
}

.wood-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/wood-texture.jpg');
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}

/* 轮播图视频样式 */
.video-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.carousel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    filter: brightness(0.7);
}

/* 轮播图文字底部显示 */
.carousel-caption-bottom {
    display: none; /* 不再使用此样式 */
}

/* 恢复原来的轮播图文字样式 */
.carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    text-align: center;
    background-color: transparent; /* 去掉半透明背景 */
}

.carousel-caption h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.carousel-caption p {
    font-size: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 28px;
    }
    
    .carousel-caption p {
        font-size: 14px;
    }
    
    .carousel-caption .btn {
        padding: 8px 20px;
        font-size: 14px;
    }
}

/* 导航栏标语 */
.navbar-brand .slogan {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    display: none;
}

.navbar.scrolled .navbar-brand .slogan {
    color: #333;
}

@media (min-width: 768px) {
    .navbar-brand .slogan {
        display: inline-block;
    }
}