/* ------------------------------------------------------------------
   شاشة تفاعلية 55" — 1920×1080 أفقي
   كل المقاسات بـ rem، و 1rem = 10px عند 1920×1080، فيتكيف التخطيط
   مع 4K أو أي دقة بنفس النسبة دون تعديل.
   ------------------------------------------------------------------ */
:root {
  --green-deep: #004d2a;
  --green-card: #1a7f4d;
  --white: #ffffff;
  --card-ratio: 1.968;      /* نسبة بطاقات الأصول المرسلة */
  --radius: 3rem;
}

html {
  font-size: min(0.926vh, 0.521vw);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--green-deep);
  color: var(--white);
  font-family: 'Segoe UI', 'Tahoma', 'Noto Naskh Arabic', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

/* المؤشر يظهر عند تحريك الماوس ويختفي بعد سكونه — الفني يستخدم الماوس عند
   الصيانة، والزائر لا يرى سهمًا عالقًا على شاشة لمس. */
body.cursor-idle,
body.cursor-idle * { cursor: none; }

.screen {
  position: absolute;
  inset: 0;
  display: none;
}
.screen.is-active { display: flex; }

/* ---------------- الشاشة الرئيسية ---------------- */
#home {
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* الكتلة كلها موزونة رأسيًا بدل تعليقها في الأعلى */
  padding: 4rem 5.6rem;
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2rem;
  width: 100%;
}

/* الترويسة صورة واحدة تضم شعارين لكل منهما رابط، فنغطي نصفيها بمنطقتَي نقر
   شفافتين بدل تقطيع الصورة. الفاصل الرأسي في منتصف الصورة تمامًا. */
.masthead__logos {
  position: relative;
  height: 10.4rem;
}

.masthead__logos img {
  height: 100%;
  width: auto;
  display: block;
}

.masthead__hotspot {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  cursor: pointer;
  border-radius: 1.2rem;
  transition: background 140ms ease;
}
.masthead__hotspot--right { right: 0; }
.masthead__hotspot--left { left: 0; }

.masthead__hotspot:active { background: rgba(255, 255, 255, 0.12); }

.masthead__divider {
  width: 62%;
  max-width: 110rem;
  height: auto;
  opacity: 0.9;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem;
  width: 100%;
  margin-top: 6rem;
  z-index: 1;
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--card-ratio);
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.tile__img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

.tile:not(.tile--disabled):active {
  transform: scale(0.965);
  filter: brightness(1.12);
}

/* استجابة لمس فورية — الكشك بلا مؤشر فلا يوجد hover حقيقي */
.tile.is-pressed {
  transform: scale(0.965);
  filter: brightness(1.12);
}

/* البطاقة المعطّلة تخفت، أما نصّها فيبقى مقروءًا من مسافة المشاهدة */
.tile--disabled .tile__img { opacity: 0.45; }

.tile__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.tile__badge {
  font-size: 2rem;
  font-weight: 600;
  padding: 0.6rem 2rem;
  border: 0.2rem solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.6);
}

.watermark {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

/* ---------------- شاشة عرض المنصة ---------------- */
.viewer { flex-direction: column; background: var(--green-deep); }

.viewer__bar {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  height: 9rem;
  padding: 0 3.2rem;
  background: var(--green-deep);
  border-bottom: 0.2rem solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.viewer__title {
  flex: 1;
  font-size: 2.6rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: 6rem;
  padding: 0 2.8rem;
  font-family: inherit;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--green-deep);
  background: var(--white);
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease;
}
.btn:active { transform: scale(0.96); }

.btn__icon { font-size: 2.2rem; line-height: 1; }

.btn--home { flex: 0 0 auto; }

.btn--ghost {
  min-width: 6rem;
  padding: 0;
  font-size: 3rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.viewer__stage {
  position: relative;
  flex: 1;
  background: #ffffff;
}

.frame-slot { width: 100%; height: 100%; }

.frame-slot iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.spinner,
.error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  background: var(--green-deep);
  font-size: 2.4rem;
}
.spinner[hidden],
.error[hidden] { display: none; }

.spinner__ring {
  width: 7rem;
  height: 7rem;
  border: 0.6rem solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error__title { font-size: 3.2rem; font-weight: 700; }
.error__hint { font-size: 2.2rem; opacity: 0.75; }

