/* =====================================================================
   Demo theme — modern multilingual news site
   Direction-agnostic: built with CSS logical properties so the same
   sheet serves Arabic (RTL) and English / Turkish (LTR).
   ===================================================================== */

:root {
    --dm-primary:        #2563eb;
    --dm-primary-dark:   #1d4ed8;
    --dm-primary-soft:   #eff4ff;
    --dm-accent:         #dc2626;
    --dm-accent-soft:    #fef2f2;
    --dm-ink:            #0f172a;
    --dm-ink-soft:       #1e293b;
    --dm-muted:          #64748b;
    --dm-muted-light:    #94a3b8;
    --dm-bg:             #f6f8fb;
    --dm-surface:        #ffffff;
    --dm-surface-alt:    #f1f5f9;
    --dm-border:         #e2e8f0;
    --dm-border-strong:  #cbd5e1;
    --dm-radius:         14px;
    --dm-radius-sm:      9px;
    --dm-shadow:         0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
    --dm-shadow-lg:      0 12px 40px rgba(15,23,42,.14);
    --dm-container:      1200px;
    --dm-font:           'Cairo', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--dm-font);
    color: var(--dm-ink);
    background: var(--dm-bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--dm-primary); }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.35; color: var(--dm-ink); font-weight: 800; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
[x-cloak] { display: none !important; }

/* ---------- Layout helpers ---------- */
.dm-container {
    width: 100%;
    max-width: var(--dm-container);
    margin-inline: auto;
    padding-inline: 20px;
}

.dm-section { padding-block: 40px; }
.dm-section--tight { padding-block: 24px; }

.dm-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-block-end: 22px;
}
.dm-section__title {
    position: relative;
    font-size: 1.5rem;
    font-weight: 800;
    padding-inline-start: 16px;
}
.dm-section__title::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 4px;
    width: 5px;
    border-radius: 4px;
    background: linear-gradient(var(--dm-primary), var(--dm-accent));
}
.dm-section__more {
    font-size: .9rem;
    font-weight: 700;
    color: var(--dm-primary);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dm-section__more i { font-size: .72rem; }

.dm-grid { display: grid; gap: 24px; }
.dm-grid--3 { grid-template-columns: repeat(3, 1fr); }
.dm-grid--4 { grid-template-columns: repeat(4, 1fr); }
.dm-grid--2 { grid-template-columns: repeat(2, 1fr); }

.dm-chip {
    display: inline-block;
    align-self: flex-start;     /* never stretch to full width inside flex columns */
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
    font-size: .72rem;
    font-weight: 800;
    color: var(--dm-accent);
    background: var(--dm-accent-soft);
    padding: 4px 11px;
    border-radius: 999px;
    letter-spacing: .2px;
}
.dm-chip--solid { color: #fff; background: var(--dm-accent); }
.dm-chip--blue { color: var(--dm-primary); background: var(--dm-primary-soft); }

.dm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .92rem;
    border: 1.5px solid transparent;
    background: var(--dm-primary);
    color: #fff;
}
.dm-btn:hover { background: var(--dm-primary-dark); color: #fff; }
.dm-btn--ghost { background: transparent; color: var(--dm-primary); border-color: var(--dm-border-strong); }
.dm-btn--ghost:hover { background: var(--dm-primary-soft); color: var(--dm-primary); }

.dm-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--dm-muted); font-size: .82rem; }
.dm-meta i { color: var(--dm-primary); font-size: .8rem; }
.dm-dot { color: var(--dm-muted-light); margin-inline: 4px; }

.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

[dir="rtl"] .dm-flip { transform: scaleX(-1); }

/* ---------- Top bar ---------- */
.dm-topbar {
    background: var(--dm-ink);
    color: #cbd5e1;
    font-size: .8rem;
}
.dm-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 40px;
    flex-wrap: wrap;
}
.dm-topbar__date { display: inline-flex; align-items: center; gap: 8px; }
.dm-topbar__date i { color: var(--dm-primary); }
.dm-topbar__links { display: inline-flex; align-items: center; gap: 18px; }
.dm-topbar__links a { color: #cbd5e1; }
.dm-topbar__links a:hover { color: #fff; }

.dm-langs { display: inline-flex; align-items: center; gap: 6px; }
.dm-lang {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-weight: 700; font-size: .78rem;
    border: 1px solid rgba(255,255,255,.22); color: #e2e8f0;
}
.dm-lang:hover { background: rgba(255,255,255,.12); color: #fff; }
.dm-lang.is-active { background: var(--dm-primary); border-color: var(--dm-primary); color: #fff; }

/* Language switcher revealed inside the (light) sticky header once scrolled. */
.dm-header__langs { display: none; flex-shrink: 0; }
.dm-header.is-scrolled .dm-header__langs { display: inline-flex; animation: dm-langs-in .25s ease; }
.dm-header__langs .dm-lang { border-color: var(--dm-border); color: var(--dm-ink-soft); }
.dm-header__langs .dm-lang:hover { background: var(--dm-primary-soft); color: var(--dm-primary); }
.dm-header__langs .dm-lang.is-active { background: var(--dm-primary); border-color: var(--dm-primary); color: #fff; }
@keyframes dm-langs-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Phone-only language switcher: a globe icon in the header that opens a small
   dropdown. Hidden on desktop (the top-bar / scroll-reveal switcher covers it). */
.dm-langbtn { display: none; }
.dm-langbtn__toggle {
    width: 44px; height: 44px; border-radius: 11px;
    border: 1.5px solid var(--dm-border); background: #fff; color: var(--dm-ink);
    font-size: 1.1rem; display: grid; place-items: center; cursor: pointer;
}
.dm-langbtn__menu {
    position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0;
    background: #fff; border: 1px solid var(--dm-border); border-radius: 12px;
    box-shadow: var(--dm-shadow); padding: 6px; min-width: 96px; z-index: 70;
    display: flex; flex-direction: column; gap: 2px;
}
.dm-langbtn__item {
    padding: 9px 12px; border-radius: 8px; text-align: center;
    font-weight: 700; font-size: .85rem; color: var(--dm-ink-soft);
}
.dm-langbtn__item:hover { background: var(--dm-primary-soft); color: var(--dm-primary); }
.dm-langbtn__item.is-active { background: var(--dm-primary); color: #fff; }

/* ---------- Header ---------- */
.dm-header {
    position: sticky; top: 0; z-index: 60;
    background: var(--dm-surface);
    border-block-end: 1px solid var(--dm-border);
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.dm-header__inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
}
.dm-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dm-brand img { height: 42px; width: auto; }
.dm-brand__txt { font-weight: 900; font-size: 1.4rem; letter-spacing: .3px; }
.dm-brand__txt span { color: var(--dm-primary); }

/* Search trigger: on desktop it looks like a search input (pill + placeholder),
   on phones it collapses to a single icon button. Clicking it opens the glass
   search modal — the real <input> lives there (see .dm-search-modal). */
.dm-search-trigger {
    margin-inline-start: auto;
    display: flex; align-items: center; gap: 10px;
    background: var(--dm-surface-alt);
    border: 1.5px solid var(--dm-border);
    border-radius: 999px;
    padding-inline: 16px 5px; padding-block: 5px;
    min-width: 260px; max-width: 360px; flex: 1;
    font-family: inherit; cursor: text; text-align: start;
    transition: border-color .2s, background .2s;
}
.dm-search-trigger:hover { border-color: var(--dm-primary); background: #fff; }
.dm-search-trigger__txt {
    flex: 1; min-width: 0; font-size: .9rem; color: var(--dm-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-search-trigger.has-q .dm-search-trigger__txt { color: var(--dm-ink); font-weight: 600; }
.dm-search-trigger__ico {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: var(--dm-primary); color: #fff;
    display: grid; place-items: center; font-size: .9rem;
}

/* ---------- Search modal (frosted glass) ---------- */
.dm-search-modal {
    position: fixed; inset: 0; z-index: 2100;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 15vh 20px 24px;
    background: rgba(15, 23, 42, .38);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
}
.dm-search-modal__close {
    position: absolute; inset-block-start: 22px; inset-inline-end: 24px;
    width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,.16); color: #fff; font-size: 1.1rem;
    display: grid; place-items: center;
}
.dm-search-modal__close:hover { background: var(--dm-primary); }
.dm-search-modal__box {
    width: 100%; max-width: 640px;
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 18px;
    padding-inline: 20px 8px; padding-block: 8px;
    box-shadow: 0 26px 70px rgba(2,6,23,.4);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    animation: dm-search-in .26s cubic-bezier(.2,.8,.2,1);
}
@keyframes dm-search-in { from { opacity: 0; transform: translateY(-16px) scale(.98); } to { opacity: 1; transform: none; } }
.dm-search-modal__icon { color: var(--dm-primary); font-size: 1.05rem; flex-shrink: 0; }
.dm-search-modal__box input {
    flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
    font-family: inherit; font-size: 1.05rem; color: var(--dm-ink);
    padding: 14px 6px;
}
.dm-search-modal__submit {
    flex-shrink: 0; border: 0; cursor: pointer; font-family: inherit;
    background: var(--dm-primary); color: #fff;
    height: 46px; padding-inline: 22px; border-radius: 12px;
    font-weight: 700; font-size: .9rem;
    display: inline-flex; align-items: center; gap: 8px;
}
.dm-search-modal__submit:hover { background: var(--dm-primary-dark); }

.dm-header__social { display: inline-flex; align-items: center; gap: 4px; }
.dm-header__social a {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--dm-muted); background: var(--dm-surface-alt);
}
.dm-header__social a:hover { background: var(--dm-primary); color: #fff; }

.dm-burger {
    display: none;
    width: 44px; height: 44px; border-radius: 11px;
    border: 1.5px solid var(--dm-border);
    background: #fff; color: var(--dm-ink);
    font-size: 1.2rem;
}

/* ---------- Nav ---------- */
.dm-nav { background: var(--dm-primary); }
.dm-nav__list { display: flex; align-items: center; justify-content: center; gap: 0 1px; flex-wrap: wrap; }
.dm-nav__brand { display: none; } /* shown only inside the mobile drawer (see @media) */
.dm-nav__link {
    position: relative;
    display: inline-flex; align-items: center; gap: 5px;
    color: rgba(255,255,255,.86);
    font-weight: 700; font-size: .88rem; white-space: nowrap;
    padding: 13px 11px;
}
.dm-nav__link:hover { color: #fff; }
.dm-nav__link.is-active { color: #fff; }
.dm-nav__link.is-active::after {
    content: ""; position: absolute; inset-inline: 12px; inset-block-end: 0;
    height: 3px; border-radius: 3px 3px 0 0; background: #fff;
}
.dm-nav__item { position: relative; }
.dm-nav__dropdown {
    position: absolute; inset-inline-start: 0; top: 100%;
    min-width: 210px; background: #fff;
    border: 1px solid var(--dm-border); border-radius: 0 0 12px 12px;
    box-shadow: var(--dm-shadow-lg);
    padding-block: 8px; margin: 0;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: .2s ease; z-index: 70;
}
.dm-nav__item:hover .dm-nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dm-nav__dropdown a { display: block; padding: 9px 18px; font-size: .9rem; font-weight: 600; color: var(--dm-ink-soft); }
.dm-nav__dropdown a:hover { background: var(--dm-surface-alt); color: var(--dm-primary); }
.dm-nav__overlay { display: none; }

/* ---------- Breaking ticker ---------- */
.dm-breaking {
    display: flex; align-items: stretch;
    background: var(--dm-surface);
    border: 1px solid var(--dm-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--dm-shadow);
    margin-block: 22px;
    min-height: 54px;
}
.dm-breaking__tag {
    display: inline-flex; align-items: center; gap: 9px;
    background: linear-gradient(135deg, #ef4444, var(--dm-accent));
    color: #fff; font-weight: 800; font-size: .88rem;
    padding-inline: 20px; flex-shrink: 0; white-space: nowrap; letter-spacing: .3px;
}
.dm-breaking__dot {
    width: 9px; height: 9px; border-radius: 50%; background: #fff; flex-shrink: 0;
    animation: dm-pulse 1.6s ease-out infinite;
}
@keyframes dm-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
    70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.dm-breaking__track {
    overflow: hidden; flex: 1; min-width: 0; position: relative; display: flex; align-items: center;
    /* Force LTR so the marquee anchors to the LEFT edge of the track. On RTL pages a
       flex child anchors right, and translateX(-50%) would slide it left and leave a
       growing empty gap on the right (next to the tag). LTR anchoring keeps the
       seamless -50% loop gapless in both directions. */
    direction: ltr;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 30px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 30px), transparent 100%);
}
.dm-breaking__marquee {
    display: inline-flex; align-items: center; white-space: nowrap;
    direction: ltr; padding-inline-start: 22px; will-change: transform;
    animation: dm-ticker 40s linear infinite;
}
.dm-breaking:hover .dm-breaking__marquee { animation-play-state: paused; }
.dm-breaking__marquee > * { white-space: nowrap; }
.dm-breaking__marquee a, .dm-breaking__marquee span:not(.dm-breaking__sep) { font-weight: 700; font-size: .92rem; color: var(--dm-ink-soft); }
.dm-breaking__marquee a:hover { color: var(--dm-accent); }
.dm-breaking__sep { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--dm-accent); opacity: .5; margin-inline: 16px; vertical-align: middle; }
@keyframes dm-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .dm-breaking__marquee { animation: none; } }

/* ---------- Hero ---------- */
.dm-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.dm-hero__main {
    position: relative; border-radius: var(--dm-radius); overflow: hidden;
    min-height: 460px; box-shadow: var(--dm-shadow); background: var(--dm-ink);
}
.dm-hero__main img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.dm-hero__main::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(2,6,23,.92) 0%, rgba(2,6,23,.45) 45%, rgba(2,6,23,.05) 100%);
}
.dm-hero__body { position: absolute; inset-block-end: 0; inset-inline: 0; padding: 30px; z-index: 2; color: #fff; }
.dm-hero__body h2 { color: #fff; font-size: 2rem; margin-block: 12px 10px; }
.dm-hero__body .dm-meta { color: #cbd5e1; }
.dm-hero__body .dm-meta i { color: #93c5fd; }

.dm-hero__side { display: grid; grid-template-rows: repeat(4, 1fr); gap: 16px; }
.dm-hero__sidecard {
    position: relative; display: flex; gap: 12px; align-items: stretch;
    background: var(--dm-surface); border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius-sm); overflow: hidden; box-shadow: var(--dm-shadow);
}
.dm-hero__sidecard-img { width: 108px; flex-shrink: 0; overflow: hidden; }
.dm-hero__sidecard-img img { width: 100%; height: 100%; object-fit: cover; }
.dm-hero__sidecard-body { padding: 12px 12px 12px 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.dm-hero__sidecard-body h4 { font-size: .98rem; font-weight: 700; }

/* ---------- Cards ---------- */
.dm-card {
    display: flex; flex-direction: column;
    background: var(--dm-surface);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
    overflow: hidden;
    box-shadow: var(--dm-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
}
.dm-card:hover { transform: translateY(-4px); box-shadow: var(--dm-shadow-lg); }
.dm-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--dm-surface-alt); }
.dm-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.dm-card:hover .dm-card__media img { transform: scale(1.06); }
.dm-card__chip { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 2; }
.dm-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.dm-card__title { font-size: 1.08rem; font-weight: 700; }
.dm-card__title a:hover { color: var(--dm-primary); }
.dm-card__excerpt { color: var(--dm-muted); font-size: .9rem; }
.dm-card__foot { margin-block-start: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block-start: 6px; }

/* placeholder card — keeps section grids balanced when a category has < 3 posts */
.dm-card--placeholder { border-style: dashed; box-shadow: none; background: var(--dm-surface-alt); }
.dm-card--placeholder:hover { transform: none; box-shadow: none; }
.dm-card--placeholder .dm-card__media { background: var(--dm-surface-alt); display: grid; place-items: center; }
.dm-card--placeholder .dm-card__media img { width: 44%; height: auto; object-fit: contain; opacity: .3; }
.dm-card--placeholder .dm-card__media img:hover { transform: none; }
.dm-card--placeholder .dm-card__title { color: var(--dm-muted-light); font-weight: 600; }

/* horizontal compact card */
.dm-hcard { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-block-end: 1px dashed var(--dm-border); }
.dm-hcard:last-child { border-block-end: 0; }
.dm-hcard__img { width: 92px; height: 70px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--dm-surface-alt); }
.dm-hcard__img img { width: 100%; height: 100%; object-fit: cover; }
.dm-hcard__title { font-size: .94rem; font-weight: 700; }

/* rank list */
.dm-rank { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-block-end: 1px solid var(--dm-border); }
.dm-rank:last-child { border-block-end: 0; }
.dm-rank__n { font-size: 1.5rem; font-weight: 900; color: var(--dm-border-strong); width: 34px; flex-shrink: 0; text-align: center; }
.dm-rank:nth-child(1) .dm-rank__n { color: var(--dm-accent); }
.dm-rank:nth-child(2) .dm-rank__n { color: var(--dm-primary); }
.dm-rank__title { font-size: .95rem; font-weight: 700; }

/* sidebar panel */
.dm-panel { background: var(--dm-surface); border: 1px solid var(--dm-border); border-radius: var(--dm-radius); padding: 20px 22px; box-shadow: var(--dm-shadow); }
.dm-panel__title { font-size: 1.1rem; margin-block-end: 14px; padding-inline-start: 12px; position: relative; }
.dm-panel__title::before { content: ""; position: absolute; inset-inline-start: 0; inset-block: 3px; width: 4px; border-radius: 3px; background: var(--dm-primary); }

/* ---------- Category block on home ---------- */
.dm-catblock { margin-block-start: 18px; }

/* ---------- Layout: content + sidebar ---------- */
.dm-with-aside { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.dm-aside { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 92px; }

/* ---------- Ad slot ---------- */
.dm-ad { margin-block: 26px; text-align: center; }
.dm-ad__label { display: block; font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--dm-muted-light); margin-block-end: 6px; }
.dm-ad img { margin-inline: auto; border-radius: 10px; }

/* ---------- Pagination (themed: vendor/pagination/demo-custom) ---------- */
.dm-pagination { display: flex; justify-content: center; }
.dm-loadmore { display: flex; justify-content: center; margin-block-start: 36px; }
.dm-pager {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex-wrap: wrap; margin-block-start: 40px;
}
.dm-pager__btn {
    display: inline-grid; place-items: center;
    min-width: 44px; height: 44px; padding: 0 13px;
    border: 1px solid var(--dm-border); border-radius: var(--dm-radius-sm);
    background: var(--dm-surface); color: var(--dm-ink-soft);
    font-family: var(--dm-font); font-weight: 700; font-size: .95rem; line-height: 1;
    cursor: pointer; transition: border-color .18s, color .18s, background .18s, box-shadow .18s;
}
.dm-pager__btn--nav { font-size: .8rem; min-width: 44px; padding: 0; }
.dm-pager__btn:hover { border-color: var(--dm-primary); color: var(--dm-primary); box-shadow: var(--dm-shadow); }
.dm-pager__btn.is-active {
    background: var(--dm-primary); border-color: var(--dm-primary); color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--dm-primary) 32%, transparent);
}
.dm-pager__btn.is-active:hover { color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--dm-primary) 32%, transparent); }
.dm-pager__btn.is-disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.dm-pager__gap { display: inline-grid; place-items: center; min-width: 26px; height: 44px; color: var(--dm-muted); }

/* ---------- Page banner ---------- */
.dm-banner {
    background: linear-gradient(120deg, var(--dm-ink), var(--dm-primary-dark));
    color: #fff; padding-block: 46px; position: relative; overflow: hidden;
}
.dm-banner::after { content: ""; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.06); }
.dm-banner h1 { color: #fff; font-size: 2.1rem; }
.dm-banner__crumb { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: #cbd5e1; margin-block-start: 10px; }
.dm-banner__crumb a:hover { color: #fff; }

/* ---------- Filters ---------- */
.dm-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-block-end: 26px; }
.dm-filters input, .dm-filters select {
    border: 1.5px solid var(--dm-border); border-radius: 10px;
    padding: 11px 14px; font-family: inherit; font-size: .9rem; color: var(--dm-ink);
    background: var(--dm-surface); outline: 0;
}
.dm-filters input:focus, .dm-filters select:focus { border-color: var(--dm-primary); }
.dm-filters input { flex: 1; min-width: 220px; }

/* ---------- Single article ---------- */
.dm-article__hero {
    position: relative; min-height: 420px; border-radius: var(--dm-radius);
    overflow: hidden; display: flex; align-items: flex-end;
    background: var(--dm-ink); color: #fff; margin-block: 28px;
}
.dm-article__hero img, .dm-article__hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-article__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(2,6,23,.93), rgba(2,6,23,.25)); }
.dm-article__hero-body { position: relative; z-index: 2; padding: 34px; max-width: 880px; }
.dm-article__hero-body h1 { color: #fff; font-size: 2.3rem; margin-block: 14px 12px; }
.dm-article__hero-body .dm-meta { color: #e2e8f0; }
.dm-article__hero-body .dm-meta i { color: #93c5fd; }
.dm-article__hero-body a:hover { color: #93c5fd; }

.dm-prose { font-size: 1.06rem; line-height: 2; color: var(--dm-ink-soft); }
.dm-prose p { margin-block: 0 1.3rem; }
.dm-prose h2 { font-size: 1.5rem; margin-block: 2rem 1rem; }
.dm-prose h3 { font-size: 1.25rem; margin-block: 1.6rem .8rem; }
.dm-prose img { border-radius: 12px; margin-block: 1.4rem; }
.dm-prose a { color: var(--dm-primary); font-weight: 600; text-decoration: underline; }
.dm-prose blockquote {
    margin: 1.6rem 0; padding: 14px 20px;
    border-inline-start: 4px solid var(--dm-primary);
    background: var(--dm-primary-soft); border-radius: 0 12px 12px 0;
    font-weight: 600; color: var(--dm-ink);
}
.dm-prose ul { list-style: disc; padding-inline-start: 22px; margin-block: 1rem; }
.dm-prose ul li { margin-block: .4rem; }

.dm-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-block-start: 26px; }
.dm-tags a { font-size: .82rem; font-weight: 700; color: var(--dm-ink-soft); background: var(--dm-surface-alt); padding: 6px 14px; border-radius: 999px; }
.dm-tags a:hover { background: var(--dm-primary); color: #fff; }

.dm-share { display: flex; gap: 10px; align-items: center; margin-block-start: 26px; flex-wrap: wrap; }
.dm-share span { font-weight: 700; color: var(--dm-muted); font-size: .85rem; }
.dm-share a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--dm-surface-alt); color: var(--dm-ink-soft); }
.dm-share a:hover { background: var(--dm-primary); color: #fff; }
.dm-share__copy {
    position: relative; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer; border: 0;
    background: var(--dm-surface-alt); color: var(--dm-ink-soft);
    font-family: inherit; font-size: 1rem; transition: background .2s, color .2s;
}
.dm-share__copy:hover { background: var(--dm-primary); color: #fff; }
.dm-share__copy.is-copied { background: #16a34a; color: #fff; }
.dm-share__tip {
    position: absolute; inset-block-end: calc(100% + 8px); inset-inline-start: 50%;
    transform: translateX(-50%); white-space: nowrap; pointer-events: none; z-index: 5;
    background: var(--dm-ink); color: #fff; font-size: .72rem; font-weight: 700;
    padding: 5px 10px; border-radius: 7px;
}
[dir="rtl"] .dm-share__tip { transform: translateX(50%); }

/* author card on article */
.dm-authorcard { display: flex; gap: 16px; align-items: center; background: var(--dm-surface); border: 1px solid var(--dm-border); border-radius: var(--dm-radius); padding: 18px 20px; margin-block-start: 30px; box-shadow: var(--dm-shadow); }
.dm-authorcard__avatar { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--dm-surface-alt); }
.dm-authorcard__avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-authorcard__name { font-size: 1.1rem; font-weight: 800; }
.dm-authorcard__bio { color: var(--dm-muted); font-size: .88rem; margin-block-start: 4px; }

/* ---------- Writer / author page ---------- */
.dm-author-hero { text-align: center; padding-block: 44px; }
.dm-author-hero__avatar { width: 128px; height: 128px; border-radius: 50%; overflow: hidden; margin-inline: auto; border: 4px solid #fff; box-shadow: var(--dm-shadow-lg); background: var(--dm-surface-alt); }
.dm-author-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-author-hero h1 { font-size: 1.9rem; margin-block-start: 16px; }
.dm-author-hero__bio { color: var(--dm-muted); max-width: 620px; margin: 12px auto 0; }
.dm-author-hero__social { display: flex; gap: 10px; justify-content: center; margin-block-start: 18px; }
.dm-author-hero__social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--dm-surface); border: 1px solid var(--dm-border); color: var(--dm-ink-soft); }
.dm-author-hero__social a:hover { background: var(--dm-primary); color: #fff; border-color: var(--dm-primary); }

/* ---------- Visuals ---------- */
.dm-vis-pills { display: flex; gap: 10px; justify-content: center; margin-block-end: 30px; flex-wrap: wrap; }
.dm-vis-pill { padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--dm-border); background: #fff; font-weight: 700; font-size: .88rem; color: var(--dm-ink-soft); }
.dm-vis-pill:hover { border-color: var(--dm-primary); color: var(--dm-primary); }
.dm-vis-pill.is-active { background: var(--dm-primary); border-color: var(--dm-primary); color: #fff; }
.dm-vis-pill span { opacity: .7; font-size: .8rem; }

.dm-vis-card { position: relative; border-radius: var(--dm-radius); overflow: hidden; cursor: pointer; box-shadow: var(--dm-shadow); aspect-ratio: 4 / 3; background: var(--dm-ink); }
.dm-vis-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.dm-vis-card:hover img { transform: scale(1.07); }
.dm-vis-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(2,6,23,.72), transparent 55%); }
.dm-vis-card__badge { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: rgba(15,23,42,.78); color: #fff; font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.dm-vis-card__count { background: var(--dm-primary); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .68rem; line-height: 1.5; }
.dm-vis-card__play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(37,99,235,.92); color: #fff; font-size: 1.3rem; z-index: 2; }
.dm-vis-card__meta { position: absolute; inset-block-end: 0; inset-inline: 0; z-index: 2; padding: 16px; color: #fff; }
.dm-vis-card__meta h4 { color: #fff; font-size: 1rem; }
.dm-vis-card__meta .dm-meta { color: #cbd5e1; }

/* lightbox */
.dm-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(2,6,23,.95); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 30px 24px; }
.dm-lb__bar { position: absolute; inset-block-start: 0; inset-inline: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 22px; z-index: 4; }
.dm-lb__cap { color: #fff; font-weight: 700; font-size: 1rem; max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-lb__actions { display: inline-flex; align-items: center; gap: 10px; }
.dm-lb__counter { color: #cbd5e1; font-size: .85rem; font-weight: 600; min-width: 48px; text-align: center; }
.dm-lb__btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; font-size: 1rem; cursor: pointer; text-decoration: none; }
.dm-lb__btn:hover { background: var(--dm-primary); color: #fff; }
.dm-lb__stage { max-width: 1000px; width: 100%; max-height: 74vh; display: flex; align-items: center; justify-content: center; }
.dm-lb__stage img, .dm-lb__stage video, .dm-lb__stage iframe { max-width: 100%; max-height: 74vh; border-radius: 12px; background: #000; }
.dm-lb__stage iframe { width: 900px; height: 506px; max-width: 100%; border: 0; }
.dm-lb__nav { position: absolute; inset-block: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.3rem; display: grid; place-items: center; }
.dm-lb__nav:hover { background: var(--dm-primary); }
.dm-lb__nav--prev { inset-inline-start: 24px; }
.dm-lb__nav--next { inset-inline-end: 24px; }
.dm-lb__thumbs { display: flex; gap: 8px; margin-block-start: 18px; flex-wrap: wrap; justify-content: center; max-width: 90vw; }
.dm-lb__thumb { width: 60px; height: 44px; border-radius: 7px; overflow: hidden; border: 2px solid transparent; background: #1e293b; cursor: pointer; padding: 0; display: grid; place-items: center; color: #94a3b8; }
.dm-lb__thumb.is-active { border-color: var(--dm-primary); }
.dm-lb__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dm-lb__title { color: #fff; font-weight: 700; margin-block-start: 14px; }

/* ---------- Custom themed video player ---------- */
.dm-vp {
    position: relative; width: min(1000px, 100%); max-height: 74vh; line-height: 0;
    border-radius: 16px; overflow: hidden;
    border: 3px solid transparent;                 /* theme-colored frame around the video */
    background:
        linear-gradient(#000, #000) padding-box,
        linear-gradient(135deg, var(--dm-primary), var(--dm-primary-dark)) border-box;
    box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(37,99,235,.20);
}
.dm-vp video { width: 100%; max-height: 74vh; display: block; background: #000; }
.dm-vp.is-idle { cursor: none; }
.dm-vp__big { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; border: 0; background: rgba(37,99,235,.92); color: #fff; font-size: 1.7rem; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.45); transition: transform .15s; z-index: 3; }
.dm-vp__big:hover { transform: scale(1.08); background: var(--dm-primary-dark); }
.dm-vp__big i { margin-inline-start: 5px; }
.dm-vp__spin { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: dm-spin .8s linear infinite; z-index: 2; }
@keyframes dm-spin { to { transform: rotate(360deg); } }
.dm-vp__ctrl { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 28px 14px 12px; background: linear-gradient(to top, rgba(0,0,0,.85), transparent); transition: opacity .25s; line-height: 1.4; direction: ltr; z-index: 3; }
.dm-vp.is-idle .dm-vp__ctrl { opacity: 0; }
.dm-vp__progress { position: relative; height: 6px; border-radius: 6px; background: rgba(255,255,255,.25); cursor: pointer; margin-bottom: 8px; }
.dm-vp__progress:hover { height: 8px; }
.dm-vp__buffered { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(255,255,255,.35); border-radius: 6px; }
.dm-vp__played { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--dm-primary); border-radius: 6px; }
.dm-vp__handle { position: absolute; inset-inline-end: -6px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); opacity: 0; transition: opacity .15s; }
.dm-vp__progress:hover .dm-vp__handle { opacity: 1; }
.dm-vp__row { display: flex; align-items: center; gap: 4px; }
.dm-vp__b { background: transparent; border: 0; color: #fff; min-width: 38px; height: 38px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; font-size: 1rem; position: relative; padding: 0; }
.dm-vp__b:hover { background: rgba(255,255,255,.16); }
.dm-vp__skip i { font-size: 1.12rem; }
.dm-vp__skip b { position: absolute; inset: 0; display: grid; place-items: center; padding-block-start: 2px; font-size: .46rem; font-weight: 800; line-height: 1; pointer-events: none; font-style: normal; }
.dm-vp__rate { min-width: 46px; padding-inline: 8px; font-weight: 800; font-size: .82rem; }
.dm-vp__vol { display: inline-flex; align-items: center; }
.dm-vp__volrange { width: 0; opacity: 0; transition: width .2s ease, opacity .2s ease; height: 4px; accent-color: var(--dm-primary); cursor: pointer; }
.dm-vp__vol:hover .dm-vp__volrange { width: 74px; opacity: 1; margin-inline-start: 4px; }
.dm-vp__time { color: #e2e8f0; font-size: .82rem; font-variant-numeric: tabular-nums; margin-inline-start: 8px; white-space: nowrap; }
.dm-vp__sp { flex: 1; }
/* Settings (gear) menu — shown only on phones (see @media below); groups
   speed · loop · background-play so the phone control bar stays a single row. */
.dm-vp__gear { position: relative; display: none; align-items: center; }
.dm-vp__menu {
    position: absolute; bottom: calc(100% + 10px); right: 0;
    min-width: 190px; padding: 6px; z-index: 6;
    background: rgba(15,23,42,.98); border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0,0,0,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    direction: rtl;
}
[dir="ltr"] .dm-vp__menu { direction: ltr; }
.dm-vp__menu-item {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
    padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
    color: #e2e8f0; font-family: var(--dm-font); font-size: .9rem; font-weight: 600; text-align: start;
}
.dm-vp__menu-item span { display: inline-flex; align-items: center; gap: 9px; }
.dm-vp__menu-item i { width: 16px; text-align: center; }
.dm-vp__menu-item b { color: #fff; font-weight: 800; font-size: .82rem; }
.dm-vp__menu-item:hover, .dm-vp__menu-item:active { background: rgba(255,255,255,.1); }
.dm-vp__menu-item.is-on { color: #fff; }
.dm-vp__menu-item.is-on > span > i:first-child, .dm-vp__menu-tick { color: var(--dm-primary); }
.dm-vp:fullscreen, .dm-vp:-webkit-full-screen { width: 100%; height: 100%; max-height: 100vh; border-radius: 0; border: 0; display: flex; align-items: center; justify-content: center; }
.dm-vp:fullscreen video, .dm-vp:-webkit-full-screen video { max-height: 100vh; }
.dm-vp__b.is-on { background: var(--dm-primary); color: #fff; }
.dm-vp__b.is-on:hover { background: var(--dm-primary-dark); }
.dm-vp__tip { position: absolute; inset-block-end: 16px; transform: translateX(-50%); background: rgba(15,23,42,.96); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; z-index: 4; }

/* ---------- About ---------- */
.dm-about__lead { font-size: 1.15rem; color: var(--dm-muted); max-width: 720px; }
.dm-about__cover { border-radius: var(--dm-radius); overflow: hidden; margin-block: 26px; box-shadow: var(--dm-shadow); }
.dm-about__cover img { width: 100%; max-height: 420px; object-fit: cover; }
.dm-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-block-start: 30px; }
.dm-feature { background: var(--dm-surface); border: 1px solid var(--dm-border); border-radius: var(--dm-radius); padding: 24px; box-shadow: var(--dm-shadow); }
.dm-feature__icon { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; background: var(--dm-primary-soft); color: var(--dm-primary); font-size: 1.3rem; margin-block-end: 14px; }
.dm-feature h3 { font-size: 1.1rem; margin-block-end: 8px; }
.dm-feature p { color: var(--dm-muted); font-size: .92rem; margin: 0; }

/* ---------- Empty state ---------- */
.dm-empty { text-align: center; padding: 60px 20px; color: var(--dm-muted); }
.dm-empty i { font-size: 2.6rem; color: var(--dm-border-strong); margin-block-end: 14px; }

/* ---------- Footer ---------- */
.dm-footer { background: var(--dm-ink); color: #cbd5e1; margin-block-start: 50px; }
.dm-footer__main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-block: 50px; }
.dm-footer__brand img { height: 44px; margin-block-end: 16px; }
.dm-footer__brand-txt { font-weight: 900; font-size: 1.4rem; color: #fff; margin-block-end: 14px; }
.dm-footer__about { font-size: .9rem; color: #94a3b8; line-height: 1.9; }
.dm-footer__social { display: flex; gap: 10px; margin-block-start: 18px; }
.dm-footer__social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #e2e8f0; }
.dm-footer__social a:hover { background: var(--dm-primary); color: #fff; }
.dm-footer__col h4 { color: #fff; font-size: 1rem; margin-block-end: 16px; }
.dm-footer__col { display: flex; flex-direction: column; align-items: flex-start; }
.dm-footer__col a { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 8px; color: #94a3b8; font-size: .9rem; line-height: 1.5; padding-block: 6px; }
.dm-footer__col a:hover { color: #fff; }
.dm-footer__col a i { font-size: .68rem; color: var(--dm-primary); }
.dm-footer__bottom { border-block-start: 1px solid rgba(255,255,255,.08); padding-block: 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: #94a3b8; }
.dm-footer__bottom a { color: #cbd5e1; }
.dm-footer__bottom a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .dm-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .dm-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .dm-hero { grid-template-columns: 1fr; }
    .dm-hero__main { min-height: 360px; }
    .dm-hero__side { grid-template-rows: none; }
    .dm-with-aside { grid-template-columns: 1fr; }
    .dm-aside { position: static; }
    .dm-features { grid-template-columns: repeat(2, 1fr); }
    .dm-footer__main { grid-template-columns: 1fr 1fr; }

    /* Centered logo on phones: burger pinned to the start, logo centered */
    .dm-header__inner { flex-wrap: wrap; gap: 14px; min-height: auto; padding-block: 14px; position: relative; justify-content: center; }
    /* Burger pinned to the start with the same 16px gap as the search side. */
    .dm-burger { display: grid; place-items: center; position: absolute; inset-inline-start: 16px; inset-block-start: 13px; }
    .dm-brand { margin-inline: 0; }
    /* Phones: collapse the search pill into an icon button pinned to the end,
       mirroring the burger on the start side. */
    .dm-search-trigger {
        position: absolute; inset-inline-end: 16px; inset-block-start: 13px;
        order: 0; flex: none; gap: 0; min-width: 0; max-width: none;
        width: 44px; height: 44px; padding: 0; border-radius: 11px; background: #fff;
    }
    .dm-search-trigger__txt { display: none; }
    .dm-search-trigger__ico {
        width: 100%; height: 100%; border-radius: 11px;
        background: transparent; color: var(--dm-ink); font-size: 1.15rem;
    }
    .dm-header__social { display: none; }
    .dm-header__langs { display: none !important; }
    /* Language globe sits just inside the search icon on the end side. */
    .dm-langbtn { display: block; position: absolute; inset-inline-end: 66px; inset-block-start: 13px; z-index: 3; }

    /* Footer (white) logo at the top of the mobile drawer */
    .dm-nav__brand { display: flex; justify-content: center; padding: 6px 20px 16px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.16); }
    .dm-nav__brand img { height: 40px; width: auto; }

    .dm-nav__overlay.is-open { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 80; }
    .dm-nav .dm-container { padding: 0; }
    .dm-nav__list {
        position: fixed; inset-block: 0; inset-inline-start: -300px;
        width: 280px; max-width: 84vw; background: var(--dm-primary);
        flex-direction: column; align-items: stretch; gap: 0;
        padding-block-start: 20px; z-index: 90;
        transition: inset-inline-start .3s ease; overflow-y: auto;
    }
    .dm-nav__list.is-open { inset-inline-start: 0; }
    .dm-nav__list > .dm-nav__item { width: 100%; }
    .dm-nav__link { padding: 14px 22px; width: 100%; justify-content: space-between; }
    .dm-nav__link.is-active::after { display: none; }
    /* Mobile submenu = full-width collapsible accordion (not a floating 210px box) */
    .dm-nav__dropdown {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; border-radius: 0; background: rgba(0,0,0,.18);
        padding-block: 0; min-width: 0; width: 100%;
        max-height: 0; overflow: hidden; transition: max-height .3s ease;
    }
    .dm-nav__item.is-expanded > .dm-nav__dropdown { max-height: 75vh; }
    .dm-nav__item > .dm-nav__link .fa-chevron-down { transition: transform .25s ease; }
    .dm-nav__item.is-expanded > .dm-nav__link .fa-chevron-down { transform: rotate(180deg); }
    .dm-nav__dropdown a { color: #e2e8f0; padding-inline-start: 36px; }
    .dm-nav__dropdown a:hover { background: rgba(0,0,0,.25); color: #fff; }
}

@media (max-width: 600px) {
    .dm-grid--4, .dm-grid--3, .dm-grid--2 { grid-template-columns: 1fr; }
    .dm-features { grid-template-columns: 1fr; }
    /* Phones: pair the link columns two-per-row; brand spans the full width on top. */
    .dm-footer__main { grid-template-columns: 1fr 1fr; gap: 26px 20px; padding-block: 36px; }
    .dm-footer__brand { grid-column: 1 / -1; }
    .dm-hero__body h2 { font-size: 1.5rem; }
    .dm-article__hero-body h1 { font-size: 1.7rem; }
    .dm-banner h1 { font-size: 1.6rem; }
    .dm-section__title { font-size: 1.25rem; }
    .dm-topbar__date span { display: none; }

    /* Phones: the desktop control bar has more buttons than fit a phone-width
       (overflow:hidden) player, so they used to wrap into a lopsided 2nd row.
       Instead keep ONE clean row of essentials (play · −5 · +5 · mute · time …
       speed · fullscreen) and drop the power-user buttons (loop, PiP) — those
       stay available on desktop. Tighter modal padding gives the video more room. */
    .dm-lb { padding: 58px 10px 16px; }
    .dm-lb__bar { padding: 12px 14px; }
    .dm-vp__ctrl { padding: 20px 8px 9px; }
    .dm-vp__row { gap: 2px; }
    .dm-vp__b { min-width: 33px; height: 33px; font-size: .95rem; }
    .dm-vp__time { font-size: .72rem; margin-inline-start: 4px; }
    /* Collapse speed · loop · background-play into the gear menu, keeping one
       clean row: play · −5 · +5 · mute · time … gear · fullscreen. */
    .dm-vp__gear { display: inline-flex; }
    .dm-vp__row > .dm-vp__rate,
    .dm-vp__row > [aria-label="loop"],
    .dm-vp__row > [aria-label="picture in picture"] { display: none; }
}

/* ---------- Homepage section layout variants («طريقة العرض», DEMO_* 41-47) ---------- */
.dm-hero--sec .dm-hero__side { grid-template-rows: none; grid-auto-rows: 1fr; }
.dm-hero--sec .dm-hero__main { min-height: 340px; }

.dm-listaside { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.dm-listaside__list { display: grid; gap: 14px; align-content: start; }

.dm-mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 16px; }
.dm-mosaic__tile { position: relative; border-radius: var(--dm-radius); overflow: hidden; box-shadow: var(--dm-shadow); display: block; }
.dm-mosaic__tile img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .35s ease; }
.dm-mosaic__tile:hover img { transform: scale(1.06); }
.dm-mosaic__tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, .82)); }
.dm-mosaic__tile h4 { position: absolute; inset-block-end: 0; inset-inline: 0; padding: 14px 16px; z-index: 2; color: #fff; font-size: 1rem; }
.dm-mosaic__tile--lg { grid-column: span 2; grid-row: span 2; }
.dm-mosaic__tile--lg h4 { font-size: 1.35rem; }
.dm-mosaic__tile--card { height: 260px; }

.dm-ranked { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 34px; }
.dm-ranked__item { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-block-end: 1px dashed var(--dm-border-strong); }
.dm-ranked__item:hover h4 { color: var(--dm-primary); }
.dm-ranked__num { font-size: 1.55rem; font-weight: 800; color: var(--dm-primary); opacity: .4; line-height: 1.15; min-width: 34px; text-align: center; }
.dm-ranked__item h4 { font-size: 1rem; margin-block-end: 4px; }

@media (max-width: 992px) {
    .dm-listaside { grid-template-columns: 1fr; }
    .dm-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
    .dm-ranked { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .dm-mosaic { grid-template-columns: 1fr; grid-auto-rows: 170px; }
    .dm-mosaic__tile--lg { grid-column: auto; grid-row: auto; }
    .dm-mosaic__tile--card { height: 200px; }
}
