/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    max-width: 1440px;
    margin: 0 auto;
}

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

.logo img {
    height: 60px;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
}

.logo-tagline {
    color: #002B5C;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.logo-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.login-button {
    margin-right: 5px;
}

.btn-login {
    display: inline-block;
    padding: 8px 18px;
    background-color: rgb(0, 91, 170);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background-color: rgb(0, 70, 130);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.search-box {
    display: flex;
    align-items: center;
    border: 2px solid #eee;
    padding: 8px 15px;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.search-box:focus-within {
    border-color: #002B5C;
}

.search-box input {
    border: none;
    outline: none;
    padding: 5px;
    width: 200px;
    font-size: 14px;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.search-box button:hover {
    opacity: 0.8;
}

.language-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s;
    position: relative;
}

.language-select:hover {
    border-color: #002B5C;
}

.language-select img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.language-select select {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    padding: 0 20px 0 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
}

.language-select::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #333;
    pointer-events: none;
}

/* Navigation styles */
.main-nav {
    background-color: rgb(0,91,170);
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.primary-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    position: relative;
    margin: 0 5px;
}

.main-nav ul li a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    padding: 15px 10px;
    transition: all 0.3s ease;
}

.main-nav ul li a:hover {
    color: #e6e6e6;
}

.main-nav ul li.has-dropdown > a .fa-chevron-down {
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

/* 下拉菜单样式 */
.main-nav .dropdown-menu {
    display: none; /* 默认隐藏 */
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.main-nav .dropdown-menu li {
    margin: 0;
    width: 100%;
}

.main-nav .dropdown-menu li a {
    padding: 10px 15px;
    display: block;
    border-bottom: 1px solid #f5f5f5;
    color: rgb(0, 91, 170);
}

.main-nav .dropdown-menu li:last-child a {
    border-bottom: none;
}

.main-nav .dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: rgb(0, 71, 150);
}

/* 确保在桌面设备上悬停时显示下拉菜单 */
@media screen and (min-width: 993px) {
    .main-nav li.has-dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
}

/* 社交图标样式 */
.social-icons {
    display: flex;
    margin-left: 20px;
}

.social-icons a {
    color: #fff;
    margin: 0 8px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: #ff6600;
    transform: scale(1.2);
}

/* Main content styles */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 30px;
    max-width: 1440px;
    margin: 0 auto;
}

/* 添加右侧内容区域的布局 */
.main-right-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto auto;
    gap: 30px;
}

/* Sidebar styles */
.left-sidebar, .right-sidebar {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.enterprise-certifications,
.institution-certifications,
.awards {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.enterprise-certifications h3,
.institution-certifications h3,
.awards h3 {
    color: rgb(0,91,170);
    font-size: 1em;
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: 2px solid #e6e6e6;
    margin: 0;
}

.certification-content {
    padding: 20px;
}

/* Certification list styles */
.certification-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 10px;
}

.certification-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 32%; /* 一行三个，考虑间距 */
    margin-bottom: 12px;
}

.certification-list li:hover {
    background-color: #f5f5f5;
}

.certification-list img {
    max-width: 100%;
    max-height: 60px; /* 增加图片高度 */
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.certification-list a {
    display: block;
    text-decoration: none;
    color: inherit;
    text-align: center;
    width: 100%;
}

/* 获奖区域的更多链接样式 */
.certification-list li.more-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.certification-list li.more-link a {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgb(0,91,170);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.certification-list li.more-link a:hover {
    background-color: rgb(0,71,150);
    transform: translateY(-2px);
}

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 500px;
}

.fair-section {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.fair-section h3 {
    color: rgb(0,91,170);
    font-size: 1.2em;
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: 2px solid #e6e6e6;
    margin: 0;
}

.fair-content {
    padding: 20px;
    position: relative;
    height: 180px;
}

.fair-item {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fair-item.active {
    opacity: 1;
    transform: translateY(0);
}

.fair-item h4 {
    color: rgb(0,91,170);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
}

.fair-details {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
}

.fair-details p {
    margin-bottom: 6px;
}

.fair-details p:last-child {
    margin-bottom: 0;
}

.fair-date {
    font-weight: 500;
}

.fair-booth {
    color: rgb(0,91,170);
    font-weight: 500;
}

.quick-links {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 0;
    margin-top: auto;
}

.quick-links-content {
    padding: 15px;
}

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

.quick-links li {
    margin-bottom: 8px;
}

.quick-links li:last-child {
    margin-bottom: 0;
}

.quick-links a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 10px 0;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

.quick-links a:hover {
    color: rgb(0,91,170);
    border-bottom-color: rgb(0,91,170);
    padding-left: 5px;
}

.quick-links a:hover {
    color: rgb(0,71,150);
}

/* Content area styles */
.content-area {
    background-color: #fff;
    grid-column: 1;
    grid-row: 1;
}

.slider {
    height: 100%;
    min-height: 500px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 右侧边栏样式 */
.right-sidebar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 底部表格区域样式 */
.product-categories-table {
    grid-column: 1 / span 2;
    grid-row: 2;
    width: 100%;
    position: relative;
    margin-top: 0;
}

.product-categories-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    table-layout: fixed;
}

.product-categories-table th {
    background-color: rgb(0,91,170);
    color: white;
    padding: 15px 15px;
    text-align: left;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid rgb(0,71,150);
}

.product-categories-table td {
    padding: 15px;
    vertical-align: top;
    border: 1px solid #d1d1d1;
    background-color: #fff;
    transition: background-color 0.3s;
}

.product-categories-table td:hover {
    background-color: #f8f9fa;
}

.product-categories-table ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-categories-table ul li {
    margin-bottom: 10px;
}

.product-categories-table ul li:last-child {
    margin-bottom: 0;
}

.product-categories-table ul li a {
    color: rgb(0,91,170);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
    padding: 2px 0;
}

.product-categories-table ul li a:hover {
    color: rgb(0,71,150);
}

.category-button {
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.category-column .view-catalog:hover {
    background-color: rgb(0,71,150);
    transform: translateY(-2px);
}

/* Footer styles */
footer {
    background-color: #f8f9fa;
    padding: 30px;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid #e6e6e6;
}

/* 移动端适配 - 首页 */
@media screen and (max-width: 768px) {
    /* 首页布局调整 */
    .main-content {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }
    
    .main-right-content {
        grid-template-columns: 1fr;
    }
    
    .left-sidebar, .right-sidebar {
        grid-column: 1;
    }
    
    .content-area {
        grid-column: 1;
        grid-row: 1;
    }
    
    .right-sidebar {
        grid-column: 1;
        grid-row: 3;
    }
    
    /* 认证列表调整 */
    .certification-list li {
        width: 48%;
    }
    
    /* 产品分类表格调整 */
    .product-categories-table {
        overflow-x: auto;
    }
    
    .product-categories-table table {
        min-width: 600px;
    }
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    max-width: 1440px;
    margin: 0 auto;
}

.footer-links a {
    color: rgb(0,91,170);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: rgb(0,71,150);
}

.copyright {
    color: #666;
    margin-left: 30px;
}

/* 导航栏下拉菜单样式 */
.main-nav ul li.has-dropdown {
    position: relative;
}

/* 响应式导航栏 */
@media screen and (max-width: 992px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .main-nav ul li {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 10px 0;
    }
    
    .main-nav .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: rgba(0, 71, 140, 0.85);
        padding-left: 15px;
        margin-top: 5px;
        transform: none;
    }
    
    .main-nav .dropdown-menu li a {
        color: #ffffff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        padding: 10px 15px;
        font-weight: 500;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    }
    
    .main-nav .dropdown-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .main-nav li.has-dropdown:hover .dropdown-menu {
        transform: none;
    }
    
    .social-icons {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 超小屏幕设备的媒体查询 */
@media screen and (max-width: 576px) {
    .top-bar {
        padding: 8px 10px;
    }
    
    .logo {
        width: 80%;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo-tagline {
        font-size: 12px;
        line-height: 1.2;
    }
    
    .logo-text {
        font-size: 10px;
    }
    
    .header-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box, .language-select {
        width: 100%;
    }
    
    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .social-icons a {
        margin: 5px;
    }
}

/* ========== 新的移动端导航样式 ========== */

/* 移动端导航按钮 */
.mobile-nav-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.mobile-nav-btn:hover {
    background-color: rgba(0, 91, 170, 0.1);
}

.mobile-nav-btn.active {
    background-color: rgba(0, 91, 170, 0.15);
}

/* 汉堡菜单线条 */
.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: rgb(0, 91, 170);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* 激活状态的汉堡菜单动画 */
.mobile-nav-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-nav-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端导航遮罩层 */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 移动端侧边栏 */
.mobile-nav-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 1999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-nav-sidebar.active {
    right: 0;
}

/* 移动端导航头部 */
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgb(0, 91, 170), rgb(0, 71, 150));
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-logo img {
    height: 28px;
    filter: brightness(0) invert(1);
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* 移动端导航内容 */
.mobile-nav-content {
    padding: 0;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #e9ecef;
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link:hover {
    background-color: #f8f9fa;
    color: rgb(0, 91, 170);
    padding-left: 25px;
}

.mobile-nav-link:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, rgb(0, 91, 170), rgb(0, 71, 150));
}

/* 子菜单箭头 */
.submenu-arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.3s ease;
}

.mobile-nav-item.expanded .submenu-arrow {
    transform: rotate(90deg);
    color: rgb(0, 91, 170);
}

/* 移动端子菜单 */
.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav-item.expanded .mobile-submenu {
    max-height: 300px;
}

.mobile-submenu-item {
    border-bottom: 1px solid #e9ecef;
}

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

.mobile-submenu-link {
    display: block;
    padding: 15px 20px 15px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-submenu-link:hover {
    background-color: #ffffff;
    color: rgb(0, 91, 170);
    padding-left: 45px;
}

.mobile-submenu-link:hover::before {
    content: '→';
    position: absolute;
    left: 25px;
    color: rgb(0, 91, 170);
    font-weight: bold;
}

/* 移动端社交媒体图标 */
.mobile-social-icons {
    padding: 30px 20px 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

.mobile-social-icons a {
    display: inline-block;
    width: 44px;
    height: 44px;
    margin: 0 8px 10px;
    background: linear-gradient(135deg, rgb(0, 91, 170), rgb(0, 71, 150));
    color: white;
    text-decoration: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 91, 170, 0.3);
}

.mobile-social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 91, 170, 0.4);
}

/* 响应式显示控制 */
@media screen and (max-width: 992px) {
    .mobile-nav-btn {
        display: flex;
    }
    
    .main-nav {
        display: none;
    }
    
    /* 头部布局调整 */
    .top-bar {
        position: relative;
    }
    
    .mobile-nav-btn {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* 小屏幕设备适配 */
@media screen and (max-width: 768px) {
    .mobile-nav-sidebar {
        width: 280px;
        right: -280px;
    }
    
    .top-bar {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    
    .logo {
        flex-direction: column;
        align-items: flex-start;
        width: calc(100% - 60px);
    }
    
    .logo img {
        height: 50px;
        margin-bottom: 5px;
    }
    
    .header-right {
        width: 100%;
        margin-top: 15px;
        justify-content: space-between;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .mobile-nav-btn {
        right: 15px;
    }
}

/* 超小屏幕设备适配 */
@media screen and (max-width: 576px) {
    .mobile-nav-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .mobile-nav-header {
        padding: 15px;
    }
    
    .mobile-nav-logo img {
        height: 28px;
    }
    
    .mobile-nav-link {
        padding: 16px 15px;
    }
    
    .mobile-submenu-link {
        padding: 12px 15px 12px 30px;
    }
    
    .mobile-social-icons {
        padding: 20px 15px 15px;
    }
    
    .mobile-social-icons a {
        width: 40px;
        height: 40px;
        margin: 0 6px 8px;
        font-size: 16px;
    }
}