/*
Theme Name: Mirouch
Author: Mirouch
Description: قالب عربي سريع ومتجاوب لموقع Mirouch، مستقل تماماً عن Elementor.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: mirouch-theme
Tags: rtl-language-support, blog, news, custom-logo, custom-menu, featured-images, threaded-comments
*/

:root { --mirouch-primary:#4f46e5; --mirouch-primary-dark:#3730a3; --mirouch-accent:#1686f5; --mirouch-ink:#172033; --mirouch-muted:#64748b; --mirouch-border:#e5eaf2; --mirouch-surface:#fff; --mirouch-soft:#f6f8ff; --mirouch-shadow:0 12px 34px rgba(27,42,92,.09); --mirouch-radius:16px; --mirouch-container:1200px; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; direction:rtl; background:#fff; color:var(--mirouch-ink); font-family:Tahoma,Arial,"Segoe UI",sans-serif; font-size:16px; line-height:1.85; text-align:right; -webkit-font-smoothing:antialiased; }
img { display:block; max-width:100%; height:auto; }
a { color:inherit; text-decoration:none; transition:color .2s ease,opacity .2s ease,transform .2s ease,background-color .2s ease; }
a:hover { color:var(--mirouch-primary); }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
h1,h2,h3,h4,h5,h6 { margin:0 0 .6em; color:var(--mirouch-ink); line-height:1.42; }
p { margin:0 0 1.25em; }
ul,ol { padding-right:1.25rem; }
.site-container,.header-container { width:min(100% - 40px,var(--mirouch-container)); margin-inline:auto; }
.screen-reader-text { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
.screen-reader-text:focus { z-index:100000; top:10px; right:10px; width:auto; height:auto; padding:.7rem 1rem; overflow:visible; clip:auto; background:#fff; color:var(--mirouch-primary); box-shadow:var(--mirouch-shadow); }
.skip-link { position:absolute; }

/* Header */
.site-header { position:sticky; top:0; z-index:20; border-bottom:1px solid var(--mirouch-border); background:rgba(255,255,255,.97); }
.admin-bar .site-header { top:32px; }
.header-container { display:flex; min-height:78px; align-items:center; gap:26px; }
.site-branding { display:flex; flex:0 0 auto; align-items:center; }
.site-title { color:var(--mirouch-primary); font-size:1.78rem; font-weight:800; letter-spacing:-.04em; }
.custom-logo-link { display:inline-flex; max-width:180px; }
.custom-logo { max-height:58px; width:auto; }
.site-navigation { flex:1; }
.primary-menu,.footer-menu { display:flex; align-items:center; gap:4px; margin:0; padding:0; list-style:none; }
.primary-menu > li { position:relative; }
.primary-menu a { display:block; padding:.55rem .67rem; color:#334155; font-size:.91rem; font-weight:700; white-space:nowrap; }
.primary-menu a:hover,.primary-menu .current-menu-item > a,.primary-menu .current-menu-ancestor > a { color:var(--mirouch-primary); }
.primary-menu .sub-menu { position:absolute; top:calc(100% + 14px); right:0; display:none; min-width:200px; margin:0; padding:.5rem; list-style:none; border:1px solid var(--mirouch-border); border-radius:12px; background:#fff; box-shadow:var(--mirouch-shadow); }
.primary-menu li:hover > .sub-menu,.primary-menu li:focus-within > .sub-menu { display:block; }
.primary-menu .sub-menu a { white-space:normal; }
.menu-toggle,.search-toggle { display:inline-flex; align-items:center; justify-content:center; border:0; background:transparent; color:var(--mirouch-ink); }
.menu-toggle { display:none; width:42px; height:42px; padding:0; border:1px solid var(--mirouch-border); border-radius:10px; }
.menu-toggle__icon,.menu-toggle__icon::before,.menu-toggle__icon::after { width:19px; height:2px; border-radius:2px; background:currentColor; content:""; transition:transform .2s ease; }
.menu-toggle__icon { position:relative; display:block; }
.menu-toggle__icon::before { position:absolute; top:-6px; right:0; }
.menu-toggle__icon::after { position:absolute; top:6px; right:0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon { background:transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { top:0; transform:rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { top:0; transform:rotate(-45deg); }
.search-toggle { width:42px; height:42px; border-radius:50%; }
.search-toggle:hover { background:var(--mirouch-soft); color:var(--mirouch-primary); }
.search-toggle svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.header-search { position:absolute; right:0; left:0; padding:17px 0; border-top:1px solid var(--mirouch-border); background:#fff; box-shadow:0 12px 22px rgba(24,38,79,.07); }
.header-search[hidden] { display:none; }
.header-ad-wrap .ad-slot,.homepage-ad-wrap .ad-slot { margin:16px 0 0; }
.search-form { display:flex; gap:9px; max-width:640px; }
.search-field { min-width:0; flex:1; padding:.78rem 1rem; border:1px solid #ced7e6; border-radius:10px; outline:none; color:var(--mirouch-ink); background:#fff; }
.search-field:focus { border-color:var(--mirouch-primary); box-shadow:0 0 0 3px rgba(79,70,229,.12); }
.search-submit,.button { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; min-height:46px; padding:.64rem 1rem; border:1px solid var(--mirouch-primary); border-radius:10px; color:#fff; background:var(--mirouch-primary); font-size:.93rem; font-weight:700; }
.search-submit:hover,.button:hover { border-color:var(--mirouch-primary-dark); color:#fff; background:var(--mirouch-primary-dark); }

/* Home */
.site-main { min-height:55vh; }
.welcome-hero { overflow:hidden; margin:22px 0 0; padding:34px 0; color:#fff; background:radial-gradient(circle at 88% 16%,rgba(103,232,249,.28),transparent 25%),radial-gradient(circle at 10% 100%,rgba(167,139,250,.42),transparent 31%),linear-gradient(125deg,#312e81 0%,#4f46e5 47%,#6d28d9 100%); }
.welcome-hero__inner { display:grid; grid-template-columns:minmax(0,1fr) 220px; align-items:center; gap:28px; min-height:190px; }
.welcome-hero__eyebrow { display:inline-block; margin-bottom:.65rem; color:#ddd6fe; font-size:.83rem; font-weight:800; letter-spacing:.12em; }
.welcome-hero h1 { max-width:680px; margin-bottom:.45rem; color:#fff; font-size:clamp(1.75rem,3.6vw,2.8rem); letter-spacing:-.045em; }
.welcome-hero p { max-width:680px; margin-bottom:1rem; color:#ede9fe; font-size:clamp(.9rem,1.5vw,1.02rem); line-height:1.8; }
.welcome-hero .button--light { color:#4338ca; }
.welcome-hero__visual { display:grid; grid-template-columns:repeat(2,1fr); gap:13px; transform:rotate(-10deg); }
.welcome-hero__visual span { display:grid; width:82px; height:82px; place-items:center; border:1px solid rgba(255,255,255,.3); border-radius:24px; background:linear-gradient(145deg,rgba(255,255,255,.27),rgba(255,255,255,.07)); box-shadow:0 18px 32px rgba(24,20,91,.22); font-size:1.45rem; font-weight:800; backdrop-filter:blur(6px); }
.welcome-hero__visual span:nth-child(2) { transform:translateY(25px); }
.welcome-hero__visual span:nth-child(3) { transform:translateX(18px); }
.welcome-hero__visual span:nth-child(5) { transform:translate(14px,-6px); }
.hero-featured { padding:clamp(30px,5vw,70px) 0; background:linear-gradient(120deg,#eef4ff 0%,#f5f2ff 100%); }
.hero-featured__inner { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr); align-items:center; gap:clamp(30px,5vw,72px); }
.hero-featured__label,.section-heading__eyebrow { display:inline-block; margin-bottom:.55rem; color:var(--mirouch-primary); font-size:.77rem; font-weight:800; letter-spacing:.04em; }
.hero-featured__label { padding:.26rem .68rem; border-radius:99px; color:#fff; background:var(--mirouch-primary); }
.hero-featured .category-list { margin-bottom:.7rem; }
.hero-featured h1 { max-width:650px; margin-bottom:.75rem; font-size:clamp(1.85rem,4vw,3.05rem); letter-spacing:-.035em; }
.hero-featured h1 a:hover { color:var(--mirouch-primary); }
.hero-featured__content > p { max-width:630px; color:#526178; font-size:1.04rem; }
.hero-featured__footer { display:flex; flex-wrap:wrap; align-items:center; gap:20px; margin-top:1.55rem; }
.hero-featured .entry-meta { margin:0; }
.button--light { border-color:transparent; color:var(--mirouch-primary); background:#fff; box-shadow:0 7px 20px rgba(46,61,125,.12); }
.button--light:hover { border-color:transparent; color:#fff; background:var(--mirouch-primary); }
.hero-featured__image { display:block; overflow:hidden; min-height:330px; border-radius:22px; background:#dce5ff; box-shadow:0 20px 42px rgba(59,74,138,.2); }
.hero-featured__image img,.hero-featured__image .post-placeholder { width:100%; height:100%; min-height:330px; object-fit:cover; transition:transform .35s ease; }
.hero-featured__image:hover img { transform:scale(1.035); }
.home-layout,.content-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:clamp(30px,4vw,58px); padding-top:50px; padding-bottom:68px; }
.home-content { min-width:0; }
.home-section { margin-bottom:58px; }
.section-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:21px; }
.section-heading h2 { margin:0; font-size:clamp(1.35rem,2.2vw,1.75rem); }
.section-heading__eyebrow { margin-bottom:.15rem; }
.section-link { color:var(--mirouch-primary); font-size:.9rem; font-weight:800; white-space:nowrap; }
.section-link span { display:inline-block; transition:transform .2s ease; }
.section-link:hover span { transform:translateX(-4px); }
.posts-grid { display:grid; gap:22px; }
.posts-grid--three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.posts-grid--two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.category-cards { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:13px; }
.category-card { display:flex; min-height:120px; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:13px; border:1px solid var(--mirouch-border); border-radius:14px; color:#38455c; background:#fff; text-align:center; font-size:.84rem; font-weight:800; box-shadow:0 4px 15px rgba(21,35,75,.025); }
.category-card:hover { border-color:#c9c7f8; color:var(--mirouch-primary); box-shadow:var(--mirouch-shadow); transform:translateY(-3px); }
.category-card__icon { font-size:1.65rem; line-height:1; }
.country-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.country-card { display:flex; align-items:center; gap:.55rem; padding:.72rem .82rem; border:1px solid var(--mirouch-border); border-radius:11px; color:#3a465d; background:#fff; font-size:.87rem; font-weight:800; }
.country-card:hover { border-color:#ccc9fc; color:var(--mirouch-primary); background:#fafaff; }
.country-card span { font-size:1.2rem; }
.post-card { min-width:0; overflow:hidden; border:1px solid var(--mirouch-border); border-radius:var(--mirouch-radius); background:var(--mirouch-surface); box-shadow:0 4px 15px rgba(21,35,75,.03); }
.post-card:hover { border-color:#d7d7f4; box-shadow:var(--mirouch-shadow); transform:translateY(-3px); }
.post-card__image { display:block; overflow:hidden; aspect-ratio:1.55 / 1; background:#e8ecfa; }
.post-card__image img,.post-card__image .post-placeholder { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.post-card:hover .post-card__image img { transform:scale(1.04); }
.post-card__content { padding:17px 17px 19px; }
.category-list { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:.6rem; }
.category-list a { padding:.14rem .53rem; border-radius:99px; color:var(--mirouch-primary); background:#f0efff; font-size:.72rem; font-weight:700; }
.category-list a:hover { color:#fff; background:var(--mirouch-primary); }
.post-card__title { margin-bottom:.6rem; font-size:1.02rem; }
.post-card__title a:hover { color:var(--mirouch-primary); }
.post-card__excerpt { display:-webkit-box; overflow:hidden; margin-bottom:.75rem; color:var(--mirouch-muted); font-size:.86rem; line-height:1.75; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.entry-meta { display:flex; flex-wrap:wrap; gap:.5rem 1.15rem; color:#718096; font-size:.76rem; }
.entry-meta time::before { padding-left:.45rem; color:var(--mirouch-primary); content:"•"; }
.entry-meta a:hover { color:var(--mirouch-primary); }
.post-card__read-more { display:inline-flex; gap:.3rem; align-items:center; margin-top:.7rem; color:var(--mirouch-primary); font-size:.77rem; font-weight:800; }
.post-card__read-more:hover { color:var(--mirouch-primary-dark); }
.post-placeholder { display:grid; min-height:180px; place-items:center; overflow:hidden; color:rgba(255,255,255,.94); background:linear-gradient(135deg,#4f46e5,#198cf5); font-size:1.4rem; font-weight:800; letter-spacing:-.03em; }

/* Sidebar, archives and widgets */
.site-sidebar { min-width:0; }
.site-sidebar .widget,.ad-slot { margin-bottom:25px; padding:19px; border:1px solid var(--mirouch-border); border-radius:14px; background:#fff; }
.widget-title { position:relative; margin-bottom:1.1rem; padding-bottom:.65rem; border-bottom:1px solid var(--mirouch-border); font-size:1.05rem; }
.widget-title::after { position:absolute; right:0; bottom:-1px; width:44px; height:2px; background:var(--mirouch-primary); content:""; }
.widget ul { margin:0; padding:0; list-style:none; }
.widget li { padding:.45rem 0; border-bottom:1px solid #f0f2f7; }
.widget li:last-child { border-bottom:0; }
.widget a { color:#344158; }
.widget a:hover { color:var(--mirouch-primary); }
.sidebar-posts li { display:grid; gap:.2rem; }
.sidebar-posts a { font-size:.88rem; font-weight:700; line-height:1.65; }
.sidebar-posts time { color:var(--mirouch-muted); font-size:.74rem; }
.widget select,.widget input,.widget textarea { max-width:100%; }
.widget .search-form { flex-wrap:wrap; }
.widget .search-submit { width:100%; }
.ad-slot { padding:14px; border-style:dashed; background:#fafbff; }
.ad-slot__label { display:block; margin-bottom:.65rem; color:var(--mirouch-muted); font-size:.7rem; text-align:center; }
.ad-slot .widget { margin:0; padding:0; border:0; background:transparent; }
.ad-slot .widget-title { display:none; }
.archive-header { margin-bottom:30px; padding-bottom:25px; border-bottom:1px solid var(--mirouch-border); }
.archive-header h1 { margin:0; font-size:clamp(1.65rem,3vw,2.35rem); }
.archive-description { max-width:720px; margin-top:.75rem; color:var(--mirouch-muted); }
.breadcrumbs { margin:22px 0 27px; overflow-x:auto; color:var(--mirouch-muted); font-size:.79rem; }
.breadcrumbs ol { display:flex; gap:.42rem; margin:0; padding:0; list-style:none; white-space:nowrap; }
.breadcrumbs li:not(:last-child)::after { padding-right:.42rem; content:"/"; color:#aab3c2; }
.breadcrumbs a:hover { color:var(--mirouch-primary); }
.pagination { margin-top:38px; }
.pagination .page-numbers { display:flex; flex-wrap:wrap; gap:7px; margin:0; padding:0; list-style:none; }
.pagination .page-numbers a,.pagination .page-numbers span { display:grid; min-width:39px; min-height:39px; place-items:center; padding:.3rem .55rem; border:1px solid var(--mirouch-border); border-radius:9px; color:#44516a; font-size:.86rem; }
.pagination .page-numbers .current,.pagination .page-numbers a:hover { border-color:var(--mirouch-primary); color:#fff; background:var(--mirouch-primary); }
.no-results { padding:36px; border:1px solid var(--mirouch-border); border-radius:var(--mirouch-radius); background:var(--mirouch-soft); }
.no-results h1 { font-size:1.35rem; }

/* Single article */
.single-article { min-width:0; }
.single-article__header { margin-bottom:24px; }
.single-article__header h1 { max-width:950px; margin-bottom:.9rem; font-size:clamp(1.85rem,4vw,3.05rem); letter-spacing:-.035em; }
.single-article__image { overflow:hidden; margin-bottom:28px; border-radius:var(--mirouch-radius); background:#e8ecfa; }
.single-article__image img { width:100%; max-height:560px; object-fit:cover; }
.entry-content { color:#29364c; font-size:1.05rem; }
.entry-content > * { max-width:100%; }
.entry-content h2,.entry-content h3,.entry-content h4 { margin-top:1.6em; }
.entry-content h2 { font-size:1.55rem; }
.entry-content h3 { font-size:1.3rem; }
.entry-content a { color:var(--mirouch-primary); font-weight:700; text-decoration:underline; text-decoration-color:rgba(79,70,229,.35); text-underline-offset:3px; }
.entry-content a:hover { color:var(--mirouch-primary-dark); }
.entry-content blockquote { margin:1.6rem 0; padding:1.15rem 1.3rem; border-right:4px solid var(--mirouch-primary); border-radius:0 10px 10px 0; color:#3d4771; background:var(--mirouch-soft); font-size:1.12rem; font-weight:700; }
.entry-content ul,.entry-content ol { margin-bottom:1.3rem; }
.entry-content li { margin-bottom:.35rem; }
.entry-content table { width:100%; margin:1.5rem 0; border-collapse:collapse; }
.entry-content th,.entry-content td { padding:.7rem; border:1px solid var(--mirouch-border); text-align:right; }
.entry-content th { background:var(--mirouch-soft); }
.entry-content pre { overflow:auto; padding:1rem; border-radius:10px; direction:ltr; text-align:left; background:#172033; color:#fff; }
.entry-content iframe { max-width:100%; }
.entry-content .wp-block-image,.entry-content figure { margin:1.6rem auto; }
.entry-content figcaption { color:var(--mirouch-muted); font-size:.8rem; text-align:center; }
.entry-content .wp-block-button__link { color:#fff; text-decoration:none; }
.page-links { margin:2rem 0; font-weight:700; }
.post-tags { display:flex; flex-wrap:wrap; gap:.45rem; align-items:center; margin:30px 0 18px; padding-top:19px; border-top:1px solid var(--mirouch-border); }
.post-tags a { padding:.18rem .6rem; border-radius:99px; color:#556175; background:#f2f5fa; font-size:.8rem; }
.post-tags a:hover { color:#fff; background:var(--mirouch-primary); }
.share-links { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:18px 0 30px; }
.share-links > span { margin-left:.2rem; font-size:.86rem; font-weight:800; }
.share-link { padding:.32rem .68rem; border-radius:8px; color:#fff; font-size:.74rem; font-weight:700; }
.share-link:hover { color:#fff; opacity:.86; }
.share-link--facebook { background:#1877f2; }
.share-link--x { background:#172033; }
.share-link--whatsapp { background:#20b661; }
.post-navigation { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:32px 0 46px; padding-top:28px; border-top:1px solid var(--mirouch-border); }
.post-navigation > div { min-width:0; padding:15px; border:1px solid var(--mirouch-border); border-radius:12px; }
.post-navigation__next { text-align:right; }
.post-navigation__previous { text-align:left; }
.post-navigation a { display:block; color:#39465d; font-size:.88rem; font-weight:700; }
.post-navigation a:hover { color:var(--mirouch-primary); }
.related-posts { margin:0 0 45px; }
.related-posts h2,.comments-title { margin-bottom:20px; font-size:1.45rem; }

/* Comments */
.comments-area { margin-top:42px; padding-top:32px; border-top:1px solid var(--mirouch-border); }
.comment-list { margin:0; padding:0; list-style:none; }
.comment-list .comment-body { margin-bottom:15px; padding:18px; border:1px solid var(--mirouch-border); border-radius:12px; }
.comment-list .children { margin:0 24px 0 0; padding:0; list-style:none; }
.comment-author { display:flex; align-items:center; gap:9px; font-weight:700; }
.comment-author .avatar { border-radius:50%; }
.comment-metadata { margin:.25rem 0 .65rem; color:var(--mirouch-muted); font-size:.76rem; }
.comment-metadata a { color:inherit; }
.reply a { color:var(--mirouch-primary); font-size:.83rem; font-weight:700; }
.comment-respond { margin-top:28px; padding:22px; border-radius:14px; background:var(--mirouch-soft); }
.comment-reply-title { font-size:1.2rem; }
.comment-form p { margin-bottom:13px; }
.comment-form label { display:block; margin-bottom:5px; color:#4a576d; font-size:.88rem; font-weight:700; }
.comment-form input:not([type="checkbox"]),.comment-form textarea { width:100%; padding:.72rem .85rem; border:1px solid #cfd8e8; border-radius:9px; outline:0; background:#fff; }
.comment-form input:focus,.comment-form textarea:focus { border-color:var(--mirouch-primary); box-shadow:0 0 0 3px rgba(79,70,229,.12); }
.comment-form .submit { min-height:43px; padding:.55rem 1rem; border:0; border-radius:9px; color:#fff; background:var(--mirouch-primary); font-weight:700; }

/* Footer and error */
.site-footer { color:#cbd5e1; background:#111a2e; }
.footer-main { display:grid; grid-template-columns:1.35fr repeat(2,1fr); gap:34px; padding-top:52px; padding-bottom:42px; }
.footer-brand .site-title { color:#fff; }
.footer-brand .custom-logo { filter:brightness(0) invert(1); }
.footer-brand p { max-width:330px; margin-top:.9rem; color:#aebbd0; font-size:.88rem; }
.footer-links h2 { margin-bottom:.85rem; color:#fff; font-size:1rem; }
.footer-links ul { margin:0; padding:0; list-style:none; }
.footer-links li { padding:.22rem 0; }
.footer-links a { color:#b9c6da; font-size:.85rem; }
.footer-links a:hover { color:#fff; }
.footer-social { display:flex; flex-wrap:wrap; gap:7px; margin-top:1rem; }
.footer-social a { padding:.2rem .55rem; border:1px solid rgba(255,255,255,.22); border-radius:7px; color:#dbeafe; font-size:.72rem; }
.footer-social a:hover { border-color:#fff; color:#fff; }
.footer-ad-wrap .ad-slot { margin:0 0 25px; border-color:rgba(255,255,255,.24); color:#dbeafe; background:rgba(255,255,255,.05); }
.footer-ad-wrap .ad-slot__label { color:#aebbd0; }
.footer-widget-area .widget { margin:0; }
.footer-widget-area .widget-title { margin-bottom:.85rem; padding:0; border:0; color:#fff; font-size:1rem; }
.footer-widget-area .widget-title::after { display:none; }
.footer-widget-area ul { margin:0; padding:0; list-style:none; }
.footer-widget-area li { padding:.22rem 0; }
.footer-widget-area a { color:#b9c6da; font-size:.85rem; }
.footer-widget-area a:hover { color:#fff; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.11); }
.footer-bottom__inner { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:66px; }
.footer-bottom p { margin:0; font-size:.78rem; }
.footer-menu { flex-wrap:wrap; }
.footer-menu a { color:#c5d0e0; font-size:.78rem; }
.footer-menu a:hover { color:#fff; }
.back-to-top { position:fixed; z-index:15; bottom:20px; left:20px; display:grid; width:42px; height:42px; place-items:center; border:0; border-radius:50%; color:#fff; background:var(--mirouch-primary); box-shadow:0 7px 18px rgba(49,46,129,.28); opacity:0; pointer-events:none; transform:translateY(10px); transition:opacity .2s ease,transform .2s ease; }
.back-to-top.is-visible { opacity:1; pointer-events:auto; transform:translateY(0); }
.error-page { display:grid; min-height:65vh; place-items:center; padding-top:55px; padding-bottom:70px; }
.error-page__content { max-width:690px; text-align:center; }
.error-page__code { display:block; margin-bottom:-.35rem; color:#e3e2ff; font-size:clamp(5rem,16vw,10rem); font-weight:800; letter-spacing:-.08em; line-height:1; }
.error-page h1 { font-size:clamp(1.65rem,3vw,2.25rem); }
.error-page__content .search-form { margin:25px auto 17px; }

/* WordPress alignment and embeds */
.alignleft { float:right; margin:.4rem 0 1rem 1.4rem; }
.alignright { float:left; margin:.4rem 1.4rem 1rem 0; }
.aligncenter { display:block; clear:both; margin-right:auto; margin-left:auto; }
.wp-caption { max-width:100%; }
.wp-caption-text { color:var(--mirouch-muted); font-size:.8rem; }
.sticky { border-color:var(--mirouch-primary); }

@media (max-width:1030px) {
	.header-container { gap:14px; }
	.primary-menu a { padding:.5rem .44rem; font-size:.84rem; }
	.home-layout,.content-layout { grid-template-columns:minmax(0,1fr) 270px; gap:30px; }
	.footer-main { grid-template-columns:1.25fr repeat(2,1fr); gap:22px; }
}
@media (max-width:820px) {
	.header-container { min-height:68px; justify-content:space-between; }
	.menu-toggle { display:inline-flex; order:3; }
	.site-branding { order:2; margin-left:auto; }
	.search-toggle { order:1; }
	.site-navigation { position:absolute; top:100%; right:0; left:0; display:none; padding:13px 20px 20px; border-top:1px solid var(--mirouch-border); background:#fff; box-shadow:0 12px 24px rgba(24,38,79,.1); }
	.site-navigation.is-open { display:block; }
	.primary-menu { display:block; }
	.primary-menu > li { border-bottom:1px solid #edf0f5; }
	.primary-menu > li:last-child { border-bottom:0; }
	.primary-menu a { padding:.7rem .2rem; }
	.primary-menu .sub-menu { position:static; display:block; margin:0 .6rem .5rem 0; padding:0 .65rem; border:0; border-right:2px solid var(--mirouch-border); border-radius:0; box-shadow:none; }
	.hero-featured__inner { grid-template-columns:1fr; }
	.hero-featured__image { min-height:250px; order:-1; }
	.hero-featured__image img,.hero-featured__image .post-placeholder { min-height:250px; }
	.home-layout,.content-layout { grid-template-columns:1fr; }
	.welcome-hero__inner { grid-template-columns:1fr; }
	.welcome-hero__visual { display:none; }
	.category-cards { grid-template-columns:repeat(4,minmax(0,1fr)); }
	.country-cards { grid-template-columns:repeat(4,minmax(0,1fr)); }
	.site-sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
	.site-sidebar .widget,.site-sidebar .ad-slot { margin-bottom:0; }
	.footer-main { grid-template-columns:repeat(2,1fr); }
	.footer-brand { grid-column:1 / -1; }
}
@media (max-width:620px) {
	.site-container,.header-container { width:min(100% - 28px,var(--mirouch-container)); }
	.custom-logo-link { max-width:145px; }
	.hero-featured { padding:28px 0 36px; }
	.welcome-hero { margin:12px 0 0; padding:22px 0; border-radius:0 0 18px 18px; }
	.welcome-hero__inner { min-height:150px; }
	.welcome-hero h1 { font-size:1.65rem; line-height:1.35; }
	.welcome-hero p { margin-bottom:.8rem; font-size:.88rem; line-height:1.75; }
	.welcome-hero .button { padding:.68rem .95rem; font-size:.82rem; }
	.hero-featured__footer { align-items:stretch; gap:13px; }
	.hero-featured__footer .button { width:100%; }
	.posts-grid--three,.posts-grid--two { grid-template-columns:1fr; }
	.category-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.country-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.home-layout,.content-layout { padding-top:33px; padding-bottom:42px; }
	.home-section { margin-bottom:41px; }
	.section-heading { align-items:flex-end; margin-bottom:16px; }
	.section-link { font-size:.79rem; }
	.site-sidebar { grid-template-columns:1fr; }
	.single-article__header h1 { font-size:1.75rem; }
	.entry-content { font-size:1rem; }
	.post-navigation { grid-template-columns:1fr; }
	.post-navigation__previous { text-align:right; }
	.footer-main { grid-template-columns:1fr; padding-top:38px; }
	.footer-brand { grid-column:auto; }
	.footer-bottom__inner { display:block; padding:15px 0; }
	.footer-menu { margin-top:8px; }
	.comment-list .children { margin-right:12px; }
	.alignleft,.alignright { float:none; margin:1rem auto; }
}


/* ===== Mirouch compact hero: desktop + mobile ===== */
.mirouch-hero,
.hero,
.hero-section,
.front-hero,
.home-hero {
  max-height: 360px;
  min-height: 280px;
  overflow: hidden;
}
.mirouch-hero img,
.hero img,
.hero-section img,
.front-hero img,
.home-hero img {
  max-height: 360px;
  object-fit: cover;
}
@media (max-width: 768px) {
  .mirouch-hero,
  .hero,
  .hero-section,
  .front-hero,
  .home-hero {
    max-height: 300px;
    min-height: 220px;
  }
  .mirouch-hero img,
  .hero img,
  .hero-section img,
  .front-hero img,
  .home-hero img {
    max-height: 300px;
  }
}



/* ===== Final Mirouch section layout ===== */
.home-section.categories-section{margin-top:0}
.categories-section .category-cards{
	display:grid;
	grid-template-columns:repeat(5,minmax(0,1fr));
	gap:12px;
	width:100%;
}
.categories-section .category-card{
	min-width:0;
	min-height:88px;
	padding:10px 7px;
	border-radius:14px;
	gap:7px;
	font-size:.78rem;
	line-height:1.35;
	white-space:normal;
}
.categories-section .category-card__icon{
	width:38px;
	height:38px;
	display:grid;
	place-items:center;
	border-radius:11px;
	background:#f1e9ff;
	font-size:1.35rem;
}
@media (max-width:900px){
	.categories-section .category-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:640px){
	.categories-section .category-cards{
		grid-template-columns:repeat(2,minmax(0,1fr));
		gap:9px;
	}
	.categories-section .category-card{
		min-height:78px;
		padding:8px 5px;
		border-radius:12px;
		font-size:.72rem;
	}
	.categories-section .category-card__icon{
		width:32px;
		height:32px;
		border-radius:9px;
		font-size:1.1rem;
	}
}



/* ===== Final archive/category polish ===== */
.archive-category-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:30px;padding:12px;border:1px solid var(--mirouch-border);border-radius:16px;background:#fff;box-shadow:0 4px 16px rgba(21,35,75,.035)}
.archive-category-chip{display:flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:7px 8px;border:1px solid transparent;border-radius:11px;color:#354158;background:#f8f9fd;font-size:.78rem;font-weight:800;text-align:center;line-height:1.3}
.archive-category-chip:hover,.archive-category-chip.is-active{border-color:#d8d5ff;color:var(--mirouch-primary);background:#f1efff}
.archive-category-chip span:first-child{font-size:1.05rem;line-height:1}
.archive-header--compact{margin-bottom:22px;padding-bottom:18px}
.archive-header--compact h1{font-size:clamp(1.5rem,3vw,2rem)}
.archive-posts{row-gap:18px}
.archive-empty{text-align:center;margin-top:10px;padding:42px 24px}
.archive-empty__icon{font-size:2rem;margin-bottom:8px}
.archive-empty h2{margin-bottom:8px;font-size:1.3rem}
.archive-empty p{max-width:560px;margin:0 auto 18px;color:var(--mirouch-muted)}
@media(max-width:1100px){.archive-category-nav{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.archive-category-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.archive-category-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:22px;padding:8px;border-radius:13px}.archive-category-chip{min-height:42px;padding:6px 5px;font-size:.7rem;border-radius:9px}.archive-category-chip span:first-child{font-size:.95rem}.archive-header--compact{margin-bottom:16px}.archive-header--compact h1{font-size:1.45rem}.archive-empty{padding:32px 18px}}
/* Hide empty ad placeholders while keeping real injected ad markup untouched */
.header-ad-wrap:has(.ad-slot:empty),.homepage-ad-wrap:has(.ad-slot:empty),.sidebar-ad-wrap:has(.ad-slot:empty),.footer-ad-wrap:has(.ad-slot:empty){display:none}


/* ===== Mirouch final layout: compact hero + clean category grid ===== */
.welcome-hero { margin:16px 0 0; padding:14px 0; border-radius:0 0 18px 18px; }
.welcome-hero__inner { min-height:138px; }
.welcome-hero__content { padding:4px 0; }
.welcome-hero h1 { margin-top:0; margin-bottom:.35rem; font-size:clamp(1.5rem,3vw,2.2rem); }
.welcome-hero p { margin-bottom:.65rem; font-size:.9rem; line-height:1.55; }
.welcome-hero .button { min-height:38px; padding:.45rem .85rem; font-size:.82rem; }
.home-categories { margin:28px 0 0; }
.home-categories .section-heading { margin-bottom:15px; }
.home-categories .category-cards { grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.home-categories .category-card { min-height:104px; padding:10px; border-radius:14px; }
.home-categories .category-card__icon { font-size:1.45rem; }
@media (max-width:820px) {
  .welcome-hero { padding:15px 0; }
  .welcome-hero__inner { min-height:105px; }
  .welcome-hero h1 { font-size:1.5rem; }
  .welcome-hero p { font-size:.82rem; line-height:1.6; }
  .welcome-hero .button { min-height:38px; }
}
@media (max-width:620px) {
  .welcome-hero { margin:8px 0 0; padding:12px 0; border-radius:0 0 14px 14px; }
  .welcome-hero__inner { min-height:124px; }
  .welcome-hero__content { padding:2px 0; }
  .welcome-hero h1 { margin-bottom:.25rem; font-size:1.28rem; line-height:1.3; }
  .welcome-hero p { margin-bottom:.5rem; font-size:.74rem; line-height:1.5; }
  .welcome-hero .button { min-height:34px; padding:.38rem .7rem; font-size:.74rem; }
  .home-categories { margin-top:24px; }
  .home-categories .category-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .home-categories .category-card { min-height:88px; padding:9px 7px; font-size:.78rem; }
  .home-categories .category-card__icon { font-size:1.3rem; }
}
/* إصلاح نهائي لخروج صفحات الهاتف عن الشاشة */
html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden !important;
}

#page,
.site,
.site-content,
.site-header,
.header-container,
main,
.main,
article,
.single-article,
.entry-content {
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

img,
video,
iframe,
embed,
object {
    max-width: 100% !important;
}

* {
    box-sizing: border-box;
}