/* Additional Mobile Fixes */
@media (max-width: 768px) {
    .ticker-wrapper {
        height: 40px !important;
        flex-direction: row !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .ticker-title {
        width: auto !important;
        padding: 0 15px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }

    .ticker-content {
        flex: 1;
    }

    /* Prevent Bootstrap Row Overflow */
    .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }
    .col-lg-9, .col-lg-3, .col-md-7, .col-md-5, .col-md-6 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}


/* Final Mobile Responsive Overrides */
@media (max-width: 768px) {
    .news-container-grid {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .infinite-article {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }

/* ============================================================
   ULTIMATE MOBILE RESPONSIVE FIX (NO SCROLL)
   ============================================================ */
@media (max-width: 991px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Shrink container to 95% to create safe gutters */
    .container, .container-fluid {
        width: 95% !important;
        max-width: 95% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: hidden !important;
    }

    .row {
        display: block !important; /* Force vertical stack */
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px;
    }

    /* Fix Nav & Header */
    .logo-area { display: none !important; }
    
    #main-nav { 
        position: fixed !important;
        top: 0 !important;
        width: 100% !important;
        border-top: none !important; 
    }
    .nav-container { width: 100% !important; padding: 0 !important; }

    /* Fix Grid Sections */
    .hero-grid, .layout-politics, .layout-sports-top, .layout-sports-bottom, 
    .layout-triple-row, .news-grid, .category-hero-section {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        margin-bottom: 40px !important;
    }

    .news-card, .news-list-item, .side-item, .triple-col-block, .featured-news-main, 
    .politics-featured, .sports-main-img, .triple-featured {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 25px !important;
    }

    .main-news, .tabs-container {
        margin-bottom: 50px !important;
        margin-top: 0 !important;
        display: block !important;
        clear: both !important;
        position: relative !important;
    }

    .tabs-container {
        margin-top: 50px !important;
    }

    /* Fix SVG Map */
    .svg-map-wrapper, .svg-map-container, svg {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Fix Ticker */
    .ticker-wrapper {
        display: flex !important;
        width: 100% !important;
        height: 40px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 5px;
    }
    
    .ticker-title {
        font-size: 11px !important;
        padding: 0 10px !important;
    }
    
    .ticker-content { overflow: hidden !important; flex: 1; }

    /* Fix Dropdowns */
    .dropdown-content {
        min-width: auto !important;
        width: 100% !important;
    }

    /* Typography Safety */
    h1 { font-size: 22px !important; line-height: 1.3 !important; }
    h2 { font-size: 19px !important; line-height: 1.3 !important; }
    h3 { font-size: 17px !important; }
    h4 { font-size: 15px !important; }
    p { font-size: 14px !important; line-height: 1.6 !important; }
}

    .publish-info .sep {
        display: none !important;
    }
/* Ajax Search Popup Styles */
.search-overlay {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    top: 150px !important;
    right: 5% !important;
    width: 320px !important;
    height: auto !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-top: 3px solid #005000 !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2) !important;
    animation: slideFade 0.2s ease-out forwards;
    border-radius: 0 0 5px 5px !important;
}

@keyframes slideFade {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.search-overlay.is-open {
    display: block !important;
}

.close-overlay {
    position: absolute !important;
    top: 5px !important;
    right: 12px !important;
    color: #aaa !important;
    font-size: 24px !important;
    cursor: pointer !important;
    z-index: 1060 !important;
    line-height: 1 !important;
    transition: color 0.2s;
}

.close-overlay:hover {
    color: #e00000 !important;
}

.search-overlay-content {
    width: 100% !important;
    padding: 20px 15px 15px 15px !important;
}

.search-box-large {
    position: relative !important;
    width: 100% !important;
}

.search-box-large input {
    width: 100% !important;
    padding: 10px 35px 10px 15px !important;
    font-size: 15px !important;
    font-family: 'SolaimanLipi', sans-serif !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: #f9f9f9 !important;
    color: #333 !important;
    outline: none !important;
    transition: all 0.2s;
}

.search-box-large input:focus {
    border-color: #005000 !important;
    background: #fff !important;
    box-shadow: 0 0 5px rgba(0,80,0,0.2) !important;
}

.search-box-large i {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 14px !important;
    color: #777 !important;
}

.search-results-ajax {
    width: 100% !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    margin-top: 10px !important;
}

.ajax-result-item {
    border-bottom: 1px solid #eee !important;
    padding: 8px 0 !important;
}

.ajax-result-item:last-child {
    border-bottom: none !important;
}

.ajax-result-item a {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    color: #333 !important;
}

.ajax-result-item a:hover {
    color: #005000 !important;
}

.ajax-result-item img {
    width: 50px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    margin-right: 10px !important;
}

.ajax-result-item span {
    font-size: 14px !important;
    line-height: 1.3 !important;
}

.no-result {
    color: #666 !important;
    font-size: 14px !important;
    padding: 10px !important;
    text-align: center !important;
}

@media (max-width: 768px) {
    .search-overlay-content {
        width: 90%;
        top: 10%;
    }
    .search-box-large input {
        font-size: 18px;
        padding: 12px 40px 12px 20px;
    }
    .ajax-result-item span {
        font-size: 15px;
    }
}
    .news-main-media {
        border-radius: 8px !important;
        margin: 15px 0 !important;
        width: 100% !important;
    }

    .news-main-media img {
        width: 100% !important;
        height: auto !important;
    }

    .article-content {
        font-size: 17px !important;
        line-height: 1.7 !important;
    }

    .article-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    aside {
        margin-top: 30px !important;
        width: 100% !important;
    }
}

/* Premium Unique Footer */
footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 0;
    font-family: var(--font-bn);
}

.footer-top {
    background: #f8f9fa;
    border-bottom: 1px solid #eef0f2;
    padding: 10px 0;
}

.footer-nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.footer-nav-links li {
    font-size: 14px;
    color: #555;
    position: relative;
}

.footer-nav-links li:not(:last-child)::after {
    content: '|';
    margin-left: 15px;
    color: #ccc;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    transition: 0.3s;
}

.social-circle:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.footer-middle {
    padding: 35px 0;
    background: #fff;
}

.footer-info-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-brand img {
    max-height: 70px;
    width: auto;
}

.editorial-info {
    text-align: left;
    color: #444;
}

.editorial-info p {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
    font-weight: 500;
}

.editorial-info span {
    font-weight: 700;
    color: #222;
}

.footer-bottom-unique {
    background: #000;
    color: #fff;
    padding: 12px 0;
    font-size: 13px;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom-unique a {
    color: #ff9800;
    font-weight: 700;
}

@media (max-width: 768px) {
    .footer-info-grid {
        flex-direction: column;
        text-align: center;
    }
    .editorial-info {
        text-align: center;
    }
    .footer-nav-links {
        justify-content: center;
    }
    .footer-social {
        justify-content: center;
        margin-top: 15px;
    }
    .footer-bottom-flex {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Swiper Slider Overrides */
.featured-slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.featured-slider .swiper-slide {
    position: relative;
}

.featured-slider .swiper-button-next,
.featured-slider .swiper-button-prev {
    color: #fff !important;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.featured-slider .swiper-button-next:after,
.featured-slider .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.featured-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

.featured-slider .swiper-pagination-bullet-active {
    background: #bd0202; /* Red color matching the theme */
    opacity: 1;
    width: 25px;
    border-radius: 5px;
}

@media (max-width: 991px) {
    .featured-slider .swiper-button-next,
    .featured-slider .swiper-button-prev {
        display: none !important;
    }
}


/* Fix all link colors */
a { text-decoration: none !important; color: inherit; }
.news-title a, .title a, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: #222 !important;
}
.news-title a:hover, .title a:hover, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    color: var(--primary, #e00000) !important;
}
.news-overlay h2, .news-overlay p {
    color: #fff !important;
}

/* =========================================
   ARTICLE BODY PREMIUM READABILITY & JUSTIFY
   ========================================= */
.article-content, .article-content p, .article-content div, .article-content span {
    color: #111111 !important;
    text-align: justify !important;
    font-family: 'SolaimanLipi', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0 !important;
}

.article-content {
    font-size: 18px !important;
    line-height: 1.65 !important;
}

.article-content p {
    margin-bottom: 16px !important;
}

/* Dark Mode Support for Article Text */
.dark-mode .article-content, .dark-mode .article-content p, .dark-mode .article-content div, .dark-mode .article-content span {
    color: #e2e8f0 !important;
}

/* Mobile Adjustments for Article Text */
@media (max-width: 768px) {
    .article-content {
        font-size: 17px !important;
        line-height: 1.55 !important;
    }
}
/* =========================================
   BREADCRUMB FONT OVERRIDE
   ========================================= */
.news-breadcrumb, .news-breadcrumb a, .news-breadcrumb span {
    font-family: 'SolaimanLipi', sans-serif !important;
}
/* =========================================
   ARTICLE META FONT OVERRIDE
   ========================================= */
.article-meta, .article-meta span, .article-meta a, .publish-info, .meta-info, .meta-text, .reporter-name, .social-share .share-label {
    font-family: 'SolaimanLipi', sans-serif !important;
}

/* =========================================
   MOBILE MENU - COMPLETE FIX
   ========================================= */
@media (max-width: 991px) {

    /* Hide desktop header on mobile */
    header.d-none.d-lg-block { display: none !important; }

    /* Fix body padding for fixed nav */
    body { padding-top: 56px !important; }

    /* Nav takes full width on mobile */
    #main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: #1a1a1a !important;
        border-top: none !important;
        padding: 0 !important;
    }

    .nav-container {
        width: 100% !important;
        padding: 5px 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Show hamburger */
    .mobile-menu-toggle {
        display: block !important;
        order: 1;
        font-size: 22px;
        color: #fff !important;
        cursor: pointer;
        padding: 8px;
    }

    /* Show sticky logo in nav on mobile */
    .sticky-logo {
        order: 2;
        display: block !important;
        margin: 0 auto;
    }

    .sticky-logo img {
        height: 38px;
        width: auto;
    }

    /* Search icon on right */
    .desktop-search-icon {
        order: 3;
        color: #fff !important;
    }

    /* Mobile dropdown nav */
    #nav-menu {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        background: #ffffff !important;
        box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important;
        padding: 10px 0 !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        z-index: 9998 !important;
    }

    #nav-menu.active {
        display: flex !important;
    }

    #nav-menu > li {
        width: 100% !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    #nav-menu > li > a {
        padding: 12px 20px !important;
        width: 100% !important;
        display: block !important;
        font-size: 16px !important;
        color: #111 !important;
        border-bottom: none !important;
    }

    #nav-menu > li:hover > a,
    #nav-menu > li.active > a {
        color: #e00000 !important;
        background: #f9f9f9 !important;
        border-bottom: none !important;
    }

    /* Mobile Dropdown sub-menu */
    .dropdown-content {
        position: static !important;
        display: none !important;
        box-shadow: none !important;
        border: none !important;
        background: #f4f4f4 !important;
        padding-left: 20px !important;
        border-top: 3px solid #005000 !important;
    }

    .dropdown.active .dropdown-content {
        display: block !important;
    }

    .dropdown-content a {
        padding: 10px 15px !important;
        font-size: 15px !important;
        border-bottom: 1px solid #e8e8e8 !important;
    }

    /* Hide "margin-left: auto" search li item */
    #nav-menu > li:last-child {
        display: none !important;
    }
}

/* Hide duplicate mobile header - nav bar handles mobile already */
@media (max-width: 991px) {
    header.d-block.d-lg-none {
        display: none !important;
    }
}