/*
 * SleepHealthAssessment.com - Main Stylesheet
 * Version: 1.0
 *
 * SHA-branded stylesheet mirroring TotalCare eHealth structure.
 * Uses sha- namespace prefix throughout.
 *
 * Color Palette:
 * - Deep Blue:    #2C5282  (primary, headings, nav active)
 * - Soft Teal:    #38B2AC  (accents, links, hover)
 * - Success Green:#38A169  (primary CTA)
 * - Alert Orange: #ED8936  (secondary CTA, highlights)
 * - Dark Gray:    #2D3748  (body text)
 * - Warm Gray:    #718096  (supporting text)
 * - Light BG:     #E6FFFA  (section backgrounds)
 * - White:        #FFFFFF
 *
 * Dependencies: None
 * External Services: None
 */

/* ============================================
   1. GLOBAL RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #2D3748;
    line-height: 1.6;
}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */

h1 {
    font-size: 2.5rem;
    color: #2C5282;
    margin-bottom: 1rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    color: #2C5282;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: #2C5282;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    color: #718096;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: #718096;
}

ul,
ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

ul li,
ol li {
    margin-bottom: 0.5rem;
    color: #718096;
}

a {
    color: #38B2AC;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   3. LAYOUT CONTAINERS
   ============================================ */

.sha-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.sha-section {
    padding: 4rem 0;
}

/* ============================================
   4. HEADER & NAVIGATION
   ============================================ */

.sha-site-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sha-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sha-site-logo {
    height: 50px;
    width: auto;
}

.sha-main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.sha-main-nav a {
    color: #2D3748;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid transparent;
}

.sha-main-nav a:hover {
    color: #38B2AC;
    text-decoration: none;
}

.sha-main-nav a.sha-active {
    color: #2D3748;
    border-bottom: 3px solid #2C5282;
}

/* Cross-site nav item -- links to sibling TotalCare site */
.sha-main-nav a.sha-sibling-link {
    color: #38B2AC;
    font-weight: 600;
}

.sha-main-nav a.sha-sibling-link:hover {
    color: #2C5282;
}

.sha-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2D3748;
}

/* ============================================
   5. HERO SECTIONS
   ============================================ */

.sha-hero {
    background: linear-gradient(135deg, #2C5282 0%, #38B2AC 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

.sha-hero-container {
    max-width: 860px;
    margin: 0 auto;
}

.sha-hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.sha-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.92);
}

.sha-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 2.5rem;
}

/* ============================================
   6. BUTTONS & CTAS
   ============================================ */

.sha-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

.sha-button-primary {
    background: #38A169;
    color: white;
}

.sha-button-primary:hover {
    background: #2F855A;
    text-decoration: none;
    color: white;
}

.sha-button-secondary {
    background: #38B2AC;
    color: white;
}

.sha-button-secondary:hover {
    background: #2C7A7B;
    text-decoration: none;
    color: white;
}

.sha-header-cta {
    background: #38B2AC;
    color: white;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease;
}

.sha-header-cta:hover {
    background: #2C7A7B;
    text-decoration: none;
    color: white;
}

.sha-button-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.sha-button-outline:hover {
    background: white;
    color: #2C5282;
    text-decoration: none;
}

/* ============================================
   7. CONTENT COMPONENTS
   ============================================ */

/* Card Layouts */
.sha-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.sha-card {
    background: white;
    border: 2px solid #38B2AC;
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.sha-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(56, 178, 172, 0.2);
}

.sha-card h3 {
    color: #2C5282;
    margin-bottom: 1rem;
}

.sha-card p {
    color: #718096;
    margin-bottom: 1.5rem;
}

.sha-card-link {
    display: inline-block;
    color: #ED8936;
    text-decoration: none;
    font-weight: 600;
}

.sha-card-link:hover {
    text-decoration: underline;
}

/* Feature Boxes */
.sha-feature-box {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid #2C5282;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sha-feature-box h3 {
    color: #2C5282;
}

/* Highlight / Takeaway Box */
.sha-highlight-box {
    background: #2C5282;
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.sha-highlight-box h3 {
    color: white;
    margin-bottom: 0.75rem;
}

.sha-highlight-box p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
}

/* FAQ */
.sha-faq-item {
    background: white;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #38B2AC;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sha-faq-item h3 {
    color: #2C5282;
    margin-bottom: 1rem;
}

.sha-faq-item p {
    color: #718096;
    margin-bottom: 0;
}

/* ============================================
   8. KNOWLEDGE BASE COMPONENTS
   ============================================ */

/* Article listing page */
.sha-kb-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.sha-article-list {
    margin-top: 1rem;
}

.sha-article-item {
    background: white;
    border-left: 4px solid #38B2AC;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.sha-article-item:hover {
    box-shadow: 0 4px 16px rgba(44,82,130,0.12);
}

.sha-article-item h3 {
    font-size: 1.15rem;
    color: #2C5282;
    margin-bottom: 0.4rem;
}

.sha-article-item h3 a {
    color: inherit;
    text-decoration: none;
}

.sha-article-item h3 a:hover {
    color: #38B2AC;
    text-decoration: underline;
}

.sha-article-item p {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.sha-article-meta {
    font-size: 0.85rem;
    color: #A0AEC0;
}

.sha-category-tag {
    display: inline-block;
    background: #E6FFFA;
    color: #2C7A7B;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-right: 0.5rem;
}

/* Individual article page */
.sha-article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.sha-article-body {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sha-article-body h1 {
    font-size: 2rem;
    color: #2C5282;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.sha-article-body h2 {
    font-size: 1.5rem;
    color: #2C5282;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.sha-article-body h3 {
    font-size: 1.2rem;
    color: #2C5282;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.sha-article-body p {
    color: #2D3748;
    line-height: 1.8;
}

.sha-article-body ul,
.sha-article-body ol {
    color: #2D3748;
    margin-bottom: 1.5rem;
}

.sha-article-body li {
    color: #2D3748;
    margin-bottom: 0.5rem;
}

.sha-article-divider {
    border: none;
    border-top: 1px solid #E2E8F0;
    margin: 2rem 0;
}

.sha-article-source {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}

.sha-article-source a {
    color: #38B2AC;
}

.sha-article-authors {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.sha-article-author a {
    color: #2C5282;
    font-weight: 500;
}

/* Takeaway block */
.sha-takeaway {
    background: #E6FFFA;
    border-left: 4px solid #38B2AC;
    padding: 1.25rem 1.5rem;
    border-radius: 0 6px 6px 0;
    margin: 2rem 0;
}

.sha-takeaway p {
    color: #2C5282;
    font-weight: 500;
    margin-bottom: 0;
    font-size: 1rem;
}

/* CTA block (injected by template) */
.sha-cta-block {
    background: linear-gradient(135deg, #2C5282 0%, #38B2AC 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2.5rem;
}

.sha-cta-block h3 {
    color: white;
    margin-bottom: 0.75rem;
}

.sha-cta-block p {
    color: rgba(255,255,255,0.88);
    margin-bottom: 1.25rem;
}

/* Sidebar */
.sha-sidebar {
    position: sticky;
    top: 90px;
}

.sha-sidebar-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.sha-sidebar-card h4 {
    color: #2C5282;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sha-sidebar-category-list {
    list-style: none;
    margin: 0;
}

.sha-sidebar-category-list li {
    margin-bottom: 0.5rem;
}

.sha-sidebar-category-list a {
    color: #718096;
    font-size: 0.95rem;
    text-decoration: none;
}

.sha-sidebar-category-list a:hover {
    color: #38B2AC;
}

.sha-sidebar-search {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #2D3748;
    transition: border-color 0.2s;
}

.sha-sidebar-search:focus {
    outline: none;
    border-color: #38B2AC;
}

.sha-sidebar-cta {
    background: linear-gradient(135deg, #2C5282 0%, #38B2AC 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.sha-sidebar-cta p {
    color: rgba(255,255,255,0.88);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ============================================
   9. CONTENT SECTIONS
   ============================================ */

.sha-content-section {
    background: #f8f9fa;
}

.sha-light-bg {
    background: #E6FFFA;
}

/* ============================================
   10. FOOTER
   ============================================ */

.sha-site-footer {
    background: #2D3748;
    color: white;
    padding: 3rem 2rem 1rem;
}

.sha-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.sha-footer-section h4 {
    color: #38B2AC;
    margin-bottom: 1rem;
}

.sha-footer-section p {
    color: #A0AEC0;
}

.sha-footer-section ul {
    list-style: none;
    margin-left: 0;
}

.sha-footer-section ul li {
    margin-bottom: 0.5rem;
}

.sha-footer-section a {
    color: #A0AEC0;
    text-decoration: none;
}

.sha-footer-section a:hover {
    color: #38B2AC;
}

.sha-footer-cta-button {
    display: inline-block;
    background: #38A169;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: background 0.3s;
}

.sha-footer-cta-button:hover {
    background: #2F855A;
    color: white;
}

.sha-footer-email {
    color: #A0AEC0;
    display: block;
    margin-bottom: 0.5rem;
}

.sha-footer-social {
    margin-top: 1rem;
}

.sha-footer-social a {
    display: inline-block;
    margin-right: 1rem;
    color: #A0AEC0;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.sha-footer-social a:hover {
    color: #38B2AC;
}

.sha-footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4A5568;
    color: #718096;
}

.sha-footer-bottom a {
    color: #718096;
}

/* ============================================
   11. FORMS
   ============================================ */

.sha-form-container {
    background: #f8f9fa;
    padding: 3rem;
    border-radius: 8px;
    max-width: 700px;
    margin: 2rem auto;
}

.sha-form-group {
    margin-bottom: 1.5rem;
}

.sha-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2D3748;
    font-weight: 600;
}

.sha-form-container input[type="text"],
.sha-form-container input[type="email"],
.sha-form-container input[type="tel"],
.sha-form-container select,
.sha-form-container textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #E2E8F0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.sha-form-container input:focus,
.sha-form-container select:focus,
.sha-form-container textarea:focus {
    outline: none;
    border-color: #38B2AC;
}

.sha-form-container textarea {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   12. RESPONSIVE
   ============================================ */

@media (max-width: 768px) {

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .sha-hero {
        padding: 3rem 1.5rem;
    }

    .sha-hero h1 {
        font-size: 1.85rem;
    }

    .sha-main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem 2rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        gap: 1rem;
    }

    .sha-main-nav.active {
        display: flex;
    }

    .sha-mobile-menu-toggle {
        display: block;
    }

    .sha-kb-layout,
    .sha-article-layout {
        grid-template-columns: 1fr;
    }

    .sha-sidebar {
        position: static;
    }

    .sha-card-grid {
        grid-template-columns: 1fr;
    }
}