/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Source Serif Pro', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    color: #1a1a1a;
}

h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-top: 2.5rem;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
}

h4 {
    font-size: 1.2rem;
    color: #2c3e50;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #4a5568;
}

a {
    text-decoration: none;
    color: #3498db;
    transition: color 0.2s;
}

a:hover {
    color: #2980b9;
}

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.nav-logo span {
    color: #3498db;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #4a5568;
    font-weight: 500;
}

.nav-link:hover {
    color: #3498db;
}

.btn-subscribe {
    background-color: #3498db;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.btn-subscribe:hover {
    background-color: #2980b9;
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 3rem 0 2rem;
    background-color: #f8fafc;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #718096;
}

.breadcrumb a:hover {
    color: #3498db;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: #1a202c;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 2rem;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.2rem;
}

.article-date {
    color: #718096;
    font-size: 0.9rem;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-share span {
    color: #718096;
    font-size: 0.9rem;
}

.social-share a {
    color: #4a5568;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-share a:hover {
    background-color: #3498db;
    color: white;
}

.hero-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Main Content */
.main-content {
    padding: 4rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
}

/* Article Content */
.article-content {
    max-width: 800px;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.content-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.section-title {
    color: #2c3e50;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.highlight-box {
    background-color: #f0f9ff;
    border-left: 4px solid #3498db;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1.2rem;
    border-radius: 0 8px 8px 0;
}

.highlight-icon {
    color: #3498db;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.highlight-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.image-with-caption {
    margin: 2rem 0;
}

.image-with-caption img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.caption {
    font-size: 0.9rem;
    color: #718096;
    text-align: center;
    font-style: italic;
    margin-top: 0.5rem;
}

.conclusion {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.conclusion .section-title {
    border-bottom: none;
    color: #1a202c;
}

/* Interaction Section */
.interaction-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.tag-label {
    font-weight: 600;
    color: #4a5568;
}

.tag {
    background-color: #edf2f7;
    color: #4a5568;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.tag:hover {
    background-color: #3498db;
    color: white;
}

.share-footer {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    text-align: center;
}

.share-footer p {
    margin-bottom: 1rem;
    font-weight: 500;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.twitter {
    background-color: #1da1f2;
}

.facebook {
    background-color: #1877f2;
}

.linkedin {
    background-color: #0077b5;
}

.link {
    background-color: #718096;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comments-prompt {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

.comments-prompt h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    margin: 1.5rem 0 1rem;
    resize: vertical;
}

.btn-submit-comment {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
}

.btn-submit-comment:hover {
    background-color: #2980b9;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.widget-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-sidebar-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.2rem;
}

.author-sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-sidebar-info h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.author-sidebar-info p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #718096;
}

.author-link {
    font-weight: 500;
    color: #3498db;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.related-article {
    display: block;
    padding: 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s;
}

.related-article:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.related-article h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.related-article p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #718096;
}

.read-time {
    font-size: 0.8rem;
    color: #3498db;
    font-weight: 500;
}

.newsletter-widget {
    background-color: #f0f9ff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.newsletter-widget p {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    color: #4a5568;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    padding: 0.8rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-subscribe-sidebar {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.btn-subscribe-sidebar:hover {
    background-color: #2980b9;
}

.privacy-note {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 0;
}

/* Footer */
/* Footer - Commented out to prevent conflict with common styles
.footer {
    background-color: #1a202c;
    color: #cbd5e0;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.footer-logo span {
    color: #3498db;
}

.footer-logo p {
    margin-top: 1rem;
    color: #a0aec0;
    max-width: 300px;
}

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

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-column h4 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-column a {
    color: #cbd5e0;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: #3498db;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom p {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.footer-social {
    display: flex;
    gap: 1.2rem;
}

.footer-social a {
    color: #cbd5e0;
    font-size: 1.2rem;
}

.footer-social a:hover {
    color: #3498db;
}
*/

.footer-social a {
    color: #cbd5e0;
    font-size: 1.2rem;
}

.footer-social a:hover {
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        gap: 2.5rem;
    }

    .hero-image {
        order: -1;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-container {
        padding: 0 1.5rem;
    }

    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .highlight-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================= */
/* Dark Mode Overrides for Morning Blog Page */
/* ========================================= */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .navbar {
    background-color: #1a1a2e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-logo a,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .hero-title,
body.dark-mode .section-title,
body.dark-mode .author-name,
body.dark-mode .widget-title,
body.dark-mode .related-article h4,
body.dark-mode .comments-prompt h3 {
    color: #e0e0e0;
}

body.dark-mode p,
body.dark-mode .hero-subtitle,
body.dark-mode .nav-link,
body.dark-mode .breadcrumb,
body.dark-mode .breadcrumb a {
    color: #b0b3b8;
}

body.dark-mode .hero {
    background-color: #16213e;
}

body.dark-mode .hero-meta,
body.dark-mode .intro-text,
body.dark-mode .content-section,
body.dark-mode .sidebar-widget,
body.dark-mode .widget-title {
    border-color: #2d3748;
}

body.dark-mode .social-share a {
    background-color: #2d3748;
    color: #cbd5e0;
}

body.dark-mode .social-share a:hover {
    background-color: #3498db;
    color: white;
}

/* Specific Component Fixes */

/* Myth vs Truth Cards */
body.dark-mode .myth-card {
    background-color: #3e1a1a;
    /* Dark Red background */
    border-color: #c0392b;
}

body.dark-mode .myth-header h4 {
    color: #e74c3c;
}

body.dark-mode .truth-card {
    background-color: #1a3e2a;
    /* Dark Green background */
    border-color: #27ae60;
}

body.dark-mode .truth-header h4 {
    color: #2ecc71;
}

/* Calculator Demo Section */
body.dark-mode .calculator-demo {
    background-color: #1a2639;
    border-color: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .demo-header h3,
body.dark-mode .demo-header p,
body.dark-mode .control-group label {
    color: #e0e0e0;
}

body.dark-mode .demo-input,
body.dark-mode .demo-select {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e0e0e0;
}

/* Sleep Stages Visual */
body.dark-mode .stage-card {
    background-color: #1a2639;
    border-color: #2d3748;
}

body.dark-mode .stage-number {
    color: #a0aec0;
}

body.dark-mode .stage-content p {
    color: #cbd5e0;
}


/* Newsletter Widget */
body.dark-mode .newsletter-widget {
    background-color: #1a2639;
    border-color: #2d3748;
}

body.dark-mode .newsletter-widget p {
    color: #a0aec0;
}

body.dark-mode .newsletter-form input {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e0e0e0;
}

/* Related Articles */
body.dark-mode .related-article {
    border-color: #2d3748;
    background-color: #1a202c;
    /* Slight card background */
}

body.dark-mode .related-article:hover {
    border-color: #3498db;
    background-color: #2c3e50;
}

/* Tags */
body.dark-mode .tag {
    background-color: #2d3748;
    color: #cbd5e0;
}

body.dark-mode .tag:hover {
    background-color: #3498db;
    color: white;
}

/* Comments Section */
body.dark-mode .comments-prompt {
    background-color: #1a202c;
    border-color: #2d3748;
}

body.dark-mode .comment-form textarea {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e0e0e0;
}

/* Conclusion Box */
body.dark-mode .conclusion {
    background-color: #1a202c;
    border-color: #2d3748;
}

body.dark-mode .conclusion .section-title {
    color: #e0e0e0;
}

/* Share Footer */
body.dark-mode .share-footer {
    background-color: #1a202c;
}

/* Calculator Demo Fixes */
body.dark-mode .calculator-demo {
    background-color: #1a2639;
    border-color: #2d3748;
}


/* Interaction Line */
body.dark-mode .interaction-section {
    border-top-color: #2d3748;
}

/* ========================================== */
/* Dark Mode Overrides                        */
/* ========================================== */

body.dark-mode {
    background-color: #0f1419;
    color: #e2e8f0;
}

.dark-mode .navbar {
    background-color: #1a202c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .nav-logo a,
.dark-mode .nav-link {
    color: #e2e8f0;
}

.dark-mode .nav-link:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.dark-mode .hero {
    background-color: #1a202c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-mode .hero-title,
.dark-mode .section-title,
.dark-mode .widget-title,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4 {
    color: #f7fafc;
}

.dark-mode .hero-subtitle,
.dark-mode p,
.dark-mode .breadcrumb,
.dark-mode .breadcrumb a,
.dark-mode li {
    color: #cbd5e0;
}

.dark-mode .hero-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .author-name {
    color: #e2e8f0;
}

.dark-mode .article-date {
    color: #a0aec0;
}

.dark-mode .social-share a {
    background-color: #2d3748;
    color: #cbd5e0;
}

.dark-mode .social-share a:hover {
    background-color: #3498db;
    color: #fff;
}

.dark-mode .intro-text {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .content-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-mode .highlight-box {
    background-color: rgba(52, 152, 219, 0.1);
    color: #e2e8f0;
}

.dark-mode .conclusion {
    background-color: #1a202c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .conclusion .section-title {
    color: #f7fafc;
}

.dark-mode .interaction-section {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .tag-label {
    color: #a0aec0;
}

.dark-mode .tag {
    background-color: #2d3748;
    color: #cbd5e0;
}

.dark-mode .tag:hover {
    background-color: #3498db;
    color: #fff;
}

.dark-mode .share-footer {
    background-color: #1a202c;
}

.dark-mode .comments-prompt {
    background-color: #1a202c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .comments-prompt h3 {
    color: #f7fafc;
}

.dark-mode .comment-form textarea {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

.dark-mode .sidebar-widget {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .author-sidebar-info h4 {
    color: #f7fafc;
}

.dark-mode .author-sidebar-info p {
    color: #a0aec0;
}

.dark-mode .related-article {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1a202c;
}

.dark-mode .related-article:hover {
    border-color: #3498db;
    background-color: #2d3748;
}

.dark-mode .related-article h4 {
    color: #f7fafc;
}

.dark-mode .related-article p {
    color: #a0aec0;
}

.dark-mode .newsletter-widget {
    background-color: #1a202c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .newsletter-form input {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

.dark-mode .menu-toggle {
    color: #e2e8f0;
}