/* =========================================================
   SF Announcement Stories (Splash)
   نافذة لقطات بأسلوب الستوريز — ترحيب + حملات مؤقتة
   ========================================================= */

.sf-announcement-modal {
	position: fixed; inset: 0;
	display: none;
	z-index: 10001; /* فوق نافذة النشرة */
	align-items: center; justify-content: center;
	padding: 16px;
}
.sf-announcement-modal.is-open { display: flex; }

.sf-announcement-modal__backdrop {
	position: absolute; inset: 0;
	background: rgba(7, 46, 72, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	cursor: pointer;
	animation: sf-ann-fade 200ms ease;
}
@keyframes sf-ann-fade { from { opacity: 0; } to { opacity: 1; } }

/* لوحة الستوري — كانفس ثابتة الأبعاد */
.sf-announcement-modal__panel {
	position: relative;
	background: #fff;
	border-radius: 20px;
	width: min(440px, 100%);
	height: min(640px, 88vh);
	overflow: hidden;
	box-shadow: 0 24px 72px rgba(7, 46, 72, 0.3);
	animation: sf-ann-rise 260ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes sf-ann-rise { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.sf-announcement-modal__backdrop,
	.sf-announcement-modal__panel { animation: none; }
}

/* ---------- أشرطة التقدم ---------- */
.sf-story__progress {
	position: absolute;
	top: 12px; inset-inline: 14px;
	z-index: 5;
	display: flex;
	gap: 5px;
}
.sf-story__bar {
	flex: 1;
	height: 3px;
	border-radius: 3px;
	/* لون محايد يظهر على الخلفيات الفاتحة والصور الداكنة معاً */
	background: rgba(128, 128, 128, 0.35);
	overflow: hidden;
}
.sf-story__bar-fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 3px;
	background: var(--wp--preset--color--accent-400, #E3A54F);
}

/* ---------- زر الإغلاق ---------- */
.sf-announcement-modal__close {
	position: absolute;
	top: 24px; inset-inline-end: 14px;
	z-index: 6;
	background: rgba(255, 255, 255, 0.92);
	border: 0;
	width: 36px; height: 36px;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer;
	color: var(--wp--preset--color--text-muted, #596B77);
	box-shadow: 0 1px 4px rgba(7, 46, 72, .15);
	transition: background 120ms var(--sf-ease, cubic-bezier(.16, 1, .3, 1));
}
.sf-announcement-modal__close:hover {
	background: var(--wp--preset--color--bg, #E4F3EC);
	color: var(--wp--preset--color--text-dark, #072E48);
}

/* ---------- مناطق التنقل (غير مرئية) ----------
   RTL ستوريز: التقدم لليسار — منطقة "التالي" يسار، "السابق" يمين */
.sf-story__nav {
	position: absolute;
	top: 60px; bottom: 0;
	z-index: 4;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.sf-story__nav--next { left: 0; width: 38%; }
.sf-story__nav--prev { right: 0; width: 26%; }
.sf-story__nav:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-400, #E3A54F);
	outline-offset: -4px;
	border-radius: 12px;
}

/* ---------- مجموعات ولقطات ---------- */
.sf-story-group,
.sf-story-slide {
	position: absolute;
	inset: 0;
}
.sf-story-group[hidden],
.sf-story-slide[hidden] { display: none; }

/* لقطة نص */
.sf-story-slide--text {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	background: #fff;
}
.sf-story-slide__banner {
	flex-shrink: 0;
	max-height: 45%;
	overflow: hidden;
}
.sf-story-slide__banner img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
}
.sf-story-slide__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 56px 30px 30px;
}
.sf-story-slide__banner + .sf-story-slide__content { padding-top: 22px; justify-content: flex-start; }
.sf-story-slide__title {
	font-family: var(--wp--preset--font-family--display, Syne), sans-serif;
	font-size: 1.65rem;
	font-weight: 800;
	margin: 0 0 12px;
	color: var(--wp--preset--color--secondary-600, #072E48);
	line-height: 1.3;
}
.sf-story-slide__body {
	color: var(--wp--preset--color--text-muted, #596B77);
	line-height: 1.9;
	font-size: 15.5px;
}
.sf-story-slide__body p { margin: 0 0 12px; }
.sf-story-slide__body p:last-child { margin-bottom: 0; }
.sf-story-slide__body a { color: var(--wp--preset--color--accent-400, #E3A54F); }

.sf-story-slide__cta {
	position: relative;
	z-index: 5; /* فوق مناطق التنقل حتى يُنقر */
	display: block;
	margin-top: 22px;
	padding: 12px 18px;
	background: var(--wp--preset--color--accent-400, #E3A54F);
	color: #fff;
	border-radius: 10px;
	font-weight: 700;
	font-size: 15px;
	text-align: center;
	text-decoration: none;
	transition: background 150ms;
}
.sf-story-slide__cta:hover {
	background: var(--wp--preset--color--accent-500, #d4913a);
	color: #fff;
}

/* لقطة صورة — ملء كامل */
.sf-story-slide--image { background: #072E48; }
.sf-story-slide__media,
.sf-story-slide__media img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
}
.sf-story-slide__media img { object-fit: cover; display: block; }
.sf-story-slide__overlay {
	position: absolute;
	inset-inline: 0; bottom: 0;
	padding: 48px 24px 24px;
	background: linear-gradient(0deg, rgba(7, 46, 72, .65) 0%, transparent 100%);
}
.sf-story-slide__overlay .sf-story-slide__cta { margin-top: 0; }

/* لقطة كود HTML */
.sf-story-slide--html {
	overflow-y: auto;
	background: #fff;
}
.sf-story-slide__html {
	padding: 52px 26px 26px;
	color: var(--wp--preset--color--text-dark, #072E48);
	line-height: 1.85;
	font-size: 15px;
}
.sf-story-slide__html img { max-width: 100%; height: auto; }
.sf-story-slide__html a {
	position: relative;
	z-index: 5;
	color: var(--wp--preset--color--accent-400, #E3A54F);
}

/* قفل تمرير الصفحة */
body.sf-ann-locked { overflow: hidden; }

/* الوضع الداكن */
.sf-dark-theme .sf-announcement-modal__panel,
.sf-dark-theme .sf-story-slide--text,
.sf-dark-theme .sf-story-slide--html { background: #1a1a1a; }
.sf-dark-theme .sf-story-slide__title { color: #f1f1f1; }
.sf-dark-theme .sf-story-slide__body,
.sf-dark-theme .sf-story-slide__html { color: #a3a3a3; }
.sf-dark-theme .sf-story__bar { background: rgba(255, 255, 255, .16); }
.sf-dark-theme .sf-announcement-modal__close { background: rgba(26, 26, 26, 0.92); color: #a3a3a3; }
.sf-dark-theme .sf-announcement-modal__close:hover { background: #262626; color: #f1f1f1; }

@media (max-width: 480px) {
	.sf-announcement-modal { padding: 10px; }
	.sf-announcement-modal__panel { height: min(600px, 92vh); border-radius: 16px; }
	.sf-story-slide__content { padding: 50px 22px 22px; }
	.sf-story-slide__title { font-size: 1.45rem; }
}
