/* «مطبوعاتنا» — right-to-left throughout, theme colours with fallbacks. */
.mcp-list,.mcp-single,.mcp-dialog{--mcp-brand:var(--wp--preset--color--brand,#0f7a6d);--mcp-ink:var(--wp--preset--color--ink,#13221f);--mcp-muted:var(--wp--preset--color--muted,#5d6b68);--mcp-line:var(--wp--preset--color--line,#dfe7e5);--mcp-mint:var(--wp--preset--color--mint,#e8f4f1);--mcp-accent:var(--wp--preset--color--accent,#d39a3c);--mcp-r:16px;direction:rtl;text-align:right}

.mcp-single [hidden],.mcp-list [hidden],.mcp-dialog [hidden]{display:none!important}
/* ---------- bar: filters + search */
.mcp-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin:0 0 24px}
.mcp-filters{display:flex;flex-wrap:wrap;gap:8px}
.mcp-filters a{padding:.45rem 1rem;border:1.5px solid var(--mcp-line);border-radius:999px;color:var(--mcp-ink);text-decoration:none;font-weight:600;font-size:.95rem;transition:.15s}
.mcp-filters a:hover{border-color:var(--mcp-brand);color:var(--mcp-brand)}
.mcp-filters a[aria-current]{background:var(--mcp-brand);border-color:var(--mcp-brand);color:#fff}
.mcp-search{display:flex;border:1.5px solid var(--mcp-line);border-radius:999px;overflow:hidden;background:#fff;min-width:min(320px,100%)}
.mcp-search input{flex:1;border:0;padding:.6rem 1rem;font:inherit;min-width:0;background:transparent}
.mcp-search button{border:0;background:var(--mcp-brand);color:#fff;padding:0 1.1rem;font:inherit;font-weight:600;cursor:pointer}
.mcp-empty{padding:40px 16px;text-align:center;color:var(--mcp-muted);background:var(--mcp-mint);border-radius:var(--mcp-r)}
.mcp-heading{margin-top:2.5rem}

/* ---------- cards */
.mcp-grid-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:24px}
.mcp-card{background:#fff;border:1px solid var(--mcp-line);border-radius:var(--mcp-r);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 6px 22px rgba(16,40,34,.06);transition:transform .2s,box-shadow .2s}
.mcp-card:hover{transform:translateY(-3px);box-shadow:0 16px 40px rgba(16,40,34,.12)}
.mcp-card__media{position:relative;display:block;aspect-ratio:10/7;background:var(--mcp-mint);overflow:hidden}
.mcp-card__media img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.mcp-card:hover .mcp-card__media img{transform:scale(1.04)}
.mcp-card__ph{position:absolute;inset:0;display:grid;place-items:center;font-size:1.4rem;font-weight:700;color:var(--mcp-brand)}
.mcp-badge{position:absolute;top:12px;inset-inline-start:12px;background:rgba(255,255,255,.95);color:var(--mcp-brand);font-size:.82rem;font-weight:700;padding:.25rem .7rem;border-radius:999px}
.mcp-badge--static{position:static;display:inline-block;background:var(--mcp-mint)}
.mcp-card__body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:8px;flex:1}
.mcp-card__title{margin:0;font-size:1.15rem;line-height:1.4}
.mcp-card__title a{color:var(--mcp-ink);text-decoration:none}
.mcp-card__meta{margin:0;color:var(--mcp-muted);font-size:.9rem}
.mcp-card__actions{display:flex;gap:8px;margin-top:auto;padding-top:6px}

/* ---------- buttons */
.mcp-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:.45rem 1.1rem;border-radius:999px;border:1.5px solid var(--mcp-brand);background:var(--mcp-brand);color:#fff!important;text-decoration:none!important;font:inherit;font-weight:600;font-size:.95rem;cursor:pointer;transition:.15s}
.mcp-btn:hover{filter:brightness(1.08)}
.mcp-btn--ghost{background:transparent;color:var(--mcp-brand)!important}
.mcp-btn--ghost:hover{background:var(--mcp-mint)}
.mcp-btn:disabled{opacity:.6;cursor:wait}

/* ---------- single */
.mcp-single__meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;color:var(--mcp-muted);margin:0 0 12px}
.mcp-single__lead{font-size:1.1rem;color:var(--mcp-ink)}
.mcp-share{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 8px}
.mcp-section{margin:36px 0}
.mcp-section h2{margin:0 0 14px}
.mcp-section__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.mcp-section__head h2{margin:0}
.mcp-view-toggle{display:inline-flex;border:1.5px solid var(--mcp-line);border-radius:999px;overflow:hidden}
.mcp-view-toggle button{border:0;background:#fff;padding:.4rem 1rem;font:inherit;cursor:pointer;color:var(--mcp-ink)}
.mcp-view-toggle button[aria-pressed=true]{background:var(--mcp-brand);color:#fff}
.mcp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px}
.mcp-grid a{display:block;border-radius:10px;overflow:hidden;border:1px solid var(--mcp-line);background:#fff}
.mcp-grid img{width:100%;height:auto;display:block;transition:transform .3s}
.mcp-grid a:hover img{transform:scale(1.03)}
.mcp-back{margin-top:32px}

/* ---------- page-turning book (right-to-left: first page on the right) */
.mcp-book{background:linear-gradient(180deg,#eef3f2,#dfe8e6);border-radius:var(--mcp-r);padding:22px 16px 12px;outline:none}
.mcp-book:focus-visible{box-shadow:0 0 0 3px var(--mcp-accent)}
.mcp-book:fullscreen{display:flex;flex-direction:column;justify-content:center;background:#1d2a28;border-radius:0}
.mcp-book__stage{perspective:2200px;display:flex;justify-content:center}
.mcp-book__spread{display:flex;flex-direction:row;justify-content:center;max-width:100%;transform-style:preserve-3d}
.mcp-page{margin:0;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.18);cursor:zoom-in;max-width:50%;transition:transform .26s ease,opacity .26s ease}
.mcp-book__spread.is-single .mcp-page{max-width:min(560px,100%)}
.mcp-page img{display:block;width:100%;height:auto;max-height:72vh;object-fit:contain}
.mcp-book:fullscreen .mcp-page img{max-height:84vh}
.mcp-book__spread:not(.is-single) .mcp-page:first-child{transform-origin:left center;border-radius:10px 0 0 4px;box-shadow:inset 18px 0 24px -18px rgba(0,0,0,.25),0 10px 30px rgba(0,0,0,.18)}
.mcp-book__spread:not(.is-single) .mcp-page:last-child{transform-origin:right center;border-radius:0 4px 4px 0;box-shadow:inset -18px 0 24px -18px rgba(0,0,0,.25),0 10px 30px rgba(0,0,0,.18)}
/* next: the left-hand page turns over towards the right */
.mcp-book__spread.turn-next .mcp-page:last-child,.mcp-book__spread.is-single.turn-next .mcp-page{transform:rotateY(-80deg);opacity:.35}
.mcp-book__spread.turn-prev .mcp-page:first-child,.mcp-book__spread.is-single.turn-prev .mcp-page{transform:rotateY(80deg);opacity:.35}
.mcp-book__spread.in-next .mcp-page:first-child,.mcp-book__spread.is-single.in-next .mcp-page{animation:mcpInNext .26s ease}
.mcp-book__spread.in-prev .mcp-page:last-child,.mcp-book__spread.is-single.in-prev .mcp-page{animation:mcpInPrev .26s ease}
@keyframes mcpInNext{from{transform:rotateY(80deg);opacity:.35}to{transform:none;opacity:1}}
@keyframes mcpInPrev{from{transform:rotateY(-80deg);opacity:.35}to{transform:none;opacity:1}}
.mcp-book__bar{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:14px}
.mcp-book__bar button,.mcp-lb-nav button{width:44px;height:44px;border-radius:50%;border:1.5px solid var(--mcp-line);background:#fff;color:var(--mcp-ink);font-size:1.5rem;line-height:1;cursor:pointer}
.mcp-book__bar button:disabled{opacity:.35;cursor:default}
.mcp-book__bar .mcp-full{font-size:1.1rem}
.mcp-count{min-width:90px;text-align:center;font-weight:600;color:var(--mcp-ink)}
.mcp-book:fullscreen .mcp-count{color:#fff}

/* ---------- files */
.mcp-files{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.mcp-file{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--mcp-line);border-radius:10px;background:#fff}
.mcp-file__ext{min-width:52px;height:52px;display:grid;place-items:center;border-radius:10px;background:var(--mcp-mint);color:var(--mcp-brand);font-weight:700;font-size:.85rem}
.mcp-file__name{flex:1;min-width:160px;font-weight:600}
.mcp-file__name small{color:var(--mcp-muted);font-weight:400}
.mcp-file__actions{display:flex;gap:8px}
.mcp-preview{flex-basis:100%}
.mcp-preview iframe{width:100%;height:min(78vh,900px);border:1px solid var(--mcp-line);border-radius:10px;background:#f6f8f8}

/* ---------- videos (players load after a click) */
.mcp-videos-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px;align-items:start}
.mcp-video{margin:0}
.mcp-video video{width:100%;border-radius:10px;background:#000}
.mcp-video__frame{position:relative;aspect-ratio:var(--mcp-ratio,16/9);max-height:80vh;border-radius:10px;overflow:hidden;background:#0d1715}
.mcp-video--tiktok .mcp-video__frame,.mcp-video--instagram .mcp-video__frame,.mcp-video--x .mcp-video__frame{max-width:420px;margin-inline:auto}
.mcp-video__frame iframe,.mcp-video__play{position:absolute;inset:0;width:100%;height:100%;border:0}
.mcp-video__play{padding:0;cursor:pointer;background:linear-gradient(135deg,#0b4f4a,#179585);display:grid;place-items:center}
.mcp-video__play img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.mcp-video__brand{color:#fff;font-size:1.3rem;font-weight:700;position:absolute;top:16px;inset-inline-start:16px}
.mcp-video__icon{position:relative;width:68px;height:68px;border-radius:50%;background:rgba(0,0,0,.6);box-shadow:0 0 0 4px rgba(255,255,255,.35);transition:transform .2s}
.mcp-video__icon::after{content:"";position:absolute;top:50%;left:54%;transform:translate(-50%,-50%);border-style:solid;border-width:13px 0 13px 21px;border-color:transparent transparent transparent #fff}
.mcp-video__play:hover .mcp-video__icon{transform:scale(1.08);background:var(--mcp-brand)}
.mcp-video figcaption{margin-top:8px;color:var(--mcp-muted);font-size:.92rem}
.mcp-video--link{padding:18px;border:1px dashed var(--mcp-line);border-radius:10px;text-align:center}

/* ---------- dialogs: lightbox, QR, download form */
.mcp-dialog{border:0;border-radius:16px;padding:22px;max-width:min(560px,94vw);width:100%;box-shadow:0 30px 80px rgba(0,0,0,.35);color:var(--mcp-ink)}
.mcp-dialog::backdrop{background:rgba(10,20,18,.62)}
.mcp-dialog h2{margin:0 0 6px;font-size:1.25rem}
.mcp-x{position:absolute;top:8px;inset-inline-end:10px;border:0;background:transparent;font-size:1.8rem;line-height:1;cursor:pointer;color:inherit}
.mcp-lightbox{max-width:96vw;max-height:96vh;width:auto;padding:12px;background:#111;color:#fff}
.mcp-lightbox img{display:block;max-width:92vw;max-height:80vh;margin:28px auto 8px;object-fit:contain}
.mcp-lightbox .mcp-count{color:#fff}
.mcp-lb-nav{display:flex;align-items:center;justify-content:center;gap:14px}
.mcp-qr{text-align:center}
.mcp-qr img{width:min(320px,80vw);height:auto;margin:10px auto;display:block}
.mcp-qr__url{color:var(--mcp-muted);font-size:.85rem;word-break:break-all}
.mcp-gate{display:grid;gap:12px}
.mcp-gate label{display:grid;gap:4px;font-weight:600}
.mcp-gate input:not([type=checkbox]){border:1.5px solid var(--mcp-line);border-radius:10px;padding:.6rem .8rem;font:inherit}
.mcp-gate input:focus{outline:2px solid var(--mcp-brand);outline-offset:1px}
.mcp-check{display:flex!important;gap:8px;align-items:flex-start;font-weight:400!important}
.mcp-gate__msg{color:#b32d2e;margin:0;min-height:1.2em}
.mcp-gate__actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.mcp-hp{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

@media (max-width:600px){
.mcp-bar{flex-direction:column;align-items:stretch}
.mcp-bar>*{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.mcp-filters{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
.mcp-filters a{white-space:nowrap}
.mcp-book{padding:14px 8px 10px}
.mcp-file__actions{width:100%}
.mcp-file__actions .mcp-btn{flex:1}
}
@media (prefers-reduced-motion:reduce){.mcp-card,.mcp-card__media img,.mcp-page,.mcp-grid img{transition:none}.mcp-book__spread *{animation:none!important}}

/* ---------- admin (edit screen) */
#mcp-admin h3{margin:1.4em 0 .3em}
.mcp-alist{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0;padding:0;list-style:none}
.mcp-alist li{position:relative;width:110px;border:1px solid #dcdcde;border-radius:10px;background:#fff;padding:4px;cursor:move;text-align:center}
.mcp-alist img{width:100%;height:100px;object-fit:cover;display:block;border-radius:10px}
.mcp-alist__file{display:grid;place-items:center;height:100px;background:#f0f6f5;border-radius:10px;font-weight:700;color:#0f7a6d}
.mcp-alist__name{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}
.mcp-alist__x{position:absolute;top:-8px;left:-8px;width:22px;height:22px;border-radius:50%;border:0;background:#b32d2e;color:#fff;cursor:pointer;line-height:1}
.mcp-v{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px;border:1px solid #dcdcde;border-radius:10px;margin:6px 0;background:#fff;cursor:move}
.mcp-v input{flex:1;min-width:200px}
.mcp-v-tag{font-size:12px;background:#f0f6f5;color:#0f7a6d;padding:2px 8px;border-radius:999px}
.mcp-v-warn{flex-basis:100%;margin:0;color:#b32d2e;font-weight:600}
