/*
    MOI-DL BBC-inspired Homepage
    - Fully scoped to home.html
    - Uses existing Bootstrap, FontAwesome, ZeroFour, and static files
    - No backend logic changed inside the template
*/

.moi-after-nav-space {
    height: clamp(24px, 4vw, 46px);
    width: 100%;
}

.moi-home {
    --moi-black: #111111;
    --moi-dark: #202020;
    --moi-red: #b80000;
    --moi-red-dark: #8f0000;
    --moi-white: #ffffff;
    --moi-soft: #f6f6f6;
    --moi-border: #d9d9d9;
    --moi-muted: #686868;

    background: #ffffff;
    color: var(--moi-black);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

.moi-home,
.moi-home * {
    text-shadow: none !important;
    box-sizing: border-box;
}

.moi-home a {
    color: inherit;
    text-decoration: none;
}

.moi-home a:hover {
    color: var(--moi-red);
    text-decoration: underline;
}

.moi-container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.moi-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--moi-red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.moi-kicker::before {
    content: "";
    width: 28px;
    height: 3px;
    background: var(--moi-red);
    display: inline-block;
}

.moi-section-title {
    border-top: 3px solid var(--moi-black);
    padding-top: 12px;
    margin: 0 0 18px 0;
    color: var(--moi-black);
    font-size: clamp(21px, 2.2vw, 28px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.moi-meta {
    color: var(--moi-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.moi-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #dddddd;
}

.moi-clamp-2,
.moi-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.moi-clamp-2 {
    -webkit-line-clamp: 2;
}

.moi-clamp-3 {
    -webkit-line-clamp: 3;
}

.moi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 15px;
    background: var(--moi-red);
    color: #ffffff !important;
    border: 2px solid var(--moi-red);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.moi-btn:hover {
    background: var(--moi-red-dark);
    border-color: var(--moi-red-dark);
    color: #ffffff !important;
}

.moi-btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.72);
    color: #ffffff !important;
}

.moi-btn-outline:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--moi-black) !important;
}

/* Hero */

/* =========================================================
Dynamic hero background carousel
========================================================= */

.moi-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
    #090909
    url("/static/img/bg-img/breadcumb2.jpg")
    center / cover no-repeat;
    color: #ffffff;
    padding: clamp(34px, 6vw, 70px) 0 clamp(28px, 4vw, 44px);
    margin-bottom: 22px;
}

/* Keeps the normal heading/statistics above all moving media */
.moi-hero > .moi-container {
    position: relative;
    z-index: 4;
}

/* Holds all thumbnails and the short preview video */
.moi-hero-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #090909;
    pointer-events: none;
}

/* Each database-retrieved cover image */
.moi-hero-slide {
    position: absolute;
    inset: -2%;
    width: 104%;
    height: 104%;
    display: block;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    visibility: hidden;
    filter: saturate(0.9) contrast(1.04);
    transform: scale(1.04) translateX(-1%);
    transition:
        opacity 1.15s ease,
        visibility 1.15s ease;
    will-change: opacity, transform;
}

.moi-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    animation: moiHeroBackgroundMotion 6s ease-out forwards;
}

@keyframes moiHeroBackgroundMotion {
    from {
        transform: scale(1.04) translateX(-1.2%);
    }

    to {
        transform: scale(1.09) translateX(1.2%);
    }
}

/* Six-second MP4 generated by Multimedia.generate_preview_clip() */
.moi-hero-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #090909;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.9s ease,
        visibility 0.9s ease;
}

.moi-hero-preview.is-active {
    opacity: 1;
    visibility: visible;
}

/* Maintains the readable BBC-style dark foreground */
.moi-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.93) 0%,
            rgba(0, 0, 0, 0.77) 48%,
            rgba(0, 0, 0, 0.58) 100%
        ),
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.35),
            transparent 55%
        );
}

/* Displays which content type is currently behind the hero */
.moi-hero-source {
    position: absolute;
    right: max(16px, calc((100vw - 1240px) / 2));
    bottom: 14px;
    z-index: 5;
    max-width: min(320px, calc(100% - 32px));
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,0.20);
    background: rgba(0,0,0,0.42);
    color: rgba(255,255,255,0.82);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.moi-hero-source i {
    color: var(--moi-red);
}

@media screen and (max-width: 736px) {
    .moi-hero-source {
        display: none;
    }

    .moi-hero-shade {
        background:
            linear-gradient(
                90deg,
                rgba(0,0,0,0.91),
                rgba(0,0,0,0.73)
            );
    }
}

/* Accessibility: no automatic background movement */
@media (prefers-reduced-motion: reduce) {
    .moi-hero-slide,
    .moi-hero-slide.is-active,
    .moi-hero-preview {
        animation: none !important;
        transition: none !important;
    }
}

.moi-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 26px;
    align-items: end;
}

.moi-hero h1 {
    margin: 10px 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 70px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.065em;
    max-width: 880px;
}

.moi-hero p {
    margin: 0;
    max-width: 760px;
    color: rgba(255,255,255,0.87);
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.55;
}

.moi-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.moi-stat-panel {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 18px;
    backdrop-filter: blur(6px);
}

.moi-stat-panel h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.moi-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.moi-stat-item {
    padding: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}

.moi-stat-number {
    display: block;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
}

.moi-stat-label {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,0.72);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
/* =========================================================
Dynamic "Now Showing" hero panel
========================================================= */

.moi-hero-focus-panel {
    min-width: 0;
    width: 100%;
    height: 300px;
    min-height: 300px;
    padding: 19px;

    display: flex;
    flex-direction: column;

    border: 1px solid rgba(255,255,255,0.20);
    border-left: 4px solid var(--moi-red);
    background: rgba(0,0,0,0.42);
    color: #ffffff;
    backdrop-filter: blur(8px);

    overflow: hidden;

    transition:
        background 0.4s ease,
        border-color 0.4s ease,
        transform 0.4s ease;
}
/* Keep the preview title within two lines */
.moi-hero-focus-panel h2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    min-height: 54px;
    max-height: 54px;
    overflow: hidden;
}

/* Keep the description within three lines */
.moi-hero-focus-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    min-height: 60px;
    max-height: 60px;
    overflow: hidden;
}

/* Keep the action and note aligned near the bottom */
.moi-hero-focus-link {
    align-self: flex-start;
}

.moi-hero-focus-note {
    margin-top: auto;
}

.moi-hero-focus-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
    min-width: 0;
}

.moi-hero-focus-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--moi-red);
    color: #ffffff;
    font-size: 17px;
}

.moi-hero-focus-head > div:last-child {
    min-width: 0;
}

.moi-hero-focus-eyebrow {
    display: block;
    color: rgba(255,255,255,0.70);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.moi-hero-focus-panel h2 {
    margin: 3px 0 0;
    color: #ffffff;
    font-size: clamp(19px, 2vw, 25px);
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.moi-hero-focus-summary {
    margin: 0 0 12px !important;
    color: rgba(255,255,255,0.82) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

.moi-hero-focus-meta {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.68);
    font-size: 11px;
    line-height: 1.45;
    font-weight: 800;
    text-transform: uppercase;
}

.moi-hero-focus-meta i {
    margin-top: 2px;
    color: var(--moi-red);
}

.moi-hero-focus-link {
    min-height: 39px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.70);
    background: rgba(255,255,255,0.06);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
}

.moi-hero-focus-link:hover {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--moi-black) !important;
}

.moi-hero-focus-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.58);
    font-size: 10px;
    line-height: 1.45;
}

/* Stronger visual emphasis while the video preview is playing */
.moi-hero.is-previewing .moi-hero-shade {
    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,0.94) 0%,
            rgba(0,0,0,0.80) 42%,
            rgba(0,0,0,0.25) 100%
        ),
        linear-gradient(
            0deg,
            rgba(0,0,0,0.26),
            transparent 55%
        );
}

.moi-hero.is-previewing .moi-hero-focus-panel {
    border-color: rgba(255,255,255,0.35);
    border-left-color: #ff3030;
    background: rgba(115,0,0,0.42);
    transform: translateY(-2px);
}

.moi-hero.is-previewing .moi-hero-focus-icon {
    background: #e00000;
    box-shadow: 0 0 0 6px rgba(224,0,0,0.18);
}

@media screen and (max-width: 1100px) {
    .moi-hero-focus-panel {
        max-width: 680px;
    }
}

@media screen and (max-width: 736px) {
    .moi-hero-focus-panel {
        width: 100%;
        height: 300px;
        min-height: 300px;
        margin-top: 8px;
    }

    .moi-hero-focus-link {
        width: 100%;
    }

    .moi-hero.is-previewing .moi-hero-shade {
        background:
            linear-gradient(
                90deg,
                rgba(0,0,0,0.90),
                rgba(0,0,0,0.62)
            );
    }
}

/* Quick navigation */

.moi-section-strip {
    border-top: 1px solid var(--moi-border);
    border-bottom: 1px solid var(--moi-border);
    background: #ffffff;
    margin-bottom: 30px;
}

.moi-section-strip-inner {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: thin;
}

.moi-section-strip a {
    flex: 0 0 auto;
    padding: 12px 15px;
    border-right: 1px solid var(--moi-border);
    color: var(--moi-black);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.moi-section-strip a:first-child {
    border-left: 1px solid var(--moi-border);
}

.moi-section-strip a:hover {
    background: var(--moi-black);
    color: #ffffff;
    text-decoration: none;
}

/* Main editorial layout */

.moi-editorial-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    margin-bottom: 34px;
}

.moi-lead-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
    gap: 18px;
}

.moi-lead-card {
    min-width: 0;
    border-bottom: 1px solid var(--moi-border);
    padding-bottom: 14px;
}

.moi-lead-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #dddddd;
    margin-bottom: 14px;
}

.moi-lead-card h2 {
    margin: 0 0 10px;
    color: var(--moi-black);
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.moi-lead-card p {
    margin: 0 0 12px;
    color: #404040;
    font-size: 15px;
}

.moi-side-stack {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.moi-small-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    border-bottom: 1px solid var(--moi-border);
    padding-bottom: 13px;
}

.moi-small-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dddddd;
}

.moi-small-card h3 {
    margin: 0 0 7px;
    color: var(--moi-black);
    font-size: 17px;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.moi-small-card p {
    margin: 0 0 7px;
    color: #4e4e4e;
    font-size: 13px;
    line-height: 1.35;
}

.moi-rail {
    border-left: 1px solid var(--moi-border);
    padding-left: 22px;
    min-width: 0;
}

/* =========================================================
    MOI Live player — right rail, above Trending Now
    ========================================================= */

.moi-live-panel {
    margin: 0 0 26px;
    overflow: hidden;
    border-top: 4px solid var(--moi-red);
    background: #151515;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.moi-live-panel[data-live-state="error"] {
    border-top-color: #777777;
}

.moi-live-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 11px 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    background: #0d0d0d;
}

.moi-live-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.moi-live-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #e00000;
    box-shadow: 0 0 0 0 rgba(224, 0, 0, 0.65);
    animation: moiLivePulse 1.7s infinite;
}

@keyframes moiLivePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(224, 0, 0, 0.64);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(224, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(224, 0, 0, 0);
    }
}

.moi-live-status {
    color: rgba(255, 255, 255, 0.68);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: right;
    text-transform: uppercase;
}

.moi-live-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(184, 0, 0, 0.16), transparent 57%),
        #050505;
}

.moi-live-video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    background: #050505;
    object-fit: contain;
}

.moi-live-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 16px;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.34)),
        radial-gradient(circle at center, rgba(184, 0, 0, 0.20), transparent 65%);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.moi-live-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.moi-live-overlay-inner {
    max-width: 245px;
    text-align: center;
}

.moi-live-overlay-inner > i {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 26px;
}

.moi-live-overlay-inner strong {
    display: block;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 900;
}

.moi-live-overlay-inner span {
    display: block;
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 12px;
    line-height: 1.4;
}

.moi-live-start,
.moi-live-sound {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
}

.moi-live-start {
    min-height: 38px;
    margin-top: 14px;
    padding: 8px 13px;
    border: 1px solid #e00000;
    background: #c70000;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.moi-live-start:hover,
.moi-live-start:focus {
    border-color: #f00000;
    background: #e00000;
    color: #ffffff;
}

.moi-live-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    background: #151515;
}

.moi-live-title {
    display: block;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 900;
}

.moi-live-note {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.59);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.moi-live-sound {
    min-height: 31px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    background: transparent;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.moi-live-sound:hover,
.moi-live-sound:focus {
    border-color: #ffffff;
    background: #ffffff;
    color: #111111;
}

.moi-live-sound:disabled {
    cursor: default;
    opacity: 0.45;
}

@media (prefers-reduced-motion: reduce) {
    .moi-live-dot {
        animation: none;
    }
}

.moi-ranked-list {
    counter-reset: moi-rank;
    margin: 0;
    padding: 0;
    list-style: none;
}

.moi-ranked-list li {
    counter-increment: moi-rank;
    position: relative;
    min-height: 46px;
    border-bottom: 1px solid var(--moi-border);
    padding: 12px 0 12px 42px;
}

.moi-ranked-list li::before {
    content: counter(moi-rank);
    position: absolute;
    left: 0;
    top: 12px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: var(--moi-red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.moi-ranked-list a {
    color: var(--moi-black);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 900;
}

/* Category tiles */

.moi-band {
    border-top: 1px solid var(--moi-border);
    padding-top: 26px;
    margin-bottom: 34px;
}

.moi-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.moi-category-card {
    min-height: 126px;
    padding: 16px;
    background: var(--moi-black);
    color: #ffffff !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none !important;
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.moi-category-card:hover {
    background: var(--moi-red);
    color: #ffffff !important;
}

.moi-category-card i {
    color: #ffffff;
    font-size: 23px;
}

.moi-category-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.moi-category-card span {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    font-weight: 700;
}

/* Cards */

.moi-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.moi-card {
    min-width: 0;
    border-bottom: 1px solid var(--moi-border);
    padding-bottom: 14px;
}

.moi-card-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dddddd;
    margin-bottom: 11px;
}

.moi-card h3 {
    margin: 0 0 8px;
    color: var(--moi-black);
    font-size: 18px;
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.moi-card p {
    margin: 0 0 8px;
    color: #444444;
    font-size: 13px;
}

.moi-score-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.moi-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    background: #f0f0f0;
    color: #333333;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

/* List + spotlight */

.moi-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    gap: 24px;
}

.moi-list {
    display: grid;
    gap: 14px;
}

.moi-list-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    border-bottom: 1px solid var(--moi-border);
    padding-bottom: 14px;
}

.moi-list-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dddddd;
}

.moi-list-item h3 {
    margin: 0 0 7px;
    color: var(--moi-black);
    font-size: 20px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.moi-list-item p {
    margin: 0 0 8px;
    color: #4a4a4a;
    font-size: 14px;
}

.moi-spotlight {
    background: var(--moi-soft);
    border-top: 4px solid var(--moi-red);
    padding: 18px;
}

.moi-spotlight-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #dddddd;
    margin-bottom: 13px;
}

.moi-spotlight h3 {
    margin: 0 0 8px;
    color: var(--moi-black);
    font-size: 24px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.moi-spotlight p {
    margin: 0 0 14px;
    color: #444444;
    font-size: 14px;
}

.moi-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--moi-black);
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none !important;
}

.moi-read-more:hover {
    background: var(--moi-red);
    color: #ffffff !important;
}

/* Most viewed */

.moi-most-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.moi-most-card {
    min-width: 0;
    background: #f5f5f5;
    border-left: 4px solid var(--moi-red);
    padding: 14px;
}

.moi-most-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--moi-red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.moi-most-card h3 {
    margin: 0 0 8px;
    color: var(--moi-black);
    font-size: 18px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

/* Video feature */

.moi-video-feature {
    position: relative;
    min-height: 390px;
    display: grid;
    align-items: end;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    margin: 8px 0 34px;
}

.moi-video-feature::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.88), rgba(0,0,0,0.18));
}

.moi-video-content {
    position: relative;
    padding: 38px 0;
    color: #ffffff;
}

.moi-play-btn {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    background: var(--moi-red);
    color: #ffffff !important;
    border-radius: 50%;
    margin-bottom: 15px;
    text-decoration: none !important;
}

.moi-video-content h2 {
    margin: 0 0 8px;
    max-width: 900px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.055em;
}

/* CTA */

.moi-cta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.moi-cta {
    background: var(--moi-soft);
    border-top: 4px solid var(--moi-black);
    padding: 22px;
}

.moi-cta h2 {
    margin: 0 0 10px;
    color: var(--moi-black);
    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.moi-cta p {
    margin-bottom: 16px;
    color: #444444;
}

.moi-ad-area img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tablet */

@media screen and (max-width: 1100px) {
    .moi-hero-grid,
    .moi-editorial-grid,
    .moi-lead-grid,
    .moi-two-column {
        grid-template-columns: 1fr;
    }

    .moi-rail {
        border-left: 0;
        padding-left: 0;
    }

    .moi-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .moi-card-grid,
    .moi-most-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media screen and (max-width: 736px) {
    .moi-after-nav-space {
        height: 28px;
    }

    .moi-container {
        width: min(100% - 22px, 1240px);
    }

    .moi-hero {
        padding: 34px 0 28px;
    }

    .moi-hero h1 {
        font-size: clamp(32px, 13vw, 50px);
    }

    .moi-hero-actions {
        flex-direction: column;
    }

    .moi-btn {
        width: 100%;
    }

    .moi-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .moi-category-grid,
    .moi-card-grid,
    .moi-most-grid,
    .moi-cta-grid {
        grid-template-columns: 1fr;
    }

    .moi-small-card,
    .moi-list-item {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 11px;
    }

    .moi-small-card h3,
    .moi-list-item h3 {
        font-size: 16px;
    }

    .moi-card h3 {
        font-size: 17px;
    }

    .moi-video-feature {
        min-height: 320px;
    }

    .moi-video-content {
        padding: 28px 0;
    }
}

@media screen and (max-width: 430px) {
    .moi-small-card,
    .moi-list-item {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .moi-stat-grid {
        grid-template-columns: 1fr;
    }

    .moi-small-card p,
    .moi-list-item p {
        display: none;
    }
}
/* =========================================================
MOI-DL HOME TEXT OVERFLOW FIX
Put this at the very bottom of the home.html <style> block.
It protects this page from inherited ZeroFour / Bootstrap styles.
========================================================= */

/* Stop inherited CSS from forcing titles into one line or fixed height */
.moi-home h1,
.moi-home h2,
.moi-home h3,
.moi-home h4,
.moi-home h5,
.moi-home h6,
.moi-home p,
.moi-home a,
.moi-home span,
.moi-home div {
    max-width: 100%;
}

/* Most important fix: allow long titles to wrap safely */
.moi-home h1,
.moi-home h2,
.moi-home h3,
.moi-home h4,
.moi-home h5,
.moi-home h6,
.moi-home h1 a,
.moi-home h2 a,
.moi-home h3 a,
.moi-home h4 a,
.moi-home h5 a,
.moi-home h6 a,
.moi-ranked-list a,
.moi-meta,
.moi-score-pill,
.moi-category-card h3,
.moi-category-card span {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto;
}

/* Let grid/flex children shrink instead of pushing outside their cards */
.moi-hero-grid > *,
.moi-editorial-grid > *,
.moi-lead-grid > *,
.moi-side-stack > *,
.moi-small-card > *,
.moi-rail,
.moi-card-grid > *,
.moi-card,
.moi-list,
.moi-list-item,
.moi-list-item > *,
.moi-two-column > *,
.moi-most-grid > *,
.moi-most-card,
.moi-category-grid > *,
.moi-category-card,
.moi-cta-grid > *,
.moi-cta,
.moi-video-content {
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Make title links behave as block text instead of inline text overflowing */
.moi-lead-card h2 a,
.moi-small-card h3 a,
.moi-card h3 a,
.moi-list-item h3 a,
.moi-spotlight h3 a,
.moi-most-card h3 a,
.moi-ranked-list a,
.moi-video-content h2,
.moi-cta h2 {
    display: block;
    max-width: 100%;
}

/* Replace very tight BBC-style title spacing with safer spacing */
.moi-hero h1 {
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
}

.moi-lead-card h2 {
    line-height: 1.12 !important;
    letter-spacing: -0.025em !important;
}

.moi-small-card h3,
.moi-card h3,
.moi-list-item h3,
.moi-spotlight h3,
.moi-most-card h3,
.moi-video-content h2,
.moi-cta h2 {
    line-height: 1.18 !important;
    letter-spacing: -0.015em !important;
}

/* Safer clamp behavior */
.moi-clamp-2,
.moi-clamp-3 {
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.moi-clamp-2 {
    -webkit-line-clamp: 2;
}

.moi-clamp-3 {
    -webkit-line-clamp: 3;
}

/* Avoid tiny image/text layouts becoming too narrow on mobile */
@media screen and (max-width: 736px) {
    .moi-small-card,
    .moi-list-item {
        grid-template-columns: 96px minmax(0, 1fr) !important;
    }

    .moi-lead-card h2 {
        font-size: clamp(22px, 7vw, 32px) !important;
    }

    .moi-list-item h3,
    .moi-small-card h3,
    .moi-card h3,
    .moi-most-card h3 {
        font-size: 16px !important;
    }
}

/* Very small phones: stack image above text for maximum safety */
@media screen and (max-width: 430px) {
    .moi-small-card,
    .moi-list-item {
        grid-template-columns: 1fr !important;
    }

    .moi-small-img,
    .moi-list-img {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .moi-small-card p,
    .moi-list-item p {
        display: -webkit-box !important;
    }

    .moi-video-content h2 {
        font-size: 24px !important;
    }
}

/* =========================================================
MOI-DL HOME BBC EDITORIAL UPGRADE
Frontend-only overrides. Backend/template variables unchanged.
========================================================= */

.moi-container {
    width: min(1360px, calc(100% - 32px));
}

/* Wider right rail so the MOI Live player becomes slightly wider */
.moi-editorial-grid {
    grid-template-columns: minmax(0, 1.52fr) minmax(390px, 0.92fr);
    gap: 30px;
}

.moi-rail {
    padding-left: 26px;
}

.moi-live-panel {
    margin-bottom: 32px;
}

.moi-live-overlay-inner {
    max-width: 315px;
}

/* Featured by Engagement side cards */
.moi-side-stack {
    gap: 18px;
}

.moi-small-card {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--moi-border);
    border-left: 4px solid transparent;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.moi-small-card:hover {
    border-left-color: var(--moi-red);
    background: #fff8f8;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.moi-small-img {
    aspect-ratio: 4 / 3;
}

.moi-small-card h3 {
    font-size: 19px;
    line-height: 1.12;
}

.moi-featured-newspaper-card {
    grid-template-columns: minmax(175px, 0.96fr) minmax(0, 1fr);
    min-height: 220px;
    border-left-color: var(--moi-red);
    background: #f6f6f6;
}

.moi-featured-newspaper-card .moi-small-img {
    height: 100%;
    aspect-ratio: 4 / 3;
}

.moi-featured-newspaper-card h3 {
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.08;
}

.moi-featured-newspaper-card p {
    font-size: 14px;
}

/* Explore Library mosaic */
.moi-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 168px;
    gap: 16px;
}

.moi-category-card {
    position: relative;
    min-height: unset;
    padding: 0;
    overflow: hidden;
    background: #111111;
    color: #ffffff !important;
    display: block;
    isolation: isolate;
    border: 1px solid rgba(0,0,0,0.08);
}

.moi-category-card.is-large {
    grid-column: span 2;
    grid-row: span 2;
}

.moi-category-card.is-wide {
    grid-column: span 2;
}

.moi-category-thumb {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #222222;
}

.moi-category-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.04);
    transform: scale(1.01);
    transition: transform 0.28s ease, filter 0.28s ease;
}

.moi-category-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.88), rgba(0,0,0,0.18) 62%),
        linear-gradient(90deg, rgba(184,0,0,0.45), rgba(0,0,0,0.08));
}

.moi-category-content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 3;
    padding: 18px;
    color: #ffffff;
}

.moi-category-card i {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 12px;
    background: var(--moi-red);
    color: #ffffff;
    font-size: 18px;
}

.moi-category-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(22px, 2.05vw, 30px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.moi-category-card span.moi-category-count {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.moi-category-card span.moi-category-teaser {
    display: block;
    max-width: 310px;
    margin-top: 9px;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.moi-category-card:hover {
    color: #ffffff !important;
    text-decoration: none;
    background: #111111;
}

.moi-category-card:hover .moi-category-thumb img {
    transform: scale(1.08);
    filter: saturate(1.05) contrast(1.08);
}

.moi-category-card:hover h3 {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Media mosaic */
.moi-media-editorial-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(320px, 0.52fr);
    gap: 26px;
    align-items: start;
}

.moi-media-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 218px;
    gap: 16px;
}

.moi-media-mosaic-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #111111;
    color: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    isolation: isolate;
}

.moi-media-mosaic-card.is-primary {
    grid-column: span 2;
    grid-row: span 2;
}

.moi-media-mosaic-card.is-wide {
    grid-column: span 2;
}

.moi-media-mosaic-img {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    background: #222222;
}

.moi-media-mosaic-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.moi-media-mosaic-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.90), rgba(0,0,0,0.12) 62%),
        linear-gradient(90deg, rgba(184,0,0,0.28), transparent 55%);
    pointer-events: none;
}

.moi-media-mosaic-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 18px;
    color: #ffffff;
}

.moi-media-mosaic-card h3 {
    margin: 8px 0 8px;
    color: #ffffff;
    font-size: clamp(19px, 2vw, 30px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.moi-media-mosaic-card p,
.moi-media-mosaic-card .moi-meta,
.moi-media-mosaic-card .moi-kicker {
    color: rgba(255,255,255,0.84);
}

.moi-media-mosaic-card p {
    margin: 0 0 9px;
    font-size: 13px;
}

.moi-media-mosaic-card:hover .moi-media-mosaic-img img {
    transform: scale(1.06);
}

.moi-media-mosaic-card:hover h3 a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.moi-media-mosaic-card:not(.is-primary) p {
    display: none;
}

/* Bigger newspaper and magazine cards */
.moi-news-mag-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr);
    gap: 26px;
    align-items: start;
}

.moi-newspaper-grid,
.moi-magazine-stack {
    display: grid;
    gap: 16px;
}

.moi-newspaper-card,
.moi-magazine-card {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--moi-border);
    border-left: 5px solid var(--moi-red);
    min-width: 0;
    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.moi-newspaper-card.is-large {
    grid-template-columns: minmax(270px, 0.88fr) minmax(0, 1fr);
    min-height: 285px;
    background: #f7f7f7;
}

.moi-newspaper-img,
.moi-magazine-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #dddddd;
}

.moi-newspaper-card.is-large .moi-newspaper-img {
    height: 100%;
    aspect-ratio: 3 / 2;
}

.moi-newspaper-body,
.moi-magazine-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.moi-newspaper-card h3,
.moi-magazine-card h3 {
    margin: 0 0 9px;
    color: var(--moi-black);
    font-size: clamp(21px, 2vw, 31px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.moi-newspaper-card p,
.moi-magazine-card p {
    margin: 0 0 10px;
    color: #444444;
    font-size: 14px;
}

.moi-newspaper-card:hover,
.moi-magazine-card:hover {
    background: #fff8f8;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.07);
}

/* Online and Blog Updates: bigger editorial cards */
.moi-updates-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.moi-update-card {
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--moi-border);
    border-top: 5px solid var(--moi-red);
    box-shadow: 0 12px 28px rgba(0,0,0,0.07);
    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.moi-update-card.is-featured {
    grid-column: span 2;
}

.moi-update-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dddddd;
}

.moi-update-card.is-featured .moi-update-img {
    aspect-ratio: 16 / 8.6;
}

.moi-update-body {
    padding: 18px;
}

.moi-update-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--moi-red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.moi-update-card h3 {
    margin: 0 0 10px;
    color: var(--moi-black);
    font-size: clamp(20px, 1.85vw, 28px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.moi-update-card p {
    margin: 0 0 12px;
    color: #444444;
    font-size: 14px;
}

.moi-update-card:hover {
    background: #fff8f8;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.10);
}

/* Keep generic card sections slightly more spacious after the upgrade */
.moi-card-grid {
    gap: 20px;
}

.moi-card-img {
    aspect-ratio: 4 / 3;
}

.moi-card h3 {
    font-size: 20px;
}

@media screen and (max-width: 1180px) {
    .moi-editorial-grid,
    .moi-media-editorial-grid,
    .moi-news-mag-grid {
        grid-template-columns: 1fr;
    }

    .moi-rail {
        border-left: 0;
        padding-left: 0;
    }

    .moi-live-panel {
        max-width: 740px;
    }

    .moi-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .moi-category-card.is-large,
    .moi-category-card.is-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .moi-media-mosaic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .moi-media-mosaic-card.is-primary,
    .moi-media-mosaic-card.is-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .moi-updates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .moi-update-card.is-featured {
        grid-column: span 1;
    }
}

@media screen and (max-width: 736px) {
    .moi-container {
        width: min(100% - 22px, 1360px);
    }

    .moi-category-grid,
    .moi-media-mosaic,
    .moi-updates-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .moi-category-card,
    .moi-media-mosaic-card {
        min-height: 260px;
    }

    .moi-featured-newspaper-card,
    .moi-newspaper-card,
    .moi-newspaper-card.is-large,
    .moi-magazine-card {
        grid-template-columns: 1fr;
    }

    .moi-small-card {
        grid-template-columns: 1fr !important;
    }

    .moi-small-img,
    .moi-newspaper-img,
    .moi-magazine-img {
        aspect-ratio: 16 / 9;
    }

    .moi-live-panel {
        max-width: 100%;
    }
}



/* =========================================================
    FINAL BBC-STYLE MOSAIC REDESIGN — v4
    These rules intentionally override the earlier home CSS.
    ========================================================= */

.moi-home {
    --moi-page-max: 1440px;
    --moi-card-shadow: 0 16px 36px rgba(0, 0, 0, 0.10);
    --moi-card-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.moi-container {
    width: min(var(--moi-page-max), calc(100% - 34px)) !important;
}

.moi-band {
    margin-bottom: 44px !important;
    padding-top: 30px !important;
    border-top: 1px solid #d7d7d7 !important;
}

.moi-section-title {
    position: relative;
    margin-bottom: 18px !important;
    padding-top: 14px !important;
    border-top: 4px solid #111111 !important;
    font-size: clamp(26px, 2.6vw, 38px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.045em !important;
}

.moi-section-title::after {
    content: "";
    display: block;
    width: 74px;
    height: 5px;
    margin-top: 12px;
    background: var(--moi-red);
}

.moi-section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
}

.moi-section-heading-row .moi-section-title {
    margin-bottom: 0 !important;
}

.moi-section-heading-row p {
    max-width: 430px;
    margin: 0 0 10px;
    color: #505050;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.moi-section-heading-row.is-important {
    padding: 20px 22px;
    background: #111111;
    color: #ffffff;
    align-items: center;
}

.moi-section-heading-row.is-important .moi-section-title {
    color: #ffffff !important;
    border-top-color: #ffffff !important;
}

.moi-section-heading-row.is-important p {
    color: rgba(255,255,255,0.78);
}

.moi-editorial-grid.moi-featured-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(430px, 0.78fr) !important;
    gap: 34px !important;
    align-items: start !important;
    margin-bottom: 46px !important;
}

.moi-live-rail {
    border-left: 1px solid var(--moi-border) !important;
    padding-left: 28px !important;
}

.moi-live-panel {
    width: 100% !important;
    margin-bottom: 34px !important;
    box-shadow: 0 18px 44px rgba(0,0,0,0.18) !important;
}

.moi-live-stage {
    min-height: 252px;
}

.moi-featured-mosaic {
    display: grid !important;
    grid-template-columns: minmax(0, 1.14fr) minmax(330px, 0.86fr) !important;
    grid-auto-rows: minmax(215px, auto) !important;
    gap: 22px !important;
    align-items: stretch !important;
}

.moi-featured-hero-card {
    grid-row: span 2 !important;
    padding: 0 0 18px !important;
    border-bottom: 0 !important;
}

.moi-featured-hero-card .moi-lead-img {
    aspect-ratio: 16 / 10 !important;
    margin-bottom: 18px !important;
    box-shadow: var(--moi-card-shadow-soft);
}

.moi-featured-hero-card h2 {
    font-size: clamp(34px, 3.8vw, 56px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.05em !important;
    margin-bottom: 14px !important;
}

.moi-featured-hero-card p {
    font-size: 16px !important;
    line-height: 1.55 !important;
}

.moi-featured-newspaper-card {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(190px, 0.92fr) minmax(0, 1fr) !important;
    gap: 18px !important;
    min-height: 280px !important;
    padding: 18px !important;
    background: #f3f3f3 !important;
    border: 1px solid #d0d0d0 !important;
    border-left: 7px solid var(--moi-red) !important;
    box-shadow: var(--moi-card-shadow-soft) !important;
    overflow: hidden;
}

.moi-featured-newspaper-img {
    display: block;
    height: 100%;
    min-height: 245px;
    overflow: hidden;
    background: #ddd;
}

.moi-featured-newspaper-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.moi-featured-newspaper-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.moi-featured-newspaper-body h3 {
    margin: 8px 0 12px !important;
    color: var(--moi-black);
    font-size: clamp(30px, 3vw, 44px) !important;
    line-height: 1.02 !important;
    font-weight: 900 !important;
    letter-spacing: -0.045em !important;
}

.moi-featured-newspaper-body p {
    font-size: 15px !important;
    line-height: 1.5 !important;
}

.moi-featured-mini-stack {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    align-self: stretch;
}

.moi-featured-mini-card {
    display: grid;
    grid-template-rows: 160px minmax(0, auto);
    gap: 12px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--moi-border);
    border-top: 5px solid #111111;
    min-width: 0;
}

.moi-featured-mini-img {
    display: block;
    overflow: hidden;
    background: #ddd;
}

.moi-featured-mini-card h3 {
    margin: 7px 0 0 !important;
    font-size: 19px !important;
    line-height: 1.12 !important;
    font-weight: 900 !important;
}

/* Explore library: true mosaic */
.moi-library-mosaic {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-auto-rows: 180px !important;
    gap: 18px !important;
}

.moi-library-tile {
    position: relative;
    grid-column: span 3;
    min-height: 180px;
    overflow: hidden;
    background: #111111;
    color: #ffffff !important;
    isolation: isolate;
    text-decoration: none !important;
    box-shadow: var(--moi-card-shadow-soft);
}

.moi-library-tile.is-hero {
    grid-column: span 5;
    grid-row: span 2;
}

.moi-library-tile.is-wide {
    grid-column: span 4;
}

.moi-library-thumb,
.moi-library-shade,
.moi-library-content {
    position: absolute;
}

.moi-library-thumb,
.moi-library-shade {
    inset: 0;
}

.moi-library-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.moi-library-shade {
    z-index: 2;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.92), rgba(0,0,0,0.12) 62%),
        linear-gradient(90deg, rgba(184,0,0,0.42), transparent 58%);
}

.moi-library-content {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 22px;
}

.moi-library-content i {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 14px;
    background: var(--moi-red);
    color: #ffffff;
    font-size: 20px;
}

.moi-library-content strong {
    display: block;
    color: #ffffff;
    font-size: clamp(26px, 2.6vw, 42px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.moi-library-content small {
    display: block;
    margin-top: 10px;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.moi-library-tile:hover .moi-library-thumb img,
.moi-media-tile:hover .moi-media-tile-img img,
.moi-newspaper-tile:hover .moi-newspaper-tile-img img,
.moi-update-story:hover .moi-update-story-img img,
.moi-book-tile:hover .moi-book-tile-img img {
    transform: scale(1.07);
    filter: saturate(1.04) contrast(1.06);
}

/* Relevant Media mosaic */
.moi-media-mosaic {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-auto-rows: 205px !important;
    gap: 18px !important;
}

.moi-media-tile {
    position: relative;
    grid-column: span 3;
    overflow: hidden;
    background: #111111;
    color: #ffffff;
    min-height: 205px;
    isolation: isolate;
    box-shadow: var(--moi-card-shadow-soft);
}

.moi-media-tile.is-primary {
    grid-column: span 6;
    grid-row: span 2;
}

.moi-media-tile.is-tall {
    grid-column: span 3;
    grid-row: span 2;
}

.moi-media-tile.is-wide {
    grid-column: span 6;
}

.moi-media-tile-img,
.moi-media-tile-img img,
.moi-newspaper-tile-img,
.moi-newspaper-tile-img img,
.moi-update-story-img,
.moi-update-story-img img,
.moi-book-tile-img,
.moi-book-tile-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.moi-media-tile-img,
.moi-media-tile-content {
    position: absolute;
}

.moi-media-tile-img {
    inset: 0;
    z-index: 1;
}

.moi-media-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(0deg, rgba(0,0,0,0.93), rgba(0,0,0,0.08) 66%),
        linear-gradient(90deg, rgba(184,0,0,0.34), transparent 60%);
    pointer-events: none;
}

.moi-media-tile-content {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 20px;
}

.moi-media-tile h3 {
    margin: 8px 0 9px !important;
    color: #ffffff !important;
    font-size: clamp(22px, 2.25vw, 38px) !important;
    line-height: 1.04 !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
}

.moi-media-tile a,
.moi-media-tile .moi-meta,
.moi-media-tile .moi-kicker,
.moi-media-tile p {
    color: #ffffff !important;
}

.moi-media-tile:not(.is-primary) p {
    display: none !important;
}

.moi-blog-spotlight-strip {
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
    gap: 22px;
    margin-top: 20px;
    padding: 18px;
    background: #f4f4f4;
    border-left: 6px solid var(--moi-red);
    box-shadow: var(--moi-card-shadow-soft);
}

.moi-blog-spotlight-img {
    min-height: 240px;
    overflow: hidden;
    background: #ddd;
    display: block;
}

.moi-blog-spotlight-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.moi-blog-spotlight-body h3 {
    margin: 8px 0 12px !important;
    font-size: clamp(28px, 3vw, 44px) !important;
    line-height: 1.03 !important;
    font-weight: 900 !important;
    letter-spacing: -0.045em !important;
}

/* Books mosaic */
.moi-book-mosaic {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(230px, auto) !important;
    gap: 18px !important;
}

.moi-book-tile {
    grid-column: span 3;
    display: grid;
    grid-template-rows: 230px minmax(0, auto);
    background: #ffffff;
    border: 1px solid var(--moi-border);
    box-shadow: var(--moi-card-shadow-soft);
    overflow: hidden;
}

.moi-book-tile.is-primary {
    grid-column: span 5;
    grid-row: span 2;
    grid-template-rows: 420px minmax(0, auto);
}

.moi-book-tile.is-wide {
    grid-column: span 4;
}

.moi-book-tile-img {
    overflow: hidden;
    background: #ddd;
}

.moi-book-tile-body {
    padding: 16px;
}

.moi-book-tile h3 {
    margin: 8px 0 9px !important;
    font-size: clamp(20px, 2vw, 31px) !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    letter-spacing: -0.03em !important;
}

.moi-book-tile p {
    color: #4a4a4a;
    font-size: 14px;
}

/* Publications mosaic */
.moi-publications-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.48fr) minmax(370px, 0.52fr) !important;
    gap: 28px !important;
    align-items: start;
}

.moi-newspaper-mosaic {
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(235px, auto) !important;
    gap: 18px !important;
}

.moi-newspaper-tile {
    grid-column: span 4;
    display: grid;
    grid-template-columns: minmax(180px, 0.46fr) minmax(0, 0.54fr);
    min-height: 250px;
    background: #ffffff;
    border: 1px solid var(--moi-border);
    border-left: 6px solid var(--moi-red);
    box-shadow: var(--moi-card-shadow-soft);
    overflow: hidden;
}

.moi-newspaper-tile.is-primary {
    grid-column: span 8;
    min-height: 390px;
    grid-template-columns: minmax(360px, 0.52fr) minmax(0, 0.48fr);
    background: #f3f3f3;
}

.moi-newspaper-tile.is-tall {
    grid-column: span 4;
    grid-row: span 2;
    grid-template-columns: 1fr;
    grid-template-rows: 420px minmax(0, auto);
}

.moi-newspaper-tile.is-wide {
    grid-column: span 4;
}

.moi-newspaper-tile-img {
    min-height: 100%;
    overflow: hidden;
    background: #ddd;
}

.moi-newspaper-tile-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.moi-newspaper-tile h3 {
    margin: 9px 0 11px !important;
    color: var(--moi-black);
    font-size: clamp(24px, 2.4vw, 42px) !important;
    line-height: 1.04 !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
}

.moi-newspaper-tile p {
    color: #444444;
    font-size: 14px;
    line-height: 1.48;
}

.moi-magazine-panel {
    min-width: 0;
}

.moi-magazine-mosaic {
    display: grid;
    gap: 18px;
}

.moi-magazine-tile {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--moi-border);
    border-top: 5px solid #111111;
    box-shadow: var(--moi-card-shadow-soft);
}

.moi-magazine-tile.is-primary {
    grid-template-columns: 1fr;
    padding: 0;
}

.moi-magazine-tile-img {
    min-height: 160px;
    overflow: hidden;
    background: #ddd;
    display: block;
}

.moi-magazine-tile.is-primary .moi-magazine-tile-img {
    min-height: 300px;
}

.moi-magazine-tile-body {
    padding: 0;
    min-width: 0;
}

.moi-magazine-tile.is-primary .moi-magazine-tile-body {
    padding: 18px;
}

.moi-magazine-tile h3 {
    margin: 8px 0 !important;
    font-size: clamp(20px, 2vw, 30px) !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
}

/* Online and Blog Updates: promoted showcase */
.moi-updates-band {
    padding-top: 0 !important;
    border-top: 0 !important;
}

.moi-updates-showcase {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(245px, auto) !important;
    gap: 18px !important;
}

.moi-update-story {
    grid-column: span 3;
    display: grid;
    grid-template-rows: 210px minmax(0, auto);
    background: #ffffff;
    border: 1px solid var(--moi-border);
    border-top: 6px solid var(--moi-red);
    box-shadow: var(--moi-card-shadow-soft);
    overflow: hidden;
}

.moi-update-story.is-lead {
    grid-column: span 6;
    grid-row: span 2;
    grid-template-rows: 360px minmax(0, auto);
}

.moi-update-story.is-blog-lead {
    border-top-color: #111111;
}

.moi-update-story-img {
    overflow: hidden;
    background: #ddd;
}

.moi-update-story-body {
    padding: 18px;
}

.moi-update-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--moi-red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.moi-update-story h3 {
    margin: 0 0 10px !important;
    color: var(--moi-black);
    font-size: clamp(22px, 2.2vw, 38px) !important;
    line-height: 1.06 !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
}

.moi-update-story p {
    color: #444444;
    font-size: 14px;
    line-height: 1.5;
}

.moi-update-story:not(.is-lead) p {
    -webkit-line-clamp: 2;
}

.moi-library-tile,
.moi-media-tile,
.moi-book-tile,
.moi-newspaper-tile,
.moi-magazine-tile,
.moi-update-story,
.moi-featured-newspaper-card,
.moi-featured-mini-card,
.moi-blog-spotlight-strip {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.moi-library-tile:hover,
.moi-media-tile:hover,
.moi-book-tile:hover,
.moi-newspaper-tile:hover,
.moi-magazine-tile:hover,
.moi-update-story:hover,
.moi-featured-newspaper-card:hover,
.moi-featured-mini-card:hover,
.moi-blog-spotlight-strip:hover {
    transform: translateY(-3px);
    box-shadow: var(--moi-card-shadow);
}

@media screen and (max-width: 1220px) {
    .moi-editorial-grid.moi-featured-layout,
    .moi-publications-layout {
        grid-template-columns: 1fr !important;
    }

    .moi-live-rail {
        border-left: 0 !important;
        padding-left: 0 !important;
    }

    .moi-live-panel {
        max-width: 800px;
    }

    .moi-featured-mosaic {
        grid-template-columns: 1fr !important;
    }

    .moi-featured-hero-card {
        grid-row: auto !important;
    }

    .moi-library-mosaic,
    .moi-media-mosaic,
    .moi-book-mosaic,
    .moi-updates-showcase {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    .moi-library-tile,
    .moi-media-tile,
    .moi-book-tile,
    .moi-update-story,
    .moi-library-tile.is-wide,
    .moi-media-tile.is-wide,
    .moi-book-tile.is-wide {
        grid-column: span 3 !important;
    }

    .moi-library-tile.is-hero,
    .moi-media-tile.is-primary,
    .moi-book-tile.is-primary,
    .moi-update-story.is-lead {
        grid-column: span 6 !important;
        grid-row: auto !important;
    }

    .moi-media-tile.is-tall {
        grid-column: span 3 !important;
        grid-row: auto !important;
    }
}

@media screen and (max-width: 780px) {
    .moi-container {
        width: min(100% - 22px, var(--moi-page-max)) !important;
    }

    .moi-section-heading-row {
        display: block;
    }

    .moi-section-heading-row p {
        max-width: none;
        margin-top: 8px;
    }

    .moi-featured-newspaper-card,
    .moi-blog-spotlight-strip,
    .moi-newspaper-tile,
    .moi-newspaper-tile.is-primary,
    .moi-newspaper-tile.is-tall,
    .moi-magazine-tile {
        grid-template-columns: 1fr !important;
    }

    .moi-featured-newspaper-img,
    .moi-blog-spotlight-img,
    .moi-newspaper-tile-img,
    .moi-magazine-tile-img {
        min-height: 250px !important;
    }

    .moi-featured-mini-stack,
    .moi-library-mosaic,
    .moi-media-mosaic,
    .moi-book-mosaic,
    .moi-newspaper-mosaic,
    .moi-updates-showcase {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
    }

    .moi-featured-mini-card,
    .moi-library-tile,
    .moi-library-tile.is-hero,
    .moi-library-tile.is-wide,
    .moi-media-tile,
    .moi-media-tile.is-primary,
    .moi-media-tile.is-tall,
    .moi-media-tile.is-wide,
    .moi-book-tile,
    .moi-book-tile.is-primary,
    .moi-book-tile.is-wide,
    .moi-newspaper-tile,
    .moi-newspaper-tile.is-primary,
    .moi-newspaper-tile.is-tall,
    .moi-newspaper-tile.is-wide,
    .moi-update-story,
    .moi-update-story.is-lead {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    .moi-library-tile,
    .moi-media-tile {
        min-height: 300px;
    }

    .moi-book-tile,
    .moi-book-tile.is-primary,
    .moi-update-story,
    .moi-update-story.is-lead {
        grid-template-rows: 260px minmax(0, auto) !important;
    }

    .moi-live-stage {
        min-height: auto;
    }
}
/* =========================================================
FONT SIZE FIX ONLY FOR:
1. Relevant Media Posts
2. Online and Blog Updates
========================================================= */

/* Relevant Media Posts */
.moi-media-tile-content {
    padding: 15px !important;
}

.moi-media-tile .moi-kicker {
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
}

.moi-media-tile h3 {
    font-size: clamp(16px, 1.35vw, 22px) !important;
    line-height: 1.14 !important;
    letter-spacing: -0.015em !important;
    margin: 6px 0 7px !important;
}

.moi-media-tile.is-primary h3 {
    font-size: clamp(20px, 1.75vw, 28px) !important;
    line-height: 1.12 !important;
}

.moi-media-tile p {
    font-size: 12px !important;
    line-height: 1.38 !important;
    margin-bottom: 7px !important;
}

.moi-media-tile .moi-meta {
    font-size: 10px !important;
    line-height: 1.3 !important;
}

/* Online and Blog Updates */
.moi-update-story-body {
    padding: 15px !important;
}

.moi-update-label {
    font-size: 10px !important;
    margin-bottom: 8px !important;
}

.moi-update-story h3 {
    font-size: clamp(17px, 1.45vw, 24px) !important;
    line-height: 1.14 !important;
    letter-spacing: -0.018em !important;
    margin-bottom: 8px !important;
}

.moi-update-story.is-lead h3 {
    font-size: clamp(21px, 1.9vw, 30px) !important;
    line-height: 1.12 !important;
}

.moi-update-story p {
    font-size: 12.5px !important;
    line-height: 1.42 !important;
    margin-bottom: 8px !important;
}

.moi-update-story .moi-meta {
    font-size: 10px !important;
    line-height: 1.3 !important;
}
/* =========================================================
HERO BACKGROUND ROTATION — SMOOTH BBC-STYLE ZOOM/CROSSFADE
IMPORTANT: no transform: ... !important here.
========================================================= */

.moi-hero-media {
    overflow: hidden;
    background: #090909;
}

.moi-hero-slide,
.moi-hero-preview {
    position: absolute;
    inset: -2%;
    width: 104%;
    height: 104%;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #090909;

    opacity: 0;
    visibility: hidden;
    z-index: 1;

    transform: scale(1.035) translate3d(-0.8%, 0, 0);
    filter: saturate(0.92) contrast(1.04) brightness(0.92);

    transition:
        opacity 1.45s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.45s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 1.45s;

    animation: none;
    will-change: opacity, transform, filter;
}

.moi-hero-slide.is-active,
.moi-hero-preview.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 3;

    filter: saturate(1.04) contrast(1.08) brightness(1);

    transition:
        opacity 1.45s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.45s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;
}

.moi-hero-slide.is-leaving,
.moi-hero-preview.is-leaving {
    opacity: 0;
    visibility: visible;
    z-index: 2;

    filter: saturate(0.95) contrast(1.04) brightness(0.88);

    transition:
        opacity 1.45s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.45s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 1.45s;
}

.moi-hero-slide.is-active {
    animation: moiHeroSmoothZoomImage 5.8s ease-in-out forwards;
}

.moi-hero-preview.is-active {
    animation: moiHeroSmoothZoomPreview 6.5s ease-in-out forwards;
}

@keyframes moiHeroSmoothZoomImage {
    0% {
        transform: scale(1.035) translate3d(-0.8%, 0, 0);
    }

    45% {
        transform: scale(1.105) translate3d(0.3%, -0.35%, 0);
    }

    100% {
        transform: scale(1.075) translate3d(0.9%, -0.15%, 0);
    }
}

@keyframes moiHeroSmoothZoomPreview {
    0% {
        transform: scale(1.02) translate3d(0, 0, 0);
    }

    55% {
        transform: scale(1.075) translate3d(0.35%, -0.3%, 0);
    }

    100% {
        transform: scale(1.04) translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .moi-hero-slide,
    .moi-hero-preview,
    .moi-hero-slide.is-active,
    .moi-hero-preview.is-active {
        animation: none !important;
        transform: none !important;
        transition: opacity 0.4s ease !important;
    }
}
/* =========================================================
   MOI NEWSLETTER SUBSCRIPTION SECTION
   Added outside the cached homepage block because it contains CSRF.
   ========================================================= */

   .moi-newsletter-section {
    margin: 36px auto 34px;
}

.moi-newsletter-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 26px;
    align-items: stretch;
    padding: clamp(22px, 3vw, 34px);
    background:
        linear-gradient(135deg, #111111 0%, #1f1f1f 58%, #320000 100%);
    color: #ffffff;
    border-top: 5px solid var(--moi-red);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.moi-newsletter-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.moi-newsletter-intro .moi-kicker {
    color: #ffffff;
}

.moi-newsletter-intro .moi-kicker::before {
    background: var(--moi-red);
}

.moi-newsletter-intro h2 {
    margin: 12px 0 12px;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.moi-newsletter-intro p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 700;
}

.moi-newsletter-form-card {
    min-width: 0;
    background: #ffffff;
    color: #111111;
    padding: 22px;
    border-left: 5px solid var(--moi-red);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Scope old sidebar widget styles so it fits the new homepage design */
.moi-newsletter-form-card .sidebar-area,
.moi-newsletter-form-card .single-widget-area,
.moi-newsletter-form-card .newsletter-widget {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.moi-newsletter-form-card h4 {
    margin: 0 0 16px;
    color: #111111;
    font-size: clamp(20px, 1.9vw, 28px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.moi-newsletter-form-card form {
    display: grid;
    gap: 10px;
}

.moi-newsletter-form-card input[type="email"] {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #cfcfcf;
    background: #f7f7f7;
    color: #111111;
    font-size: 14px;
    font-weight: 700;
    outline: none;
}

.moi-newsletter-form-card input[type="email"]:focus {
    border-color: var(--moi-red);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(184, 0, 0, 0.12);
}

.moi-newsletter-form-card button,
.moi-newsletter-form-card .newsbox-btn {
    min-height: 48px;
    width: 100%;
    background: var(--moi-red) !important;
    border: 0 !important;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.moi-newsletter-form-card button:hover,
.moi-newsletter-form-card .newsbox-btn:hover {
    background: var(--moi-red-dark) !important;
}

.moi-newsletter-form-card p {
    margin: 16px 0 0 !important;
    color: #555555;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

@media screen and (max-width: 900px) {
    .moi-newsletter-shell {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 520px) {
    .moi-newsletter-section {
        margin-top: 28px;
    }

    .moi-newsletter-shell {
        padding: 20px;
    }

    .moi-newsletter-form-card {
        padding: 18px;
    }
}
/* =========================================================
   MOI NEWSLETTER POP-UP MODAL
   Separate from the permanent bottom subscription section.
   ========================================================= */

   .moi-newsletter-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.moi-newsletter-modal.is-visible {
    display: flex;
}

.moi-newsletter-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.moi-newsletter-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(540px, calc(100vw - 32px));
    max-height: min(86vh, 720px);
    overflow-y: auto;
    background: #ffffff;
    color: #111111;
    border-top: 6px solid var(--moi-red);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    animation: moiNewsletterModalIn 0.34s ease-out both;
}

@keyframes moiNewsletterModalIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.moi-newsletter-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    background: #111111;
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
}

.moi-newsletter-modal-close:hover,
.moi-newsletter-modal-close:focus {
    background: var(--moi-red);
    color: #ffffff;
}

.moi-newsletter-modal-intro {
    padding: 28px 28px 18px;
    background: linear-gradient(135deg, #111111 0%, #1f1f1f 58%, #350000 100%);
    color: #ffffff;
}

.moi-newsletter-modal-intro .moi-kicker {
    color: #ffffff;
}

.moi-newsletter-modal-intro .moi-kicker::before {
    background: var(--moi-red);
}

.moi-newsletter-modal-intro h2 {
    margin: 12px 42px 10px 0;
    color: #ffffff;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.moi-newsletter-modal-intro p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.52;
    font-weight: 700;
}

.moi-newsletter-modal-form {
    padding: 24px 28px 28px;
}

.moi-newsletter-modal-form .sidebar-area,
.moi-newsletter-modal-form .single-widget-area,
.moi-newsletter-modal-form .newsletter-widget {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.moi-newsletter-modal-form h4 {
    margin: 0 0 16px;
    color: #111111;
    font-size: clamp(19px, 2vw, 25px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.moi-newsletter-modal-form form {
    display: grid;
    gap: 10px;
}

.moi-newsletter-modal-form input[type="email"] {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #cfcfcf;
    background: #f7f7f7;
    color: #111111;
    font-size: 14px;
    font-weight: 700;
    outline: none;
}

.moi-newsletter-modal-form input[type="email"]:focus {
    border-color: var(--moi-red);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(184, 0, 0, 0.12);
}

.moi-newsletter-modal-form button,
.moi-newsletter-modal-form .newsbox-btn {
    min-height: 48px;
    width: 100%;
    background: var(--moi-red) !important;
    border: 0 !important;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.moi-newsletter-modal-form button:hover,
.moi-newsletter-modal-form .newsbox-btn:hover {
    background: var(--moi-red-dark) !important;
}

.moi-newsletter-modal-form p {
    margin: 16px 0 0 !important;
    color: #555555;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

body.moi-newsletter-modal-open {
    overflow: hidden;
}

@media screen and (max-width: 520px) {
    .moi-newsletter-modal {
        padding: 16px;
    }

    .moi-newsletter-modal-dialog {
        width: min(100%, 540px);
        max-height: 88vh;
    }

    .moi-newsletter-modal-intro {
        padding: 24px 22px 16px;
    }

    .moi-newsletter-modal-form {
        padding: 22px;
    }
}

.moi-home {
    font-size: 15px;
}

.moi-kicker {
    font-size: 11px;
    letter-spacing: 0.10em;
}

.moi-hero h1 {
    font-size: clamp(30px, 4.6vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.moi-hero p {
    font-size: clamp(14px, 1.55vw, 16px);
    line-height: 1.5;
}

.moi-section-title {
    font-size: clamp(19px, 1.9vw, 24px);
    letter-spacing: -0.035em;
}

.moi-lead-card h2 {
    font-size: clamp(23px, 2.5vw, 34px);
    line-height: 1.06;
}

.moi-video-content h2 {
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.04;
}

.moi-cta h2 {
    font-size: clamp(21px, 2.3vw, 26px);
}

.moi-hero-focus-panel h2,
.moi-spotlight h3 {
    font-size: clamp(18px, 1.8vw, 23px);
}

.moi-book-tile-body h3,
.moi-media-tile-content h3,
.moi-newspaper-tile-body h3,
.moi-magazine-tile-body h3,
.moi-update-story-body h3,
.moi-most-card h3 {
    font-size: clamp(16px, 1.55vw, 20px);
    line-height: 1.16;
}

.moi-card h3,
.moi-list-item h3,
.moi-small-card h3 {
    font-size: clamp(15px, 1.45vw, 18px);
}

.moi-home p {
    font-size: 14px;
}

.moi-meta,
.moi-score-pill,
.moi-update-label {
    font-size: 11px;
}

@media screen and (max-width: 736px) {
    .moi-hero h1 {
        font-size: clamp(29px, 10.5vw, 42px);
    }

    .moi-hero p {
        font-size: 14px;
    }

    .moi-section-title {
        font-size: 20px;
    }

    .moi-video-content h2 {
        font-size: 28px;
    }
}