/* 1000megabytes Blog Static CSS */
/* Optimized for performance and maintainability */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: #007acc;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: #005a9e;
    text-decoration: underline;
}

/* Header Navigation */
.header {
    background: #1a2e4a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
    text-decoration: none;
}

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

.nav-links a {
    color: white;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #007acc;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Main Container Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

/* Article Content */
.article-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.article-title {
    color: #1a2e4a;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-size: 2.5rem;
    font-weight: 700;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.category-badge {
    background: #007acc;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.publication-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Article Body Content */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-body h2 {
    color: #1a2e4a;
    margin: 2.5rem 0 1rem 0;
    font-size: 1.8rem;
    border-bottom: 2px solid #007acc;
    padding-bottom: 0.5rem;
}

.article-body h3 {
    color: #1a2e4a;
    margin: 2rem 0 1rem 0;
    font-size: 1.4rem;
}

.article-body h4 {
    color: #1a2e4a;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

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

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 4px solid #007acc;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-body code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-body pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #e9ecef;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.article-body th,
.article-body td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.article-body th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1a2e4a;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1a2e4a 0%, #007acc 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 12px;
    margin-top: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.cta-section:hover::before {
    transform: translateX(0);
}

.cta-section h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #1a2e4a;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #1a2e4a;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.sidebar-title {
    color: #1a2e4a;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #007acc;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

/* Related Posts */
.related-posts {
    list-style: none;
}

.related-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.related-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-posts a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
    display: block;
    line-height: 1.4;
}

.related-posts a:hover {
    text-decoration: underline;
}

.related-post-date {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Categories */
.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list a {
    color: #007acc;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.categories-list a:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.category-count {
    background: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Contact CTA */
.contact-cta {
    text-align: center;
}

.contact-cta p {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.contact-button {
    display: inline-block;
    background: #25d366;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* Footer */
.footer {
    background: #1a2e4a;
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #007acc;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr 300px;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .sidebar-section {
        padding: 1rem;
    }
    
    .cta-section {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .breadcrumb {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .cta-section {
        padding: 1.5rem 1rem;
    }
    
    .footer {
        padding: 2rem 1rem 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .breadcrumb,
    .sidebar,
    .cta-section,
    .footer {
        display: none;
    }
    
    .container {
        grid-template-columns: 1fr;
        max-width: none;
        padding: 0;
    }
    
    .article-content {
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    .article-body a {
        color: inherit;
        text-decoration: underline;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .article-content,
    .sidebar-section {
        border: 2px solid #000;
    }
    
    .cta-section {
        border: 2px solid #fff;
    }
}
