/*
Theme Name: Mzawa News
Theme URI: https://mzawa.co.tz/
Author: Mzawa Online
Description: Mobile-first WordPress news and magazine theme with configurable layouts, social sharing, advertisements and security-conscious code.
Version: 1.8.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mzawa-news
*/

:root {
    --mz-primary: #d71920;
    --mz-secondary: #111827;
    --mz-bg: #ffffff;
    --mz-surface: #f5f6f8;
    --mz-text: #111827;
    --mz-muted: #6b7280;
    --mz-border: #e5e7eb;
    --mz-container: 1180px;
    --mz-radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--mz-bg);
    color: var(--mz-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

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

a {
    color: inherit;
}

.mz-container {
    width: min(100% - 28px, var(--mz-container));
    margin-inline: auto;
}

.mz-skip {
    position: absolute;
    left: -9999px;
}

.mz-skip:focus {
    left: 12px;
    top: 12px;
    z-index: 9999;
    background: #fff;
    padding: 10px;
}

.mz-topbar {
    background: var(--mz-secondary);
    color: #fff;
    font-size: 13px;
}

.mz-topbar-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mz-header {
    background: #fff;
    border-bottom: 1px solid var(--mz-border);
}

.mz-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
}

.custom-logo {
    max-height: 52px;
    width: auto;
}

.site-title {
    text-decoration: none;
    font-size: 26px;
    font-weight: 800;
}

.mz-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mz-icon-button {
    border: 1px solid var(--mz-border);
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.mz-nav-wrap {
    border-bottom: 1px solid var(--mz-border);
    background: #fff;
}

.mz-nav,
.mz-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.mz-nav li {
    display: block;
}

.mz-nav a {
    display: block;
    padding: 13px 15px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    font-size: 14px;
}

.mz-nav a:hover,
.mz-nav .current-menu-item>a {
    color: var(--mz-primary);
}

.mz-menu-toggle {
    display: none;
}

.mz-breaking {
    background: var(--mz-breaking-bg);
    color: #fff;
}

.mz-breaking-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    overflow: hidden;
}

.mz-breaking-label {
    font-weight: 800;
    white-space: nowrap;
}

.mz-breaking-track {
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    position: relative;
    display: flex;
}

.mz-breaking-marquee {
    display: inline-flex;
    white-space: nowrap;
    padding-left: 100%;
    animation: mz-scroll-left 25s linear infinite;
}

.mz-breaking-marquee:hover {
    animation-play-state: paused;
}

@keyframes mz-scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.mz-breaking-track a {
    color: #fff;
    text-decoration: none;
}

.mz-main {
    padding-block: 22px 45px;
}

.mz-section {
    margin-top: 34px;
}

.mz-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-size: 20px;
    line-height: 1.2;
}

.mz-home-widget .mz-section-head {
    border-bottom: 0;
    margin-bottom: 12px;
}

.mz-home-widget .mz-section-title {
    display: inline-block;
    background: #0ea5e9;
    /* Light blue from screenshot */
    color: #fff;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 800;
    border-bottom: none;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 0;
}

.mz-home-widget .mz-section-title:after {
    display: none;
}

.mz-featured {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.mz-featured-main,
.mz-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--mz-radius);
    background: #fff;
    border: 1px solid var(--mz-border);
}

.mz-featured-main img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.mz-featured-main .mz-card-body {
    padding: 18px;
}

.mz-featured-main h1 {
    font-size: clamp(25px, 3.4vw, 42px);
    line-height: 1.12;
    margin: 7px 0;
}

.mz-side-featured {
    display: grid;
    gap: 18px;
}

.mz-side-featured .mz-card {
    display: grid;
    grid-template-columns: 40% 60%;
}

.mz-side-featured img {
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
}

.mz-card-body {
    padding: 12px;
}

.mz-card h2,
.mz-card h3 {
    margin: 5px 0;
    line-height: 1.25;
}

.mz-card h2 {
    font-size: 20px;
}

.mz-card h3 {
    font-size: 17px;
}

.mz-meta {
    color: var(--mz-muted);
    font-size: 12px;
}

.mz-category {
    color: var(--mz-primary);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
}

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

.mz-grid .mz-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}

.mz-content-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 28px;
}

.mz-list {
    display: grid;
    gap: 14px;
}

.mz-list .mz-card {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.mz-list .mz-card img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
}

.mz-sidebar-box {
    border: 1px solid var(--mz-border);
    padding: 16px;
    border-radius: var(--mz-radius);
    margin-bottom: 18px;
}

.mz-sidebar-box h3 {
    margin-top: 0;
    border-left: 4px solid var(--mz-primary);
    padding-left: 9px;
}

.mz-ad {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mz-surface);
    border: 1px dashed #cbd5e1;
    margin: 18px 0;
    color: var(--mz-muted);
    font-size: 12px;
}

.mz-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mz-social a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--mz-border);
    border-radius: 7px;
    padding: 8px 11px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
}

.mz-social a:hover {
    border-color: var(--mz-primary);
    color: var(--mz-primary);
}

.mz-share {
    margin: 16px 0;
}

.mz-single-header h1 {
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.08;
    margin: 10px 0;
}

.mz-featured-image {
    margin: 18px 0;
}

.mz-featured-image img {
    width: 100%;
    border-radius: var(--mz-radius);
}

.mz-entry {
    font-size: 18px;
    max-width: 820px;
}

.mz-entry img {
    border-radius: 6px;
}

.mz-footer {
    background: #111827;
    color: #fff;
    padding: 42px 0 18px;
}

.mz-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.mz-footer a {
    color: #fff;
}

.mz-copyright {
    border-top: 1px solid rgba(255, 255, 255, .15);
    margin-top: 28px;
    padding-top: 16px;
    color: #cbd5e1;
    font-size: 13px;
}

.mz-dark {
    background: #0b1120;
    color: #e5e7eb;
}

.mz-dark .mz-header,
.mz-dark .mz-nav-wrap,
.mz-dark .mz-card,
.mz-dark .mz-social a,
.mz-dark .mz-icon-button {
    background: #111827;
    color: #e5e7eb;
}

.mz-dark .mz-header,
.mz-dark .mz-nav-wrap,
.mz-dark .mz-card,
.mz-dark .mz-social a {
    border-color: #263244;
}

.mz-dark .mz-surface {
    background: #172033;
}

@media (max-width: 900px) {
    .mz-featured {
        grid-template-columns: 1fr;
    }

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

    .mz-content-sidebar {
        grid-template-columns: 1fr;
    }

    .mz-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .mz-topbar {
        display: none;
    }

    .mz-header-main {
        min-height: 62px;
    }

    .site-title {
        font-size: 21px;
    }

    .mz-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--mz-border);
        background: #fff;
        width: 40px;
        height: 40px;
        border-radius: 7px;
    }

    .mz-nav-wrap {
        display: none;
    }

    .mz-nav-wrap.is-open {
        display: block;
    }

    .mz-nav,
    .mz-nav ul {
        display: block;
        overflow: visible;
    }

    .mz-nav li {
        display: block;
        width: 100%;
    }

    .mz-nav a {
        padding: 12px 2px;
        border-bottom: 1px solid var(--mz-border);
    }

    .mz-breaking-inner {
        min-height: 38px;
    }

    .mz-breaking-label {
        font-size: 12px;
    }

    .mz-main {
        padding-top: 15px;
    }

    .mz-grid {
        grid-template-columns: 1fr;
    }

    .mz-list .mz-card {
        grid-template-columns: 115px 1fr;
    }

    .mz-list .mz-card img {
        min-height: 95px;
    }

    .mz-card-body {
        padding: 10px;
    }

    .mz-featured-main .mz-card-body {
        padding: 14px;
    }

    .mz-footer-grid {
        grid-template-columns: 1fr;
    }

    .mz-entry {
        font-size: 17px;
    }

    .mz-social a {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }
}


/* ===== Mzawa News Pro UI upgrade ===== */
.mz-container {
    max-width: var(--mz-container)
}

.mz-header.is-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08)
}

.mz-nav-wrap.is-sticky {
    position: sticky;
    top: 74px;
    z-index: 999
}

.mz-logo-row {
    display: flex;
    align-items: center;
    gap: 18px
}

.mz-date-pill {
    font-size: 12px;
    color: var(--mz-muted)
}

.mz-menu-button {
    display: none
}

.mz-hero-label {
    display: inline-block;
    background: var(--mz-primary);
    color: #fff;
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase
}

.mz-featured-main {
    box-shadow: 0 5px 22px rgba(15, 23, 42, .07)
}

.mz-featured-main .mz-card-body {
    background: linear-gradient(180deg, #fff 0, #fff 100%)
}

.mz-featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px
}

.mz-featured-grid .mz-tile {
    position: relative;
    min-height: 240px;
    border-radius: 8px;
    overflow: hidden;
    background: #111
}

.mz-featured-grid .mz-tile:first-child {
    grid-row: span 2;
    min-height: 494px
}

.mz-featured-grid .mz-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0
}

.mz-featured-grid .mz-tile:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .82))
}

.mz-tile-body {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    color: #fff
}

.mz-tile-body a {
    color: #fff;
    text-decoration: none
}

.mz-tile-body h2,
.mz-tile-body h3 {
    margin: 7px 0 0;
    line-height: 1.15
}

.mz-tile-body h2 {
    font-size: 30px
}

.mz-tile-body h3 {
    font-size: 18px
}

.mz-numbered-list {
    counter-reset: mzrank;
    display: grid;
    gap: 11px
}

.mz-numbered-item {
    counter-increment: mzrank;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--mz-border)
}

.mz-numbered-item:before {
    content: counter(mzrank);
    font-size: 24px;
    font-weight: 900;
    color: var(--mz-primary);
    line-height: 1
}

.mz-numbered-item h4 {
    margin: 0;
    line-height: 1.3
}

.mz-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--mz-text);
    margin-bottom: 16px
}

.mz-section-head .mz-section-title {
    margin: 0;
    border-bottom: 3px solid var(--mz-primary);
    padding-bottom: 8px;
    display: block
}

.mz-section-head .mz-section-title:after {
    display: none
}

.mz-view-all {
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    color: var(--mz-primary)
}

.mz-category-block {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 15px
}

.mz-category-lead img {
    aspect-ratio: 16/10;
    width: 100%;
    object-fit: cover;
    border-radius: 7px
}

.mz-category-lead h3 {
    font-size: 23px;
    line-height: 1.2;
    margin: 8px 0
}

.mz-mini-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--mz-border)
}

.mz-mini-card img {
    width: 110px;
    height: 78px;
    object-fit: cover;
    border-radius: 5px
}

.mz-mini-card h4 {
    margin: 0;
    font-size: 15px;
    line-height: 1.25
}

.mz-video-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px
}

.mz-video-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #000
}

.mz-video-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    opacity: .85
}

.mz-play {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: var(--mz-primary);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center
}

.mz-search-modal {
    width: min(700px, 92vw);
    border: 0;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .25)
}

.mz-search-modal::backdrop {
    background: rgba(0, 0, 0, .55)
}

.mz-search-form {
    display: flex;
    gap: 8px
}

.mz-search-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--mz-border);
    border-radius: 7px
}

.mz-search-form button {
    padding: 12px 18px;
    border: 0;
    border-radius: 7px;
    background: var(--mz-primary);
    color: #fff;
    font-weight: 700
}

.mz-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--mz-primary);
    z-index: 2000
}

.mz-mobile-share {
    display: none
}

.mz-author-box {
    display: flex;
    gap: 15px;
    align-items: center;
    border: 1px solid var(--mz-border);
    border-radius: 8px;
    padding: 15px;
    margin: 25px 0
}

.mz-author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover
}

.mz-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 25px 0
}

.mz-tags a {
    background: var(--mz-surface);
    padding: 5px 9px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px
}

.mz-breadcrumbs {
    font-size: 12px;
    color: var(--mz-muted);
    margin-bottom: 8px
}

.mz-breadcrumbs a {
    text-decoration: none
}

.mz-newsletter {
    background: var(--mz-secondary);
    color: #fff;
    border-radius: 9px;
    padding: 22px;
    margin: 25px 0
}

.mz-newsletter h3 {
    margin-top: 0
}

@media(max-width:900px) {
    .mz-featured-grid {
        grid-template-columns: 1fr 1fr
    }

    .mz-featured-grid .mz-tile:first-child {
        grid-column: span 2;
        grid-row: auto;
        min-height: 350px
    }

    .mz-category-block,
    .mz-video-grid {
        grid-template-columns: 1fr 1fr
    }

    .mz-category-lead {
        grid-column: span 2
    }
}

@media(max-width:680px) {
    .mz-date-pill {
        display: none
    }

    .mz-menu-button {
        display: inline-flex
    }

    .mz-featured-grid {
        grid-template-columns: 1fr
    }

    .mz-featured-grid .mz-tile:first-child {
        grid-column: auto;
        min-height: 310px
    }

    .mz-featured-grid .mz-tile {
        min-height: 210px
    }

    .mz-category-block,
    .mz-video-grid {
        grid-template-columns: 1fr
    }

    .mz-category-lead {
        grid-column: auto
    }

    .mz-tile-body h2 {
        font-size: 25px
    }

    .mz-mobile-share {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        background: #fff;
        border-top: 1px solid var(--mz-border);
        padding: 7px;
        display: flex;
        justify-content: center;
        box-shadow: 0 -3px 14px rgba(0, 0, 0, .1)
    }

    .mz-mobile-share .mz-social {
        margin: 0;
        width: 100%;
        justify-content: center
    }

    .mz-mobile-share .mz-social a {
        flex: 1;
        padding: 7px 3px
    }

    body {
        padding-bottom: 56px
    }
}

.mz-mega-strip {
    background: #fff;
    border-bottom: 1px solid var(--mz-border);
    padding: 12px 0
}

.mz-mega-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px
}

.mz-mega-item {
    text-decoration: none;
    display: grid;
    gap: 7px;
    font-size: 13px;
    line-height: 1.25
}

.mz-mega-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px
}

.mz-dark .mz-mega-strip {
    background: #111827;
    border-color: #263244
}

@media(max-width:680px) {
    .mz-mega-strip {
        display: none
    }
}

/* Pro Advertising Manager */
.mz-pro-ad {
    width: 100%;
    margin: 22px auto;
    position: relative;
    overflow: hidden;
    line-height: 0;
    text-align: center;
    clear: both
}

.mz-pro-ad a {
    display: block
}

.mz-pro-ad picture,
.mz-pro-ad img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 auto
}

.mz-pro-ad img {
    object-fit: contain
}

.mz-pro-ad .mz-ad-label {
    position: absolute;
    right: 5px;
    bottom: 4px;
    font: 10px/1.2 Arial, sans-serif;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    padding: 3px 5px;
    border-radius: 2px;
    opacity: .75
}

.mz-pro-ad-header {
    max-width: 1920px;
    margin: 0 auto 18px
}

.mz-pro-ad-sidebar {
    margin: 0 0 22px
}

.mz-pro-ad-mobile_sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    margin: 0;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .18);
    display: none;
    padding-bottom: env(safe-area-inset-bottom)
}

.mz-pro-ad-mobile_sticky img {
    max-height: 100px;
    width: auto
}

.mz-pro-ad-article_middle {
    margin: 26px auto
}

.mz-ad {
    width: 100%;
    margin: 18px auto;
    text-align: center
}

.mz-ad img {
    max-width: 100%;
    height: auto
}

.mz-entry .mz-pro-ad:first-child {
    margin-top: 18px
}

@media(max-width:680px) {
    .mz-pro-ad {
        margin: 16px auto
    }

    .mz-pro-ad-header {
        margin-top: 0
    }

    .mz-pro-ad-mobile_sticky {
        display: block
    }

    .mz-pro-ad-mobile_sticky[data-mz-ad-devices*="mobile"] {
        display: block
    }

    .mz-pro-ad-mobile_sticky:not([data-mz-ad-devices*="mobile"]) {
        display: none
    }

    .mz-pro-ad[data-mz-ad-devices*="desktop"] {
        display: block;
    }

    .mz-pro-ad-sidebar {
        margin-top: 18px
    }

    .mz-pro-ad-article_middle {
        margin: 20px auto
    }
}

@media(min-width:681px) {
    .mz-pro-ad-mobile_sticky {
        display: none !important
    }
}

/* v1.7 Commercial Advertising Reports */
.mz-ad-report-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0
}

.mz-ad-report-kpis>div {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 18px
}

.mz-ad-report-kpis strong {
    display: block;
    font-size: 25px
}

.mz-ad-report-kpis span {
    display: block;
    color: #646970;
    margin-top: 6px
}

.mz-ad-report-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px
}

@media(max-width:800px) {

    .mz-ad-report-kpis,
    .mz-ad-report-cols {
        grid-template-columns: 1fr
    }
}

/* ===== Homepage Widget Layouts - Responsive ===== */

/* Wrapper spacing */
.mz-home-widget {
    margin-bottom: 40px;
}

/* Section title badge */
.mz-home-widget .mz-section-head {
    border-bottom: 0;
    margin-bottom: 14px;
}

.mz-home-widget .mz-section-title {
    display: inline-block;
    background: var(--mz-primary);
    color: #fff;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.mz-home-widget .mz-section-title:after {
    display: none;
}

/* ---- MODERN SPLIT LAYOUT ---- */
.mz-modern-block {
    display: grid;
    grid-template-columns: minmax(0, 55%) minmax(0, 45%);
    gap: 28px;
    margin-top: 10px;
}

/* Main left panel */
.mz-modern-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mz-modern-img-link {
    display: block;
}

.mz-modern-thumb {
    width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
}

.mz-modern-title {
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.mz-modern-title a {
    text-decoration: none;
    color: inherit;
}

.mz-modern-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--mz-muted);
}

.mz-author-name {
    color: var(--mz-text);
    font-weight: 700;
}

.mz-comment-count {
    background: #777;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.mz-modern-excerpt {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
}

/* Right side panel */
.mz-modern-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mz-modern-side-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--mz-border);
}

.mz-modern-side-item:last-child {
    border-bottom: 0;
}

.mz-modern-side-img {
    display: block;
    flex-shrink: 0;
}

.mz-modern-side-thumb {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.mz-modern-side-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mz-modern-side-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.mz-modern-side-title a {
    text-decoration: none;
    color: inherit;
}

/* Load more link */
.mz-loadmore-wrap {
    text-align: center;
    margin-top: 22px;
}

.mz-loadmore-link {
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    color: var(--mz-text);
}

.mz-loadmore-link:hover {
    color: var(--mz-primary);
}

/* ---- RESPONSIVE BREAKPOINTS ---- */

/* Tablet 900px */
@media (max-width: 900px) {
    .mz-modern-block {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .mz-modern-side-item {
        grid-template-columns: 110px 1fr;
        gap: 10px;
    }

    .mz-modern-side-thumb {
        height: 75px;
    }
}

/* Mobile 680px */
@media (max-width: 680px) {

    /* Modern Split stacks into a single column */
    .mz-modern-block {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mz-modern-main {
        gap: 8px;
    }

    .mz-modern-thumb {
        height: auto;
    }

    /* Side items become a 2-column small grid on mobile */
    .mz-modern-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .mz-modern-side-item {
        grid-template-columns: 1fr;
        border-bottom: 0;
        padding-bottom: 0;
        border: 1px solid var(--mz-border);
        border-radius: 6px;
        overflow: hidden;
    }

    .mz-modern-side-img {
        display: block;
    }

    .mz-modern-side-thumb {
        width: 100%;
        height: auto;
    }

    .mz-modern-side-body {
        padding: 8px;
    }

    .mz-modern-side-title {
        font-size: 13px;
    }

    /* Grid layout: single column on mobile */
    .mz-grid {
        grid-template-columns: 1fr;
    }

    /* List layout: tighter on mobile */
    .mz-list .mz-card {
        grid-template-columns: 100px 1fr;
    }

    .mz-list .mz-card img {
        min-height: 80px;
    }
}

/* Very small screens 400px */
@media (max-width: 400px) {
    .mz-modern-side {
        grid-template-columns: 1fr;
    }
}

/* ===== Magazeti (PDF) Widget ===== */
.mz-mag-grid {
    display: grid;
    gap: 20px;
    margin-top: 10px;
}

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

.mz-mag-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mz-mag-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mz-mag-card {
    border: 1px solid var(--mz-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.mz-mag-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
    transform: translateY(-3px);
}

/* Cover image area */
.mz-mag-cover-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.mz-mag-cover-img {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    /* A4 Standard Ratio so it mimics a magazine */
    object-fit: contain;
    background: #f8fafc;
    /* Rangi nzuri ya nyuma kama picha hailingani */
    display: block;
    transition: transform .3s;
}

.mz-mag-card:hover .mz-mag-cover-img {
    transform: scale(1.03);
}

/* No cover placeholder */
.mz-mag-no-cover {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--mz-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mz-mag-no-cover span {
    font-size: 32px;
    font-weight: 900;
    color: var(--mz-muted);
    opacity: .4;
}

/* Free / Paid badge */
.mz-mag-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
    z-index: 2;
}

/* Info section */
.mz-mag-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.mz-mag-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

.mz-mag-title a {
    text-decoration: none;
    color: inherit;
}

.mz-mag-title a:hover {
    color: var(--mz-primary);
}

/* Action buttons */
.mz-mag-btn {
    display: block;
    text-align: center;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    transition: opacity .2s;
}

.mz-mag-btn:hover {
    opacity: .85;
}

.mz-mag-btn--free {
    background: #16a34a;
    color: #fff;
}

.mz-mag-btn--paid {
    background: var(--mz-primary);
    color: #fff;
}

.mz-mag-btn:not(.mz-mag-btn--free):not(.mz-mag-btn--paid) {
    background: var(--mz-surface);
    color: var(--mz-text);
    border: 1px solid var(--mz-border);
}

/* Responsive */
@media (max-width: 900px) {
    .mz-mag-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .mz-mag-cols-3,
    .mz-mag-cols-4,
    .mz-mag-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .mz-mag-cols-2,
    .mz-mag-cols-3,
    .mz-mag-cols-4 {
        grid-template-columns: 1fr;
        /* Simu iwe column 1 */
    }
}

/* ===== Magazine Single Page ===== */
.mz-mag-single-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    margin-bottom: 36px;
    align-items: flex-start;
}

/* Cover */
.mz-mag-single-cover {
    position: relative;
}

.mz-mag-single-thumb {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
    display: block;
}

.mz-mag-access-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.mz-badge-free {
    background: #16a34a;
}

.mz-badge-paid {
    background: var(--mz-primary);
}

/* Info panel */
.mz-mag-single-title {
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px;
}

.mz-mag-single-desc {
    color: var(--mz-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.mz-mag-price-row {
    margin-bottom: 18px;
    font-size: 16px;
}

.mz-mag-price-tag {
    font-weight: 600;
}

/* Action Buttons */
.mz-mag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.mz-mag-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: opacity .2s, transform .15s;
}

.mz-mag-action-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
}

.mz-btn-read {
    background: var(--mz-primary);
    color: #fff;
}

.mz-btn-download {
    background: #1d4ed8;
    color: #fff;
}

.mz-btn-request {
    background: #f59e0b;
    color: #fff;
}

.mz-btn-disabled {
    background: var(--mz-surface);
    color: var(--mz-muted);
    cursor: not-allowed;
}

/* Request form */
.mz-request-form {
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    border-radius: 10px;
    padding: 22px;
    margin-top: 16px;
}

.mz-request-form h3 {
    margin-top: 0;
    font-size: 18px;
}

.mz-form-row {
    margin-bottom: 14px;
}

.mz-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.mz-form-row input,
.mz-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mz-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.mz-form-row textarea {
    resize: vertical;
}

.mz-request-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    padding: 12px 16px;
    border-radius: 7px;
    font-weight: 600;
    margin: 8px 0;
}

.mz-request-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 12px 16px;
    border-radius: 7px;
    font-weight: 600;
    margin: 8px 0;
}

/* PDF Viewer */
.mz-pdf-reader-wrap {
    border: 1px solid var(--mz-border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

.mz-pdf-reader-header {
    background: var(--mz-secondary);
    color: #fff;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 15px;
}

.mz-pdf-dl-btn {
    background: #fff;
    color: var(--mz-secondary);
    padding: 5px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.mz-pdf-reader-body {
    position: relative;
}

.mz-pdf-iframe {
    width: 100%;
    height: 80vh;
    min-height: 500px;
    border: none;
    display: block;
}

.mz-pdf-fallback {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--mz-muted);
}

.mz-pdf-locked {
    background: #fef9c3;
    border: 1px solid #fde047;
    padding: 20px;
    border-radius: 8px;
    margin-top: 24px;
    font-size: 16px;
    font-weight: 600;
    color: #713f12;
}

/* Responsive magazine single */
@media (max-width: 760px) {
    .mz-mag-single-wrap {
        grid-template-columns: 1fr;
    }

    .mz-mag-single-cover {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mz-mag-single-thumb {
        max-width: 260px;
    }

    .mz-pdf-iframe {
        height: 60vh;
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    .mz-mag-actions {
        flex-direction: column;
    }

    .mz-mag-action-btn {
        justify-content: center;
    }
}

/* ===== Homepage Widget Builder – Spacing ===== */
.mz-home-widget {
    margin-bottom: 32px;
}

/* ===== Modern Block Layout (Top Stories / Modern Split) ===== */
.mz-modern-block {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Main (left) featured post */
.mz-modern-main {
    border-radius: var(--mz-radius);
    overflow: hidden;
    border: 1px solid var(--mz-border);
    background: #fff;
}

.mz-modern-img-link {
    display: block;
    overflow: hidden;
    border-radius: var(--mz-radius) var(--mz-radius) 0 0;
}

.mz-modern-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.mz-modern-img-link:hover .mz-modern-thumb {
    transform: scale(1.03);
}

.mz-modern-title {
    font-size: clamp(20px, 2.8vw, 32px);
    line-height: 1.2;
    margin: 12px 16px 8px;
}

.mz-modern-title a {
    text-decoration: none;
    color: var(--mz-text);
}

.mz-modern-title a:hover {
    color: var(--mz-primary);
}

.mz-modern-meta {
    font-size: 12px;
    color: var(--mz-muted);
    margin: 0 16px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mz-author-name {
    font-weight: 700;
    color: var(--mz-secondary);
}

.mz-comment-count {
    display: none;
    /* hide if no icon – can style later */
}

.mz-modern-excerpt {
    font-size: 14px;
    color: var(--mz-muted);
    line-height: 1.6;
    margin: 0 16px 16px;
}

/* Right side list of secondary posts */
.mz-modern-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mz-modern-side-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    border: 1px solid var(--mz-border);
    border-radius: var(--mz-radius);
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.mz-modern-side-item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
}

.mz-modern-side-img {
    display: block;
    overflow: hidden;
}

.mz-modern-side-thumb {
    width: 100px;
    height: 100%;
    min-height: 80px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.mz-modern-side-img:hover .mz-modern-side-thumb {
    transform: scale(1.05);
}

.mz-modern-side-body {
    padding: 10px 10px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mz-modern-side-title {
    font-size: 15px;
    line-height: 1.3;
    margin: 0 0 6px;
}

.mz-modern-side-title a {
    text-decoration: none;
    color: var(--mz-text);
}

.mz-modern-side-title a:hover {
    color: var(--mz-primary);
}

/* "Load more" link */
.mz-loadmore-wrap {
    margin-top: 14px;
    text-align: center;
}

.mz-loadmore-link {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--mz-primary);
    color: var(--mz-primary);
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.mz-loadmore-link:hover {
    background: var(--mz-primary);
    color: #fff;
}

/* Dark mode */
.mz-dark .mz-modern-main,
.mz-dark .mz-modern-side-item {
    background: #111827;
    border-color: #263244;
}

.mz-dark .mz-modern-title a,
.mz-dark .mz-modern-side-title a {
    color: #e5e7eb;
}

/* Responsive – Modern Block */
@media (max-width: 900px) {
    .mz-modern-block {
        grid-template-columns: 1fr;
    }

    .mz-modern-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 580px) {
    .mz-modern-block {
        grid-template-columns: 1fr;
    }

    .mz-modern-side {
        grid-template-columns: 1fr;
    }

    .mz-modern-side-item {
        grid-template-columns: 85px 1fr;
    }

    .mz-modern-side-thumb {
        width: 85px;
        min-height: 70px;
    }
}