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

:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #333;
    --text-color-light: #666;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --content-width: 60%;
    --side-width: 20%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.language-switcher button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.language-switcher button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Main content - centered 60% layout */
main {
    flex: 1;
    width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7ff 0%, #e3e9ff 100%);
    border-radius: 16px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-color-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.cta-button:hover {
    background-color: #3a5ce5;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 108, 247, 0.2);
}

/* Features / Tool Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card, .tool-card, .blog-card {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover, .tool-card:hover, .blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-card h2, .tool-card h2, .blog-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.feature-card p, .tool-card p, .blog-card p {
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tools-section, .blog-section {
    margin: 3rem 0;
}

.section-subtitle {
    color: var(--text-color-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Tool grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
}

.tool-card .tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tool-card .tool-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.tool-card .tool-actions a {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background-color: #f1f5ff;
    color: var(--primary-color);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.tool-card .tool-actions a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Blog section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-card .blog-card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.blog-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.15rem;
}

.blog-card .blog-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
}

.blog-card .blog-excerpt {
    margin-bottom: 1rem;
    flex: 1;
}

.blog-card .read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
}

.blog-card .read-more:hover {
    text-decoration: underline;
}

/* Blog post and Legal page */
.blog-post, .legal-page {
    max-width: 100%;
}

.blog-post article, .legal-page article {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.blog-post .blog-header, .legal-page .page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    position: relative;
}

.blog-post .blog-header h1, .legal-page .page-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.blog-post .blog-content, .legal-page .legal-content {
    line-height: 1.8;
}

.blog-post .blog-content h2, .legal-page .legal-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.blog-post .blog-content p, .legal-page .legal-content p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.blog-post .blog-content ul,
.blog-post .blog-content ol,
.legal-page .legal-content ul,
.legal-page .legal-content ol {
    margin: 1rem 0 1rem 2rem;
    color: var(--text-color);
}

.blog-post .blog-content li, .legal-page .legal-content li {
    margin-bottom: 0.5rem;
}

.blog-post .blog-content pre, .legal-page .legal-content pre {
    background: #f5f7ff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.blog-post .blog-content code, .legal-page .legal-content code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.9rem;
}

.blog-post .blog-footer, .legal-page .legal-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Footer */
footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-color-light);
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
    main {
        width: 80%;
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    main {
        width: 95%;
        padding: 1rem 0.5rem;
    }
    
    .features, .tools-grid, .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-post article, .legal-page article {
        padding: 1.5rem;
    }
}

/* Language-specific */
[lang="zh"] .hero h1,
[lang="zh"] .hero p,
[lang="zh"] .feature-card h2,
[lang="zh"] .feature-card p {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* Utility */
.hidden {
    display: none;
}
