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

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

/* Header Navigation */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    font-size: 1rem;
}

nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Main Content Container */
main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Article Styles */
article {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    font-weight: 700;
}

h2 {
    font-size: 1.875rem;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #34495e;
    font-weight: 600;
}

/* Published info */
article p:first-of-type {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #444;
}

/* Lists */
ul, ol {
    margin-bottom: 1.5rem;
    margin-left: 2rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

ul li {
    list-style-type: disc;
}

li strong {
    color: #2c3e50;
}

/* Links */
a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

a:hover {
    border-bottom-color: #667eea;
}

article a {
    font-weight: 500;
}

/* Call to Action Section */
article > p:has(> a[href*="calculator"]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
    font-size: 1.1rem;
}

article > p:has(> a[href*="calculator"]) a {
    color: white;
    font-weight: 600;
    border-bottom: 2px solid white;
}

article > p:has(> a[href*="calculator"]) a:hover {
    opacity: 0.9;
}

/* Related Articles */
article > h4:last-of-type {
    margin-top: 3rem;
    font-size: 1.3rem;
    color: #2c3e50;
}

article > ul:last-of-type {
    background: #f8f9fa;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

article > ul:last-of-type li {
    list-style: none;
    margin-bottom: 0.5rem;
}

article > ul:last-of-type a {
    font-size: 1.05rem;
    color: #667eea;
    font-weight: 500;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem;
    margin-top: 4rem;
}

footer nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

footer a {
    color: white;
    opacity: 0.8;
}

footer a:hover {
    opacity: 1;
    border-bottom-color: white;
}

footer p {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    header {
        padding: 1rem;
    }
    
    nav {
        gap: 1rem;
    }
    
    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    article {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.35rem;
    }
    
    article {
        padding: 1.25rem;
    }
}
