@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #f8991d;
    /* Bhaskar Orange */
    --secondary: #2563eb;
    --dark: #1a1a1b;
    --light: #f4f4f4;
    --text: #333;
    --border: #ececec;
    --sidebar-width: 200px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Mukta', 'Outfit', sans-serif;
    color: var(--text);
    background-color: #fff;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

/* Main Layout Wrapper */
.app-container {
    min-height: 100vh;
}

/* Sidebar Nav */
.side-nav {
    width: var(--sidebar-width);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    padding: 20px 0;
    background: transparent;
    z-index: 1000;
    overflow-y: auto;
    /* Enable scrolling */
    scrollbar-width: none;
    /* Hide scrollbar for clean look */
}

.side-nav::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome/Safari */
}

.side-nav ul {
    list-style: none;
}

.side-nav li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 25px;
    font-weight: 600;
    color: #555;
    font-size: 16px;
}

.side-nav li a:hover {
    background: #fff8f0;
    color: var(--primary);
}

.side-nav li .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Area */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: auto;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: #fff;
    z-index: 99;
    overflow: hidden;
    /* Prevent logo/content overflow */
}

.logo-bhaskar {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 40%;
    flex-shrink: 0;
}

.logo-bhaskar span {
    color: var(--primary);
}

.top-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.top-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.top-menu a.active {
    color: var(--primary);
}

/* Content Container */
.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    flex: 1;
    /* Pushes footer down */
    width: 100%;
}

/* Trending Bar */
.trending-tags {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.trending-label {
    color: var(--primary);
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.tag-item {
    background: #f8f8f8;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border: 1px solid #eee;
    white-space: nowrap;
}

.tag-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Featured Section - Bhaskar Style */
.bhaskar-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.main-feature h2 {
    font-size: 28px;
    font-weight: 700;
    color: #003399;
    /* Bhaskar Blue Headline */
    margin-bottom: 15px;
    line-height: 1.3;
}

.main-feature img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Sub Features list */
.sub-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.small-card {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.small-card img {
    width: 100px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
}

.small-card h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

/* Grid Layout */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.news-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-card .meta {
    font-size: 13px;
    color: #888;
}

/* Article Page Layout */
.article-layout {
    display: flex; /* Using flex for better compatibility in some browsers */
    gap: 40px;
    align-items: start;
    width: 100%;
}

.article-page {
    /* Main article content column */
    flex: 1;
    min-width: 0; /* Critical for shrinking within flex/grid */
}

.article-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.article-page h1 {
    font-size: 36px;
    color: #1a1a1b;
    margin-bottom: 20px;
}

.article-main-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
}

.article-body {
    font-size: 19px;
    line-height: 1.8;
    color: #333;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* Quoted Text Format / RTF Blockquotes */
.article-body blockquote, .rtf-content blockquote {
    font-size: 24px;
    font-weight: 600;
    font-style: italic;
    color: var(--text);
    text-align: center;
    margin: 40px auto;
    padding: 35px 40px;
    position: relative;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-bottom: 4px solid var(--primary);
    max-width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    z-index: 1;
}

.article-body blockquote::before, .rtf-content blockquote::before {
    content: "\201C"; /* Left double quote */
    font-family: 'Outfit', sans-serif;
    font-size: 80px;
    position: absolute;
    top: -10px;
    left: 15px;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    z-index: -1;
}

.article-body blockquote::after, .rtf-content blockquote::after {
    content: "\201D"; /* Right double quote */
    font-family: 'Outfit', sans-serif;
    font-size: 80px;
    position: absolute;
    bottom: -40px;
    right: 15px;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    z-index: -1;
}

.article-body blockquote p, .rtf-content blockquote p {
    margin: 0 !important;
    display: inline-block;
}

/* Footer Section */
.bhaskar-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 70px 0 40px;
    margin-top: 60px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 25px 25px;
}

.bhaskar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h5 {
    font-size: 16px;
    margin-bottom: 25px;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 15px;
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col a {
    color: #64748b;
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Footer Dark Theme */
.bhaskar-footer.theme-dark {
    background: #0f172a;
    /* Slate 900 - 80% Black feel */
    color: #fff;
    border-top: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
}

.bhaskar-footer.theme-dark h5 {
    color: #fff;
}

.bhaskar-footer.theme-dark .footer-col li,
.bhaskar-footer.theme-dark .footer-col a {
    color: #aaa;
}

.bhaskar-footer.theme-dark .footer-col a:hover {
    color: var(--primary);
}

.bhaskar-footer.theme-dark .social-icons a {
    background: #222 !important;
}

.bhaskar-footer.theme-dark div[style*="border-top"] {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

@media (max-width: 1024px) {

    .side-nav,
    .desktop-only,
    .header-date-time {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    /* Stack article layout */
    .article-layout {
        flex-direction: column;
        gap: 30px;
    }

    .article-sidebar {
        width: 100%;
        display: block; /* Show sidebar on tablet, just stack it */
        margin-top: 40px;
    }

    .top-menu,
    .header-search-desktop {
        display: none !important;
    }

    .menu-toggle {
        display: block !important;
    }

    .top-header {
        padding: 0 15px;
        height: 60px;
    }

    .logo-bhaskar {
        max-width: 70%;
    }

    .logo-bhaskar img {
        height: 35px !important;
    }

    .logo-bhaskar span {
        font-size: 16px !important;
    }

    .bhaskar-hero {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .main-feature h2 {
        font-size: 22px;
    }

    .article-page h1 {
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease;
}

.mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-content {
    left: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-body ul {
    list-style: none;
    padding: 10px 0;
}

.mobile-nav-body li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mobile-nav-body li.divider {
    padding: 15px 20px 5px;
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-nav-body .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mobile-nav-body li a i {
    width: 20px;
    color: #64748b;
}

/* ── Hidden but Functional Scrollbars ────────────────────────── */
/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* ── RTF CONTENT FORMATTING FIXES (Quill Editor) ────────────────────────── */
.article-body p, .rtf-content p {
    margin-bottom: 12px;
}

.article-body h1, .article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6,
.rtf-content h1, .rtf-content h2, .rtf-content h3, .rtf-content h4, .rtf-content h5, .rtf-content h6 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #1a1a1b;
}

.article-body ul, .rtf-content ul {
    list-style-type: disc;
    margin-bottom: 25px;
    padding-left: 40px;
}

.article-body ol, .rtf-content ol {
    list-style-type: decimal;
    margin-bottom: 25px;
    padding-left: 40px;
}

.article-body li, .rtf-content li {
    margin-bottom: 10px;
}

.article-body a, .rtf-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.article-body a:hover, .rtf-content a:hover {
    text-decoration: underline;
}

.article-body img, .rtf-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

/* Quill Specific Alignments */
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }

/* Quill Specific Indentations */
.ql-indent-1 { padding-left: 3em; }
.ql-indent-2 { padding-left: 6em; }
.ql-indent-3 { padding-left: 9em; }
.ql-indent-4 { padding-left: 12em; }
.ql-indent-5 { padding-left: 15em; }
.ql-indent-6 { padding-left: 18em; }
.ql-indent-7 { padding-left: 21em; }
.ql-indent-8 { padding-left: 24em; }

/* Video Embeds */
.ql-video {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}