/* Blog styles for My Paycheck Calculator */

/* Override scroll snapping from main styles.css */
html {
    scroll-snap-type: none !important;
    scroll-behavior: smooth;
}

.section {
    scroll-snap-align: none !important;
    min-height: auto !important;
}

/* Blog-specific vars (match main site) */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --bg: #0a0a0b;
    --bg-card: #18181b;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: #27272a;
}

/* Base */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 1.05rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation — use main site navbar class */
.nav {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.nav-logo, .footer-logo {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon-img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    margin-left: 1.25rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Hero / Header */
.hero {
    padding: 4rem 0 2rem;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

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

/* Typography */
h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin: 0.5rem 0 1.25rem;
    font-weight: 800;
}

h2 {
    font-size: 1.7rem;
    line-height: 1.3;
    margin: 3rem 0 1rem;
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.85;
}

li {
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 0.5rem;
}

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

strong {
    color: var(--text);
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    padding: 3rem 0;
}

.article {
    min-width: 0;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

/* Tables */
.table-wrap {
    overflow: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--text);
    background: #141417;
    font-weight: 600;
}

td {
    color: var(--text-secondary);
}

/* Example boxes */
.example {
    background: #10231c;
    border: 1px solid #1c4b3e;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.example-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px dashed #2d5b4e;
}

.example-row:last-child {
    border-bottom: none;
}

/* CTA Box */
.cta-box {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f2f25, #111113);
    border: 1px solid #1c4b3e;
    text-align: center;
}

.cta-box h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.cta-box p {
    margin-bottom: 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Sidebar */
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.sidebar-card ul {
    padding-left: 1.25rem;
    margin: 0;
}

.sidebar-card li {
    margin: 0.625rem 0;
}

.sidebar-card a {
    color: var(--primary);
    text-decoration: none;
}

.sidebar-card a:hover {
    text-decoration: underline;
}

/* FAQ */
.faq details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.faq summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
}

.faq details p {
    margin-top: 1rem;
}

/* Sources */
.sources a {
    color: var(--primary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-legal a {
    color: var(--text-secondary);
    margin-left: 1rem;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Blog Grid (index page) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.blog-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.blog-card h3 {
    margin: 0.5rem 0 0.75rem;
    font-size: 1.15rem;
}

.blog-card p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.blog-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
