/*
Theme Name:   Flex Mag Child
Theme URI:    https://themeforest.net/user/mvpthemes/
Description:  Flex Mag Child Theme
Author:       MVP Themes
Author URI:   https://themeforest.net/user/mvpthemes/portfolio
Template:     flex-mag
Version:      1.2.0
License:      GNU General Public License v3 or later
License URI:  http://www.gnu.org/licenses/gpl-3.0.html
Tags:         two-columns, custom-background, custom-colors, custom-menu, featured-images, theme-options, threaded-comments, translation-ready
Text Domain:  flex-mag-child
*/

/* ==========================================================================
   StockPil UI Fixes - Desktop & Mobile
   ========================================================================== */

/* --- Hide hamburger menu on desktop --- */
@media screen and (min-width: 992px) {
    .fly-but-wrap.left.relative {
        display: none !important;
    }
    .nav-logo {
        width: 250px;
    }
}

/* --- Hide "Featured News" title (redundant) --- */
#tab-col1 > .side-title-wrap.left.relative {
    display: none;
}

/* --- Featured image full height on posts --- */
#post-feat-img {
    height: 100% !important;
    max-height: 100% !important;
}

/* --- Hide view counts --- */
.feat-info-views,
.feat-info-wrap {
    display: none;
}

/* --- Homepage widget spacing --- */
.home-widget {
    margin-bottom: 25px;
}

.blog-widget-wrap {
    margin-bottom: 10px;
}

/* --- Featured cards --- */
.feat-wide5-main {
    overflow: hidden;
}

.feat-wide5-text h2 {
    font-size: 0.95rem;
    line-height: 140%;
}

/* --- Blog widget text truncation --- */
.blog-widget-text h2 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-widget-text p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Newsletter + sidebar --- */
.hustle-inline .hustle-layout {
    border-radius: 8px;
}

.side-widget .wp-block-image img {
    border-radius: 4px;
}

.home-right-col #sidebar-wrap:empty {
    display: none;
}

/* --- Desktop 3-column homepage layout fix --- */
@media screen and (min-width: 768px) {
    .home-wrap-out1 {
        display: flex !important;
        flex-wrap: nowrap !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    .home-wrap-in1 {
        flex: 1 1 0% !important;
        margin-right: 15px !important;
        min-width: 0;
    }
    .home-right-col {
        flex: 0 0 300px !important;
        width: 300px !important;
        float: none !important;
        margin-left: 0 !important;
    }
}
@media screen and (min-width: 1100px) {
    .home-wrap-out2 {
        display: flex !important;
        flex-wrap: nowrap !important;
        margin-left: 0 !important;
        width: 100% !important;
        float: none !important;
    }
    .home-wrap-in2 {
        flex: 1 1 0% !important;
        margin-left: 15px !important;
        min-width: 0;
    }
    .home-mid-col {
        flex: 0 0 300px !important;
        width: 300px !important;
        float: none !important;
        order: -1;
        margin-right: 0 !important;
    }
}

/* ==========================================================================
   FOOTER REDESIGN — Google News / E-E-A-T Compliant (2025-2026)
   ========================================================================== */

/* --- Reset parent theme footer styles we're overriding --- */
footer#foot-wrap.stockpil-footer {
    background: #0b2442;
    margin-top: 40px;
    width: 100%;
}

.stockpil-footer #foot-top-wrap {
    background: #0b2442;
    width: 100%;
    padding: 50px 0 30px;
}

.stockpil-footer #foot-widget-wrap {
    display: none !important;
}

/* --- Footer Grid: 4 columns on desktop --- */
.sp-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.8fr 1fr;
    gap: 40px;
    width: 100%;
}

/* --- Column 1: Brand --- */
.sp-footer-brand {
    padding-right: 20px;
}

.sp-footer-logo {
    margin-bottom: 18px;
    line-height: 0;
}

.sp-footer-logo img {
    max-width: 220px;
    height: auto;
    width: auto;
    display: block;
}

.sp-footer-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 400;
}

.sp-footer-desc p {
    margin: 0;
    padding: 0;
}

/* --- Social Icons --- */
.sp-footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sp-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 15px;
    transition: all 0.25s ease;
    text-decoration: none;
    font-weight: 400;
}

.sp-footer-social a:hover {
    background: #eb0254;
    color: #fff;
    transform: translateY(-2px);
}

/* --- Column Headings --- */
.sp-footer-heading {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eb0254;
    display: inline-block;
}

/* --- Footer Link Lists --- */
.sp-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-footer-links li {
    margin-bottom: 10px;
}

.sp-footer-links li a {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
    line-height: 1.4;
}

.sp-footer-links li a:hover {
    color: #fff;
    padding-left: 4px;
}

/* --- Footer Bottom Bar --- */
.stockpil-footer #foot-bot-wrap {
    background: #091b36;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sp-footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.sp-footer-copyright {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 8px;
}

.sp-footer-copyright a {
    color: #94a3b8;
    font-weight: 400;
}

.sp-footer-copyright a:hover {
    color: #fff;
}

.sp-footer-disclaimer-text {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto;
}


/* ==========================================================================
   FOOTER — Tablet Responsive (< 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .sp-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px 30px;
    }

    .sp-footer-brand {
        grid-column: 1 / -1;
        padding-right: 0;
        text-align: center;
    }

    .sp-footer-logo {
        display: flex;
        justify-content: center;
    }

    .sp-footer-desc {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .sp-footer-social {
        justify-content: center;
    }
}


/* ==========================================================================
   FOOTER — Mobile Responsive (< 768px)
   ========================================================================== */
@media screen and (max-width: 767px) {
    .stockpil-footer #foot-top-wrap {
        padding: 35px 0 20px;
    }

    .sp-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .sp-footer-brand {
        padding-right: 0;
    }

    .sp-footer-logo img {
        max-width: 180px;
        margin: 0 auto;
    }

    .sp-footer-desc {
        max-width: 400px;
        font-size: 0.82rem;
    }

    .sp-footer-social {
        justify-content: center;
    }

    .sp-footer-heading {
        display: block;
        text-align: center;
        margin-bottom: 14px;
        padding-bottom: 8px;
    }

    .sp-footer-links {
        text-align: center;
    }

    .sp-footer-links li {
        margin-bottom: 8px;
    }

    .sp-footer-links li a:hover {
        padding-left: 0;
    }

    .sp-footer-bottom {
        padding: 16px 0;
    }

    .sp-footer-copyright {
        font-size: 0.72rem;
    }

    .sp-footer-disclaimer-text {
        font-size: 0.68rem;
        padding: 0 10px;
    }

    /* Featured cards on mobile */
    .feat-wide5-main {
        width: 50% !important;
    }

    .feat-wide5-text h2 {
        font-size: 0.8rem;
        line-height: 130%;
        padding: 8px 10px;
    }

    .feat-wide5-text .feat-cat {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .blog-widget-text h2 {
        font-size: 0.9rem;
    }

    .blog-widget-text p {
        font-size: 0.8rem;
    }
}


/* ==========================================================================
   FOOTER — Small Mobile (< 480px)
   ========================================================================== */
@media screen and (max-width: 479px) {
    .sp-footer-logo img {
        max-width: 150px;
    }

    .sp-footer-grid {
        gap: 22px;
    }

    .sp-footer-social a {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .feat-wide5-main {
        width: 100% !important;
    }

    .feat-wide5-text h2 {
        font-size: 0.85rem;
    }
}


/* ==========================================================================
   MOBILE REDESIGN — Google News / Search Style
   Only affects screens <= 767px. Desktop untouched.
   ========================================================================== */

@media screen and (max-width: 767px) {

    /* --- Page background --- */
    #body-main-wrap,
    #home-main-wrap {
        background: #f0f2f5 !important;
    }

    /* --- Featured cards: vertical stack with rounded corners --- */
    #feat-top-wrap .feat-wide5-main,
    #feat-wide-wrap .feat-wide5-main {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 8px !important;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    #feat-top-wrap,
    #feat-wide-wrap {
        padding: 8px 12px !important;
        margin: 0 !important;
        background: #f0f2f5;
    }

    .feat-wide5-img {
        height: 180px !important;
        overflow: hidden;
    }

    .feat-wide5-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        margin-top: 0 !important;
    }

    .feat-wide5-text {
        background: #fff !important;
        padding: 10px 14px 12px !important;
        width: 100% !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        background-image: none !important;
    }

    .feat-wide5-text .feat-cat {
        background: #eb0254;
        color: #fff;
        font-size: 10px !important;
        font-weight: 700;
        text-transform: uppercase;
        padding: 3px 8px !important;
        border-radius: 4px;
        display: inline-block;
        margin-bottom: 6px;
    }

    #feat-top-wrap .feat-wide5-text h2,
    #feat-wide-wrap .feat-wide5-text h2 {
        font-size: 15px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        color: #202124 !important;
        padding: 0 !important;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* --- Homepage widget sections: BASE STYLES --- */
    #home-mid-wrap {
        padding: 0 !important;
    }

    .home-widget.mvp_catlist_widget {
        margin: 0 0 10px 0 !important;
        width: 100% !important;
        background: #fff;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        padding: 0 !important;
    }

    #home-mid-wrap .home-title-wrap {
        margin: 0 !important;
        padding: 16px 16px 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    #home-mid-wrap .home-title-wrap h3.side-list-title {
        font-size: 15px !important;
        font-weight: 800;
        color: #202124;
        margin: 0;
        padding: 0 0 10px 0;
        border-bottom: 3px solid #eb0254;
        display: inline-block;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-family: 'Montserrat', sans-serif;
    }

    .blog-widget-wrap {
        margin: 0 !important;
        width: 100% !important;
    }

    ul.blog-widget-list {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    ul.blog-widget-list li {
        padding: 12px 16px !important;
        border-bottom: 1px solid #f1f3f4;
        margin: 0 !important;
    }

    ul.blog-widget-list li:last-child {
        border-bottom: none;
    }

    .blog-widget-img {
        width: 90px !important;
        max-width: 90px !important;
        height: 68px;
        margin: 0 12px 0 0 !important;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .blog-widget-img img {
        width: 100% !important;
        height: 68px !important;
        object-fit: cover !important;
        border-radius: 8px;
    }

    .blog-widget-text {
        width: auto !important;
        flex: 1;
        min-width: 0;
    }

    .blog-widget-text .side-list-cat {
        font-size: 10px !important;
        font-weight: 700;
        color: #1a73e8;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin-bottom: 4px;
        display: block;
    }

    .blog-widget-text h2 {
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.35 !important;
        color: #202124 !important;
        margin: 0 !important;
        -webkit-line-clamp: 2 !important;
    }

    .blog-widget-text p {
        display: none !important;
    }

    ul.blog-widget-list li a {
        display: flex !important;
        align-items: flex-start;
        text-decoration: none;
    }

    /* =============================================
       UNIQUE CATEGORY STYLES (Mobile Only)
       ============================================= */

    /* --- 1. CRYPTOCURRENCY (#16): Hero card first post + list ---
       Orange accent, first post gets full-width image */
    #mvp_catlist_widget-16 {
        background: #fff !important;
        border-left: 4px solid #f7931a;
    }

    #mvp_catlist_widget-16 .home-title-wrap h3.side-list-title {
        border-bottom-color: #f7931a !important;
        color: #f7931a !important;
    }

    #mvp_catlist_widget-16 .blog-widget-list li:first-child {
        padding: 0 !important;
        border-bottom: none;
    }

    #mvp_catlist_widget-16 .blog-widget-list li:first-child a {
        flex-direction: column !important;
    }

    #mvp_catlist_widget-16 .blog-widget-list li:first-child .blog-widget-img {
        width: 100% !important;
        max-width: 100% !important;
        height: 180px;
        margin: 0 !important;
        border-radius: 0;
    }

    #mvp_catlist_widget-16 .blog-widget-list li:first-child .blog-widget-img img {
        height: 180px !important;
        border-radius: 0;
    }

    #mvp_catlist_widget-16 .blog-widget-list li:first-child .blog-widget-text {
        padding: 12px 16px !important;
    }

    #mvp_catlist_widget-16 .blog-widget-list li:first-child .blog-widget-text h2 {
        font-size: 16px !important;
        font-weight: 700 !important;
        -webkit-line-clamp: 3 !important;
    }

    #mvp_catlist_widget-16 .blog-widget-text .side-list-cat {
        color: #f7931a !important;
    }

    /* --- 2. FINANCE NEWS (#14): Green accent, card style ---
       Clean white with green left border */
    #mvp_catlist_widget-14 {
        border-left: 4px solid #0d9488;
    }

    #mvp_catlist_widget-14 .home-title-wrap h3.side-list-title {
        border-bottom-color: #0d9488 !important;
        color: #0d9488 !important;
    }

    #mvp_catlist_widget-14 .blog-widget-text .side-list-cat {
        color: #0d9488 !important;
    }

    #mvp_catlist_widget-14 ul.blog-widget-list li {
        border-bottom: 1px solid #e6f5f3 !important;
    }

    #mvp_catlist_widget-14 .blog-widget-img {
        border-radius: 10px;
    }

    #mvp_catlist_widget-14 .blog-widget-img img {
        border-radius: 10px;
    }

    /* --- 3. BUSINESS NEWS (#18): Dark header band ---
       Dark navy header with white title */
    #mvp_catlist_widget-18 {
        border: none;
        overflow: hidden;
    }

    #mvp_catlist_widget-18 .home-title-wrap {
        background: #1e293b !important;
        padding: 14px 16px 14px !important;
    }

    #mvp_catlist_widget-18 .home-title-wrap h3.side-list-title {
        color: #fff !important;
        border-bottom-color: #3b82f6 !important;
    }

    #mvp_catlist_widget-18 .blog-widget-text .side-list-cat {
        color: #3b82f6 !important;
    }

    #mvp_catlist_widget-18 .blog-widget-img {
        border-radius: 4px;
    }

    #mvp_catlist_widget-18 .blog-widget-img img {
        border-radius: 4px;
    }

    /* --- 4. FOREX NEWS (#15): Purple accent, 2-col grid first 2 posts --- */
    #mvp_catlist_widget-15 {
        border-left: 4px solid #7c3aed;
    }

    #mvp_catlist_widget-15 .home-title-wrap h3.side-list-title {
        border-bottom-color: #7c3aed !important;
        color: #7c3aed !important;
    }

    #mvp_catlist_widget-15 .blog-widget-text .side-list-cat {
        color: #7c3aed !important;
    }

    #mvp_catlist_widget-15 ul.blog-widget-list {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    #mvp_catlist_widget-15 .blog-widget-list li:first-child,
    #mvp_catlist_widget-15 .blog-widget-list li:nth-child(2) {
        padding: 8px !important;
        border-bottom: none;
        width: calc(50% - 4px) !important;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    #mvp_catlist_widget-15 .blog-widget-list li:nth-child(n+3) {
        width: 100% !important;
    }

    #mvp_catlist_widget-15 .blog-widget-list li:first-child a,
    #mvp_catlist_widget-15 .blog-widget-list li:nth-child(2) a {
        flex-direction: column !important;
    }

    #mvp_catlist_widget-15 .blog-widget-list li:first-child .blog-widget-img,
    #mvp_catlist_widget-15 .blog-widget-list li:nth-child(2) .blog-widget-img {
        width: 100% !important;
        max-width: 100% !important;
        height: 100px;
        margin: 0 0 8px 0 !important;
        border-radius: 10px;
    }

    #mvp_catlist_widget-15 .blog-widget-list li:first-child .blog-widget-img img,
    #mvp_catlist_widget-15 .blog-widget-list li:nth-child(2) .blog-widget-img img {
        height: 100px !important;
        border-radius: 10px;
    }

    #mvp_catlist_widget-15 .blog-widget-list li:first-child .blog-widget-text h2,
    #mvp_catlist_widget-15 .blog-widget-list li:nth-child(2) .blog-widget-text h2 {
        font-size: 12px !important;
        -webkit-line-clamp: 2 !important;
    }

    /* --- 5. AI NEWS (#17): Gradient header, modern tech feel --- */
    #mvp_catlist_widget-17 {
        border: none;
        overflow: hidden;
    }

    #mvp_catlist_widget-17 .home-title-wrap {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        padding: 14px 16px 14px !important;
    }

    #mvp_catlist_widget-17 .home-title-wrap h3.side-list-title {
        color: #fff !important;
        border-bottom-color: rgba(255,255,255,0.4) !important;
    }

    #mvp_catlist_widget-17 .blog-widget-text .side-list-cat {
        color: #764ba2 !important;
    }

    #mvp_catlist_widget-17 .blog-widget-img {
        border-radius: 50% !important;
        width: 60px !important;
        max-width: 60px !important;
        height: 60px !important;
    }

    #mvp_catlist_widget-17 .blog-widget-img img {
        height: 60px !important;
        border-radius: 50% !important;
    }

    /* --- 6. STOCKS NEWS (#13): Red accent, numbered list feel --- */
    #mvp_catlist_widget-13 {
        border-left: 4px solid #dc2626;
    }

    #mvp_catlist_widget-13 .home-title-wrap h3.side-list-title {
        border-bottom-color: #dc2626 !important;
        color: #dc2626 !important;
    }

    #mvp_catlist_widget-13 .blog-widget-text .side-list-cat {
        color: #dc2626 !important;
    }

    #mvp_catlist_widget-13 ul.blog-widget-list {
        counter-reset: stock-counter;
        list-style: none !important;
    }

    #mvp_catlist_widget-13 ul.blog-widget-list li {
        counter-increment: stock-counter;
        position: relative;
        padding-left: 44px !important;
    }

    #mvp_catlist_widget-13 ul.blog-widget-list li::before {
        content: counter(stock-counter);
        position: absolute;
        left: 16px;
        top: 16px;
        font-size: 18px;
        font-weight: 800;
        color: #fecaca;
        font-family: 'Montserrat', sans-serif;
    }

    /* --- 7. TECHNOLOGY NEWS (#19): Full-width stacked image cards --- */
    #mvp_catlist_widget-19 {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0;
    }

    #mvp_catlist_widget-19 .home-title-wrap h3.side-list-title {
        border-bottom-color: #0ea5e9 !important;
        color: #0ea5e9 !important;
    }

    #mvp_catlist_widget-19 .blog-widget-text .side-list-cat {
        color: #0ea5e9 !important;
    }

    #mvp_catlist_widget-19 ul.blog-widget-list li {
        padding: 8px 12px !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    #mvp_catlist_widget-19 ul.blog-widget-list li a {
        flex-direction: column !important;
    }

    #mvp_catlist_widget-19 .blog-widget-img {
        width: 100% !important;
        max-width: 100% !important;
        height: 140px;
        margin: 0 0 10px 0 !important;
        border-radius: 10px;
    }

    #mvp_catlist_widget-19 .blog-widget-img img {
        height: 140px !important;
        border-radius: 10px;
    }

    #mvp_catlist_widget-19 .blog-widget-text h2 {
        font-size: 15px !important;
        font-weight: 700 !important;
    }

    /* --- 8. PRESS RELEASE (#11): Minimal editorial style, dashed border --- */
    #mvp_catlist_widget-11 {
        background: #fffbeb !important;
        border-left: 4px solid #d97706;
        border-top: 2px dashed #fbbf24;
    }

    #mvp_catlist_widget-11 .home-title-wrap h3.side-list-title {
        border-bottom-color: #d97706 !important;
        color: #92400e !important;
        text-transform: uppercase !important;
        letter-spacing: 1.5px !important;
        font-size: 11px !important;
    }

    #mvp_catlist_widget-11 .blog-widget-text .side-list-cat {
        color: #d97706 !important;
        font-style: italic;
    }

    #mvp_catlist_widget-11 .blog-widget-text h2 {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #78350f !important;
    }

    #mvp_catlist_widget-11 .blog-widget-img {
        border-radius: 4px !important;
        border: 1px solid #fde68a;
    }

    /* --- Tab bar (Featured/Latest/Popular) redesign as pills --- */
    .col-tabs-wrap {
        background: #fff !important;
        border-bottom: 1px solid #e0e0e0;
        position: sticky;
        top: 50px;
        z-index: 99;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    ul.col-tabs {
        display: flex !important;
        gap: 0;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none;
        width: 100% !important;
    }

    ul.col-tabs li {
        flex: 1;
        text-align: center;
        margin: 0 !important;
        padding: 0 !important;
    }

    ul.col-tabs li a {
        display: block;
        padding: 12px 8px;
        font-size: 13px;
        font-weight: 600;
        color: #5f6368;
        text-decoration: none;
        border-bottom: 3px solid transparent;
        transition: all 0.2s ease;
        font-family: 'Montserrat', sans-serif;
    }

    ul.col-tabs li a:hover,
    ul.col-tabs li.ui-tabs-active a,
    ul.col-tabs li.ui-state-active a {
        color: #1a73e8;
        border-bottom-color: #1a73e8;
    }

    /* --- Flyout menu: must sit above header --- */
    #fly-wrap {
        z-index: 99999 !important;
    }

    /* --- Navigation bar: center logo on mobile --- */
    #main-nav-wrap {
        box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    }

    /* --- Mobile header: burger | logo (centered) | search --- */
    #main-nav-cont .nav-logo-out {
        float: none !important;
        margin-left: 0 !important;
        width: 100% !important;
        position: relative !important;
    }

    #main-nav-cont .nav-logo-out .nav-left-wrap {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        float: none !important;
        height: 50px !important;
    }

    #main-nav-cont .nav-logo-out .nav-left-wrap .fly-but-wrap {
        flex-shrink: 0 !important;
        float: none !important;
        margin-left: 10px !important;
    }

    #main-nav-cont .nav-left-wrap .nav-logo.left {
        flex: 1 !important;
        width: auto !important;
        text-align: center !important;
        padding: 5px 0 !important;
        float: none !important;
    }

    #main-nav-cont .nav-logo img {
        max-height: 44px;
        width: auto;
        display: inline-block !important;
    }

    /* Show search icon in nav bar, pull it out of nav-logo-in */
    #main-nav-cont .nav-logo-in {
        margin-left: 0 !important;
        position: static !important;
        width: auto !important;
        float: none !important;
    }

    #main-nav-cont .nav-menu-out {
        position: static !important;
    }

    #main-nav-cont .nav-right-wrap {
        position: absolute !important;
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: auto !important;
        z-index: 10 !important;
    }

    #main-nav-cont .nav-right-wrap .nav-search-wrap {
        float: none !important;
    }

    #main-nav-cont .nav-right-wrap .nav-search-but {
        float: none !important;
        display: block !important;
        color: #fff !important;
        font-size: 18px !important;
    }

    /* Hide social icons in nav bar, keep only search */
    #main-nav-cont .nav-right-wrap > a {
        display: none !important;
    }

    /* Search dropdown should appear properly */
    #main-nav-cont .search-fly-wrap {
        position: absolute !important;
        right: 0 !important;
        top: 100% !important;
        width: 250px !important;
        z-index: 99999 !important;
    }

    /* --- Infinite scroll button --- */
    .inf-more-but {
        display: block !important;
        margin: 16px 14px !important;
        padding: 14px !important;
        background: #1a73e8 !important;
        color: #fff !important;
        text-align: center;
        border-radius: 8px !important;
        font-size: 14px;
        font-weight: 600;
        font-family: 'Montserrat', sans-serif;
        text-decoration: none;
        border: none;
    }

    /* --- General spacing fixes --- */
    .home-wrap-out1,
    .home-wrap-in1 {
        margin: 0 !important;
        padding: 0 !important;
    }

    #home-left-wrap {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .home-wrap-out2,
    .home-wrap-in2 {
        margin: 0 !important;
        padding: 0 !important;
    }

    .home-left-col {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* --- Widget wrapper padding --- */
    #home-mid-wrap .home-widget {
        margin: 0 12px 8px !important;
        width: calc(100% - 24px) !important;
    }

    /* --- Hide redundant "Featured News" title from child CSS --- */
    #tab-col1 > .side-title-wrap.left.relative {
        display: none !important;
    }

    /* --- Featured widget (image + text card) in sidebar --- */
    .feat-widget-wrap {
        background: #fff;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 8px !important;
    }

    .feat-widget-img {
        height: 160px !important;
        max-height: none !important;
        width: 100% !important;
    }

    .feat-widget-img img {
        width: 100% !important;
        height: 160px !important;
        object-fit: cover !important;
    }

    .feat-widget-text {
        padding: 12px 14px !important;
        width: 100% !important;
        margin: 0 !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .feat-widget-text h2 {
        font-size: 15px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        color: #202124 !important;
    }

    /* --- Hustle (newsletter) widget --- */
    .hustle-inline {
        margin: 8px 12px !important;
        border-radius: 12px;
        overflow: hidden;
    }

    /* --- Prevent horizontal overflow --- */
    #site,
    #site-wrap,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

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

    /* Override parent 479px hide — keep real images, hide lazy SVG placeholders */
    .feat-wide5-img img.reg-img,
    #feat-top-wrap img.reg-img,
    #feat-wide-wrap img.reg-img,
    .blog-widget-img img.widget-img-main {
        display: block !important;
    }

    .feat-wide5-img img.mob-img,
    #feat-top-wrap img.mob-img,
    #feat-wide-wrap img.mob-img,
    .blog-widget-img img.widget-img-side {
        display: none !important;
    }
}
