/* Salafiyyah Modern Home v2.2.0
   Non-destructive redesign for the legacy YOOtheme/Warp homepage. */

body.smh-home-modern {
    --smh-bg: #f4f7f6;
    --smh-surface: #ffffff;
    --smh-ink: #17231f;
    --smh-text: #394740;
    --smh-muted: #7d8b84;
    --smh-line: #dfe8e4;
    --smh-teal: #0b8879;
    --smh-teal-dark: #075f56;
    --smh-gold: #b59a58;
    --smh-header: #171b1d;
    --smh-soft: #eef6f3;
    --smh-shadow: 0 18px 48px rgba(15, 42, 34, .08);

    margin: 0 !important;
    background: var(--smh-bg) !important;
    color: var(--smh-text);
    overflow-x: hidden;
}

body.smh-home-modern * { box-sizing: border-box; }

body.smh-home-modern a { transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }

/* ---------- Header ---------- */
body.smh-home-modern #block-header,
body.smh-home-modern #header {
    background:
        radial-gradient(circle at 50% 20%, rgba(181,154,88,.08), transparent 36%),
        linear-gradient(180deg, #191d1f 0%, #131719 100%) !important;
    color: #fff;
}

body.smh-home-modern #header {
    width: 100% !important;
    max-width: none !important;
    padding: 28px 0 0 !important;
}

body.smh-home-modern #headerbar {
    min-height: 185px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 20px 24px !important;
    background: transparent !important;
}

body.smh-home-modern #logo {
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,.16));
}

body.smh-home-modern #logo img {
    width: auto !important;
    height: auto !important;
    max-width: 235px !important;
    max-height: 155px !important;
    display: block !important;
}

/* ---------- Desktop menu ---------- */
body.smh-home-modern #menubar {
    position: relative;
    width: min(1260px, calc(100vw - 48px)) !important;
    min-height: 68px !important;
    margin: 0 auto 24px !important;
    padding: 8px 90px 8px 18px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 16px 42px rgba(0,0,0,.18) !important;
    backdrop-filter: blur(10px);
    z-index: 9990;
}

body.smh-home-modern #menubar.smh-is-fixed {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    box-shadow: 0 16px 46px rgba(14,35,29,.16) !important;
}

body.smh-home-modern .smh-menu-spacer { width: 100%; }

body.smh-home-modern #menu,
body.smh-home-modern #menu ul,
body.smh-home-modern #menubar > ul {
    background: transparent !important;
}

body.smh-home-modern #menubar #menu {
    min-height: 50px;
}

body.smh-home-modern #menubar #menu > ul,
body.smh-home-modern #menubar > ul {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.smh-home-modern #menubar #menu > ul > li,
body.smh-home-modern #menubar > ul > li {
    position: relative !important;
    border: 0 !important;
    background: transparent !important;
}

body.smh-home-modern #menubar #menu > ul > li > a,
body.smh-home-modern #menubar > ul > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    padding: 7px 13px !important;
    border-radius: 12px !important;
    border: 1px solid transparent !important;
    color: #26342f !important;
    background: transparent !important;
    text-shadow: none !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

body.smh-home-modern #menubar #menu > ul > li:hover > a,
body.smh-home-modern #menubar #menu > ul > li.active > a,
body.smh-home-modern #menubar #menu > ul > li.current > a,
body.smh-home-modern #menubar > ul > li:hover > a {
    background: var(--smh-soft) !important;
    border-color: #d6ebe5 !important;
    color: var(--smh-teal-dark) !important;
}

body.smh-home-modern #menubar ul ul,
body.smh-home-modern #menubar .dropdown,
body.smh-home-modern #menubar .sub-menu,
body.smh-home-modern #menubar .nav-child {
    min-width: 240px !important;
    padding: 10px !important;
    border: 1px solid var(--smh-line) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: var(--smh-shadow) !important;
    z-index: 10020 !important;
}

body.smh-home-modern #menubar ul ul a,
body.smh-home-modern #menubar .dropdown a,
body.smh-home-modern #menubar .sub-menu a,
body.smh-home-modern #menubar .nav-child a {
    display: block !important;
    padding: 10px 12px !important;
    border-radius: 9px !important;
    color: #34433d !important;
    background: #fff !important;
    white-space: nowrap;
}

body.smh-home-modern #menubar ul ul a:hover,
body.smh-home-modern #menubar .dropdown a:hover,
body.smh-home-modern #menubar .sub-menu a:hover,
body.smh-home-modern #menubar .nav-child a:hover {
    background: var(--smh-soft) !important;
    color: var(--smh-teal-dark) !important;
}

body.smh-home-modern .smh-nav-brand {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.smh-home-modern .smh-nav-brand img {
    display: block;
    max-width: 58px;
    max-height: 48px;
    object-fit: contain;
}

/* ---------- Search ---------- */
body.smh-home-modern #search,
body.smh-home-modern .searchbox,
body.smh-home-modern #menubar form {
    border-radius: 999px !important;
}

body.smh-home-modern #search input,
body.smh-home-modern .searchbox input,
body.smh-home-modern #menubar input[type="search"],
body.smh-home-modern #menubar input[type="text"] {
    min-height: 40px !important;
    padding: 7px 14px !important;
    border: 1px solid var(--smh-line) !important;
    border-radius: 999px !important;
    background: #f9fbfa !important;
    color: var(--smh-ink) !important;
    box-shadow: inset 0 1px 0 rgba(10,40,31,.025) !important;
    outline: 0 !important;
}

body.smh-home-modern #search input:focus,
body.smh-home-modern .searchbox input:focus,
body.smh-home-modern #menubar input:focus {
    border-color: #a8d3c8 !important;
    box-shadow: 0 0 0 4px rgba(11,136,121,.08) !important;
}

/* ---------- Main canvas ---------- */
body.smh-home-modern #block-main {
    background: var(--smh-bg) !important;
    padding: 20px 0 70px !important;
}

body.smh-home-modern #block-main > .wrapper,
body.smh-home-modern #main {
    width: min(1260px, calc(100vw - 48px)) !important;
    max-width: 1260px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.smh-home-modern #main {
    display: grid !important;
    grid-template-columns: 250px minmax(0, 1fr) 250px !important;
    grid-template-areas: "left center right" !important;
    gap: 24px !important;
    align-items: start !important;
}

body.smh-home-modern #maininner {
    grid-area: center !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.smh-home-modern #sidebar-a {
    grid-area: right !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.smh-home-modern #sidebar-b {
    grid-area: left !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.smh-home-modern #content,
body.smh-home-modern #system {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* ---------- Card language ---------- */
body.smh-home-modern #main .module,
body.smh-home-modern #main .mod-box,
body.smh-home-modern #main .smh-card {
    margin: 0 0 22px !important;
    padding: 18px !important;
    border: 1px solid var(--smh-line) !important;
    border-radius: 18px !important;
    background: var(--smh-surface) !important;
    color: var(--smh-text) !important;
    box-shadow: 0 12px 34px rgba(15,42,34,.055) !important;
    overflow: hidden;
}

body.smh-home-modern #main .module-title,
body.smh-home-modern #main h3.module-title,
body.smh-home-modern #main .title {
    margin: -18px -18px 16px !important;
    padding: 13px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--smh-line) !important;
    background: linear-gradient(135deg, #0b8b7b, #0a6f64) !important;
    color: #fff !important;
    border-radius: 18px 18px 0 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    font-size: 17px !important;
    line-height: 1.55 !important;
}

body.smh-home-modern #main .module a,
body.smh-home-modern #main .mod-box a {
    color: var(--smh-teal-dark);
}

body.smh-home-modern #main .module a:hover,
body.smh-home-modern #main .mod-box a:hover {
    color: #9b7736;
}

/* ---------- Center showcase ---------- */
body.smh-home-modern #maininner > .grid-block:first-child,
body.smh-home-modern #content > .module:first-child,
body.smh-home-modern .smh-showcase {
    border-radius: 20px !important;
    overflow: hidden !important;
}

body.smh-home-modern .smh-showcase,
body.smh-home-modern .wk-slideshow,
body.smh-home-modern .wk-slideshow-default,
body.smh-home-modern .slideshow,
body.smh-home-modern .nivoSlider,
body.smh-home-modern .flexslider {
    background: #fff !important;
    border: 1px solid var(--smh-line) !important;
    border-radius: 20px !important;
    box-shadow: var(--smh-shadow) !important;
}

body.smh-home-modern .smh-showcase img,
body.smh-home-modern .wk-slideshow img,
body.smh-home-modern .slideshow img,
body.smh-home-modern .nivoSlider img,
body.smh-home-modern .flexslider img {
    width: 100% !important;
    height: auto !important;
    max-height: 470px !important;
    object-fit: cover !important;
}

/* Modernise home article/thumb blocks without assuming one extension. */
body.smh-home-modern #content img {
    max-width: 100% !important;
    height: auto !important;
}

body.smh-home-modern #content .article,
body.smh-home-modern #content article,
body.smh-home-modern #content .item,
body.smh-home-modern #content .teaser-item {
    border-radius: 16px !important;
}

body.smh-home-modern #content .items-row,
body.smh-home-modern #content .grid-block {
    gap: 18px;
}

/* ---------- Sidebar lists ---------- */
body.smh-home-modern #sidebar-a ul,
body.smh-home-modern #sidebar-b ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body.smh-home-modern #sidebar-a li,
body.smh-home-modern #sidebar-b li {
    padding: 10px 2px !important;
    border-bottom: 1px solid #edf2f0 !important;
}

body.smh-home-modern #sidebar-a li:last-child,
body.smh-home-modern #sidebar-b li:last-child { border-bottom: 0 !important; }

/* ---------- Legacy floating social rail ---------- */
body.smh-home-modern .socialbuttons,
body.smh-home-modern .social-icons-fixed,
body.smh-home-modern .social-fixed,
body.smh-home-modern #social-icons,
body.smh-home-modern #socialbuttons {
    opacity: .78;
    filter: saturate(.85);
    transition: opacity .2s ease;
}
body.smh-home-modern .socialbuttons:hover,
body.smh-home-modern .social-icons-fixed:hover,
body.smh-home-modern #social-icons:hover { opacity: 1; }

/* ---------- Footer ---------- */
body.smh-home-modern #block-footer,
body.smh-home-modern #footer,
body.smh-home-modern .smh-footer {
    background:
        radial-gradient(circle at 50% 0%, rgba(11,136,121,.12), transparent 28%),
        #101917 !important;
    color: #dce6e2 !important;
    border-top: 3px solid var(--smh-teal) !important;
}

body.smh-home-modern #footer,
body.smh-home-modern .smh-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 42px max(24px, calc((100vw - 1180px)/2)) !important;
}

body.smh-home-modern #footer a,
body.smh-home-modern .smh-footer a { color: #eef6f3 !important; }
body.smh-home-modern #footer a:hover,
body.smh-home-modern .smh-footer a:hover { color: #d5ba74 !important; }

/* ---------- Mobile shell ---------- */
.smh-mobile-header,
.smh-mobile-drawer,
.smh-mobile-overlay,
.smh-mobile-search { display: none; }

@media (max-width: 1100px) {
    body.smh-home-modern #main {
        grid-template-columns: minmax(0, 1fr) 250px !important;
        grid-template-areas:
            "center right"
            "center left" !important;
    }
}

@media (max-width: 960px) {
    body.smh-home-modern { padding-top: 66px !important; }

    body.smh-home-modern #block-header,
    body.smh-home-modern #header { padding-top: 0 !important; }

    body.smh-home-modern #headerbar,
    body.smh-home-modern #menubar { display: none !important; }

    .smh-mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 11000;
        height: 66px;
        padding: 7px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        background: rgba(255,255,255,.97);
        border-bottom: 1px solid var(--smh-line);
        box-shadow: 0 9px 28px rgba(15,42,34,.09);
        backdrop-filter: blur(12px);
    }

    .smh-mobile-brand { display: flex; align-items: center; min-width: 0; }
    .smh-mobile-brand img { display: block; width: auto; height: 50px; max-width: 160px; object-fit: contain; }
    .smh-mobile-brand span { color: var(--smh-teal-dark); font-size: 25px; }

    .smh-mobile-controls { display: flex; align-items: center; gap: 8px; }
    .smh-mobile-controls button,
    .smh-drawer-close {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #dbe6e2;
        border-radius: 12px;
        background: #f7faf9;
        color: var(--smh-teal-dark);
        cursor: pointer;
    }

    .smh-menu-toggle { flex-direction: column; gap: 4px; }
    .smh-menu-toggle span { width: 18px; height: 2px; border-radius: 9px; background: currentColor; display: block; }

    .smh-mobile-overlay {
        position: fixed;
        inset: 0;
        display: block;
        z-index: 10980;
        background: rgba(5,14,11,.52);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .smh-mobile-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 11020;
        width: min(86vw, 370px);
        display: block;
        padding: 0 16px 30px;
        background: #fff;
        transform: translateX(102%);
        transition: transform .24s ease;
        overflow-y: auto;
        box-shadow: -18px 0 50px rgba(0,0,0,.16);
        direction: rtl;
    }

    .smh-drawer-top {
        min-height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid var(--smh-line);
        color: var(--smh-teal-dark);
        font-size: 20px;
    }

    .smh-mobile-menu-list,
    .smh-mobile-menu-list ul { list-style: none !important; margin: 0 !important; padding: 10px 0 0 !important; }
    .smh-mobile-menu-list li { border-bottom: 1px solid #edf2f0; }
    .smh-mobile-menu-list a {
        display: block;
        padding: 13px 8px;
        color: #26342f !important;
        font-size: 17px;
        line-height: 1.55;
        text-decoration: none !important;
    }
    .smh-mobile-menu-list ul { display: none; padding: 0 14px 9px 0 !important; }
    .smh-mobile-menu-list ul a { padding: 9px 7px; font-size: 15px; color: #56645e !important; }
    .smh-mobile-menu-list .smh-has-children > a:before { content: '⌄'; float: left; color: #8a9992; }

    .smh-mobile-search {
        position: fixed;
        top: 76px;
        left: 14px;
        right: 14px;
        z-index: 11010;
        display: block;
        padding: 14px;
        background: #fff;
        border: 1px solid var(--smh-line);
        border-radius: 16px;
        box-shadow: var(--smh-shadow);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease;
    }

    .smh-mobile-search form { display: flex; gap: 8px; direction: rtl; }
    .smh-mobile-search input {
        min-width: 0;
        flex: 1;
        height: 46px;
        padding: 8px 14px;
        border: 1px solid var(--smh-line);
        border-radius: 12px;
        outline: 0;
    }
    .smh-mobile-search button {
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 12px;
        background: var(--smh-teal);
        color: #fff;
    }

    body.smh-drawer-open .smh-mobile-overlay,
    body.smh-search-open .smh-mobile-overlay { opacity: 1; pointer-events: auto; }
    body.smh-drawer-open .smh-mobile-drawer { transform: translateX(0); }
    body.smh-search-open .smh-mobile-search { opacity: 1; transform: translateY(0); pointer-events: auto; }
    body.smh-drawer-open,
    body.smh-search-open { overflow: hidden; }

    body.smh-home-modern #block-main { padding-top: 16px !important; }
    body.smh-home-modern #block-main > .wrapper,
    body.smh-home-modern #main { width: calc(100vw - 28px) !important; }

    body.smh-home-modern #main {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "center"
            "right"
            "left" !important;
        gap: 18px !important;
    }

    body.smh-home-modern #main .module,
    body.smh-home-modern #main .mod-box,
    body.smh-home-modern #main .smh-card {
        margin-bottom: 16px !important;
        padding: 16px !important;
        border-radius: 16px !important;
    }

    body.smh-home-modern #main .module-title,
    body.smh-home-modern #main h3.module-title,
    body.smh-home-modern #main .title {
        margin: -16px -16px 14px !important;
        border-radius: 16px 16px 0 0 !important;
    }

    body.smh-home-modern .smh-showcase,
    body.smh-home-modern .wk-slideshow,
    body.smh-home-modern .slideshow,
    body.smh-home-modern .nivoSlider,
    body.smh-home-modern .flexslider { border-radius: 16px !important; }

    body.smh-home-modern #footer,
    body.smh-home-modern .smh-footer { padding: 34px 22px !important; }
}

@media (max-width: 520px) {
    .smh-mobile-brand img { height: 46px; max-width: 135px; }
    body.smh-home-modern #block-main > .wrapper,
    body.smh-home-modern #main { width: calc(100vw - 20px) !important; }
    body.smh-home-modern #main .module,
    body.smh-home-modern #main .mod-box,
    body.smh-home-modern #main .smh-card { padding: 14px !important; }
    body.smh-home-modern #main .module-title,
    body.smh-home-modern #main h3.module-title,
    body.smh-home-modern #main .title { margin: -14px -14px 13px !important; }
}


/* ==========================================================
   v1.1.0 — ALIGNMENT + FULL-WIDTH CANVAS + REAL FOOTER
   ========================================================== */

html {
    background: #f4f7f6 !important;
    min-height: 100% !important;
}

body.smh-home-modern,
body.smh-home-modern #block-main,
body.smh-home-modern #block-bottom,
body.smh-home-modern #page,
body.smh-home-modern #page-bg {
    background: var(--smh-bg) !important;
}

/* Break out of the old Warp 980px shell. */
body.smh-home-modern #block-main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body.smh-home-modern #block-main > .wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* Keep the header centered independently from the content grid. */
body.smh-home-modern #header {
    width: min(1360px, calc(100vw - 48px)) !important;
    max-width: 1360px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Main homepage grid: preserve the old 3-column character, but modernise spacing. */
body.smh-home-modern #main {
    width: min(1360px, 100%) !important;
    max-width: 1360px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) minmax(190px, 230px) !important;
    grid-template-areas: "left center right" !important;
    gap: 24px !important;
    align-items: start !important;
    float: none !important;
    clear: both !important;
}

body.smh-home-modern #main.smh-no-left {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 230px) !important;
    grid-template-areas: "center right" !important;
}

body.smh-home-modern #main.smh-no-right {
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) !important;
    grid-template-areas: "left center" !important;
}

body.smh-home-modern #main.smh-no-left.smh-no-right {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "center" !important;
}

body.smh-home-modern #maininner,
body.smh-home-modern #sidebar-a,
body.smh-home-modern #sidebar-b {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    transform: none !important;
}

body.smh-home-modern #maininner {
    grid-area: center !important;
}

body.smh-home-modern #sidebar-a {
    grid-area: right !important;
}

body.smh-home-modern #sidebar-b {
    grid-area: left !important;
}

/* Old Warp inner width rules sometimes remain on grid-box elements. */
body.smh-home-modern #main > .grid-box,
body.smh-home-modern #maininner > .grid-box,
body.smh-home-modern #sidebar-a > .grid-box,
body.smh-home-modern #sidebar-b > .grid-box {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

/* Keep the center content balanced instead of collapsing to the left. */
body.smh-home-modern #content,
body.smh-home-modern #system,
body.smh-home-modern #maininner > * {
    width: 100% !important;
    max-width: 100% !important;
}

/* Override the earlier two-column desktop breakpoint.
   Three columns remain until the real mobile breakpoint. */
@media (min-width: 961px) and (max-width: 1180px) {
    body.smh-home-modern #block-main > .wrapper {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.smh-home-modern #main {
        grid-template-columns: minmax(175px, 205px) minmax(0, 1fr) minmax(175px, 205px) !important;
        grid-template-areas: "left center right" !important;
        gap: 16px !important;
    }

    body.smh-home-modern #main.smh-no-left {
        grid-template-columns: minmax(0, 1fr) minmax(175px, 205px) !important;
        grid-template-areas: "center right" !important;
    }

    body.smh-home-modern #main.smh-no-right {
        grid-template-columns: minmax(175px, 205px) minmax(0, 1fr) !important;
        grid-template-areas: "left center" !important;
    }
}

/* Completely replace the legacy blank/dark footer region with our footer. */
body.smh-home-modern #block-footer,
body.smh-home-modern #footer {
    display: none !important;
}

body.smh-home-modern .smh-home-footer {
    position: relative;
    width: 100% !important;
    margin: 70px 0 0 !important;
    padding: 0 !important;
    overflow: hidden;
    color: #dbe7e2;
    background:
        radial-gradient(circle at 50% 0%, rgba(17,132,116,.20), transparent 34%),
        linear-gradient(180deg, #10201c 0%, #0b1512 100%) !important;
    border-top: 3px solid var(--smh-teal);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

body.smh-home-modern .smh-home-footer:before {
    content: "";
    display: block;
    width: 110px;
    height: 3px;
    margin: 0 auto;
    background: linear-gradient(90deg, var(--smh-teal), var(--smh-gold));
    border-radius: 999px;
}

body.smh-home-modern .smh-home-footer-inner {
    width: min(1180px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 48px 0 24px;
    text-align: center;
}

body.smh-home-modern .smh-home-footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    margin-bottom: 22px;
}

body.smh-home-modern .smh-home-footer-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 180px;
    max-height: 115px;
    object-fit: contain;
    filter: brightness(.95) saturate(.9);
}

body.smh-home-modern .smh-home-footer-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 20px;
    line-height: 1.6;
    font-weight: 600;
}

body.smh-home-modern .smh-home-footer-subtitle {
    margin: 0 auto 24px;
    color: #8fa39b;
    font-size: 13px;
    line-height: 1.7;
}

body.smh-home-modern .smh-home-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 auto 30px;
    padding: 0;
    list-style: none;
}

body.smh-home-modern .smh-home-footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    color: #dce7e2 !important;
    background: rgba(255,255,255,.025);
    font-size: 14px;
    text-decoration: none !important;
}

body.smh-home-modern .smh-home-footer-links a:hover {
    color: #fff !important;
    border-color: rgba(181,154,88,.45);
    background: rgba(181,154,88,.08);
    transform: translateY(-1px);
}

body.smh-home-modern .smh-home-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 0 0;
    border-top: 1px solid rgba(255,255,255,.08);
    color: #83968f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    direction: ltr;
    text-align: left;
}

body.smh-home-modern .smh-home-to-top {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    color: #fff !important;
    font-size: 19px;
    cursor: pointer;
}

body.smh-home-modern .smh-home-to-top:hover {
    border-color: rgba(181,154,88,.45);
    background: rgba(181,154,88,.10);
}

@media (max-width: 960px) {
    body.smh-home-modern #block-main > .wrapper {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.smh-home-modern #main,
    body.smh-home-modern #main.smh-no-left,
    body.smh-home-modern #main.smh-no-right,
    body.smh-home-modern #main.smh-no-left.smh-no-right {
        width: 100% !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas:
            "center"
            "right"
            "left" !important;
        gap: 18px !important;
    }

    body.smh-home-modern .smh-home-footer {
        margin-top: 42px !important;
    }

    body.smh-home-modern .smh-home-footer-inner {
        width: calc(100vw - 34px);
        padding: 38px 0 22px;
    }

    body.smh-home-modern .smh-home-footer-brand {
        min-height: 76px;
        margin-bottom: 17px;
    }

    body.smh-home-modern .smh-home-footer-brand img {
        max-width: 145px;
        max-height: 90px;
    }

    body.smh-home-modern .smh-home-footer-links {
        gap: 8px;
        margin-bottom: 26px;
    }

    body.smh-home-modern .smh-home-footer-links a {
        font-size: 13px;
        min-height: 34px;
        padding: 6px 10px;
    }

    body.smh-home-modern .smh-home-footer-bottom {
        display: block;
        text-align: center;
        line-height: 1.8;
    }

    body.smh-home-modern .smh-home-to-top {
        margin: 16px auto 0;
    }
}


/* ==========================================================
   v1.2.0 — CLEAN DESKTOP NAV + STICKY BAR + SIDEBAR ACCORDIONS
   ========================================================== */

/* The legacy Warp menubar is retained only as a hidden source for links.
   The visible navigation below is a clean normalized copy, which prevents
   old Warp dropdown wrappers and inline menu styles from leaking through. */
.smh-desktop-nav {
    display: none;
}

@media (min-width: 961px) {

    body.smh-home-modern #menubar,
    body.smh-home-modern #menubar.smh-menubar-legacy {
        display: none !important;
    }

    body.smh-home-modern #header {
        padding-bottom: 0 !important;
        overflow: visible !important;
    }

    body.smh-home-modern #headerbar {
        min-height: 190px !important;
        padding-bottom: 28px !important;
    }

    body.smh-home-modern .smh-desktop-nav {
        position: relative;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        background: rgba(255,255,255,.985) !important;
        border-top: 1px solid #edf2f0 !important;
        border-bottom: 1px solid #dde7e3 !important;
        box-shadow: 0 7px 22px rgba(15,42,34,.035);
        z-index: 12000;
        overflow: visible !important;
    }

    body.smh-home-modern .smh-desktop-nav.smh-nav-fixed {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        z-index: 50000 !important;
        background: rgba(255,255,255,.98) !important;
        border-top: 0 !important;
        box-shadow: 0 12px 34px rgba(10,34,27,.13) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    body.smh-home-modern .smh-desktop-nav-spacer {
        display: block;
        width: 100%;
        height: 0;
    }

    body.smh-home-modern .smh-desktop-nav-inner {
        width: min(1360px, calc(100vw - 44px));
        min-height: 68px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 230px minmax(0, 1fr) 230px;
        align-items: center;
        gap: 18px;
        overflow: visible !important;
    }

    body.smh-home-modern .smh-nav-fixed .smh-desktop-nav-inner {
        min-height: 60px;
    }

    /* Search — simple, balanced and no old floating button. */
    body.smh-home-modern .smh-desktop-search-wrap {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        direction: rtl;
    }

    body.smh-home-modern .smh-desktop-search-form {
        width: 100%;
        max-width: 220px;
        height: 42px;
        margin: 0 !important;
        padding: 4px 5px 4px 12px !important;
        display: flex;
        align-items: center;
        gap: 6px;
        direction: rtl;
        border: 1px solid #dbe6e2 !important;
        border-radius: 999px !important;
        background: #f8fbfa !important;
        box-shadow: inset 0 1px 0 rgba(15,42,34,.02);
    }

    body.smh-home-modern .smh-desktop-search-form:focus-within {
        border-color: #9fcfc4 !important;
        background: #fff !important;
        box-shadow: 0 0 0 4px rgba(11,136,121,.075);
    }

    body.smh-home-modern .smh-desktop-search-form input[type="search"] {
        flex: 1;
        min-width: 0;
        width: auto !important;
        height: 32px !important;
        margin: 0 !important;
        padding: 3px 8px !important;
        border: 0 !important;
        outline: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #31413b !important;
        font-family: inherit !important;
        font-size: 13px !important;
        text-align: right !important;
    }

    body.smh-home-modern .smh-desktop-search-form .smh-nav-search-submit {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        margin: 0 !important;
        padding: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0 !important;
        border-radius: 50% !important;
        background: var(--smh-teal) !important;
        color: #fff !important;
        font-size: 17px;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 5px 14px rgba(11,136,121,.18);
    }

    body.smh-home-modern .smh-desktop-search-form .smh-nav-search-submit:hover {
        background: var(--smh-teal-dark) !important;
        transform: translateY(-1px);
    }

    /* Main menu — one clean row with a subtle active underline. */
    body.smh-home-modern .smh-desktop-menu-wrap {
        min-width: 0;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible !important;
        direction: rtl;
    }

    body.smh-home-modern .smh-desktop-menu-list,
    body.smh-home-modern .smh-desktop-menu-list ul {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.smh-home-modern .smh-desktop-menu-list {
        width: 100%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        direction: rtl;
        overflow: visible !important;
    }

    body.smh-home-modern .smh-desktop-menu-list li {
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        overflow: visible !important;
    }

    body.smh-home-modern .smh-desktop-menu-list > li > a {
        position: relative;
        min-height: 58px;
        padding: 8px 9px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px;
        border: 0 !important;
        border-radius: 8px !important;
        background: transparent !important;
        color: #293832 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        font-family: inherit !important;
        font-size: 13px !important;
        line-height: 1.45 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    body.smh-home-modern .smh-nav-fixed .smh-desktop-menu-list > li > a {
        min-height: 52px;
    }

    body.smh-home-modern .smh-desktop-menu-list > li > a:after {
        content: "";
        position: absolute;
        right: 12px;
        bottom: 3px;
        left: 12px;
        height: 2px;
        border-radius: 999px;
        background: transparent;
        transition: background .18s ease, transform .18s ease;
        transform: scaleX(.35);
    }

    body.smh-home-modern .smh-desktop-menu-list > li:hover > a,
    body.smh-home-modern .smh-desktop-menu-list > li:focus-within > a,
    body.smh-home-modern .smh-desktop-menu-list > li.active > a,
    body.smh-home-modern .smh-desktop-menu-list > li.current > a,
    body.smh-home-modern .smh-desktop-menu-list > li.smh-submenu-open > a {
        background: #f3f8f6 !important;
        color: var(--smh-teal-dark) !important;
    }

    body.smh-home-modern .smh-desktop-menu-list > li:hover > a:after,
    body.smh-home-modern .smh-desktop-menu-list > li:focus-within > a:after,
    body.smh-home-modern .smh-desktop-menu-list > li.active > a:after,
    body.smh-home-modern .smh-desktop-menu-list > li.current > a:after,
    body.smh-home-modern .smh-desktop-menu-list > li.smh-submenu-open > a:after {
        background: linear-gradient(90deg, var(--smh-teal), var(--smh-gold));
        transform: scaleX(1);
    }

    body.smh-home-modern .smh-menu-caret {
        display: inline-block;
        margin-right: 3px;
        color: #82918b;
        font-family: Arial, sans-serif;
        font-size: 10px;
        line-height: 1;
        transition: transform .18s ease, color .18s ease;
    }

    body.smh-home-modern .smh-desktop-menu-list li:hover > a .smh-menu-caret,
    body.smh-home-modern .smh-desktop-menu-list li:focus-within > a .smh-menu-caret,
    body.smh-home-modern .smh-desktop-menu-list li.smh-submenu-open > a .smh-menu-caret {
        color: var(--smh-teal);
        transform: rotate(180deg);
    }

    /* Authoritative dropdown styling; old Warp .dropdown rules cannot open them all. */
    body.smh-home-modern .smh-desktop-menu-list ul.smh-desktop-submenu {
        position: absolute !important;
        top: calc(100% + 7px) !important;
        right: 0 !important;
        left: auto !important;
        width: max-content !important;
        min-width: 245px !important;
        max-width: 340px !important;
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        margin: 0 !important;
        padding: 8px !important;
        border: 1px solid #dfe8e4 !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 18px 44px rgba(13,38,31,.14) !important;
        transform: translateY(6px);
        transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
        z-index: 60000 !important;
        text-align: right !important;
        direction: rtl !important;
        overflow: visible !important;
    }

    body.smh-home-modern .smh-desktop-menu-list li:hover > ul.smh-desktop-submenu,
    body.smh-home-modern .smh-desktop-menu-list li:focus-within > ul.smh-desktop-submenu,
    body.smh-home-modern .smh-desktop-menu-list li.smh-submenu-open > ul.smh-desktop-submenu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0);
    }

    body.smh-home-modern .smh-desktop-menu-list ul.smh-desktop-submenu li {
        display: block !important;
        width: 100% !important;
        border-bottom: 1px solid #eef2f0 !important;
    }

    body.smh-home-modern .smh-desktop-menu-list ul.smh-desktop-submenu li:last-child {
        border-bottom: 0 !important;
    }

    body.smh-home-modern .smh-desktop-menu-list ul.smh-desktop-submenu > li > a {
        min-height: 0 !important;
        width: 100% !important;
        padding: 10px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
        border: 0 !important;
        border-radius: 9px !important;
        background: #fff !important;
        color: #34443e !important;
        font-size: 13px !important;
        line-height: 1.6 !important;
        white-space: normal !important;
        text-decoration: none !important;
    }

    body.smh-home-modern .smh-desktop-menu-list ul.smh-desktop-submenu > li > a:hover,
    body.smh-home-modern .smh-desktop-menu-list ul.smh-desktop-submenu > li > a:focus {
        background: #f1f7f5 !important;
        color: var(--smh-teal-dark) !important;
    }

    body.smh-home-modern .smh-desktop-menu-list ul.smh-desktop-submenu ul.smh-desktop-submenu {
        top: -8px !important;
        right: calc(100% + 7px) !important;
    }

    /* Small logo is intentionally subtle at the top and becomes useful once fixed. */
    body.smh-home-modern .smh-desktop-nav-brand {
        width: 100%;
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        opacity: 0;
        visibility: hidden;
        transition: opacity .18s ease;
    }

    body.smh-home-modern .smh-nav-fixed .smh-desktop-nav-brand {
        opacity: 1;
        visibility: visible;
    }

    body.smh-home-modern .smh-desktop-nav-brand img {
        width: auto !important;
        height: auto !important;
        max-width: 72px !important;
        max-height: 50px !important;
        object-fit: contain;
        display: block;
    }
}

/* Medium desktop: keep the same clean single row instead of wrapping into two rows. */
@media (min-width: 961px) and (max-width: 1220px) {

    body.smh-home-modern .smh-desktop-nav-inner {
        width: calc(100vw - 26px);
        grid-template-columns: 185px minmax(0, 1fr) 185px;
        gap: 10px;
    }

    body.smh-home-modern .smh-desktop-search-form {
        max-width: 180px;
    }

    body.smh-home-modern .smh-desktop-menu-list > li > a {
        padding-right: 6px !important;
        padding-left: 6px !important;
        font-size: 12px !important;
    }

    body.smh-home-modern .smh-desktop-nav-brand img {
        max-width: 64px !important;
        max-height: 45px !important;
    }
}

/* ---------- Sidebar menu accordions ---------- */

body.smh-home-modern #sidebar-a .smh-side-accordion,
body.smh-home-modern #sidebar-b .smh-side-accordion,
body.smh-home-modern #sidebar-a .smh-side-submenu,
body.smh-home-modern #sidebar-b .smh-side-submenu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.smh-home-modern #sidebar-a .smh-side-accordion li,
body.smh-home-modern #sidebar-b .smh-side-accordion li {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f0 !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    float: none !important;
}

body.smh-home-modern #sidebar-a .smh-side-accordion li:last-child,
body.smh-home-modern #sidebar-b .smh-side-accordion li:last-child {
    border-bottom: 0 !important;
}

body.smh-home-modern #sidebar-a .smh-side-accordion li > a,
body.smh-home-modern #sidebar-b .smh-side-accordion li > a {
    width: 100% !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 10px 38px 10px 10px !important;
    display: block !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: #33423c !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    text-align: right !important;
    text-decoration: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    white-space: normal !important;
}

body.smh-home-modern #sidebar-a .smh-side-accordion li > a:hover,
body.smh-home-modern #sidebar-b .smh-side-accordion li > a:hover,
body.smh-home-modern #sidebar-a .smh-side-accordion li.active > a,
body.smh-home-modern #sidebar-b .smh-side-accordion li.active > a,
body.smh-home-modern #sidebar-a .smh-side-accordion li.current > a,
body.smh-home-modern #sidebar-b .smh-side-accordion li.current > a {
    background: #eef7f4 !important;
    color: var(--smh-teal-dark) !important;
}

body.smh-home-modern #sidebar-a .smh-side-toggle,
body.smh-home-modern #sidebar-b .smh-side-toggle {
    position: absolute !important;
    top: 7px !important;
    left: 5px !important;
    z-index: 3 !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #dfe9e5 !important;
    border-radius: 9px !important;
    background: #f7faf9 !important;
    color: #71817a !important;
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

body.smh-home-modern #sidebar-a .smh-side-open > .smh-side-toggle,
body.smh-home-modern #sidebar-b .smh-side-open > .smh-side-toggle {
    background: var(--smh-teal) !important;
    border-color: var(--smh-teal) !important;
    color: #fff !important;
    transform: rotate(180deg);
}

body.smh-home-modern #sidebar-a ul.smh-side-submenu,
body.smh-home-modern #sidebar-b ul.smh-side-submenu {
    display: none !important;
    margin: 2px 8px 8px !important;
    padding: 5px !important;
    width: auto !important;
    border: 1px solid #e5eeeb !important;
    border-radius: 10px !important;
    background: #f8fbfa !important;
}

body.smh-home-modern #sidebar-a li.smh-side-open > ul.smh-side-submenu,
body.smh-home-modern #sidebar-b li.smh-side-open > ul.smh-side-submenu {
    display: block !important;
}

body.smh-home-modern #sidebar-a ul.smh-side-submenu li,
body.smh-home-modern #sidebar-b ul.smh-side-submenu li {
    border-bottom: 1px solid #edf2f0 !important;
}

body.smh-home-modern #sidebar-a ul.smh-side-submenu a,
body.smh-home-modern #sidebar-b ul.smh-side-submenu a {
    min-height: 0 !important;
    padding: 8px 34px 8px 9px !important;
    border-radius: 8px !important;
    color: #53635c !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
}

body.smh-home-modern #sidebar-a ul.smh-side-submenu a:hover,
body.smh-home-modern #sidebar-b ul.smh-side-submenu a:hover {
    background: #fff !important;
    color: var(--smh-teal-dark) !important;
}

/* Reset legacy backgrounds/widths inside the normalized side menus. */
body.smh-home-modern #sidebar-a .smh-side-accordion *,
body.smh-home-modern #sidebar-b .smh-side-accordion * {
    max-width: 100%;
}

/* ---------- Mobile normalized accordion menu ---------- */
@media (max-width: 960px) {

    body.smh-home-modern .smh-desktop-nav,
    body.smh-home-modern .smh-desktop-nav-spacer {
        display: none !important;
    }

    body.smh-home-modern .smh-mobile-menu-list ul.smh-mobile-submenu {
        display: none !important;
        margin: 0 8px 9px !important;
        padding: 6px !important;
        border: 1px solid #e5eeeb;
        border-radius: 10px;
        background: #f8fbfa;
    }

    body.smh-home-modern .smh-mobile-menu-list li.smh-submenu-open > ul.smh-mobile-submenu {
        display: block !important;
    }

    body.smh-home-modern .smh-mobile-menu-list .smh-menu-caret {
        float: left;
        margin: 5px 0 0 4px;
        color: #82918b;
        font-family: Arial, sans-serif;
        font-size: 11px;
        transition: transform .18s ease;
    }

    body.smh-home-modern .smh-mobile-menu-list li.smh-submenu-open > a .smh-menu-caret {
        transform: rotate(180deg);
        color: var(--smh-teal);
    }
}


/* ==========================================================
   v1.3.0 — FULL MOBILE REBUILD
   ========================================================== */

@media (max-width: 960px) {

    html,
    body.smh-home-modern {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    body.smh-home-modern {
        margin: 0 !important;
        padding: 62px 0 0 !important;
        background: #f4f7f6 !important;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body.smh-home-modern *,
    body.smh-home-modern *:before,
    body.smh-home-modern *:after {
        box-sizing: border-box !important;
    }

    /* On mobile the dedicated header replaces every old Warp header/menu layer. */
    body.smh-home-modern #block-header,
    body.smh-home-modern #header,
    body.smh-home-modern #headerbar,
    body.smh-home-modern #menubar,
    body.smh-home-modern #toolbar,
    body.smh-home-modern .smh-desktop-nav,
    body.smh-home-modern .smh-desktop-nav-spacer {
        display: none !important;
    }

    /* Remove the old fixed social rail from phones. */
    body.smh-home-modern .socialbuttons,
    body.smh-home-modern .social-icons-fixed,
    body.smh-home-modern .social-fixed,
    body.smh-home-modern #social-icons,
    body.smh-home-modern #socialbuttons,
    body.smh-home-modern .social-icons,
    body.smh-home-modern [class*="social-fixed"],
    body.smh-home-modern [class*="socialbuttons"] {
        display: none !important;
    }

    /* ---------- Compact mobile header ---------- */
    body.smh-home-modern .smh-mobile-header {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        z-index: 60000 !important;
        width: 100% !important;
        height: 62px !important;
        min-height: 62px !important;
        padding: max(6px, env(safe-area-inset-top)) 12px 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        background: rgba(255,255,255,.985) !important;
        border: 0 !important;
        border-bottom: 1px solid #dfe8e4 !important;
        border-radius: 0 !important;
        box-shadow: 0 8px 24px rgba(15,42,34,.10) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    body.smh-home-modern .smh-mobile-brand {
        min-width: 0 !important;
        max-width: calc(100% - 104px) !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
    }

    body.smh-home-modern .smh-mobile-brand img {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: 145px !important;
        max-height: 47px !important;
        object-fit: contain !important;
        margin: 0 !important;
    }

    body.smh-home-modern .smh-mobile-controls {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
    }

    body.smh-home-modern .smh-mobile-controls button,
    body.smh-home-modern .smh-drawer-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #dce7e3 !important;
        border-radius: 12px !important;
        background: #f7faf9 !important;
        color: #075f56 !important;
        box-shadow: none !important;
        font-size: 18px !important;
    }

    body.smh-home-modern .smh-mobile-controls button:active,
    body.smh-home-modern .smh-drawer-close:active {
        background: #eaf5f2 !important;
        transform: scale(.97);
    }

    body.smh-home-modern .smh-menu-toggle {
        display: inline-flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    body.smh-home-modern .smh-menu-toggle span {
        width: 18px !important;
        height: 2px !important;
        display: block !important;
        border-radius: 999px !important;
        background: currentColor !important;
    }

    /* ---------- Drawer ---------- */
    body.smh-home-modern .smh-mobile-overlay {
        position: fixed !important;
        inset: 0 !important;
        z-index: 59970 !important;
        display: block !important;
        background: rgba(5,14,11,.56) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity .22s ease, visibility .22s ease !important;
    }

    body.smh-home-modern .smh-mobile-drawer {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        z-index: 60020 !important;
        display: block !important;
        width: min(90vw, 380px) !important;
        max-width: 380px !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 14px calc(28px + env(safe-area-inset-bottom)) !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        box-shadow: -18px 0 48px rgba(0,0,0,.18) !important;
        transform: translate3d(102%,0,0) !important;
        transition: transform .24s ease !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        direction: rtl !important;
    }

    body.smh-home-modern .smh-drawer-top {
        position: sticky !important;
        top: 0 !important;
        z-index: 5 !important;
        min-height: 66px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        margin: 0 -14px 8px !important;
        padding: 8px 14px !important;
        border-bottom: 1px solid #e5ece9 !important;
        background: rgba(255,255,255,.98) !important;
        color: #075f56 !important;
        font-size: 19px !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    body.smh-home-modern .smh-mobile-menu-list,
    body.smh-home-modern .smh-mobile-menu-list ul {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    body.smh-home-modern .smh-mobile-menu-list > li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-bottom: 1px solid #edf2f0 !important;
        background: transparent !important;
    }

    body.smh-home-modern .smh-mobile-menu-list > li > a {
        width: 100% !important;
        min-height: 50px !important;
        margin: 0 !important;
        padding: 12px 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        border: 0 !important;
        border-radius: 10px !important;
        background: transparent !important;
        color: #25362f !important;
        box-shadow: none !important;
        font-size: 16px !important;
        line-height: 1.65 !important;
        text-align: right !important;
        white-space: normal !important;
        text-decoration: none !important;
    }

    body.smh-home-modern .smh-mobile-menu-list > li > a:active,
    body.smh-home-modern .smh-mobile-menu-list > li.smh-submenu-open > a {
        background: #eef7f4 !important;
        color: #075f56 !important;
    }

    body.smh-home-modern .smh-mobile-menu-list ul.smh-mobile-submenu {
        display: none !important;
        width: calc(100% - 8px) !important;
        margin: 0 4px 10px !important;
        padding: 5px !important;
        border: 1px solid #e2ebe8 !important;
        border-radius: 11px !important;
        background: #f7faf9 !important;
    }

    body.smh-home-modern .smh-mobile-menu-list li.smh-submenu-open > ul.smh-mobile-submenu {
        display: block !important;
    }

    body.smh-home-modern .smh-mobile-menu-list ul.smh-mobile-submenu li {
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #e8efec !important;
    }

    body.smh-home-modern .smh-mobile-menu-list ul.smh-mobile-submenu li:last-child {
        border-bottom: 0 !important;
    }

    body.smh-home-modern .smh-mobile-menu-list ul.smh-mobile-submenu a {
        display: block !important;
        width: 100% !important;
        padding: 10px !important;
        border-radius: 8px !important;
        color: #52625b !important;
        font-size: 14px !important;
        line-height: 1.7 !important;
        text-align: right !important;
        white-space: normal !important;
    }

    body.smh-home-modern .smh-mobile-menu-list .smh-menu-caret {
        flex: 0 0 auto !important;
        float: none !important;
        margin: 0 !important;
        color: #83928c !important;
        font-family: Arial, sans-serif !important;
        font-size: 11px !important;
        transition: transform .18s ease !important;
    }

    body.smh-home-modern .smh-mobile-menu-list li.smh-submenu-open > a .smh-menu-caret {
        color: #0b8879 !important;
        transform: rotate(180deg) !important;
    }

    body.smh-drawer-open .smh-mobile-overlay,
    body.smh-search-open .smh-mobile-overlay {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.smh-drawer-open .smh-mobile-drawer {
        transform: translate3d(0,0,0) !important;
    }

    body.smh-drawer-open,
    body.smh-search-open {
        overflow: hidden !important;
        touch-action: none;
    }

    /* ---------- Mobile search ---------- */
    body.smh-home-modern .smh-mobile-search {
        position: fixed !important;
        top: 70px !important;
        right: 10px !important;
        left: 10px !important;
        z-index: 60010 !important;
        display: block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 10px !important;
        border: 1px solid #dfe8e4 !important;
        border-radius: 15px !important;
        background: #fff !important;
        box-shadow: 0 16px 42px rgba(15,42,34,.14) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-8px) !important;
        pointer-events: none !important;
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease !important;
    }

    body.smh-home-modern .smh-mobile-search-form {
        width: 100% !important;
        margin: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0,1fr) 44px !important;
        gap: 7px !important;
        direction: rtl !important;
    }

    body.smh-home-modern .smh-mobile-search-form input[type="search"] {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 8px 13px !important;
        border: 1px solid #dfe8e4 !important;
        border-radius: 11px !important;
        background: #f8fbfa !important;
        color: #263730 !important;
        box-shadow: none !important;
        outline: 0 !important;
        font-size: 15px !important;
        text-align: right !important;
    }

    body.smh-home-modern .smh-mobile-search-form button {
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 11px !important;
        background: #0b8879 !important;
        color: #fff !important;
        box-shadow: none !important;
        font-size: 18px !important;
    }

    body.smh-search-open .smh-mobile-search {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }

    /* ---------- Entire homepage canvas ---------- */
    body.smh-home-modern #block-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px 0 34px !important;
        background: #f4f7f6 !important;
        overflow: visible !important;
    }

    body.smh-home-modern #block-main > .wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 10px !important;
        overflow: visible !important;
    }

    body.smh-home-modern #main,
    body.smh-home-modern #main.smh-no-left,
    body.smh-home-modern #main.smh-no-right,
    body.smh-home-modern #main.smh-no-left.smh-no-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0,1fr) !important;
        grid-template-areas:
            "center"
            "right"
            "left" !important;
        gap: 13px !important;
        align-items: start !important;
        float: none !important;
        clear: both !important;
        overflow: visible !important;
    }

    body.smh-home-modern #maininner,
    body.smh-home-modern #sidebar-a,
    body.smh-home-modern #sidebar-b,
    body.smh-home-modern #content,
    body.smh-home-modern #system,
    body.smh-home-modern #main > .grid-box,
    body.smh-home-modern #maininner > .grid-box,
    body.smh-home-modern #sidebar-a > .grid-box,
    body.smh-home-modern #sidebar-b > .grid-box {
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        float: none !important;
        clear: both !important;
        transform: none !important;
        overflow: visible !important;
    }

    body.smh-home-modern #maininner { grid-area: center !important; }
    body.smh-home-modern #sidebar-a { grid-area: right !important; }
    body.smh-home-modern #sidebar-b { grid-area: left !important; }

    /* Old Warp width helper classes otherwise keep the desktop columns tiny. */
    body.smh-home-modern #main .width10,
    body.smh-home-modern #main .width20,
    body.smh-home-modern #main .width25,
    body.smh-home-modern #main .width30,
    body.smh-home-modern #main .width33,
    body.smh-home-modern #main .width40,
    body.smh-home-modern #main .width50,
    body.smh-home-modern #main .width60,
    body.smh-home-modern #main .width66,
    body.smh-home-modern #main .width70,
    body.smh-home-modern #main .width75,
    body.smh-home-modern #main .width80,
    body.smh-home-modern #main .width90 {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
    }

    /* ---------- Modules/cards ---------- */
    body.smh-home-modern #main .module,
    body.smh-home-modern #main .mod-box,
    body.smh-home-modern #main .smh-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 13px !important;
        padding: 13px !important;
        border: 1px solid #e0e9e5 !important;
        border-radius: 15px !important;
        background: #fff !important;
        box-shadow: 0 8px 22px rgba(15,42,34,.045) !important;
        overflow: hidden !important;
    }

    body.smh-home-modern #main .module-title,
    body.smh-home-modern #main h3.module-title,
    body.smh-home-modern #main .title {
        min-height: 45px !important;
        margin: -13px -13px 12px !important;
        padding: 10px 13px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        border: 0 !important;
        border-bottom: 1px solid #dfe8e4 !important;
        border-radius: 15px 15px 0 0 !important;
        background: linear-gradient(135deg,#0b8b7b,#087266) !important;
        color: #fff !important;
        box-shadow: none !important;
        text-shadow: none !important;
        font-size: 16px !important;
        line-height: 1.55 !important;
        text-align: right !important;
    }

    body.smh-home-modern #sidebar-a .module,
    body.smh-home-modern #sidebar-b .module,
    body.smh-home-modern #sidebar-a .mod-box,
    body.smh-home-modern #sidebar-b .mod-box {
        margin-bottom: 12px !important;
    }

    /* ---------- Slideshow / lead story ---------- */
    body.smh-home-modern .smh-showcase,
    body.smh-home-modern .wk-slideshow,
    body.smh-home-modern .wk-slideshow-default,
    body.smh-home-modern .slideshow,
    body.smh-home-modern .nivoSlider,
    body.smh-home-modern .flexslider,
    body.smh-home-modern .uk-slideshow {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        border-radius: 14px !important;
        box-shadow: 0 8px 22px rgba(15,42,34,.055) !important;
        overflow: hidden !important;
    }

    body.smh-home-modern .smh-showcase img,
    body.smh-home-modern .wk-slideshow img,
    body.smh-home-modern .slideshow img,
    body.smh-home-modern .nivoSlider img,
    body.smh-home-modern .flexslider img,
    body.smh-home-modern .uk-slideshow img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 auto !important;
        object-fit: cover !important;
    }

    body.smh-home-modern .wk-slideshow .slides,
    body.smh-home-modern .wk-slideshow .slides > li,
    body.smh-home-modern .wk-slideshow-default .slides,
    body.smh-home-modern .wk-slideshow-default .slides > li,
    body.smh-home-modern .flexslider .slides,
    body.smh-home-modern .flexslider .slides > li,
    body.smh-home-modern .uk-slideshow,
    body.smh-home-modern .uk-slideshow > li {
        max-width: 100% !important;
    }

    /* ---------- Homepage article grids ---------- */
    body.smh-home-modern #content .items-row,
    body.smh-home-modern #content .grid-block,
    body.smh-home-modern #content .items-leading,
    body.smh-home-modern #content .items-more,
    body.smh-home-modern #content article,
    body.smh-home-modern #content .article,
    body.smh-home-modern #content .item,
    body.smh-home-modern #content .teaser-item {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
    }

    body.smh-home-modern #content .items-row,
    body.smh-home-modern #content .grid-block {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) !important;
        gap: 12px !important;
    }

    body.smh-home-modern #content article,
    body.smh-home-modern #content .article,
    body.smh-home-modern #content .item,
    body.smh-home-modern #content .teaser-item {
        padding: 0 !important;
        border-radius: 13px !important;
        overflow: hidden !important;
    }

    /* ---------- Universal media safety ---------- */
    body.smh-home-modern #main img,
    body.smh-home-modern #main video,
    body.smh-home-modern #main svg,
    body.smh-home-modern #main canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    body.smh-home-modern #main iframe,
    body.smh-home-modern #main object,
    body.smh-home-modern #main embed {
        max-width: 100% !important;
    }

    body.smh-home-modern #main table {
        max-width: 100% !important;
    }

    /* ---------- Side menu on phone ---------- */
    body.smh-home-modern #sidebar-a .smh-side-accordion li > a,
    body.smh-home-modern #sidebar-b .smh-side-accordion li > a {
        min-height: 44px !important;
        padding: 9px 38px 9px 9px !important;
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    body.smh-home-modern #sidebar-a .smh-side-toggle,
    body.smh-home-modern #sidebar-b .smh-side-toggle {
        top: 7px !important;
        width: 30px !important;
        height: 30px !important;
    }

    /* ---------- Footer ---------- */
    body.smh-home-modern .smh-home-footer {
        width: 100% !important;
        margin: 24px 0 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    body.smh-home-modern .smh-home-footer-inner {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 30px 16px calc(20px + env(safe-area-inset-bottom)) !important;
    }

    body.smh-home-modern .smh-home-footer-brand {
        min-height: 64px !important;
        margin-bottom: 13px !important;
    }

    body.smh-home-modern .smh-home-footer-brand img {
        max-width: 125px !important;
        max-height: 75px !important;
    }

    body.smh-home-modern .smh-home-footer-title {
        font-size: 17px !important;
        margin-bottom: 6px !important;
    }

    body.smh-home-modern .smh-home-footer-subtitle {
        max-width: 300px !important;
        margin-bottom: 18px !important;
        font-size: 12px !important;
        line-height: 1.8 !important;
    }

    body.smh-home-modern .smh-home-footer-links {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        gap: 7px !important;
        margin-bottom: 22px !important;
    }

    body.smh-home-modern .smh-home-footer-links a {
        width: 100% !important;
        min-height: 37px !important;
        padding: 7px 8px !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
        white-space: normal !important;
    }

    body.smh-home-modern .smh-home-footer-bottom {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        padding-top: 17px !important;
        text-align: center !important;
        line-height: 1.8 !important;
    }

    body.smh-home-modern .smh-home-to-top {
        margin: 0 auto !important;
    }
}

@media (max-width: 520px) {

    body.smh-home-modern {
        padding-top: 58px !important;
    }

    body.smh-home-modern .smh-mobile-header {
        height: 58px !important;
        min-height: 58px !important;
        padding-right: 9px !important;
        padding-left: 9px !important;
    }

    body.smh-home-modern .smh-mobile-brand {
        height: 46px !important;
        max-width: calc(100% - 96px) !important;
    }

    body.smh-home-modern .smh-mobile-brand img {
        max-width: 126px !important;
        max-height: 43px !important;
    }

    body.smh-home-modern .smh-mobile-controls {
        gap: 6px !important;
    }

    body.smh-home-modern .smh-mobile-controls button,
    body.smh-home-modern .smh-drawer-close {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        border-radius: 11px !important;
    }

    body.smh-home-modern .smh-mobile-search {
        top: 65px !important;
        right: 8px !important;
        left: 8px !important;
    }

    body.smh-home-modern #block-main > .wrapper {
        padding-right: 7px !important;
        padding-left: 7px !important;
    }

    body.smh-home-modern #main {
        gap: 10px !important;
    }

    body.smh-home-modern #main .module,
    body.smh-home-modern #main .mod-box,
    body.smh-home-modern #main .smh-card {
        margin-bottom: 10px !important;
        padding: 11px !important;
        border-radius: 13px !important;
    }

    body.smh-home-modern #main .module-title,
    body.smh-home-modern #main h3.module-title,
    body.smh-home-modern #main .title {
        min-height: 42px !important;
        margin: -11px -11px 10px !important;
        padding: 9px 11px !important;
        border-radius: 13px 13px 0 0 !important;
        font-size: 15px !important;
    }

    body.smh-home-modern .smh-showcase,
    body.smh-home-modern .wk-slideshow,
    body.smh-home-modern .wk-slideshow-default,
    body.smh-home-modern .slideshow,
    body.smh-home-modern .nivoSlider,
    body.smh-home-modern .flexslider,
    body.smh-home-modern .uk-slideshow {
        border-radius: 12px !important;
    }

    body.smh-home-modern .smh-home-footer-links {
        grid-template-columns: minmax(0,1fr) !important;
    }
}

/* Very small phones */
@media (max-width: 370px) {
    body.smh-home-modern .smh-mobile-brand img {
        max-width: 110px !important;
    }

    body.smh-home-modern .smh-mobile-controls button {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }

    body.smh-home-modern .smh-mobile-drawer {
        width: 94vw !important;
    }
}


/* ==========================================================
   v1.4.0 — MOBILE TYPOGRAPHY + ARTICLE THUMBNAILS
   ========================================================== */

@media (max-width: 960px) {

    /* Use the readable body face for normal Dhivehi text rather than the
       heavier display face inherited from the old desktop theme. */
    body.smh-home-modern #main,
    body.smh-home-modern #main p,
    body.smh-home-modern #main li,
    body.smh-home-modern #main td,
    body.smh-home-modern #main .smh-home-text-card,
    body.smh-home-modern #main .smh-home-text-card p,
    body.smh-home-modern #main .smh-home-text-card li {
        font-family: "MV Faseyha", "Faruma", "Noto Sans Thaana", Arial, sans-serif !important;
        font-size: 16px !important;
        line-height: 1.85 !important;
        font-weight: 400 !important;
        letter-spacing: 0 !important;
    }

    /* Keep titles distinct but no longer oversized inside narrow cards. */
    body.smh-home-modern #content h1,
    body.smh-home-modern #content h2,
    body.smh-home-modern #content h3,
    body.smh-home-modern #content h4,
    body.smh-home-modern #content .title,
    body.smh-home-modern #content .smh-home-text-card h1,
    body.smh-home-modern #content .smh-home-text-card h2,
    body.smh-home-modern #content .smh-home-text-card h3,
    body.smh-home-modern #content .smh-home-text-card h4 {
        font-family: "MV Waheed", "MV Faseyha", "Faruma", "Noto Sans Thaana", Arial, sans-serif !important;
        font-size: 18px !important;
        line-height: 1.65 !important;
        font-weight: 400 !important;
        color: #075f56 !important;
        letter-spacing: 0 !important;
        text-align: right !important;
    }

    body.smh-home-modern #content a {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /* Arabic snippets should not inherit the chunky Thaana display face. */
    body.smh-home-modern #main [lang="ar"],
    body.smh-home-modern #main .arabic,
    body.smh-home-modern #main [dir="rtl"] span[style*="font-family"],
    body.smh-home-modern #main p:lang(ar) {
        font-family: "Traditional Arabic", "Noto Naskh Arabic", "Amiri", serif !important;
        font-size: 17px !important;
        line-height: 1.9 !important;
        font-weight: 400 !important;
    }

    /* Explicitly restore article/card images. Several old Warp/YOOtheme
       mobile rules set these image wrappers to none/zero-height. */
    body.smh-home-modern #content .smh-home-article-thumb,
    body.smh-home-modern #content .item-image img,
    body.smh-home-modern #content .teaser-image img,
    body.smh-home-modern #content .article-image img,
    body.smh-home-modern #content .image img,
    body.smh-home-modern #content .thumbnail img,
    body.smh-home-modern #content .wk-panel img,
    body.smh-home-modern #content article img,
    body.smh-home-modern #content .item img,
    body.smh-home-modern #content .teaser-item img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 145px !important;
        min-height: 110px !important;
        max-height: 190px !important;
        margin: 0 0 11px !important;
        padding: 0 !important;
        float: none !important;
        clear: both !important;
        border: 0 !important;
        border-radius: 11px !important;
        object-fit: cover !important;
        object-position: center !important;
        box-shadow: none !important;
    }

    body.smh-home-modern #content .smh-home-thumb-link,
    body.smh-home-modern #content .item-image,
    body.smh-home-modern #content .teaser-image,
    body.smh-home-modern #content .article-image,
    body.smh-home-modern #content .image,
    body.smh-home-modern #content .thumbnail {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    /* Card layout from the old homepage: keep the familiar two-column look
       on normal phones, but give each card a clear thumbnail and compact text. */
    body.smh-home-modern #content .items-row,
    body.smh-home-modern #content .items,
    body.smh-home-modern #content .blog-items,
    body.smh-home-modern #content .grid,
    body.smh-home-modern #content .wk-grid {
        column-gap: 10px !important;
        row-gap: 14px !important;
    }

    body.smh-home-modern #content .smh-home-article-card,
    body.smh-home-modern #content .smh-home-text-card {
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 10px !important;
        border: 1px solid #e3ebe8 !important;
        border-radius: 13px !important;
        background: #fff !important;
        box-shadow: 0 5px 16px rgba(15,42,34,.035) !important;
        overflow: hidden !important;
    }

    body.smh-home-modern #content .smh-home-article-card p,
    body.smh-home-modern #content .smh-home-text-card p {
        margin: 0 0 8px !important;
        color: #33443d !important;
    }

    body.smh-home-modern #content .smh-home-article-card h2,
    body.smh-home-modern #content .smh-home-article-card h3,
    body.smh-home-modern #content .smh-home-text-card h2,
    body.smh-home-modern #content .smh-home-text-card h3 {
        margin: 5px 0 7px !important;
    }

    /* Avoid old fixed heights that can conceal the top thumbnail. */
    body.smh-home-modern #content .smh-home-article-card *,
    body.smh-home-modern #content .smh-home-text-card * {
        max-height: none;
    }
}

@media (max-width: 520px) {

    body.smh-home-modern #main,
    body.smh-home-modern #main p,
    body.smh-home-modern #main li,
    body.smh-home-modern #main .smh-home-text-card,
    body.smh-home-modern #main .smh-home-text-card p {
        font-size: 15px !important;
        line-height: 1.82 !important;
    }

    body.smh-home-modern #content h1,
    body.smh-home-modern #content h2,
    body.smh-home-modern #content h3,
    body.smh-home-modern #content h4,
    body.smh-home-modern #content .title {
        font-size: 17px !important;
        line-height: 1.62 !important;
    }

    body.smh-home-modern #content .smh-home-article-thumb,
    body.smh-home-modern #content .item-image img,
    body.smh-home-modern #content .teaser-image img,
    body.smh-home-modern #content .article-image img,
    body.smh-home-modern #content .image img,
    body.smh-home-modern #content .thumbnail img,
    body.smh-home-modern #content .wk-panel img,
    body.smh-home-modern #content article img,
    body.smh-home-modern #content .item img,
    body.smh-home-modern #content .teaser-item img {
        height: 122px !important;
        min-height: 95px !important;
        max-height: 160px !important;
        border-radius: 10px !important;
    }

    body.smh-home-modern #content .smh-home-article-card,
    body.smh-home-modern #content .smh-home-text-card {
        padding: 8px !important;
        border-radius: 11px !important;
    }
}

/* On extremely narrow phones one article per row is more readable. */
@media (max-width: 390px) {
    body.smh-home-modern #content .items-row,
    body.smh-home-modern #content .items,
    body.smh-home-modern #content .blog-items,
    body.smh-home-modern #content .grid,
    body.smh-home-modern #content .wk-grid {
        grid-template-columns: minmax(0,1fr) !important;
    }

    body.smh-home-modern #content .smh-home-article-thumb,
    body.smh-home-modern #content .item-image img,
    body.smh-home-modern #content .teaser-image img,
    body.smh-home-modern #content .article-image img,
    body.smh-home-modern #content .image img,
    body.smh-home-modern #content .thumbnail img,
    body.smh-home-modern #content .wk-panel img,
    body.smh-home-modern #content article img,
    body.smh-home-modern #content .item img,
    body.smh-home-modern #content .teaser-item img {
        height: 170px !important;
    }
}


/* ==========================================================
   v2.2.0 — FEATURED TEXT + FULL-WIDTH MOBILE ARTICLE GRID
   ========================================================== */

@media (max-width: 960px) {

    /* Featured frame: preserve the original slider completely. */
    body.smh-home-modern .smh-v22-featured-frame {
        position: relative !important;
        overflow: hidden !important;
        isolation: isolate !important;
    }

    body.smh-home-modern .smh-v22-featured-image {
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Dark fade remains inside the SAME image/slider area. */
    body.smh-home-modern .smh-v22-featured-shade {
        position: absolute !important;
        z-index: 50 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 70% !important;
        pointer-events: none !important;
        background: linear-gradient(
            180deg,
            rgba(3,14,11,0) 0%,
            rgba(3,14,11,.24) 28%,
            rgba(3,14,11,.82) 100%
        ) !important;
    }

    /* Geometry-detected overlay text. Inline !important is also applied by JS. */
    body.smh-home-modern .smh-v22-featured-text,
    body.smh-home-modern .smh-v22-featured-text * {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        font-family:
            "MV Waheed",
            "MV Faseyha",
            "Faruma",
            "Noto Sans Thaana",
            "Traditional Arabic",
            "Noto Naskh Arabic",
            serif !important;
        font-weight: 400 !important;
        text-shadow:
            0 1px 2px rgba(0,0,0,1),
            0 2px 8px rgba(0,0,0,.98),
            0 0 16px rgba(0,0,0,.78) !important;
    }

    /* Keep arrows/controls visible and in their original slider area. */
    body.smh-home-modern .smh-v22-featured-frame .next,
    body.smh-home-modern .smh-v22-featured-frame .prev,
    body.smh-home-modern .smh-v22-featured-frame [class*="next"],
    body.smh-home-modern .smh-v22-featured-frame [class*="prev"] {
        z-index: 120 !important;
        text-shadow: none !important;
    }

    /* Completely remove the legacy split article rows/cards after the new
       grid has been rendered. */
    body.smh-home-modern #system > .smh-v22-hide-source-section,
    body.smh-home-modern .smh-v22-hide-source-card {
        display: none !important;
    }

    /* New grid is a DIRECT child of #system, so it cannot inherit the old
       half-width/float layout seen in the screenshots. */
    body.smh-home-modern #system > .smh-v22-mobile-articles,
    body.smh-home-modern .smh-v22-mobile-articles {
        position: relative !important;
        z-index: 1 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 14px 0 0 !important;
        padding: 0 !important;
        float: none !important;
        clear: both !important;
        transform: none !important;
        direction: rtl !important;
        box-sizing: border-box !important;
    }

    body.smh-home-modern .smh-v22-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        border: 1px solid #e0e9e5 !important;
        border-radius: 13px !important;
        background: #fff !important;
        box-shadow: 0 5px 16px rgba(15,42,34,.045) !important;
        overflow: hidden !important;
    }

    body.smh-home-modern .smh-v22-card-link {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: inherit !important;
        text-decoration: none !important;
    }

    body.smh-home-modern .smh-v22-card-media {
        position: relative !important;
        width: 100% !important;
        height: 120px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #edf3f0, #f8faf9) !important;
    }

    body.smh-home-modern .smh-v22-card-media img {
        display: block !important;
        visibility: visible !important;
        opacity: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 120px !important;
        min-height: 120px !important;
        max-height: 120px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        object-fit: cover !important;
        object-position: center center !important;
        transform: none !important;
        transition: opacity .18s ease !important;
    }

    body.smh-home-modern .smh-v22-card-media.smh-v22-media-loaded img {
        opacity: 1 !important;
    }

    body.smh-home-modern .smh-v22-card-title {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 10px 9px 12px !important;
        background: #fff !important;
        color: #075f56 !important;
        -webkit-text-fill-color: #075f56 !important;
        font-family:
            "MV Waheed",
            "MV Faseyha",
            "Faruma",
            "Noto Sans Thaana",
            "Traditional Arabic",
            "Noto Naskh Arabic",
            serif !important;
        font-size: 15px !important;
        line-height: 1.58 !important;
        font-weight: 400 !important;
        text-align: right !important;
        text-shadow: none !important;
        overflow-wrap: anywhere !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 520px) {
    body.smh-home-modern .smh-v22-card-media,
    body.smh-home-modern .smh-v22-card-media img {
        height: 108px !important;
        min-height: 108px !important;
        max-height: 108px !important;
    }

    body.smh-home-modern .smh-v22-card-title {
        font-size: 14px !important;
        line-height: 1.55 !important;
        padding: 9px 8px 10px !important;
    }
}

@media (max-width: 350px) {
    body.smh-home-modern .smh-v22-mobile-articles {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.smh-home-modern .smh-v22-card-media,
    body.smh-home-modern .smh-v22-card-media img {
        height: 165px !important;
        min-height: 165px !important;
        max-height: 165px !important;
    }
}
