/* ========================================
   CONRUN 康伦机电 - 企业网站样式表
   ======================================== */

/* CSS变量定义 */
:root {
    --primary-color: #0066cc;
    --primary-dark: #004d99;
    --primary-light: #3385d6;
    --secondary-color: #1a5276;
    --accent-color: #3498db;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --bg-dark: #2c3e50;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

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

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 容器 */
.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   头部样式
   ======================================== */
.header {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 50%, #1a5276 100%);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.header-top {
    padding: 15px 0;
    position: relative;
    z-index: 1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.logo-text h1 {
    font-size: 28px;
    color: white;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo-text span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-top: 2px;
}

.language-selector {
    position: relative;
}

.language-selector select {
    padding: 8px 35px 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="white" d="M6 8L1 3h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.language-selector select option {
    color: #333;
}

/* 导航菜单 */
.nav {
    background: var(--primary-color);
    position: relative;
    z-index: 100;
    
    max-width: 1150px;
    margin: 0 auto;
}

.nav-menu {
    display: flex;
    justify-content: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 40px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-dark);
}

.nav-menu li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-menu li:hover::after,
.nav-menu li.active::after {
    width: 80%;
}

/* ========================================
   Banner区域
   ======================================== */
.banner {
    max-width: 1150px;
    margin: 0 auto;
    
    position: relative;
    height: 300px;
    overflow: hidden;
    /*background: var(--bg-light);*/
    background: #fff;
}

.banner-slider {
    position: relative;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

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

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dot.active,
.banner-dot:hover {
    background: white;
}

/* ========================================
   主要内容区域
   ======================================== */
.main-content {
    background: white;
    padding: 40px 0;
    min-height: 500px;
}

/* 页面标题 */
.page-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-color);
}

.page-title2 {
    font-size: 32px;
    line-height: 1;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 30px;
    /*padding-bottom: 15px;*/
    /*border-bottom: 2px solid var(--primary-color);*/
    position: relative;
    text-align: center;
}
.page-desc {
    font-size: 16px;
    color: #555555;
    line-height: 24px;
    /*max-width: 1080px;*/
    margin: 0 auto;
    text-align: center;
}

/* ========================================
   首页产品分类
   ======================================== */
.product-categories {
    /*display: grid;*/
    /*grid-template-columns: repeat(4, 1fr);*/
    /*gap: 20px;*/
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-card .image-wrapper {
    height: 160px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.category-card h3 {
    padding: 15px;
    text-align: center;
    font-size: 15px;
    color: var(--text-color);
    background: var(--primary-color);
    color: white;
}
.productSwiper {
    margin-top: 25px;
}
.productSwiper .swiper-slide {
   background: rgb(201 209 217 / 30%);
}
.productSwiper .img-box {
    position: relative;
    padding-top: 75%;
}
.productSwiper .img-box img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    max-width: calc(100% - 30px);
    max-height: 90%;
}
.productSwiper .text-box {
    padding: 0 15px 15px;
}
.productSwiper .more {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.productSwiper .icon {
    width: 35px;
    height: 35px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(90deg);
}
.productSwiper a:hover {
    .icon {
        background: var(--primary-color);
        svg {
            stroke: #fff;
        }
    }
}

.product-categories .swiper-pagination {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
.product-categories .swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
}
.product-categories .swiper-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color);
}
/* ========================================
   全球地图区域
   ======================================== */
.global-map {
    margin: 40px 0;
    text-align: center;
}

.global-map img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.global-map video {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* ========================================
   关于我们区域
   ======================================== */
.about-section {
    margin-top: 40px;
}

.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
}

.about-text {
    color: var(--text-light);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 15px;
    text-indent: 2em;
}

/* ========================================
   客户展示
   ======================================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    padding: 20px 0;
}

.client-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    padding: 15px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.client-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.client-item img {
    max-height: 50px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.client-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ========================================
   产品展示页面
   ======================================== */
.products-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
}

/* 侧边栏 */
.sidebar {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.sidebar-title {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-menu {
    /*padding: 10px 0;*/
}

.sidebar-menu li {
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 14px 20px;
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 25px;
}

.sidebar-menu a:hover::before,
.sidebar-menu a.active::before {
    opacity: 1;
}

/* 二级下拉菜单 */
.has-submenu {
    position: relative;
}

.submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.has-submenu.active .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-light);
}

.has-submenu.active .submenu {
    max-height: 200px;
}

.submenu li {
    border-bottom: 1px solid var(--border-color);
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu a {
    padding: 10px 20px 10px 35px;
    font-size: 13px;
    color: var(--text-light);
}

.submenu a:hover {
    color: var(--primary-color);
    background: white;
}

.submenu a::before {
    display: none;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.product-image {
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-info {
    padding: 15px;
}

.product-info h4 {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.product-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination span {
    cursor: default;
}

/* ========================================
   联系我们页面
   ======================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.contact-info {
    padding: 20px 0;
}

.contact-info h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-item div h4 {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.contact-item div p {
    font-size: 14px;
    color: var(--text-light);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 50%, #1a5276 100%);
    color: white;
    padding: 30px 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.footer-logo-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.footer-logo-text h4 {
    font-size: 18px;
    font-weight: 600;
}

.footer-logo-text span {
    font-size: 12px;
    opacity: 0.8;
}

.footer-info {
    text-align: right;
    font-size: 13px;
    line-height: 1.8;
    opacity: 0.9;
}

.footer-info p {
    margin-bottom: 3px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
    .product-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        margin-bottom: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .nav-menu a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .product-categories {
        grid-template-columns: 1fr;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-info {
        text-align: center;
    }
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 滚动显示动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
