/* style_top.css */
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* 导航栏样式 */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.fixed-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    margin-right: 30px;
    height: 50px;
}

/* 默认文字Logo（备用） */
.logo-text {
    font-size: 1.5rem;
    color: #2c3e50;
    white-space: nowrap;
}

/* 图片Logo容器 */
.logo-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    overflow: hidden;
}

/* 图片Logo样式 */
.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* 当Logo加载成功时的状态 */
.logo.has-image .logo-text {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

/* 导航栏活动状态样式 */
.nav-menu li a.active {
    color: #3498db;
    position: relative;
}

.nav-menu li a.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3498db;
    border-radius: 1px;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-buttons {
    display: flex;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-login {
    color: #2c3e50;
    border: 1px solid #ddd;
}

.btn-register {
    color: white;
    background-color: #3498db;
}

.btn-consult {
    color: white;
    background-color: #e74c3c;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 20px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    margin: 2px 0;
    transition: all 0.3s;
}

/* ========== 首页轮播样式 ========== */
.home-carousel-container {
    width: 100%;
    position: relative;
    margin-top: 80px;
    overflow: hidden;
    height: 500px;
    background-color: #f5f5f5;
}

.home-carousel-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.8s ease;
}

.home-carousel-slide.active {
    display: block;
    opacity: 1;
    z-index: 1;
}

.home-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 800px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.home-carousel-caption h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.home-carousel-caption p {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.home-carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 30px;
    box-sizing: border-box;
    z-index: 10;
}

.home-carousel-control {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background-color 0.3s;
    z-index: 11;
}

.home-carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.home-carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.home-carousel-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.home-carousel-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

/* ========== 新闻页面轮播样式 ========== */
.news-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin: 25px 0 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.news-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.news-carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.news-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-carousel-slide.active .news-carousel-img {
    transform: scale(1.02);
}

/* 轮播控制按钮 */
.news-carousel .carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.news-carousel .carousel-control {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    z-index: 11;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.news-carousel .carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 轮播指示器 */
.news-carousel .carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.news-carousel .carousel-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.news-carousel .carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.news-carousel .carousel-indicator.active {
    background-color: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 轮播标题和计数器 */
.news-carousel .carousel-caption {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    z-index: 9;
}

.news-carousel .carousel-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(5px);
}

/* 内容区块样式 */
.page-content {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    border-left: 5px solid #3498db;
}

.section h2 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.section-content {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.section.expanded .section-content {
    max-height: 2000px;
}

.read-more {
    display: block;
    text-align: center;
    padding: 12px;
    background-color: #f5f5f5;
    color: #555;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.read-more:hover {
    background-color: #e9e9e9;
}

.read-more i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.section.expanded .read-more i {
    transform: rotate(180deg);
}

/* 新闻链接样式 */
.news-links {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.news-links li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.news-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s;
    background: #f8f9fa;
}

.news-links a:hover {
    background: #e9ecef;
    color: #3498db;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.news-links a i {
    color: #7f8c8d;
    font-size: 0.9rem;
    opacity: 0.7;
}

.news-links a:hover i {
    opacity: 1;
    color: #3498db;
}

/* 无详细链接的灰色状态 */
.news-links a.no-detail {
    background: #f5f5f5;
    color: #95a5a6 !important;
    cursor: not-allowed;
    position: relative;
}

.news-links a.no-detail:hover {
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.news-links a.no-detail i {
    color: #bdc3c7;
}

.news-links a.no-detail:after {
    content: '詳細ページ準備中';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.news-links a.no-detail:hover:after {
    opacity: 1;
    visibility: visible;
}

.news-links a.no-detail:before {
    content: 'ⓘ';
    display: inline-block;
    margin-right: 8px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.view-all-news {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #3498db;
    color: white !important;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.view-all-news:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* 地图样式 */
.map-container {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#company-map {
    height: 400px;
    width: 100%;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.contact-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-item h3 i {
    margin-right: 10px;
    color: #3498db;
}

/* 页脚样式 */
footer {
    background: #2c3e50;
    padding: 30px 20px;
    text-align: center;
    font-size: 16px;
    color: #ecf0f1;
}

footer a {
    margin: 0 15px;
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #1abc9c;
}

footer p {
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .home-carousel-caption h2 {
        font-size: 2.2rem;
    }
    
    .home-carousel-caption p {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    .nav-menu li a.active {
        background-color: #f8f9fa;
        border-radius: 4px;
        padding: 8px 12px;
    }
    
    .nav-menu li a.active:after {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Logo响应式调整 */
    .logo-img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .home-carousel-container {
        height: 400px;
    }
    
    .home-carousel-caption {
        padding: 20px;
        width: 95%;
    }
    
    .home-carousel-caption h2 {
        font-size: 1.8rem;
    }
    
    .home-carousel-caption p {
        font-size: 1rem;
    }
    
    .home-carousel-control {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .nav-buttons {
        display: none;
    }
    
    .section {
        padding: 20px;
    }
    
    #company-map {
        height: 300px;
    }
    
    /* 新闻轮播响应式 */
    .news-carousel {
        height: 350px;
    }
    
    .news-carousel .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .home-carousel-container {
        height: 300px;
        margin-top: 60px;
    }
    
    .home-carousel-caption {
        padding: 15px;
        bottom: 20px;
        top: auto;
        transform: translate(-50%, 0);
    }
    
    .home-carousel-caption h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .home-carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .home-carousel-controls {
        padding: 0 15px;
    }
    
    .home-carousel-indicator {
        width: 12px;
        height: 12px;
    }
    
    .logo {
        margin-right: 20px;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    /* 新闻轮播响应式 */
    .news-carousel {
        height: 250px;
    }
    
    .news-carousel .carousel-control {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .news-carousel .carousel-controls {
        padding: 0 10px;
    }
    
    .news-carousel .carousel-indicators {
        bottom: 10px;
        gap: 8px;
    }
    
    .news-carousel .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}