/*
Theme Name: SaptahikBahas Custom Styles
Description: High-priority overrides for the 'Nepali Vibe' design system, bold titles, and news ticker.
Version: 1.0.0
*/

/* 1. Design Tokens (The Nepali Vibe) */
:root {
    --sb-primary: #000000; /* Monochromatic Black */
    --sb-secondary: #000000; /* Darkened from #333333 for maximum contrast */
    --sb-accent: #333333; /* Darkened from #666666 for better visibility */
    --sb-white: #FFFFFF;
    --sb-bg: #FFFFFF;
    --sb-text: #000000;
    --sb-border: #000000;
    --sb-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 1.1 CORE LAYOUT REFINEMENTS
 * Fix Sticky Header Failure: Force parent containers to have overflow: visible.
 */
html, body, #page, .site, .sb-main-header-wrapper, .site-content, .content-area {
    overflow: visible !important;
    contain: none !important;
}

/* 2. Global Resets & Typography */
body {
    background-color: var(--sb-bg);
    color: var(--sb-text);
    font-family: 'Inter', 'Noto Sans Devanagari', sans-serif;
    font-size: var(--sb-base-font-size, 16px);
    line-height: 1.6;
}

/* Bold & Large Titles (Refined for Professional Look) */
h1, h2, h3, h4, h5, h6, 
.entry-title, .widget-title, .site-main-title {
    font-weight: 800 !important;
    color: var(--sb-secondary);
    line-height: 1.2;
}

.entry-title, 
.pagelayer-post-title,
.pagelayer-post-title a {
    font-size: var(--sb-post-title-size, 2.5rem) !important;
    margin-bottom: 0.5rem;
    text-align: center !important;
}

.news-card h3 a {
    font-size: 1.55rem !important; /* Bigger post titles on desktop */
    line-height: 1.25 !important;
    display: block;
    margin-bottom: 8px;
}

.news-card-content {
    padding: 15px 0;
    text-align: center;
}

.entry-content {
    font-size: var(--sb-post-content-size, 1.15rem);
    line-height: 1.8;
}

h2 {
    font-size: var(--sb-h2-size, 2rem) !important;
}

.news-meta {
    font-size: 13px !important; /* Bigger metadata */
    color: var(--sb-accent) !important;
    text-transform: uppercase;
    font-weight: 600;
}


.site-main-title {
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    color: var(--sb-primary) !important;
    margin: 0;
    text-shadow: none !important;
}

.site-main-tagline {
    font-size: clamp(0.9rem, 1.8vw, 1.2rem) !important;
    color: var(--sb-accent) !important;
    margin-top: 5px;
}

/* 3. Layout Containers */
.sb-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* 4. Desktop Navigation (Horizontal) */
.sb-main-nav {
    background: var(--sb-white);
    border-bottom: 1px solid var(--sb-border);
}

.sb-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px; /* Reduced from 10px */
}

.sb-menu li {
    margin: 0;
}

.sb-menu li a {
    display: block;
    padding: 10px 12px; /* Reduced from 12px 15px */
    color: var(--sb-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem; /* Reduced from 1.05rem */
    transition: all 0.3s ease;
    white-space: nowrap;
}
/* 4. Sticky Header Behavior (Standardized) */
.sb-sticky-header {
    position: relative;
    z-index: 10000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.sb-sticky-header.is-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    background: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

body.admin-bar .sb-sticky-header.is-sticky {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .sb-sticky-header.is-sticky {
        top: 46px !important;
    }
}


/* 5. News Ticker (Monochromatic Black) */
.sb-news-ticker {
    background: #000000 !important; /* Forced black for monochromatic aesthetic */
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
    overflow: hidden;
    height: 48px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 999;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.ticker-label {
    background: #000000;
    color: #FFFFFF;
    padding: 0 15px;
    height: 48px;
    line-height: 48px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 1010;
    position: relative;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-scroll {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: sb-marquee-scroll 45s linear infinite;
    will-change: transform;
}

/* Pause on hover */
.ticker-scroll:hover {
    animation-play-state: paused;
}

.ticker-scroll a {
    color: #FFFFFF !important; /* White text on black background */
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 0 15px;
    transition: color 0.3s ease;
}

.ticker-scroll a:hover {
    color: #FFFFFF !important;
    text-decoration: underline;
}

.ticker-sep {
    color: #888888;
    font-weight: bold;
    margin: 0 5px;
}

@keyframes sb-marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* 5. News Grid & Cards (Bigger is Better Refinement) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important; /* Forces 2 columns for maximum impact */
    gap: 30px;
    margin-bottom: 30px;
}

.news-card {
    background: #fff;
    border: 2px solid #eee;
    padding: 20px;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    border-color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.news-card .featured-image-link {
    display: block;
    overflow: hidden;
    margin-bottom: 15px;
}

.news-card .featured-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.news-card:hover .featured-image {
    transform: scale(1.05);
}

/* 5.15 Pradesh Section (Standalone below hero) */
.sb-pradesh-section {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 2.5%;
}

/* 5.1 Big Post Scaling */
.sb-big-post {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 3px double #000;
    text-align: center;
}

.sb-big-post h2 {
    font-size: 3.2rem !important;
    margin-top: 15px;
    margin-bottom: 25px;
}

.sb-big-post .excerpt {
    font-size: 1.3rem;
    max-width: 900px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* 5.2 Province Buttons (AJAX Tabs) */
.sb-pradesh-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    border: 2px solid #000;
}

.sb-pradesh-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 15px 10px;
    background: #fff;
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 1.1rem;
    border-right: 1px solid #000;
    transition: all 0.3s ease;
}

.sb-pradesh-btn:last-child {
    border-right: none;
}

.sb-pradesh-btn:hover,
.sb-pradesh-btn.active {
    background: #000 !important;
    color: #fff !important;
}

/* 5.3 Section Titles (Newspaper Style) */
.sb-section-title {
    margin-bottom: 35px;
    position: relative;
    text-align: center;
}

.sb-section-title::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #000;
    z-index: 1;
}

.sb-section-title h2 {
    display: inline-block;
    background: #000;
    color: #fff !important;
    padding: 10px 30px;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    font-size: 1.8rem !important;
    margin: 0;
}

/* 6. Mobile Optimizations */

/* 5. Mobile Optimizations */
@media screen and (max-width: 768px) {
    .sb-top-bar { display: none; }
    
    /* Sticky header cleanup - handled by consolidated rule and fixed section below */
    
    .sb-masthead {
        padding: 20px 0;
        text-align: center;
    }
    
    .sb-mobile-header {
        display: flex !important;
        justify-content: center !important; /* Force center for premium look */
        align-items: center;
        padding: 10px 15px;
        background: var(--sb-primary);
        color: white;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        background: transparent !important;
        color: white !important;
        border: 1px solid white !important;
        padding: 5px 10px !important;
        border-radius: 4px;
        font-size: 14px !important;
        cursor: pointer;
    }
    
    .sb-menu {
        display: none !important; /* Hide horizontal menu on mobile */
        flex-direction: column !important;
        background: var(--sb-secondary);
        width: 100%;
        padding: 10px 0;
    }
    
    .sb-menu.mobile-active {
        display: flex !important;
    }
    
    .sb-menu li a {
        padding: 15px 25px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        display: block;
        color: white;
    }
}

/* 6. Ad & Widget Styling */
.sb-ad-container {
    background: #FFFFFF;
    border: 1px solid #000000;
    text-align: center;
    padding: 0;
    margin: 20px 0;
    overflow: hidden;
}

.sb-ad-container::before {
    content: 'विज्ञापन';
    display: block;
    padding: 5px;
    font-size: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid #000000;
    font-weight: bold;
    color: #FFFFFF;
    background: #000000;
}

.sb-ad-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Sidebar Widgets */
.sb-sidebar-widget {
    border: 1px solid #000000;
    padding: 15px;
    margin-bottom: 30px;
    background: #FFFFFF;
}

.sb-widget-title {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 3px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 20px;
    position: relative;
}

.sb-sidebar-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #EEEEEE;
}

.sb-sidebar-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sb-sidebar-post-thumb {
    flex: 0 0 80px;
    height: 80px;
}

.sb-sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    border: 1px solid #000000;
}

.sb-sidebar-post-thumb:hover img {
    filter: grayscale(0%);
}

.sb-sidebar-post-content {
    flex: 1;
}

.sb-sidebar-post-title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 5px 0;
}

.sb-sidebar-post-title a {
    color: #111;
    text-decoration: none;
    font-weight: 600;
}

.sb-sidebar-post-title a:hover {
    text-decoration: underline;
}

.sb-sidebar-post-date {
    font-size: 0.8rem;
    color: #666;
}

.sb-ad-top-bar { max-height: 40px; padding: 5px; margin: 0; }
.sb-ad-masthead { width: 100%; max-width: 728px; min-height: 90px; }
.sb-ad-sidebar { min-height: 250px; width: 100%; }

/* =======================================
   STRICT MONOCHROMATIC & DESKTOP OVERRIDES
   ======================================= */
/* 1. Ensure Mobile Elements Hide on Desktop */
@media screen and (min-width: 769px) {
    .sb-mobile-header,
    .mobile-menu-toggle,
    #menuToggleBtn {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    #mainNav,
    .sb-main-nav,
    #mainMenu,
    .sb-menu {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Center the header logo section on desktop */
    .sb-masthead, .sb-logo-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }
}

/* 2. Global Button Color Override */
button, 
input[type="submit"], 
input[type="button"], 
.button, 
.btn, 
.submit-button,
#submit {
    background-color: var(--sb-primary) !important;
    color: var(--sb-white) !important;
    border: none !important;
    background-image: none !important;
}

/* Header Branding Link Fix */
.sb-mobile-logo a,
.site-main-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.sb-mobile-logo {
    display: none; /* Hidden on desktop by default */
}

.is-sticky .sb-mobile-logo {
    display: block !important;
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    color: var(--sb-white) !important;
    margin: 0 15px !important;
}

/* Excerpt Styling for Single Post */
.sb-single-excerpt {
    text-align: center !important;
    margin: 10px auto 25px auto !important;
    max-width: 800px !important;
    font-size: 1.15rem !important;
    line-height: 1.6 !important;
    color: #555 !important;
    font-style: italic !important;
    font-weight: 500 !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.sb-single-excerpt p {
    margin: 0 !important;
}

button:hover, 
input[type="submit"]:hover, 
input[type="button"]:hover, 
.button:hover, 
.btn:hover, 
.submit-button:hover,
#submit:hover {
    background-color: var(--sb-secondary) !important;
    color: var(--sb-white) !important;
}

/* 3. News Ticker Monochromatic Override */
.sb-news-ticker .ticker-label,
.ticker-label {
    background: var(--sb-primary) !important;
    color: var(--sb-white) !important;
    border-color: var(--sb-primary) !important;
}

.sb-news-ticker {
    border-top: 2px solid var(--sb-primary) !important;
    border-bottom: 2px solid var(--sb-primary) !important;
    background: #000000 !important;
    overflow: hidden !important;
    height: 40px !important;
    line-height: 40px !important;
}

.ticker-wrapper {
    display: flex !important;
    align-items: center !important;
}

.ticker-content {
    flex: 1 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    position: relative !important;
}

.ticker-scroll {
    display: inline-block !important;
    padding-left: 100% !important;
    animation: sb-ticker-scroll 30s linear infinite !important;
}

.ticker-scroll:hover {
    animation-play-state: paused !important;
}

@keyframes sb-ticker-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.sb-news-ticker a {
    color: var(--sb-white) !important;
    text-decoration: none !important;
    padding: 0 10px !important;
    font-weight: 600 !important;
    font-family: 'Mukta', sans-serif !important;
}

.sb-news-ticker a:hover {
    color: #ccc !important;
}

.ticker-sep {
    color: #666 !important;
    font-weight: bold;
}

.sb-sticky-header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sb-sticky-header.is-sticky {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

/* 4. Hide all ad containers in the header to ensure "no ads in header" */
.sb-ad-top-bar,
.sb-ad-masthead,
.sb-ad-ticker-bottom {
    display: none !important;
}

/* 5. Image Grayscale & Hover Interaction - Enhanced Specificity */
img, 
.wp-post-image,
.pagelayer-img img,
.pagelayer-post img,
.featured-image,
.news-card img,
.sb-post-image img {
    filter: grayscale(100%) !important;
    transition: filter 0.3s ease-in-out !important;
}

/* Correct target for hover transition - using parent containers to catch hover */
.pagelayer-post-holder:hover img,
.pagelayer-post:hover img,
.pagelayer-post-image:hover img,
.sb-post-image:hover img,
.pagelayer-col:hover img,
.news-card:hover img,
.featured-post-large:hover img,
.lead-story-section:hover img,
.lead-story:hover img,
.sb-big-post:hover img,
a:hover img,
img:hover,
[class*="pagelayer-"]:hover img {
    filter: grayscale(0%) !important;
}


/* 6. Fix for white text on white background (Aggressive Monochromatic) */
button, 
.button, 
.btn, 
input[type="submit"], 
input[type="button"], 
.pagelayer-button,
.wp-block-button__link,
.submit-button,
#submit {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
}

button:hover, 
.button:hover, 
.btn:hover, 
input[type="submit"]:hover, 
input[type="button"]:hover, 
.pagelayer-button:hover,
.wp-block-button__link:hover,
.submit-button:hover,
#submit:hover {
    background-color: #444444 !important;
    color: #ffffff !important;
}

/* Specific fix for Read More button (The "Black Box") */
a.read-more,
.lead-story .read-more,
.sb-big-post .read-more,
.pagelayer-post-read-more a {
    color: #ffffff !important; 
    border: 2px solid #000000 !important;
    background: #000000 !important;
    padding: 10px 25px !important;
    text-decoration: none !important;
    margin: 20px auto !important;
    display: table !important; 
    width: auto !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

a.read-more:hover,
.lead-story .read-more:hover,
.sb-big-post .read-more:hover,
.pagelayer-post-read-more a:hover {
    background: #ffffff !important;
    color: #000000 !important;
}

.pagelayer-post-read-more {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

/* Ensure the link inside the title is also centered */
.pagelayer-post-title a,
.lead-story h1 a,
.sb-big-post h2 a {
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 8. Hide empty Author Meta (The black box artifact) */
.pagelayer-post-meta-author,
.pagelayer-post-author,
.pagelayer-post-author-name,
.pagelayer-post-meta span:not(.pagelayer-post-date),
.pagelayer-post-meta .pagelayer-post-meta-author[style] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Remove borders from all meta spans to ensure no artifacts */
.pagelayer-post-meta span, 
.pagelayer-post-meta i,
.pagelayer-post-meta b {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Ensure the date is kept visible and centered with meta */
.pagelayer-post-meta,
.sb-meta-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
    margin: 15px auto !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    max-width: fit-content !important;
}

.meta-item,
.pagelayer-post-meta-date {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #444 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.meta-item svg {
    width: 16px !important;
    height: 16px !important;
    fill: #666 !important;
}

.meta-sep {
    color: #ccc !important;
    font-weight: bold;
}

.pagelayer-post-meta-date {
    color: #333 !important;
    font-size: 13px !important;
}

/* 9. PageLayer Widget Content Centering & Layout Fixes */
.pagelayer-post-excerpt {
    text-align: center !important;
    margin-top: 10px !important;
    line-height: 1.6 !important;
    color: #444 !important;
}

.pagelayer-posts-feature-image,
.pagelayer-post-image {
    display: block !important;
    margin: 0 auto 15px auto !important;
    text-align: center !important;
}

.pagelayer-post-holder {
    padding-bottom: 30px !important;
    border-bottom: 1px solid #eee !important;
    margin-bottom: 30px !important;
}

.pagelayer-post-holder:last-child {
    border-bottom: none !important;
}

/* 10. Monochromatic Social Share Buttons */
.share-btn,
.social-icon,
.pagelayer-social-icon,
.pagelayer-social-icon a {
    background-color: var(--sb-primary) !important;
    color: var(--sb-white) !important;
    border: 1px solid var(--sb-white) !important;
    filter: none !important;
}

/* 10. Final Button Contrast Polish */
.btn, .button, input[type="submit"], button, .pagelayer-btn, .pagelayer-button {
    background-color: var(--sb-primary) !important;
    color: var(--sb-white) !important;
    border: 1px solid var(--sb-white) !important;
    text-transform: uppercase !important;
    padding: 10px 20px !important;
}

.btn:hover, .button:hover, input[type="submit"]:hover, .pagelayer-btn:hover {
    background-color: var(--sb-white) !important;
    color: var(--sb-primary) !important;
}

/* Category Badge Visibility Fix */
.pagelayer-post-category a,
.pagelayer-category-link {
    background: var(--sb-primary) !important;
    color: var(--sb-white) !important;
    padding: 2px 8px !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
}

.share-btn,
.share-btn.fb, 
.share-btn.tw, 
.share-btn.wa, 
.share-btn.mail,
.ssba-btn,
.social-share-icon,
.heateor_ss_button_facebook,
.heateor_ss_button_twitter,
.heateor_ss_button_whatsapp,
.heateor_ss_button_linkedin {
    background-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    border: 1px solid #000000 !important;
}

.share-btn:hover,
.ssba-btn:hover,
.social-share-icon:hover {
    background-color: #444444 !important;
    color: #ffffff !important;
}

/* 11. White-on-White Contrast Fixes (User Request) */
input[type="text"], 
input[type="email"], 
input[type="url"], 
input[type="password"], 
input[type="search"], 
textarea,
select {
    background-color: var(--sb-white) !important;
    color: var(--sb-text) !important;
    border: 1px solid var(--sb-primary) !important;
    padding: 8px 12px !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--sb-accent) !important;
    opacity: 1 !important;
}

/* Ensure navigation dropdowns are visible (B&W) */
.sb-menu li ul,
.sub-menu,
.dropdown-menu {
    background-color: var(--sb-white) !important;
    border: 1px solid var(--sb-primary) !important;
    box-shadow: var(--sb-shadow) !important;
}

.sb-menu li ul li a,
.sub-menu li a {
    color: var(--sb-text) !important;
    border-bottom: 1px solid #eee !important;
}

.sb-menu li ul li a:hover,
.sub-menu li a:hover {
    background-color: var(--sb-primary) !important;
    color: var(--sb-white) !important;
}

/* Fix for search bar and general widget text */
.search-field, 
.search-form input,
input[type="search"] {
    color: #000000 !important;
    background-color: #ffffff !important;
}

.widget-title {
    border-bottom: 3px solid #000 !important;
    padding-bottom: 10px !important;
    margin-bottom: 20px !important;
    font-size: 1.4rem !important;
}

/* 12. RELATED NEWS REFINEMENT */
.nepali-related-news {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--sb-border);
}

.related-title {
    font-size: 1.5rem !important;
    border-bottom: 2px solid var(--sb-border);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-item-title a {
    font-size: 1rem !important;
    text-decoration: none;
    color: var(--sb-text);
    font-weight: 700;
}

.related-item-title a:hover {
    text-decoration: underline;
}

@media screen and (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* --- MINIMAL FOOTER STYLES --- */
.sb-minimal-footer {
    background: #000 !important;
    color: #fff !important;
    padding: 60px 0 40px;
    text-align: center;
    border-top: 5px solid #000;
}

.sb-minimal-footer p, 
.sb-minimal-footer span, 
.sb-minimal-footer div {
    color: #fff !important;
}

.footer-minimal-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-brand .footer-logo a {
    color: #fff !important;
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.footer-tagline {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.footer-nav-minimal ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-nav-minimal ul li a {
    color: #fff !important;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-nav-minimal ul li a:hover {
    color: #aaa;
}

.footer-copyright-minimal {
    border-top: 1px solid #333;
    padding-top: 30px;
    font-size: 0.85rem;
    color: #fff !important;
}

.footer-copyright-minimal strong {
    color: #fff;
}

.designed-by {
    margin-top: 10px;
    font-style: italic;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer-nav-minimal ul {
        flex-direction: column;
        gap: 15px;
    }
    .footer-brand .footer-logo a {
        font-size: 2rem;
    }
}

/* --- INFINITE SCROLL STYLES --- */
#sb-infinite-post-container {
    max-width: 800px;
    margin: 0 auto;
}

.sb-post-separator {
    border: none;
    border-top: 2px solid #000;
    margin: 60px auto;
    position: relative;
    max-width: 200px;
}

.sb-ad-slot-infinite {
    margin: 40px auto;
    text-align: center;
    background: #f9f9f9;
    padding: 20px;
    border: 1px dashed #ccc;
    font-size: 0.8rem;
}

.sb-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #000;
    border-radius: 50%;
    animation: sb-spin 1s linear infinite;
    display: inline-block;
}

@keyframes sb-spin {
    to { transform: rotate(360deg); }
}

#sb-infinite-loading p,
#sb-infinite-end p {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 1.1rem;
    color: #444;
}

.sb-scrolled-post {
    padding-bottom: 60px;
    border-bottom: 1px solid #eee;
    margin-bottom: 60px;
}

.sb-scrolled-post:last-child {
    border-bottom: none;
}

/* --- HEADER & NAVIGATION REFINEMENTS --- */
/* Sticky header cleanup - handled by consolidated rule */

.sb-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #000;
    color: #fff;
}

.sb-mobile-logo {
    flex-grow: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sb-mobile-logo a {
    color: #fff !important;
    text-decoration: none;
}

.mobile-menu-toggle {
    background: #000;
    border: 1px solid #fff;
    color: #fff;
    font-size: 1.5rem;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.mobile-menu-toggle:hover {
    background: #fff;
    color: #000;
    border-color: #000;
    transform: scale(1.1);
}

.sb-mobile-search-trigger {
    min-width: 80px;
    text-align: right;
    font-size: 1.2rem;
}

@media screen and (max-width: 991px) {
    .sb-mobile-header {
        display: flex;
    }
    .sb-main-nav {
        display: none; /* Controlled by JS toggle */
    }
    .sb-main-nav.mobile-active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        border-bottom: 2px solid #000;
    }
    #mainMenu.mobile-active {
        display: flex;
        flex-direction: column;
    }
}

/* --- PROFESSIONAL AD UNIT STYLING --- */
.sb-ad-unit {
    margin: 20px auto;
    text-align: center;
    line-height: 0;
}

.sb-ad-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.3s ease;
    display: inline-block;
}

.sb-ad-unit:hover .sb-ad-img {
    filter: grayscale(0%);
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sb-ad-top-bar .sb-ad-unit {
    margin: 0;
}

.sb-ad-top-bar .sb-ad-img {
    max-height: 50px;
}

.sb-ad-ticker-bottom {
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.sb-in-content-ad {
    margin: 40px 0;
    padding: 20px;
    background: #fdfdfd;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.sb-in-content-ad::before {
    content: "विज्ञापन";
    display: block;
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
}


.sb-view-all-wrapper {
    text-align: center;
    margin: 30px 0;
    padding-bottom: 20px;
}

.sb-view-all-btn {
    display: inline-block;
    padding: 12px 35px;
    background: #000;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #000;
    transition: all 0.3s ease;
}

.sb-view-all-btn:hover {
    background: #fff;
    color: #000 !important;
}

/* --- MOBILE TYPOGRAPHY SCALE (v2.1.1) --- */
@media screen and (max-width: 768px) {
    body {
        font-size: 18px !important; /* Base size increase for content */
        color: #000 !important;
    }
    
    .news-grid {
        grid-template-columns: 1fr !important; /* Stack for mobile but keep them big */
        gap: 20px;
    }

    .news-card {
        padding: 15px;
    }

    .sb-pradesh-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        border: none;
        gap: 5px;
    }

    .sb-pradesh-btn {
        border: 2px solid #000;
        padding: 12px 5px;
        font-size: 1rem;
    }

    .sb-big-post h2 {
        font-size: 2.3rem !important;
    }

    .sb-big-post .excerpt {
        font-size: 1.1rem;
    }

    .sb-section-title h2 {
        width: 100%;
        box-sizing: border-box;
    }

    .news-card h3 a {
        font-size: 1.45rem !important; /* Bigger titles on mobile */
        line-height: 1.3 !important;
        color: #000 !important;
    }
    
    .news-meta {
        font-size: 14px !important;
        margin-top: 5px !important;
        color: #000 !important;
    }
    
    .news-meta a {
        color: #000 !important;
    }
    
    .sb-section-title h2 {
        font-size: 1.9rem !important;
        border-left: 6px solid #000 !important;
        padding-left: 12px !important;
        color: #000 !important;
    }
    
    .entry-title, .site-main-title {
        font-size: 2.2rem !important;
        color: #000 !important;
    }
    
    .sb-view-all-btn {
        width: 100%;
        padding: 18px;
        font-size: 18px;
    }
}

/* --- MOBILE AUTO-SIZING & FLUIDITY (v2.2.3) --- */
/* Extreme fluid adaptability for any screen width (Auto-adjusting) */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    -webkit-overflow-scrolling: touch;
    height: auto !important;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

/* Fluid containers — auto-size to any screen */
.site,
#page,
.sb-main-header-wrapper,
.sb-pradesh-section,
.archive-layout,
.main-content,
.sidebar,
.sb-header,
.sb-section,
.sb-big-post,
.news-grid,
.news-card,
.sb-news-ticker,
.sb-main-nav {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    display: block; /* Ensure no flex-shaping breaks auto-width */
}

/* Sticky Header Refinement (Robust Mobile pinned menu) */
@media screen and (max-width: 768px) {
    /* Use position fixed for guaranteed pinning on any mobile device */
    .sb-sticky-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 99999 !important;
        background: #000000 !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
    }
    
    /* Add padding to the next following element to prevent overlap */
    #content, .site-content, .main-content {
        margin-top: 100px !important; /* Calibrated for 60px header + 40px ticker */
    }
    
    /* Consolidate: Hide redundant desktop masthead on mobile */
    .sb-masthead {
        display: none !important;
    }

    .sb-mobile-header {
        background: #000000 !important;
        height: auto !important; /* Allow it to grow with title/tagline */
        min-height: 85px;
        display: flex !important;
        flex-direction: column !important; /* Stack title and tagline */
        justify-content: center !important; 
        align-items: center !important;
        padding: 10px 15px;
        border-bottom: 2px solid #222;
        position: relative;
    }
    
    .sb-mobile-header .sb-mobile-logo {
        margin: 0 auto !important;
        width: 100%;
        text-align: center;
    }

    .sb-mobile-logo a {
        font-size: 1.8rem !important;
        font-weight: 800;
        display: block;
        margin-bottom: 2px;
    }

    .sb-mobile-tagline {
        font-size: 0.75rem !important; /* Slightly smaller for better fit */
        color: #ccc !important;
        margin: 0 !important;
        font-weight: 400;
        letter-spacing: 0.5px;
        max-width: 100%;
        display: block;
        line-height: 1.2;
    }

    .sb-menu-toggle {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent !important;
        color: #ffffff !important;
        border: 1px solid rgba(255,255,255,0.5) !important;
        padding: 4px 8px !important;
        font-size: 11px !important;
        font-weight: 800;
        text-transform: uppercase;
        border-radius: 2px;
        z-index: 100000;
    }

    .sb-mobile-header .site-logo img {
        max-height: 40px !important;
        width: auto !important;
    }
    
    .sb-news-ticker {
        background: #111111 !important;
        height: 40px !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .ticker-scroll a {
        color: #FFFFFF !important;
        font-size: 0.9rem !important;
    }
    
    .ticker-label {
        background: #FFFFFF !important;
        color: #000000 !important;
        height: 40px !important;
        line-height: 40px !important;
    }

    /* Pradesh Grid Adaptability (Fluid) */
    .sb-pradesh-links {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        border: 2px solid #000 !important;
        gap: 0 !important;
    }
    
    .sb-pradesh-btn {
        border-bottom: 1px solid #000 !important;
        border-right: 1px solid #000 !important;
        padding: 12px 5px !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .sb-pradesh-btn.active {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Ensure images don't cause overflow */
img {
    height: auto !important;
    max-width: 100% !important;
    display: block;
}

/* Centering enforcement for "any device" */
.sb-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* Tablet landscape (769px - 991px) */
@media screen and (min-width: 769px) and (max-width: 991px) {
    .archive-layout {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .main-content {
        width: 100% !important;
        float: none !important;
    }
    
    .sidebar {
        width: 100% !important;
        float: none !important;
        margin-top: 30px;
    }
    
    .news-grid,
    .news-grid-pradesh {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 6. Sidebar & Ad Styling (Monochromatic Professional) */
.sb-sidebar-widget {
    margin-bottom: 35px;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
}

.sb-widget-title {
    font-size: 1.25rem !important;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sb-sidebar-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ddd;
    transition: background 0.3s ease;
}

.sb-sidebar-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sb-sidebar-post-thumb {
    flex: 0 0 80px;
}

.sb-sidebar-post-thumb img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.sb-sidebar-post-item:hover .sb-sidebar-post-thumb img {
    filter: grayscale(0%);
}

.sb-sidebar-post-title {
    font-size: 0.95rem !important;
    margin: 0 0 5px 0 !important;
    line-height: 1.4 !important;
}

.sb-sidebar-post-date {
    font-size: 0.8rem;
    color: #666;
}

.sb-ad-container {
    margin: 30px 0;
    text-align: center;
    background: #fafafa;
    padding: 10px;
    border: 1px solid #eee;
}

.sb-ad-unit img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

