* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 2rem;
    font-weight: 700;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    width: 300px;
    outline: none;
}

.search-box button {
    padding: 12px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #e55a2b;
}

/* Categories */
.categories {
    background: white;
    border-bottom: 1px solid #e0e6ed;
    padding: 15px 0;
}

.category-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.category-item {
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s;
    color: #666;
    font-weight: 500;
}

.category-item:hover,
.category-item.active {
    background: #1e3c72;
    color: white;
}

/* Main Content */
.main {
    padding: 30px 0;
    min-height: 600px;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.company-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    border: 1px solid #f0f0f0;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.company-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #e0e6ed;
}

.company-card:active {
    transform: translateY(-2px);
}

.company-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-right: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.company-title {
    flex: 1;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1e3c72;
}

.company-english {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.company-description {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.5;
}

.company-details {
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.detail-label {
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    color: #374151;
    font-weight: 600;
}

.company-products {
    margin-bottom: 16px;
}

.products-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 8px;
}

.products-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-tag {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

.product-more {
    background: #1e3c72;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.company-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.company-tag {
    background: #e8f2ff;
    color: #1e3c72;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Hover Box */
.hover-box {
    position: absolute;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 20px;
    width: auto;
    min-width: 300px;
    max-width: 400px;
    z-index: 1000;
    display: none;
    border: 1px solid #e0e6ed;
}

.hover-box .company-name {
    margin-bottom: 15px;
    font-size: 16px;
    color: #1e3c72;
    border-bottom: 1px solid #e0e6ed;
    padding-bottom: 10px;
}

.quick-links {
    /* 默认为块级显示，适合二级菜单 */
}

.quick-links.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.3s;
}

.quick-link:hover {
    background: #1e3c72;
    color: white;
}

.quick-link::before {
    content: '→';
    margin-right: 8px;
    font-weight: bold;
}

/* Sub Menu Styles */
.sub-menu-section {
    margin-bottom: 20px;
}

.sub-menu-section:last-child {
    margin-bottom: 0;
}

.sub-menu-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e6ed;
}

.sub-menu-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sub-menu-link {
    display: block;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sub-menu-link:hover {
    background: #1e3c72;
    color: white;
    border-left-color: #ff6b35;
    transform: translateX(3px);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

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

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box input {
        width: 250px;
    }
    
    .category-list {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .hover-box {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .search-box {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
}