* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-image: url('../img/background.png');
    background-size: cover;
    background-position: center 1px;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

.header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 25px 20px;
}

.auth-section {
    display: flex;
    gap: 15px;
}

.auth-btn {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid #4682B4;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.auth-btn:hover {
    background-color: #4682B4;
    color: white;
}

.search-section {
    margin-top: 20px;
    text-align: right;
    padding: 0 20px;
}

.hot-search {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
    white-space: nowrap; /* 防止换行 */
    overflow: visible;   /* 确保内容可见 */
}

.hot-search span {
    margin-right: 15px;  /* 增加间距 */
    padding: 3px 8px;
    background-color: rgba(255,255,255,0.7);
    border-radius: 12px;
    cursor: pointer;
    display: inline-block; /* 确保span正确显示 */
}

.hot-search span:hover {
    background-color: #4682B4;
    color: white;
}

.search-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 5px 15px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-box input {
    border: none;
    outline: none;
    padding: 5px;
    width: 200px;
    background: transparent;
}

.search-icon {
    color: #999;
    margin-left: 5px;
    cursor: pointer;
}

.lang-section {
    text-align: right;
    padding: 10px 20px;
}

.lang-btn {
    margin-left: 10px;
    text-decoration: none;
    color: #333;
    padding: 3px 8px;
    border-radius: 12px;
    transition: all 0.3s;
}

.lang-btn:hover {
    background-color: #f0f0f0;
}

.current-lang {
    font-weight: bold;
    background-color: #4682B4;
    color: white;
}

.nav-bar {
    display: flex;
    justify-content: center;
    width: auto;
    max-width: 1500px;
    margin: 20px auto;
    border-radius: 25px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-item {
    position: relative; /* 添加相对定位 */
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    background-color: #4682B4;
    border-right: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.nav-item:last-child {
    border-right: none;
}

.nav-item:hover {
    background-color: #3a6d96;
}

.dropdown-content {
    display: none; /* 初始隐藏 */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 250px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 100;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block; /* 悬停时显示 */
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    text-align: left;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a::before {
    content: "•";
    color: #4682B4;
    margin-right: 8px;
    font-size: 14px;
}

.dropdown-content a:hover {
    color: #4682B4;
    background-color: #f8f9fa;
    padding-left: 25px;
}

.dropdown:hover > .nav-item {
    background-color: #3a6d96;
}

.content-area {
    display: flex;
    margin: 20px;
    gap: 20px;
}

.content-left {
    width: 50%;
    background-color: white;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.content-right {
    flex: 1;
    background-color: white;
    height: 300px;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.section-title {
    background-color: #4682B4;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.more-link {
    font-size: 12px;
    color: white;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.2);
}

.more-link:hover {
    background-color: rgba(255,255,255,0.3);
}

.news-list {
    padding: 10px;
}

.news-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s;
    display: block; /* 确保链接占满整行 */
    text-decoration: none; /* 移除下划线 */
}

.news-item:hover {
    background-color: #f9f9f9;
    padding-left: 20px;
    color: #4682B4; /* 悬停时颜色变化 */
}

.consultation-banner {
    margin: 20px;
    padding: 0;
    display: block;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.banner-image:hover {
    transform: scale(1.02);
}

/* 修复对齐问题的links-and-info-section */
.links-and-info-section {
    display: flex;
    margin: 20px;
    gap: 20px;
    align-items: flex-start; /* 确保顶部对齐 */
}

.links-column {
    width: 33.33%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-column {
    width: 66.67%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 修复links-section高度问题 */
.links-section {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    height: auto; /* 改为自动高度 */
}

.link-item {
    background-color: white;
    padding: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-bottom: 1px solid #eee;
}

.link-item:last-child {
    border-bottom: none;
}

.link-item:hover {
    background-color: #f8f9fa;
}

.link-icon img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
}

.country-info {
    background-color: #9cc3e4;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.country-title {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-list {
    background-color: white;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 10px;
}

.country-item {
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    background-color: #f0f0f0;
    border-radius: 20px;
    transition: all 0.3s;
}

.country-item:hover {
    background-color: #4682B4;
    color: white;
}

/* 确保 market-section 样式生效 */
.market-section {
    background-color: #9cc3e4; /* 浅蓝色背景 */
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.market-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.market-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.market-item {
    flex: 1;
    height: 150px; /* 保持高度与原设计一致 */
    background: #fff; /* 每个项的白色背景 */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
}

.market-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.market-item-content {
    display: flex;
    flex-direction: column; /* 图片和文字垂直排列 */
    align-items: center; /* 居中对齐 */
    justify-content: center;
    height: 100%;
    width: 100%;
}

.market-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.market-item-content img {
    width: 100%;
    height: 100%; /* 图片占满整个容器 */
    object-fit: contain;
}
/* 针对无文字的项，确保图片居中 */
.market-item-content:has(img:only-child) {
    justify-content: center;
}

.market-item-content:has(img:only-child) img {
    margin-bottom: 0; /* 无文字时，图片不需要底部间距 */
}

.footer-banner {
    margin-top: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .content-area {
        flex-direction: column;
    }
    
    .content-left,
    .content-right {
        width: 100%;
    }
    
    .links-and-info-section {
        flex-direction: column;
    }
    
    .links-column,
    .info-column {
        width: 100%;
    }
    
    .market-row {
        flex-direction: column;
    }
    
    .market-item {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .nav-bar {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .nav-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    
    .dropdown-content {
        width: 100%;
        border-radius: 0;
        position: static; /* 移动端改为静态定位 */
    }
    
    .section-title {
        font-size: 14px;
    }
}