/* ====== الصفحة الرئيسية الجديدة (wg_block) ====== */
body.wg-home {
	--wg-blue: #48a0c8; --wg-blue-d: #2a7ea8; --wg-blue-dd: #154a66;
	--wg-ink: #1d2731; --wg-muted: #6b7680; --wg-bg: #f2f5f7; --wg-line: #e3e8ec; --wg-r: 12px;
	background: var(--wg-bg);
}
/* إخفاء غلاف الصفحة الافتراضي (العنوان، الصندوق، المشاركة، التعليقات) */
body.wg-home #tie-wrapper, body.wg-home #content, body.wg-home .main-content-row { background: transparent; }
body.wg-home #the-post > .entry-header-outer,
body.wg-home #the-post .entry-header,
body.wg-home #the-post .post-footer,
body.wg-home #the-post .share-buttons,
body.wg-home .post-components,
body.wg-home #comments,
body.wg-home .entry-header-outer,
body.wg-home #breadcrumb { display: none !important; }
body.wg-home #the-post,
body.wg-home #the-post.container-wrapper,
body.wg-home .main-content .container-wrapper.post-content { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; }
body.wg-home .entry-content.entry { padding: 0 !important; margin: 0 !important; font-size: inherit; line-height: normal; }
body.wg-home .entry-content.entry p:empty { display: none; }
body.wg-home #content { padding-top: 22px; }

.wg-sec { margin: 0 0 40px; font-family: var(--wg-font, 'IBM Plex Sans Arabic', sans-serif); }
.wg-sec a { text-decoration: none !important; box-shadow: none !important; }
.wg-sec h2, .wg-sec h3 { margin: 0; padding: 0; }

/* عنوان القسم — مستوحى من مربعات الشعار */
.wg-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; border: 0; }
.wg-head h2 { display: flex; align-items: center; gap: 14px; color: var(--wg-ink) !important; font-size: 25px !important; font-weight: 800 !important; line-height: 1.3 !important; white-space: nowrap; background: none; }
.wg-mark { position: relative; width: 30px; height: 30px; flex: 0 0 30px; }
.wg-mark:before { content: ""; position: absolute; inset: 0; background: var(--wg-blue); border-radius: 11px 11px 11px 3px; box-shadow: -5px 5px 0 -1px #c4ccd2; }
.wg-mark:after { content: ""; position: absolute; width: 11px; height: 11px; top: 9.5px; right: 9.5px; background: #fff; border-radius: 4px 4px 4px 1px; }
.wg-rule { flex: 1; display: flex; align-items: center; gap: 4px; height: 8px; position: relative; }
.wg-rule:after { content: ""; flex: 1; height: 2px; margin-right: 6px; background: linear-gradient(to left, #cdd6dc, rgba(205,214,220,0)); border-radius: 2px; }
.wg-rule i { width: 8px; height: 8px; border-radius: 2px; background: #989898; }
.wg-rule i:nth-child(2) { background: #b5b5b5; }
.wg-rule i:nth-child(3) { background: #d3d3d3; }
.wg-more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; color: var(--wg-blue-d) !important; font-weight: 700; font-size: 13.5px; padding: 7px 16px; border: 1.5px solid #cfe3ee; border-radius: 999px; background: #fff; transition: all .25s; }
.wg-more:hover { background: var(--wg-blue-d); border-color: var(--wg-blue-d); color: #fff !important; }
.wg-arr { display: inline-block; transition: transform .25s; }
.wg-more:hover .wg-arr { transform: translateX(-4px); }
[dir="ltr"] .wg-arr { transform: scaleX(-1); }
[dir="ltr"] .wg-more:hover .wg-arr { transform: scaleX(-1) translateX(-4px); }
[dir="ltr"] .wg-mark:before { border-radius: 11px 11px 3px 11px; box-shadow: 5px 5px 0 -1px #c4ccd2; }
[dir="ltr"] .wg-mark:after { right: auto; left: 9.5px; }
[dir="ltr"] .wg-rule:after { margin-right: 0; margin-left: 6px; background: linear-gradient(to right, #cdd6dc, rgba(205,214,220,0)); }
.wg-tone-dark .wg-head h2 { color: #fff !important; }
.wg-tone-dark .wg-mark:before { box-shadow: -5px 5px 0 -1px rgba(255,255,255,.25); }
.wg-tone-dark .wg-rule:after { background: linear-gradient(to left, rgba(255,255,255,.3), rgba(255,255,255,0)); }
.wg-tone-dark .wg-more { background: transparent; border-color: rgba(255,255,255,.3); color: #fff !important; }
.wg-tone-dark .wg-more:hover { background: var(--wg-blue); border-color: var(--wg-blue); }

/* البطاقة */
.wg-card { position: relative; background: #fff; border-radius: var(--wg-r); overflow: hidden; box-shadow: 0 1px 2px rgba(16,40,56,.06), 0 6px 18px rgba(16,40,56,.06); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.wg-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,40,56,.08), 0 12px 28px rgba(16,40,56,.12); }
.wg-thumb { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: #dfe6eb; }
.wg-img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; transition: transform .5s; max-width: none; }
.wg-card:hover .wg-img { transform: scale(1.04); }
.wg-noimg { background: linear-gradient(135deg, #dfe6eb, #c8d4dc); }
.wg-cat { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--wg-blue-d); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px 4px 11px; border-radius: 10px 10px 10px 2px; line-height: 1.5; box-shadow: 0 4px 12px rgba(10,40,60,.25); }
.wg-card:after { content: ""; position: absolute; bottom: 0; right: 0; left: 0; height: 3px; background: linear-gradient(to left, var(--wg-blue), var(--wg-blue-d)); transform: scaleX(0); transform-origin: right; transition: transform .35s ease; z-index: 3; }
.wg-card:hover:after { transform: scaleX(1); }
.wg-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.wg-title { font-size: 17px !important; font-weight: 700 !important; line-height: 1.6 !important; }
.wg-title a { color: var(--wg-ink) !important; }
.wg-title a:hover { color: var(--wg-blue-d) !important; }
.wg-ex { color: var(--wg-muted); font-size: 14px; line-height: 1.8; margin: 0 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wg-time { color: var(--wg-muted); font-size: 12.5px; margin-top: auto; }
.wg-time:before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2.5px 2.5px 2.5px 1px; background: var(--wg-blue); margin-left: 7px; vertical-align: middle; }

/* بطاقة النص فوق الصورة */
.wg-ov .wg-thumb { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; }
.wg-ov .wg-thumb:after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,24,36,.92) 0%, rgba(8,24,36,.55) 40%, rgba(8,24,36,0) 70%); }
.wg-ov .wg-body { position: relative; z-index: 2; margin-top: auto; flex: 0 0 auto; pointer-events: none; padding: 18px 20px; }
.wg-ov .wg-body a { pointer-events: auto; }
.wg-ov .wg-title a, .wg-ov .wg-ex, .wg-ov .wg-time { color: #fff !important; }
.wg-ov .wg-ex { color: rgba(255,255,255,.85) !important; }
.wg-ov .wg-time { color: rgba(255,255,255,.75) !important; margin-top: 0; }
.wg-ov { min-height: 220px; }

/* الشبكات */
.wg-grid { display: grid; gap: 22px; }
.wg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* الواجهة: خبر كبير + 4 */
.wg-hero-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; height: 520px; }
.wg-hero-main { grid-row: 1 / 3; }
.wg-hero-main .wg-title { font-size: 28px !important; line-height: 1.5 !important; }
.wg-hero-main .wg-body { padding: 26px 28px; gap: 10px; }
.wg-hero .wg-ov { min-height: 0; }
.wg-hero .wg-ov:not(.wg-hero-main) .wg-title { font-size: 16px !important; }

/* خبر رئيسي + قائمة */
.wg-lead-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; }
.wg-lead-main { min-height: 440px; }
.wg-lead-main .wg-title { font-size: 24px !important; }
.wg-list { display: flex; flex-direction: column; gap: 12px; }
.wg-row { flex-direction: row; align-items: stretch; }
.wg-row .wg-thumb { flex: 0 0 150px; aspect-ratio: auto; }
.wg-row .wg-body { padding: 10px 14px; gap: 4px; justify-content: center; }
.wg-row .wg-title { font-size: 15.5px !important; }
.wg-row .wg-cat { display: none; }
.wg-row:hover { transform: none; }

/* شبكة النص فوق الصورة الصغيرة */
.wg-overlay .wg-ov-sm { aspect-ratio: 4/5; min-height: 0; }
.wg-overlay .wg-ov-sm .wg-title { font-size: 16.5px !important; }

/* قسم ملوّن (رياضة مثلاً) */
.wg-tone-dark { background: var(--wg-blue-dd); box-shadow: 0 0 0 100vmax var(--wg-blue-dd); clip-path: inset(0 -100vmax); padding: 34px 0 40px; margin-top: 60px; margin-bottom: 70px; }
.wg-tone-dark .wg-more { color: #cfe7f3 !important; }
body.wg-home { overflow-x: hidden; }

/* المقالات والرأي */
.wg-op { position: relative; background: #fff; border-radius: var(--wg-r); padding: 22px 20px 18px; box-shadow: 0 1px 2px rgba(16,40,56,.06), 0 6px 18px rgba(16,40,56,.06); border-top: 4px solid var(--wg-blue); display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.wg-op-q { position: absolute; left: 14px; top: -14px; font-size: 110px; line-height: 1; color: #e3f0f7; font-family: Georgia, serif; pointer-events: none; }
.wg-op-cat { position: relative; align-self: flex-start; color: var(--wg-blue-d); font-weight: 700; font-size: 13px; background: #e9f4fa; padding: 2px 10px; border-radius: 6px; }
.wg-op .wg-title { position: relative; font-size: 17px !important; }

/* شريط آخر الأخبار */
.wg-ticker { display: flex; align-items: stretch; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,40,56,.06); margin-bottom: 20px; height: 46px; }
.wg-ticker-label { flex: 0 0 auto; background: #c62f2f; color: #fff; font-weight: 700; padding: 0 18px; display: flex; align-items: center; font-size: 14.5px; }
.wg-ticker-label:before { content: ""; width: 8px; height: 8px; background: #fff; border-radius: 50%; margin-left: 8px; animation: wgpulse 1.4s infinite; }
@keyframes wgpulse { 50% { opacity: .25; } }
.wg-ticker-track { flex: 1; overflow: hidden; position: relative; display: flex; align-items: center; }
.wg-ticker-move { display: flex; white-space: nowrap; animation: wgtick 70s linear infinite; }
.wg-ticker-move:hover { animation-play-state: paused; }
.wg-ticker-move a, .wg-dup a { color: var(--wg-ink) !important; font-weight: 600; font-size: 15px; padding: 0 22px; position: relative; }
.wg-ticker-move a:before, .wg-dup a:before { content: "•"; color: var(--wg-blue); position: absolute; right: 4px; }
.wg-dup { display: flex; }
@keyframes wgtick { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .wg-ticker-move { animation: none; } .wg-dup { display: none; } }

/* ====== استجابة ====== */
@media (max-width: 1100px) {
	.wg-cols-4 { grid-template-columns: repeat(3, 1fr); }
	.wg-cols-4 > :nth-child(n+4) { display: none; }
	.wg-hero-grid { height: 460px; }
}
@media (max-width: 860px) {
	.wg-cols-4 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.wg-cols-4 > :nth-child(n+4) { display: flex; }
	.wg-hero-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 340px 190px 190px; height: auto; gap: 12px; }
	.wg-hero-main { grid-row: auto; grid-column: 1 / 3; }
	.wg-hero-main .wg-title { font-size: 22px !important; }
	.wg-lead-grid { grid-template-columns: 1fr; }
	.wg-lead-main { min-height: 320px; }
}
@media (max-width: 560px) {
	body.wg-home #content { padding-top: 12px; }
	.wg-sec { margin-bottom: 30px; }
	.wg-head h2 { font-size: 17px !important; padding: 7px 16px 6px !important; }
	.wg-hero-grid { grid-template-rows: 300px 170px 170px; }
	.wg-hero-main .wg-ex { display: none; }
	.wg-hero-main .wg-body { padding: 18px; }
	.wg-hero .wg-ov:not(.wg-hero-main) .wg-title { font-size: 14px !important; line-height: 1.5 !important; }
	.wg-hero .wg-ov:not(.wg-hero-main) .wg-body { padding: 10px 12px; }
	.wg-hero .wg-ov:not(.wg-hero-main) .wg-cat { display: none; }
	.wg-grid.wg-cols-4 { grid-template-columns: 1fr; }
	.wg-grid .wg-card:not(.wg-ov) { flex-direction: row; }
	.wg-grid .wg-card:not(.wg-ov) .wg-thumb { flex: 0 0 120px; aspect-ratio: auto; min-height: 90px; }
	.wg-grid .wg-card:not(.wg-ov) .wg-cat, .wg-grid .wg-card:not(.wg-ov) .wg-ex { display: none; }
	.wg-grid .wg-card:not(.wg-ov) .wg-body { padding: 10px 12px; gap: 4px; }
	.wg-grid .wg-card:not(.wg-ov) .wg-title { font-size: 15px !important; }
	.wg-overlay .wg-grid { grid-template-columns: 1fr 1fr; }
	.wg-overlay .wg-ov-sm .wg-title { font-size: 14px !important; }
	.wg-overlay .wg-ov-sm .wg-body { padding: 10px 12px; }
	.wg-overlay .wg-cat { display: none; }
	.wg-op { padding: 16px 12px; }
	.wg-opinion .wg-grid { grid-template-columns: 1fr 1fr; }
	.wg-row .wg-thumb { flex-basis: 120px; }
	.wg-ticker-label { padding: 0 12px; font-size: 13px; }
	.wg-tone-dark { padding-top: 26px; padding-bottom: 30px; }
}

/* English News */
.wg-sec[dir="ltr"], .wg-sec[dir="ltr"] * { font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif !important; }
.wg-sec[dir="ltr"] .wg-cat { border-radius: 10px 10px 2px 10px; }
.wg-sec[dir="ltr"] .wg-card:after { transform-origin: left; }
.wg-sec[dir="ltr"] .wg-cat { right: auto; left: 12px; }
.wg-sec[dir="ltr"] .wg-time:before { margin-left: 0; margin-right: 6px; }
.wg-sec[dir="ltr"] .wg-head h2 { letter-spacing: .2px; }
.wg-op-q { display: none; }

/* إخفاء إضافات المحتوى (مشاركة واتساب، عدد المشاهدات) في الرئيسية */
body.wg-home .share-to-whatsapp-wrapper,
body.wg-home .post-views,
body.wg-home .entry-content > .post-views,
body.wg-home #share-buttons-bottom,
body.wg-home #share-buttons-top { display: none !important; }
@media (max-width: 560px) {
	.wg-head { gap: 10px; }
	.wg-head h2 { font-size: 20px !important; gap: 11px; }
	.wg-mark { width: 24px; height: 24px; flex-basis: 24px; }
	.wg-mark:after { width: 9px; height: 9px; top: 7.5px; right: 7.5px; }
	.wg-rule i { width: 6px; height: 6px; }
	.wg-more { padding: 5px 12px; font-size: 12.5px; }
}
/* عنوان الأقسام الداكنة */
.wg-tone-dark .wg-head h2 { background: none !important; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.wg-tone-dark .wg-rule i { background: rgba(255,255,255,.55); }
.wg-tone-dark .wg-rule i:nth-child(2) { background: rgba(255,255,255,.35); }
.wg-tone-dark .wg-rule i:nth-child(3) { background: rgba(255,255,255,.18); }

/* ===== نمط العناوين البديل: شارة ممتلئة ===== */
.wg-t-badge .wg-head { gap: 18px; }
.wg-t-badge .wg-head h2 {
	position: relative; z-index: 0;
	color: #fff !important; font-size: 21px !important;
	padding: 9px 26px 10px 24px !important;
	transform: rotate(-1.6deg);
	text-shadow: none;
}
.wg-t-badge .wg-head h2:before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(120deg, var(--wg-blue) 0%, var(--wg-blue-d) 100%);
	border-radius: 16px 16px 16px 4px;
	box-shadow: -6px 6px 0 0 #c4ccd2, 0 10px 22px rgba(42,126,168,.28);
}
.wg-t-badge .wg-mark { width: 10px; height: 10px; flex-basis: 10px; }
.wg-t-badge .wg-mark:before { background: #fff; border-radius: 4px 4px 4px 1px; box-shadow: none; }
.wg-t-badge .wg-mark:after { display: none; }
.wg-t-badge .wg-tone-dark .wg-head h2:before { box-shadow: -6px 6px 0 0 rgba(255,255,255,.22), 0 10px 22px rgba(0,0,0,.25); }
.wg-t-badge [dir="ltr"] .wg-head h2 { transform: rotate(1.6deg); }
.wg-t-badge [dir="ltr"] .wg-head h2:before { border-radius: 16px 16px 4px 16px; box-shadow: 6px 6px 0 0 #c4ccd2, 0 10px 22px rgba(42,126,168,.28); }
@media (max-width: 560px) { .wg-t-badge .wg-head h2 { font-size: 18px !important; padding: 7px 18px 8px 16px !important; } }

/* ===== شبكة + الأكثر قراءة ===== */
.wg-duo-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.wg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wg-duo-grid .wg-pop { position: sticky; top: 20px; }
/* ===== قسم بلا جديد: عرض مختصر ===== */
.wg-compact-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; background: #fff; border-radius: var(--wg-r); padding: 6px 22px; box-shadow: 0 1px 2px rgba(16,40,56,.06); }
.wg-compact-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid #eef2f5; color: var(--wg-ink) !important; font-weight: 600; font-size: 15px; line-height: 1.6; }
.wg-compact-list a:hover span { color: var(--wg-blue-d); }
.wg-compact-list time { flex: 0 0 auto; color: var(--wg-muted); font-size: 12px; }
.wg-compact .wg-head h2 { font-size: 20px !important; }
@media (max-width: 860px) {
	.wg-duo-grid { grid-template-columns: 1fr; }
	.wg-duo-grid .wg-pop { position: static; }
	.wg-compact-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .wg-cols-2 { grid-template-columns: 1fr; } }
