/* Custom CSS for 领客出海博客 */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Blog specific styles */
.blog-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.featured-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.tag-cloud .tag {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.tag-cloud .tag:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.filter-tab {
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.filter-tab.active {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.filter-tab:hover:not(.active) {
    color: #3b82f6;
    border-color: #93c5fd;
}

/* Search input animations */
#searchInput {
    transition: all 0.3s ease;
}

#searchInput:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Article content styles */
.article-content {
    line-height: 1.7;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.article-content h1 {
    font-size: 2.5rem;
    color: #1f2937;
}

.article-content h2 {
    font-size: 2rem;
    color: #374151;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #4b5563;
}

.article-content h4 {
    font-size: 1.25rem;
    color: #6b7280;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #4b5563;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.article-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #3b82f6;
    font-family: 'Monaco', 'Consolas', monospace;
}

.article-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-content strong {
    font-weight: 700;
    color: #1f2937;
}

.article-content a {
    color: #3b82f6;
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.article-content a:hover {
    text-decoration-color: #3b82f6;
    color: #1d4ed8;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Sidebar sticky positioning */
.sidebar-sticky {
    position: sticky;
    top: 2rem;
}

/* Article meta styles */
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

/* Newsletter form styles */
.newsletter-form {
    position: relative;
}

.newsletter-form .success-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .article-content h1 {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .filter-tab {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .tag-cloud .tag {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .filter-tabs,
    .newsletter-signup,
    footer {
        display: none;
    }
    
    .article-content {
        max-width: none;
    }
    
    .blog-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Focus styles for accessibility */
.filter-tab:focus,
.tag:focus,
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .blog-card {
        border-width: 2px;
    }
    
    .category-badge {
        border: 2px solid currentColor;
    }
} 