/*
Theme Name: HealthCore US
Author: Gemini Senior Dev
Description: High-performance theme focused on Medical SEO, SGE, and User Experience for the US Market.
Version: 2.0
Text Domain: healthcore-us
*/

:root {
    --primary: #003366;    /* Navy Blue - Trust & Authority */
    --secondary: #005f87;  /* Lighter Blue - Information */
    --accent: #2e8b57;     /* Sea Green - Healing/Nature */
    --alert: #e53e3e;      /* Red - For medical warnings if needed */
    --text-main: #1a202c;  /* Dark Gray - Readability */
    --text-light: #718096; /* Light Gray - Meta info */
    --bg-body: #f7fafc;    /* Off-white background */
    --bg-white: #ffffff;
    --max-width: 1200px;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); background: var(--bg-body); color: var(--text-main); line-height: 1.7; font-size: 18px; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: 0.2s ease; }
a:hover { color: var(--secondary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { color: var(--primary); line-height: 1.3; font-weight: 700; }

/* --- LAYOUT UTILS --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.btn { display: inline-block; padding: 10px 20px; background: var(--primary); color: white; border-radius: 5px; font-weight: 600; font-size: 0.9rem; }
.btn:hover { background: var(--secondary); color: white; }

/* --- HEADER --- */
.site-header { background: var(--bg-white); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 999; }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; max-width: var(--max-width); margin: 0 auto; }
.logo { font-size: 1.6rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

/* Search Bar */
.header-search { position: relative; width: 100%; max-width: 300px; }
.header-search input { width: 100%; padding: 8px 15px; border: 1px solid #cbd5e0; border-radius: 20px; font-size: 0.9rem; outline: none; }
.header-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1); }

/* --- NICHE NAV (SCROLLER) --- */
.niche-nav { background: var(--primary); padding: 12px 0; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; box-shadow: inset 0 -2px 5px rgba(0,0,0,0.1); }
.niche-nav::-webkit-scrollbar { height: 4px; }
.niche-nav::-webkit-scrollbar-thumb { background: var(--accent); }
.niche-nav a { color: rgba(255,255,255,0.9); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-right: 20px; display: inline-block; }
.niche-nav a:last-child { margin-right: 0; }
.niche-nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* --- HERO SECTION --- */
.hero { background: linear-gradient(180deg, var(--bg-white) 0%, #e6fffa 100%); padding: 80px 0 60px; text-align: center; border-bottom: 1px solid #e2e8f0; }
.hero h1 { font-size: 2.8rem; margin-bottom: 20px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero p { font-size: 1.2rem; color: var(--text-light); max-width: 600px; margin: 0 auto 30px; }

/* --- GRIDS & CARDS --- */
.main-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin: 50px auto; }
@media(min-width: 900px) { .main-grid { grid-template-columns: 2.5fr 1fr; } } /* 70/30 Split */

.cards-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }

.post-card { background: var(--bg-white); border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); border-color: var(--secondary); }
.card-img-wrap { height: 180px; overflow: hidden; background: #edf2f7; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .card-img-wrap img { transform: scale(1.05); }
.card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-cat { color: var(--accent); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; display: block; }
.card-title { font-size: 1.25rem; margin-bottom: 12px; line-height: 1.4; }
.card-title a:hover { color: var(--secondary); }
.card-excerpt { font-size: 0.95rem; color: var(--text-light); margin-bottom: 20px; flex-grow: 1; }
.card-read-more { font-weight: 600; color: var(--primary); font-size: 0.9rem; margin-top: auto; }

/* --- SINGLE POST --- */
.single-container { max-width: 800px; margin: 40px auto; background: var(--bg-white); padding: 40px; border-radius: 12px; border: 1px solid #e2e8f0; }
@media(max-width: 768px) { .single-container { padding: 20px; margin: 20px auto; } }

.article-header { margin-bottom: 30px; border-bottom: 1px solid #edf2f7; padding-bottom: 20px; }
.article-meta { font-size: 0.9rem; color: var(--text-light); margin-top: 10px; }
.article-content { font-size: 1.15rem; color: #2d3748; }
.article-content h2 { font-size: 1.8rem; margin: 40px 0 20px; color: var(--primary); }
.article-content h3 { font-size: 1.4rem; margin: 30px 0 15px; }
.article-content p { margin-bottom: 24px; }
.article-content ul, .article-content ol { margin-bottom: 24px; padding-left: 20px; }
.article-content li { margin-bottom: 10px; }

/* Cluster Box */
.cluster-box { background: #f0fff4; border: 1px solid #c6f6d5; padding: 25px; border-radius: 8px; margin-top: 50px; }
.cluster-box h4 { color: #22543d; margin-bottom: 15px; }
.cluster-box ul li { border-bottom: 1px solid rgba(0,0,0,0.05); padding: 8px 0; }
.cluster-box ul li:last-child { border-bottom: none; }

/* --- SIDEBAR WIDGETS --- */
.widget { background: var(--bg-white); padding: 25px; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 30px; }
.widget-title { font-size: 1.1rem; border-bottom: 2px solid var(--accent); padding-bottom: 10px; margin-bottom: 20px; color: var(--primary); }
.widget ul li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #edf2f7; }
.widget ul li a { font-weight: 500; font-size: 0.95rem; }

/* --- FOOTER --- */
.site-footer { background: var(--primary); color: white; padding: 60px 0 30px; margin-top: 80px; }
.footer-disclaimer { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 6px; font-size: 0.8rem; color: #a0aec0; margin-bottom: 30px; border: 1px solid rgba(255,255,255,0.1); }
.footer-links { margin-bottom: 20px; }
.footer-links a { color: #e2e8f0; margin: 0 10px; font-size: 0.9rem; }
.footer-links a:hover { color: white; text-decoration: underline; }
.copyright { font-size: 0.85rem; color: #718096; }