/* Healthcare Blog - Clean Medical Aesthetic */
/* Color Palette: White, Blues, Greens for trustworthiness */

:root {
    --white: #ffffff;
    --off-white: #f8fafb;
    --light-gray: #e8eef1;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-900: #1e3a5f;
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --text-primary: #1e3a5f;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(30, 58, 95, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--blue-900);
    margin-bottom: 1rem;
}

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

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

a {
    color: var(--blue-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--blue-700);
    text-decoration: underline;
}

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

header {
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--teal-600) 100%);
    color: var(--white);
    padding: 3rem 0;
    box-shadow: 0 4px 20px var(--shadow);
}

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

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
}

.logo span {
    color: var(--green-400, #4ade80);
}

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

nav a {
    color: var(--white);
    opacity: 0.9;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 1;
    text-decoration: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--blue-900), var(--teal-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content */
main {
    padding: 4rem 0;
    min-height: 60vh;
}

/* Post Cards Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
    border-color: var(--blue-200);
}

.post-card-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-card-category {
    background: var(--green-100);
    color: var(--green-700);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.post-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.post-card h2 a {
    color: var(--blue-900);
}

.post-card h2 a:hover {
    color: var(--blue-600);
}

.post-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blue-600);
    font-weight: 600;
    font-size: 0.95rem;
}

.read-more:hover {
    gap: 0.75rem;
}

/* Single Post */
.post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light-gray);
}

.post-header h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.post-content {
    font-size: 1.1rem;
}

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.post-content ul, .post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.post-content blockquote {
    border-left: 4px solid var(--blue-500);
    padding: 1.5rem;
    margin: 2rem 0;
    background: var(--blue-50);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-primary);
}

.post-content blockquote p {
    margin: 0;
    color: var(--text-primary);
}

.post-content code {
    background: var(--off-white);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--blue-700);
}

.post-content pre {
    background: var(--blue-900);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

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

.post-content .highlight-box {
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.post-content .highlight-box h4 {
    color: var(--green-700);
    margin-bottom: 0.75rem;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.post-content th, .post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--blue-50);
    font-weight: 700;
    color: var(--blue-900);
}

.post-content tr:nth-child(even) {
    background: var(--off-white);
}

/* Sidebar */
.sidebar {
    background: var(--off-white);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

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

/* Archive Page */
.archive-list {
    max-width: 900px;
    margin: 0 auto;
}

.archive-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.archive-date {
    min-width: 120px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.archive-content h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.archive-content p {
    margin: 0;
}

/* Footer */
footer {
    background: var(--blue-900);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 4rem;
}

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

footer p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

footer a {
    color: var(--white);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

/* Disclosure Box */
.disclosure-box {
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Affiliate Table */
.affiliate-table {
    margin: 2rem 0;
}

.affiliate-row {
    display: grid;
    grid-template-columns: 1fr 1fr 150px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.affiliate-row.header {
    font-weight: 700;
    background: var(--blue-50);
    border-radius: 8px 8px 0 0;
}

.affiliate-name {
    font-weight: 600;
    color: var(--blue-900);
}

.affiliate-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.affiliate-link {
    display: inline-block;
    background: var(--green-600);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.affiliate-link:hover {
    background: var(--green-700);
    color: var(--white);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero h1 { font-size: 2.25rem; }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .affiliate-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .affiliate-row.header {
        display: none;
    }
    
    nav ul {
        gap: 1rem;
    }
}

/* Print Styles */
@media print {
    header, footer, .sidebar { display: none; }
    .post { max-width: 100%; }
}
