
/* Color Palette based on Untitled UI */
:root {
    --bg-color: #ffffff;
    --text-primary: #101828;
    --text-secondary: #475467;
    --text-tertiary: #667085;
    --primary-color: #6941C6;
    --primary-hover: #53389E;
    --border-color: #EAECF0;
    --radius: 12px;
    --radius-lg: 24px;
    --footer-bg: #101828;
    --footer-text: #EAECF0;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --text-primary: #F9FAFB;
    --text-secondary: #EAECF0;
    --text-tertiary: #98A2B3;
    --primary-color: #7F56D9;
    --primary-hover: #9E77ED;
    --border-color: #1F242F;
    --footer-bg: #000000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
}
.header-container {
    display: flex; justify-content: space-between; align-items: center; height: 80px;
}
.logo { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px;}
.main-nav { flex-grow: 1; margin-left: 40px; }
.nav-links { list-style: none; display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--text-secondary); font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 4px; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.header-actions { display: flex; align-items: center; gap: 24px; order: 2; }

/* Top Controls */
.top-controls { display: flex; align-items: center; gap: 16px; order: 1; margin-right: 8px; }
.mobile-menu-btn { display: none; }

/* Buttons */
.btn-text { color: var(--text-secondary); font-weight: 600; font-size: 1rem; }
.btn-text:hover { color: var(--text-primary); }
.btn-primary {
    background-color: var(--primary-color); color: #fff;
    padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 1rem;
    transition: background-color 0.2s;
}
.btn-primary:hover { background-color: var(--primary-hover); color: #fff; }
.btn-outline {
    background-color: transparent; border: 1px solid var(--border-color); color: var(--text-primary);
    padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 1rem;
    transition: all 0.2s;
}
.btn-outline:hover { background-color: var(--border-color); }
.btn-outline-dark {
    background-color: transparent; border: 1px solid #344054; color: var(--text-primary);
    padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 1rem;
    transition: background-color 0.2s;
}
.btn-outline-dark:hover { background-color: var(--border-color); }

/* Theme Toggle */
.theme-toggle { background: transparent; border: 1px solid var(--border-color); cursor: pointer; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; transition: all 0.2s;}
.theme-toggle:hover { background-color: var(--border-color); }

/* Featured Post */
.featured-post { margin-top: 48px; margin-bottom: 64px; }
.featured-wrapper {
    position: relative; width: 100%; height: 560px;
    border-radius: var(--radius-lg); overflow: hidden;
}
.featured-img { width: 100%; height: 100%; object-fit: cover; }
.featured-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
}
.featured-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 48px;
    color: #fff; max-width: 800px;
}
.featured-label { font-size: 1rem; font-weight: 600; margin-bottom: 12px; display: block; }
.featured-content h1 { font-size: 2.25rem; font-weight: 600; line-height: 1.2; margin-bottom: 16px; }
.featured-content h1 a { color: #fff; }
.featured-content p { font-size: 1.125rem; color: #EAECF0; line-height: 1.6; }
.featured-arrow {
    position: absolute; bottom: 48px; right: 48px;
    color: #fff; transition: transform 0.3s;
}
.featured-wrapper:hover .featured-arrow { transform: translateX(8px); }
.featured-arrow a { color: #fff; }

/* Recent Posts */
.recent-posts { margin-bottom: 96px; }
.section-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 32px; color: var(--text-primary); }
.articles-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px;
}
.post-card { display: flex; flex-direction: column; }
.post-image { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-image img { transform: scale(1.05); }
.post-content h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; line-height: 1.4; color: var(--text-primary); }
.post-content p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--text-tertiary); font-weight: 500; margin-top: auto;}
.author-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.load-more-container { text-align: center; margin-top: 64px; }
.btn-load-more {
    background-color: var(--text-primary); color: var(--bg-color);
    border: none; padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: opacity 0.2s;
}
.btn-load-more:hover { opacity: 0.9; }

/* Footer */
.site-footer {
    background-color: var(--footer-bg); color: var(--footer-text);
    padding: 64px 0 0;
    border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg);
}
.footer-cta { text-align: center; max-width: 800px; margin: 0 auto 64px; }
.footer-cta h2 { font-size: 2.25rem; font-weight: 600; margin-bottom: 20px; color: #fff; }
.footer-cta p { font-size: 1.25rem; color: #EAECF0; margin-bottom: 32px; }
.cta-buttons { display: flex; justify-content: center; gap: 12px; }

.footer-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 32px;
    padding-bottom: 64px; border-bottom: 1px solid #344054;
}
.footer-col h3 { font-size: 0.875rem; font-weight: 600; color: #98A2B3; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 1rem; color: #EAECF0; font-weight: 500; display: flex; align-items: center; gap: 8px;}
.footer-col a:hover { color: #fff; }
.badge { background-color: rgba(255,255,255,0.1); font-size: 0.75rem; padding: 2px 8px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.2); }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 32px 0; color: #98A2B3; font-size: 1rem;
}
.footer-logo { font-size: 1.25rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }

@media (max-width: 1024px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.show {
        display: flex;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border-color);
        z-index: 99;
    }
    .header-actions { display: none; }
    .header-actions.show { 
        display: flex; 
        position: absolute;
        top: 300px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column; 
        padding: 24px;
        z-index: 100;
    }

    .articles-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-wrapper { height: 400px; }
    .featured-content { padding: 24px; }
    .featured-content h1 { font-size: 1.75rem; }
    .featured-arrow { display: none; }
    .nav-links, .header-actions { display: none; }
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: none; color: var(--text-primary); cursor: pointer; }
    .footer-cta h2 { font-size: 1.75rem; }
    .footer-bottom { flex-direction: column; gap: 24px; text-align: center; }
}

/* Base styles for article content */
.article-content { margin: 60px auto 100px; max-width: 720px; }
.article-content h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 24px; line-height: 1.2; }
.article-content h2 { margin: 48px 0 20px; font-size: 1.5rem; font-weight: 600; }
.article-content p, .article-content li { font-size: 1.125rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 24px; }
.article-hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 16px; margin-bottom: 40px; }

/* Code blocks */
.article-content pre, .article-body pre { background-color: #101828; border: 1px solid #344054; color: #EAECF0; padding: 24px; padding-top: 56px; border-radius: 12px; overflow-x: auto; margin: 32px 0; font-size: 0.9rem; position: relative; }
[data-theme="dark"] .article-content pre, [data-theme="dark"] .article-body pre { background-color: #000000; border-color: #1F242F; }
.copy-btn { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1); color: #D0D5DD; border-radius: 6px; padding: 6px 12px; font-size: 0.75rem; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* Suggested */
.suggested-reading { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--border-color); }
.suggested-reading h3 { font-size: 1.5rem; margin-bottom: 24px; font-weight: 600; }
.suggested-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.suggested-card { display: flex; flex-direction: column; }
.suggested-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; margin-bottom: 16px; transition: transform 0.3s; }
.suggested-card:hover img { transform: scale(1.05); }
.suggested-card span { font-weight: 600; font-size: 1.125rem; color: var(--text-primary); }

@media (max-width: 768px) { .suggested-grid { grid-template-columns: 1fr; } }


/* -------------------------------------- */
/* --- NEW 3-COLUMN ARTICLE REDESIGN --- */
/* -------------------------------------- */

.article-layout {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 80px;
    align-items: start;
}

/* Left Sidebar */
.article-sidebar-left {
    position: sticky;
    top: 120px;
}

.author-profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
    padding: 16px;
    border-radius: 16px;
    background: var(--bg-secondary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.author-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.author-badge svg {
    vertical-align: middle;
}

.category-list h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.category-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-list a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.category-list a:hover {
    color: var(--text-primary);
}

.category-list a.active {
    color: #ef4444;
}

/* Main Content Area */
.article-main {
    min-width: 0;
}

.main-top-category {
    margin-bottom: 24px;
}

.main-top-category h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.article-main .article-hero-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 24px;
}

.article-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-tag {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.meta-stats {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.meta-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-main h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.article-byline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 24px;
}

.byline-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.byline-name {
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-primary);
}

.byline-actions {
    display: flex;
    gap: 12px;
}

.btn-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-secondary);
}

.btn-light-blue {
    border: none;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.btn-light-blue:hover {
    background: rgba(59, 130, 246, 0.2);
}

/* Right Sidebar (Related News) */
.article-sidebar-right {
    position: sticky;
    top: 120px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.see-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.related-news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.related-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.related-meta .tag {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.related-meta .views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.related-card h4 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
}

.related-card a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-card a:hover {
    color: var(--primary-color);
}

/* Media Queries */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr 300px;
    }
    .article-sidebar-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar-right {
        margin-top: 40px;
        position: static;
    }
    .article-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .article-byline-row {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* -------------------------------------- */
/* --- EDITORIAL TYPOGRAPHY STYLES ------ */
/* -------------------------------------- */

.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body p {
    margin-bottom: 24px;
}

/* Elegant Drop Cap */
.article-body > p:first-of-type::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 1;
    font-weight: 800;
    padding-right: 12px;
    padding-top: 4px;
    color: var(--text-primary);
}

.article-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 48px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
}

.article-body blockquote {
    margin: 40px 0;
    padding: 24px 32px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    border-radius: 0 12px 12px 0;
}

.article-body ul, .article-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}



/* About / Contact / Privacy Page Styles */
.static-page-hero {
    text-align: center;
    padding: 80px 0;
}

.static-page-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.static-page-hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    margin-top: 40px;
    margin-bottom: 80px;
}

.contact-form {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-card {
    display: flex;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(105, 65, 198, 0.2);
}

.contact-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-details p {
    color: var(--text-secondary);
}

.about-content, .privacy-content {
    max-width: 800px;
    margin: 0 auto 80px;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* Share Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: block !important;
}

.modal-content {
    background-color: var(--bg-color);
    margin: 15% auto;
    padding: 32px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.close-modal {
    color: var(--text-tertiary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.share-url-container {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.share-url-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.btn-copy-link {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy-link:hover {
    background-color: var(--primary-hover);
}

.btn-outline-white { background-color: transparent; border: 1px solid #ffffff; color: #ffffff !important; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 1rem; transition: all 0.2s; display: inline-block; } .btn-outline-white:hover { background-color: rgba(255,255,255,0.1); color: #ffffff !important; }
