/* Custom Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    padding-top: 0;
    margin: 0;
}

/* Navbar - 固定定位 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: #ffffff !important;
    min-height: 70px;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.nav-link.active {
    color: #0d6efd !important;
    font-weight: 600;
}

/* 主内容区域 - 统一的顶部间距 */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 300px);
}

/* 响应式调整导航栏高度 */
@media (max-width: 768px) {
    .navbar {
        min-height: 60px;
    }
    
    .main-content {
        margin-top: 60px;
    }
    
    .navbar-brand img {
        height: 32px;
    }
}

/* ========== Hero Slider 样式 - 图片完整显示 ========== */
.hero-slider {
    width: 100%;
    height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    width: 100%;
    height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

/* 图片完整显示方案 - 使用img标签时 */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 如果使用背景图，确保图片完整覆盖 */
.hero-slide-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 文字覆盖层 - 可选 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

/* Swiper 导航按钮 */
.swiper-button-next,
.swiper-button-prev {
    background: rgba(0,0,0,0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0,0,0,0.6);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: white;
    opacity: 0.8;
}

.swiper-pagination-bullet-active {
    background: #0d6efd;
    opacity: 1;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 产品图片包装器 - 1:1比例 */
.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-img-1x1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-1x1 {
    transform: scale(1.05);
}

/* 产品标题两行省略 */
.product-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
}

/* 产品描述两行省略 */
.product-desc-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
}

/* Gallery */
.product-gallery {
    border-radius: 10px;
    overflow: hidden;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.thumb-item {
    flex: 1;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    transition: opacity 0.3s;
}

.thumb-item:hover {
    opacity: 0.8;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 文章卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* 文章图片包装器 - 3:2比例 */
.article-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.article-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

/* 文章标题两行省略 */
.article-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    transition: color 0.3s ease;
}

.article-card:hover .article-title-clamp {
    color: #0d6efd;
}

/* 文章摘要两行省略 */
.article-summary-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

/* 功能卡片样式 */
.feature-card {
    padding: 20px 15px;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.feature-icon i {
    font-size: 28px;
    color: white;
}

.feature-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
}

/* Sidebar 样式 */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

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

.badge {
    font-weight: normal;
    padding: 5px 10px;
}

/* Footer */
footer {
    margin-top: auto;
}

.social-links a {
    transition: opacity 0.3s;
    display: inline-block;
}

.social-links a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .feature-card {
        padding: 15px;
    }
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    .feature-icon i {
        font-size: 24px;
    }
    .feature-card h5 {
        font-size: 1rem;
    }
    .feature-card p {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .hero-slider,
    .hero-slide {
        height: 50vh;
    }
    .hero-title {
        font-size: 1.5rem;
    }
    .hero-subtitle {
        font-size: 0.85rem;
    }
    .hero-btn {
        font-size: 0.8rem;
        padding: 6px 16px;
    }
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 12px;
    }
    .product-card .card-img-top {
        height: 150px;
    }
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .hero-slider,
    .hero-slide {
        height: 40vh;
    }
    .hero-title {
        font-size: 1.2rem;
    }
    .hero-subtitle {
        font-size: 0.7rem;
        margin-bottom: 0.8rem;
    }
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    .product-card .card-img-top {
        height: 120px;
    }
    .feature-card h5 {
        font-size: 0.85rem;
    }
    .feature-card p {
        display: none;
    }
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    .feature-icon i {
        font-size: 20px;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 1rem;
    }
    .feature-card h5 {
        font-size: 0.75rem;
    }
    .feature-icon {
        width: 45px;
        height: 45px;
    }
    .feature-icon i {
        font-size: 18px;
    }
}

/* 移动端菜单优化 */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0;
    }
    
    .btn-primary.ms-lg-3 {
        margin-left: 0 !important;
        margin-top: 10px;
        width: 100%;
    }
}

/* Loading Spinner */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.object-fit-cover {
    object-fit: cover;
}

.min-vh-75 {
    min-height: 75vh;
}

/* 文章图片自适应 */
.article-content img {
    max-width: 100%;
    height: auto;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
}

.pagination .page-link {
    color: #0d6efd;
    border-radius: 5px;
    margin: 0 3px;
}

.pagination .active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: white;
    padding: 15px 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
}
.cookie-consent.show {
    transform: translateY(0);
}
.cookie-consent .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.cookie-consent p {
    margin: 0;
    font-size: 14px;
    flex: 1;
}
.cookie-consent .btn-accept {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}
.cookie-consent .btn-accept:hover {
    background: #0b5ed7;
}
.cookie-consent .btn-more {
    background: transparent;
    color: #aaa;
    border: 1px solid #555;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    transition: all 0.3s;
}
.cookie-consent .btn-more:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}
@media (max-width: 768px) {
    .cookie-consent .container {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent .btn-more {
        margin-right: 5px;
    }
}