/* =============================================
   Shanghai Shiyin Medical Website Styles
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

/* Mobile Menu */
#mobileMenu {
    display: none;
}

#mobileMenu.active {
    display: block;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    min-height: 500px;
}

/* Cards */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Product Cards */
.product-card {
    overflow: hidden;
}

.product-card img {
    transition: transform 0.3s ease;
}

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

/* News Cards */
.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Solution Cards */
.solution-card {
    transition: all 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-4px);
}

/* Buttons */
.btn-primary {
    background-color: #1e3a5f;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2d5a87;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #22c55e;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #16a34a;
    transform: translateY(-2px);
}

/* Category Tags */
.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Statistics */
.stat-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

/* Section Spacing */
.section-padding {
    padding: 4rem 0;
}

/* Image Placeholder */
.image-placeholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prose Styles (for article content) */
.prose h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.prose h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #374151;
}

.prose p {
    margin-bottom: 1rem;
    color: #4b5563;
}

.prose ul, .prose ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

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

/* Share Buttons */
.share-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
}

/* Q&A Section */
.qa-item {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Related Articles */
.related-article {
    transition: all 0.3s ease;
}

.related-article:hover {
    transform: translateY(-2px);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

/* Footer */
footer {
    background-color: #1f2937;
    color: white;
}

footer a:hover {
    color: #22c55e;
}

/* Pagination */
.pagination-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #f3f4f6;
}

.pagination-btn.active {
    background-color: #1e3a5f;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }

    .section-padding {
        padding: 2rem 0;
    }
}

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

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

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #1e3a5f;
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: #2d5a87;
    transform: translateY(-4px);
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3a5f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SEO Meta */
.meta-description {
    max-width: 160 characters;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Print Styles */
@media print {
    header, footer, .share-buttons, .related-articles {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
:focus {
    outline: 2px solid #1e3a5f;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1e3a5f;
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}
