/*
 * Makhluot Home Pro v1 — Premium magazine home page
 *
 * Goals:
 *   - Editorial-level hero with rotator + side cards
 *   - Dark-first, RTL native, mobile-first
 *   - Performant: contain per section, content-visibility, no heavy animations
 *   - Reduced motion respected
 */

/* =========================================================
   1. TOKENS (dark default)
   ========================================================= */
.mhpro-main {
    --mh-bg:        rgba(255,255,255,.04);
    --mh-bg-soft:   rgba(255,255,255,.025);
    --mh-bg-strong: rgba(255,255,255,.07);
    --mh-border:    rgba(255,255,255,.10);
    --mh-border-2:  rgba(255,255,255,.06);
    --mh-text:      #f1f5f9;
    --mh-text-soft: #94a3b8;
    --mh-text-mute: #64748b;
    --mh-accent:    #a855f7;
    --mh-accent-2:  #ec4899;
    --mh-emerald:   #10b981;
    --mh-amber:     #f59e0b;
    --mh-radius:    14px;
    --mh-radius-sm: 10px;

    direction: rtl;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px 60px;
    color: var(--mh-text);
    font-family: inherit;
    line-height: 1.6;
    contain: layout style;
}
[data-theme="light"] .mhpro-main,
body.light .mhpro-main {
    --mh-bg:        #ffffff;
    --mh-bg-soft:   #f8fafc;
    --mh-bg-strong: #f1f5f9;
    --mh-border:    rgba(15,23,42,.10);
    --mh-border-2:  rgba(15,23,42,.05);
    --mh-text:      #0f172a;
    --mh-text-soft: #475569;
    --mh-text-mute: #64748b;
}

/* =========================================================
   2. SECTION HEADERS
   ========================================================= */
.mhpro-section-head {
    margin: 22px 0 14px;
    contain: layout style;
}
.mhpro-section-head h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: var(--mh-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.01em;
}
.mhpro-section-head h2 svg {
    color: var(--mh-accent);
}
.mhpro-section-head p {
    margin: 0;
    font-size: 13px;
    color: var(--mh-text-soft);
}

/* =========================================================
   3. HERO ROTATOR
   ========================================================= */
.mhpro-hero {
    margin-bottom: 28px;
    contain: layout style;
}
.mhpro-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

/* MAIN slide */
.mhpro-hero-main {
    position: relative;
    border-radius: var(--mh-radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--mh-bg-strong);
    isolation: isolate;
    box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.mhpro-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    pointer-events: none;
}
.mhpro-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.mhpro-slide-link {
    position: absolute;
    inset: 0;
    display: block;
    color: inherit;
    text-decoration: none;
}
.mhpro-slide-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.mhpro-slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 5s ease-out;
}
.mhpro-slide.is-active .mhpro-slide-bg img {
    transform: scale(1.05); /* slow Ken-Burns effect */
}
.mhpro-slide-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.5) 65%, rgba(0,0,0,.86) 100%);
}
.mhpro-slide-body {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 28px 28px 26px;
    z-index: 2;
    color: #fff;
}
.mhpro-slide-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(239, 68, 68, .92);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: .3px;
}
.mhpro-flag-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: mhpro-pulse 1.6s ease infinite;
}
.mhpro-slide-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}
.mhpro-slide-cat svg { color: #fff; }
.mhpro-slide-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.3;
    color: #fff;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mhpro-slide-excerpt {
    margin: 0 0 12px;
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(255,255,255,.85);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 80%;
}
.mhpro-slide-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: rgba(255,255,255,.85);
    margin-bottom: 12px;
}
.mhpro-slide-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mhpro-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: linear-gradient(135deg, var(--mh-accent), var(--mh-accent-2));
    color: #fff !important;
    font-weight: 800;
    font-size: 13px;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(168,85,247,.4);
    transition: transform .15s ease;
}
.mhpro-slide-link:hover .mhpro-slide-cta {
    transform: translateY(-1px);
}

/* Dots */
.mhpro-hero-dots {
    position: absolute;
    bottom: 14px;
    inset-inline-end: 14px;
    display: flex;
    gap: 6px;
    z-index: 3;
}
.mhpro-hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.35);
    cursor: pointer;
    transition: all .2s ease;
}
.mhpro-hero-dot:hover { background: rgba(255,255,255,.6); }
.mhpro-hero-dot.is-active {
    width: 24px;
    border-radius: 999px;
    background: #fff;
}

/* SIDE thumbs */
.mhpro-hero-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mhpro-side-card {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--mh-bg);
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, border-color .15s ease;
    flex: 1;
    min-height: 0;
}
.mhpro-side-card:hover {
    border-color: var(--mh-accent);
    transform: translateX(-2px);
}
.mhpro-side-img {
    width: 88px;
    height: 100%;
    min-height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--mh-bg-soft);
}
.mhpro-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mhpro-side-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    padding: 2px 0;
}
.mhpro-side-cat {
    display: inline-flex;
    align-items: center;
    color: var(--mh-accent);
    line-height: 1;
}
.mhpro-side-cat svg { display: block; }
.mhpro-side-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--mh-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mhpro-side-views {
    font-size: 11.5px;
    color: var(--mh-emerald);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* =========================================================
   4. CATEGORY SHOWCASE
   ========================================================= */
.mhpro-cats {
    margin-bottom: 30px;
    contain: layout style;
}
.mhpro-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}
.mhpro-cat-card {
    --mhc-from: var(--mh-accent);
    --mhc-to: var(--mh-accent-2);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 18px 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--mhc-from) 12%, transparent), color-mix(in srgb, var(--mhc-to) 8%, transparent));
    border: 1px solid color-mix(in srgb, var(--mhc-from) 25%, transparent);
    border-radius: var(--mh-radius);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease;
    isolation: isolate;
}
.mhpro-cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--mhc-from), var(--mhc-to));
    opacity: 0;
    transition: opacity .25s ease;
    z-index: -1;
}
.mhpro-cat-card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    color: #fff;
}
.mhpro-cat-card:hover::before { opacity: 1; }
.mhpro-cat-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    color: var(--mhc-from);
    background: color-mix(in srgb, var(--mhc-from) 14%, transparent);
    border-radius: 10px;
    transition: all .2s ease;
}
.mhpro-cat-card:hover .mhpro-cat-icon {
    background: rgba(255,255,255,.18);
    color: #fff;
}
.mhpro-cat-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--mh-text);
}
.mhpro-cat-card:hover .mhpro-cat-name { color: #fff; }
.mhpro-cat-stats {
    font-size: 12px;
    color: var(--mh-text-soft);
}
.mhpro-cat-card:hover .mhpro-cat-stats { color: rgba(255,255,255,.92); }
.mhpro-cat-stats strong { color: var(--mh-text); font-weight: 800; }
.mhpro-cat-card:hover .mhpro-cat-stats strong { color: #fff; }

/* =========================================================
   5. TOP VIEWED LEADERBOARD
   ========================================================= */
.mhpro-top {
    margin-bottom: 30px;
    contain: layout style;
}
.mhpro-top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.mhpro-top-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--mh-bg);
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, border-color .15s ease;
    contain: layout style;
}
.mhpro-top-card:hover {
    transform: translateY(-2px);
    border-color: var(--mh-accent);
}
.mhpro-top-rank {
    position: absolute;
    top: -8px;
    inset-inline-start: -6px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--mh-bg-strong);
    color: var(--mh-text);
    font-size: 13px;
    font-weight: 900;
    border: 2px solid var(--mh-bg);
    z-index: 2;
}
.mhpro-top-card.is-gold .mhpro-top-rank   { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.mhpro-top-card.is-silver .mhpro-top-rank { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.mhpro-top-card.is-bronze .mhpro-top-rank { background: linear-gradient(135deg, #f97316, #c2410c); color: #fff; }

.mhpro-top-img {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--mh-bg-soft);
}
.mhpro-top-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mhpro-top-body {
    flex: 1;
    min-width: 0;
}
.mhpro-top-title {
    margin: 0 0 4px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mh-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mhpro-top-views {
    font-size: 12px;
    color: var(--mh-emerald);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* =========================================================
   6. FEED (Magazine grid)
   ========================================================= */
.mhpro-feed {
    margin-bottom: 30px;
    contain: layout style;
}
.mhpro-feed-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    justify-content: space-between;
}
.mhpro-feed-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mhpro-filter {
    padding: 7px 14px;
    background: var(--mh-bg);
    border: 1px solid var(--mh-border);
    border-radius: 999px;
    color: var(--mh-text-soft);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mhpro-filter svg { color: var(--mh-accent); transition: color .15s ease; }
.mhpro-filter.is-active svg { color: #fff; }
.mhpro-filter:hover {
    border-color: var(--mh-accent);
    color: var(--mh-text);
}
.mhpro-filter.is-active {
    background: linear-gradient(135deg, var(--mh-accent), var(--mh-accent-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(168,85,247,.30);
}

.mhpro-feed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    min-height: 200px;
    contain: layout style;
}
.mhpro-fcard {
    background: var(--mh-bg);
    border: 1px solid var(--mh-border-2);
    border-radius: var(--mh-radius);
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease;
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 360px;
}
.mhpro-fcard:hover {
    transform: translateY(-2px);
    border-color: var(--mh-accent);
}
.mhpro-fcard.is-featured {
    grid-column: span 2;
    grid-row: span 2;
}
.mhpro-fcard.is-featured .mhpro-fcard-media { aspect-ratio: 4 / 3; }
.mhpro-fcard.is-featured .mhpro-fcard-title { font-size: 18px; -webkit-line-clamp: 3; }
.mhpro-fcard.is-featured .mhpro-fcard-excerpt { display: -webkit-box; }

.mhpro-fcard-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.mhpro-fcard-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mh-bg-soft);
}
.mhpro-fcard-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.mhpro-fcard:hover .mhpro-fcard-media img { transform: scale(1.05); }
.mhpro-fcard-trend {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: rgba(245, 158, 11, .92);
    color: #1a0d00;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.mhpro-fcard-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 14px 13px;
    gap: 8px;
}
.mhpro-fcard-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--mh-text-soft);
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mhpro-fcard-cat svg { color: var(--mh-accent); }
.mhpro-fcard-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mh-text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mhpro-fcard-excerpt {
    margin: 0;
    font-size: 12.5px;
    color: var(--mh-text-soft);
    line-height: 1.55;
    display: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mhpro-fcard-meta {
    display: flex;
    gap: 12px;
    margin-top: auto;
    font-size: 11.5px;
    color: var(--mh-text-mute);
}
.mhpro-fcard-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mhpro-feed-cta {
    text-align: center;
    margin-top: 18px;
}
.mhpro-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--mh-bg);
    border: 1px solid var(--mh-border);
    border-radius: 999px;
    color: var(--mh-text);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all .15s ease;
}
.mhpro-btn-ghost:hover {
    border-color: var(--mh-accent);
    color: var(--mh-accent);
}

.mhpro-feed-grid.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s ease; }

/* Infinite-scroll sentinel + loader + end indicator */
.mhpro-sentinel { height: 1px; visibility: hidden; }
.mhpro-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 16px;
    color: var(--mh-text-soft);
    font-size: 13px;
}
.mhpro-loader[hidden] { display: none; }
.mhpro-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--mh-border);
    border-top-color: var(--mh-accent);
    border-radius: 50%;
    animation: mhpro-spin .8s linear infinite;
    display: inline-block;
}
@keyframes mhpro-spin { to { transform: rotate(360deg); } }

.mhpro-feed-end {
    text-align: center;
    margin: 18px 0 8px;
    padding: 10px 18px;
    color: var(--mh-text-mute);
    font-size: 12.5px;
}
.mhpro-feed-end[hidden] { display: none; }
.mhpro-feed-end span {
    display: inline-block;
    padding: 6px 16px;
    background: var(--mh-bg);
    border: 1px solid var(--mh-border-2);
    border-radius: 999px;
}

/* =========================================================
   7. CTA banner
   ========================================================= */
.mhpro-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    background: linear-gradient(135deg, var(--mh-accent), var(--mh-accent-2));
    color: #fff;
    border-radius: var(--mh-radius);
    box-shadow: 0 12px 32px rgba(168,85,247,.30);
}
.mhpro-cta-text h2 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 800;
}
.mhpro-cta-text p {
    margin: 0;
    font-size: 13.5px;
    opacity: .92;
    line-height: 1.6;
}
.mhpro-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: #fff;
    color: var(--mh-accent) !important;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    transition: transform .15s ease;
}
.mhpro-btn-primary:hover { transform: translateY(-1px); }

/* =========================================================
   8. RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .mhpro-hero-grid { grid-template-columns: 1.6fr 1fr; }
    .mhpro-feed-grid { grid-template-columns: repeat(3, 1fr); }
    .mhpro-fcard.is-featured { grid-column: span 3; grid-row: span 1; }
    .mhpro-fcard.is-featured .mhpro-fcard-media { aspect-ratio: 21 / 9; }
    .mhpro-top-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .mhpro-main { padding: 12px 12px 40px; }
    .mhpro-hero-grid { grid-template-columns: 1fr; gap: 10px; }
    .mhpro-hero-side { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .mhpro-side-card { flex: 0 0 78%; }
    .mhpro-slide-body { padding: 18px 18px 16px; }
    .mhpro-slide-title { font-size: 18px; }
    .mhpro-slide-excerpt { font-size: 12.5px; max-width: 100%; }
    .mhpro-slide-meta { font-size: 11.5px; gap: 10px; margin-bottom: 10px; }
    .mhpro-slide-cta { padding: 7px 14px; font-size: 12px; }
    .mhpro-slide-flag, .mhpro-slide-cat { font-size: 10.5px; padding: 3px 9px; }

    .mhpro-section-head h2 { font-size: 18px; }
    .mhpro-section-head p { font-size: 12.5px; }

    .mhpro-cats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .mhpro-cat-card { padding: 14px 14px 12px; }
    .mhpro-cat-icon { width: 32px; height: 32px; }
    .mhpro-cat-name { font-size: 14px; }
    .mhpro-cat-stats { font-size: 11.5px; }

    .mhpro-top-grid { grid-template-columns: 1fr; gap: 10px; }
    .mhpro-top-img { width: 60px; height: 60px; }

    .mhpro-feed-head { flex-direction: column; align-items: stretch; }
    .mhpro-feed-filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding: 2px; }
    .mhpro-filter { flex-shrink: 0; padding: 6px 12px; font-size: 12px; }

    .mhpro-feed-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .mhpro-fcard.is-featured { grid-column: span 2; }
    .mhpro-fcard.is-featured .mhpro-fcard-media { aspect-ratio: 16 / 9; }
    .mhpro-fcard.is-featured .mhpro-fcard-title { font-size: 15px; -webkit-line-clamp: 2; }

    .mhpro-fcard-body { padding: 10px 12px 12px; gap: 6px; }
    .mhpro-fcard-title { font-size: 13.5px; }
    .mhpro-fcard-meta { font-size: 11px; gap: 10px; }

    .mhpro-cta { padding: 18px 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .mhpro-cta-text h2 { font-size: 17px; }
    .mhpro-cta-text p { font-size: 12.5px; }
}
@media (max-width: 420px) {
    .mhpro-feed-grid { grid-template-columns: 1fr; }
    .mhpro-fcard.is-featured { grid-column: span 1; }
}

/* All SVG icons render in a single consistent color (no rainbow). */
.mhpro-main svg { vertical-align: middle; }
.mhpro-cta svg { color: rgba(255,255,255,.92); }
.mhpro-cta-text h2 svg { color: #fff; }

/* =========================================================
   9. ANIMATIONS
   ========================================================= */
@keyframes mhpro-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .35; transform: scale(.85); }
}
@media (prefers-reduced-motion: reduce) {
    .mhpro-slide-bg img,
    .mhpro-fcard-media img,
    .mhpro-cat-card,
    .mhpro-top-card,
    .mhpro-side-card,
    .mhpro-fcard,
    .mhpro-filter,
    .mhpro-flag-dot {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    .mhpro-slide { transition: opacity 0s; }
}


/* =========================================================
   10. v2.0 PREMIUM ENHANCEMENTS
   ========================================================= */

/* "جديد" badge — replaces or sits next to trend, top-corner */
.mhpro-fcard-new {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, .35);
    animation: mhpro-new-pop .5s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 2;
}
@keyframes mhpro-new-pop {
    0%   { opacity: 0; transform: scale(.4); }
    100% { opacity: 1; transform: scale(1); }
}

/* Reading time pill in card meta */
.mhpro-fcard-read {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--mh-amber);
    font-weight: 600;
}
.mhpro-fcard-read svg { color: var(--mh-amber); }

/* =========================================================
   11. HERO PROGRESS BAR
   ========================================================= */
.mhpro-hero-progress {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    height: 3px;
    background: rgba(255,255,255,.10);
    z-index: 3;
    overflow: hidden;
}
.mhpro-hero-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--mh-accent), var(--mh-accent-2));
    transition: width .12s linear;
    will-change: width;
}
.mhpro-hero-progress-bar.is-resetting {
    transition: none;
    width: 0%;
}

/* =========================================================
   12. SKELETON LOADERS (for filter switch)
   ========================================================= */
.mhpro-skeleton-card {
    background: var(--mh-bg);
    border: 1px solid var(--mh-border-2);
    border-radius: var(--mh-radius);
    overflow: hidden;
    height: 360px;
    display: flex;
    flex-direction: column;
}
.mhpro-skeleton-media {
    aspect-ratio: 16 / 10;
    background: linear-gradient(110deg,
        rgba(255,255,255,.04) 30%,
        rgba(255,255,255,.10) 50%,
        rgba(255,255,255,.04) 70%);
    background-size: 200% 100%;
    animation: mhpro-shimmer 1.4s ease-in-out infinite;
}
.mhpro-skeleton-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mhpro-skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(110deg,
        rgba(255,255,255,.04) 30%,
        rgba(255,255,255,.10) 50%,
        rgba(255,255,255,.04) 70%);
    background-size: 200% 100%;
    animation: mhpro-shimmer 1.4s ease-in-out infinite;
}
.mhpro-skeleton-line.is-short { width: 35%; height: 10px; }
.mhpro-skeleton-line.is-mid   { width: 80%; height: 14px; }
.mhpro-skeleton-line.is-long  { width: 100%; }
@keyframes mhpro-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================
   13. CATEGORY CARD GLOW (theme-aware hover)
   ========================================================= */
.mhpro-cat-card {
    box-shadow: 0 0 0 0 transparent;
}
.mhpro-cat-card:hover {
    box-shadow: 0 14px 40px -12px color-mix(in srgb, var(--mhc-from) 60%, transparent);
}

/* =========================================================
   14. RECENTLY VIEWED BAR (localStorage-driven)
   ========================================================= */
.mhpro-recent {
    margin: 0 0 24px;
    padding: 14px 16px 12px;
    background: var(--mh-bg);
    border: 1px solid var(--mh-border-2);
    border-radius: var(--mh-radius);
    contain: layout style;
}
.mhpro-recent[hidden] { display: none; }
.mhpro-recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.mhpro-recent-head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--mh-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mhpro-recent-head h2 svg { color: var(--mh-accent); }
.mhpro-recent-clear {
    background: transparent;
    border: 1px solid var(--mh-border);
    color: var(--mh-text-soft);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s ease;
}
.mhpro-recent-clear:hover {
    border-color: var(--mh-accent);
    color: var(--mh-text);
}
.mhpro-recent-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}
.mhpro-recent-track::-webkit-scrollbar { height: 4px; }
.mhpro-recent-track::-webkit-scrollbar-thumb { background: var(--mh-border); border-radius: 999px; }
.mhpro-recent-card {
    flex: 0 0 200px;
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--mh-bg-soft);
    border: 1px solid var(--mh-border-2);
    border-radius: var(--mh-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, transform .15s ease;
    scroll-snap-align: start;
}
.mhpro-recent-card:hover {
    border-color: var(--mh-accent);
    transform: translateY(-2px);
}
.mhpro-recent-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--mh-bg-strong);
}
.mhpro-recent-img img {
    width: 100%; height: 100%; object-fit: cover;
}
.mhpro-recent-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mhpro-recent-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--mh-text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   15. KEYBOARD-FOCUSED SEARCH HINT (visible briefly)
   ========================================================= */
.mhpro-kbd-hint {
    position: fixed;
    bottom: 20px;
    inset-inline-start: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, .95);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.12);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.mhpro-kbd-hint.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.mhpro-kbd-hint kbd {
    display: inline-block;
    background: rgba(255,255,255,.16);
    padding: 1px 7px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    margin: 0 4px;
    border: 1px solid rgba(255,255,255,.18);
}

/* =========================================================
   16. ANIMATED COUNTERS
   ========================================================= */
.mhpro-counter {
    font-variant-numeric: tabular-nums;
    transition: color .2s ease;
}
.mhpro-counter.is-animating {
    color: var(--mh-accent);
}

/* =========================================================
   17. REDUCED MOTION OVERRIDES
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    .mhpro-fcard-new,
    .mhpro-skeleton-media,
    .mhpro-skeleton-line,
    .mhpro-hero-progress-bar {
        animation: none !important;
    }
}
