/* CSS Variables for Premium Medical Aesthetic */
:root {
    --primary-color: #0d47a1; /* Trustworthy Navy Blue */
    --primary-light: #5472d3;
    --primary-dark: #002171;
    --accent-color: #d32f2f; /* Alert/Accent Red */
    --bg-color: #f8f9fa; /* Clean light gray */
    --text-color: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}
a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:visited { color: var(--primary-color); }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--border-radius); }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
input, textarea { background-color: var(--white); color: var(--text-color); }

/* Buttons */
.button, button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.button:hover, button:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    text-decoration: none;
}

/* Header & Nav */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.site-branding {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-dark);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.site-branding:hover { text-decoration: none; opacity: 0.9; }

.main-nav { 
    display: flex; 
    align-items: center; 
    gap: 30px; 
}
.main-nav ul { 
    list-style: none; 
    display: flex; 
    gap: 25px; 
    margin: 0;
    padding: 0;
}
.main-nav a { 
    color: var(--text-color); 
    font-weight: 600; 
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.main-nav a:hover { 
    color: var(--primary-color); 
    text-decoration: none; 
}
.main-nav a:hover::after {
    width: 100%;
}
.nav-search-icon { 
    display: flex; 
    align-items: center; 
    color: var(--text-color);
    padding: 8px;
    background: #f0f2f5;
    border-radius: 50%;
    transition: var(--transition);
}
.nav-search-icon:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Main Layout */
.site-main { flex: 1; padding: 40px 0; }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.hero-section h1 { color: var(--white); font-size: 2.5rem; margin-bottom: 20px; }
.hero-section p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; opacity: 0.9; }
.hero-section .button { background: #ffca28; color: var(--primary-dark); font-weight: 700; box-shadow: 0 4px 15px rgba(0,0,0,0.2); border: 2px solid #ffca28; }
.hero-section .button:hover { background: #ffd54f; color: var(--primary-dark); transform: translateY(-2px); border-color: #ffd54f; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

/* Article Grids */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.card { background: var(--white); padding: 20px; border-radius: var(--border-radius); box-shadow: var(--shadow); transition: var(--transition); }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }

/* Single Article Layout */
.article-container { display: flex; gap: 40px; }
.article-content { flex: 1; min-width: 0; background: var(--white); padding: 40px; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.article-sidebar { width: 300px; flex-shrink: 0; }

/* Article Elements */
.breadcrumbs { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--text-muted); }
.article-title { font-size: 2.5rem; margin-bottom: 20px; }
.article-meta { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 30px; }
.author-info { display: flex; align-items: center; gap: 15px; }
.author-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.author-name { display: block; font-weight: 700; color: var(--primary-dark); }
.publish-date { display: block; font-size: 0.9rem; color: var(--text-muted); }
.social-share { display: flex; gap: 10px; }
.share-btn { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: bold; font-size: 14px; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #4267B2; }
.share-btn.linkedin { background: #0077B5; }
.share-btn:hover { color: var(--white); opacity: 0.9; text-decoration: none; }

/* Article Typography */
.article-body p { margin-bottom: 20px; font-size: 1.1rem; }
.article-body h2 { font-size: 1.8rem; margin: 40px 0 20px; border-bottom: 2px solid var(--primary-light); padding-bottom: 10px; }
.article-body h3 { font-size: 1.4rem; margin: 30px 0 15px; }
.article-body ul, .article-body ol { margin-bottom: 20px; padding-left: 20px; font-size: 1.1rem; }
.article-body li { margin-bottom: 10px; }

/* Key Takeaways */
.key-takeaways { background: #e3f2fd; border-left: 4px solid var(--primary-color); padding: 20px; margin: 30px 0; border-radius: 0 var(--border-radius) var(--border-radius) 0; }
.key-takeaways h3 { margin-top: 0; color: var(--primary-dark); }

/* Tables */
.table-responsive { overflow-x: auto; margin-bottom: 30px; }
.comparison-table { width: 100%; border-collapse: collapse; background: var(--white); }
.comparison-table th, .comparison-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-color); }
.comparison-table th { background: var(--primary-color); color: var(--white); font-weight: 600; }
.comparison-table tbody tr:nth-of-type(even) { background-color: #f9f9f9; }

/* FAQ Section */
.faq-section { margin-top: 30px; }
.faq-item { margin-bottom: 20px; padding: 20px; background: var(--bg-color); border-radius: var(--border-radius); border-left: 4px solid var(--primary-light); }
.faq-item h4 { margin-top: 0; margin-bottom: 10px; }

/* Inline Newsletter */
.newsletter-inline { background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%); padding: 30px; border-radius: var(--border-radius); text-align: center; margin: 40px 0; border: 1px solid var(--border-color); }
.newsletter-inline form { display: flex; gap: 10px; max-width: 400px; margin: 20px auto 0; }
.newsletter-inline input { flex: 1; padding: 10px 15px; border: 1px solid var(--border-color); border-radius: var(--border-radius); }

/* Author Box */
.author-box { display: flex; gap: 20px; background: var(--white); padding: 30px; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-top: 40px; border-top: 4px solid var(--primary-color); }
.author-avatar-large { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.author-box h4 { margin: 0 0 10px 0; }
.author-box p { font-size: 0.95rem; margin: 0; color: var(--text-muted); }

/* Sidebar */
.sidebar-widget { background: var(--white); padding: 25px; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-bottom: 30px; }
.sidebar-widget h3 { font-size: 1.2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { margin-bottom: 10px; border-bottom: 1px dashed var(--border-color); padding-bottom: 10px; }
.related-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sticky-ad { position: sticky; top: 90px; }

/* Adsense Placeholders */
.ad-container { text-align: center; margin: 20px auto; padding: 0 20px; max-width: 1100px; }
.ad-placeholder-box { background: #e0e0e0; color: #757575; border: 1px dashed #bdbdbd; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; min-height: 90px; width: 100%; }
.ad-placeholder-box.tall { min-height: 600px; }

/* Standard Page & Search */
.standard-page { background: var(--white); padding: 40px; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.search-container { margin-bottom: 30px; }
.search-container input { width: 100%; padding: 15px; font-size: 1.1rem; border: 2px solid var(--border-color); border-radius: var(--border-radius); transition: var(--transition); }
.search-container input:focus { outline: none; border-color: var(--primary-color); }
.search-result-item { padding: 20px; border-bottom: 1px solid var(--border-color); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item h3 { margin-top: 0; margin-bottom: 10px; }

/* Footer */
.site-footer { background: var(--primary-dark); color: var(--white); padding: 60px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-about h4, .footer-links h4, .footer-newsletter h4 { color: var(--white); margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a, .footer-links a:visited { color: #bbdefb; }
.footer-links a:hover { color: var(--white); }
.footer-newsletter form { display: flex; flex-direction: column; gap: 10px; }
.footer-newsletter input { padding: 10px; border: none; border-radius: var(--border-radius); }
.footer-newsletter button { background: var(--accent-color); color: var(--white); }
.footer-newsletter button:hover { background: #b71c1c; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: #bbdefb; }

/* Cookie Banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.9); color: white; z-index: 1000; display: none; }
.cookie-inner { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; gap: 20px; }
.cookie-inner p { margin: 0; font-size: 0.9rem; }
.cookie-inner a { color: #bbdefb; text-decoration: underline; }

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .header-inner { flex-direction: column; height: auto; padding: 20px 0; gap: 20px; }
    .main-nav { flex-direction: column; width: 100%; gap: 15px; }
    .main-nav ul { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 15px; 
        width: 100%;
    }
    .main-nav a {
        padding: 5px 10px;
        background: #f8f9fa;
        border-radius: 20px;
        border: 1px solid #eaeaea;
    }
    .main-nav a::after { display: none; }
    .main-nav a:hover { background: #e9ecef; }
    .article-container { flex-direction: column; }
    .article-sidebar { width: 100%; }
    .article-meta { flex-direction: column; align-items: flex-start; gap: 15px; }
    .article-content { padding: 20px; }
    .hero-section h1 { font-size: 2rem; }
    .newsletter-inline form { flex-direction: column; }
}
