
/* --- Hamburger Menu Styles (from icomos.css) --- */
.menu-container {
  position: relative;
  z-index: 20000; /* زيادة z-index لتكون فوق الشعار */
  isolation: isolate; /* عزل طبقة القائمة عن أي تحولات/فلاتر في الخلفية */
}
.hamburger-icon {
  position: fixed;
  z-index: 1004; /* أعلى من الشعار والقائمة */
  top: 60px;
  left: 5vw;
  cursor: pointer;
  width: 40px;
  height: auto;
  backface-visibility: hidden;
  will-change: transform;
}

/* امنع أي تأثير من تحولات/فلاتر الخلفية على عناصر القائمة */
.menu-pane {
  backface-visibility: hidden;
  will-change: transform;
}
.hamburger-icon span {
  height: 5px;
  width: 40px;
  background: linear-gradient(90deg, #c59100 0%, #ffe08a 50%, #c59100 100%);
  display: block;
  margin: 5px 0px;
  transition: 0.7s ease-in-out;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(197, 145, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.hamburger-icon span::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: none;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}
input.hamburger-checkbox {
  position: fixed; /* ابقه داخل نافذة العرض لمنع القفز لأعلى الصفحة عند التركيز */
  z-index: 3;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  cursor: pointer;
}
input.hamburger-checkbox:focus { outline: none; }
@media screen and (max-width: 768px) {
  .hamburger-icon {
    width: 30px;
    top: 4vh;
    left: 4vw;
  }
  .hamburger-icon span {
    width: 30px;
    height: 4px;
    margin: 4px 0;
  }
}
.menu-pane {
  background: linear-gradient(135deg, #b67e00 0%, #ffd87a 50%, #b67e00 100%); /* ذهب أعمق لتجنّب مظهر أصفر */
  position: fixed;
  top: 0;
  left: 0;
  width: 50vw;
  height: 100vh;
  transform: translateX(-100%);
  transition: transform 0.6s ease-in-out;
  z-index: 1003;
  overflow-y: auto;
  direction: ltr;
  padding: 20px;
  padding-top: 50px; /* ensure content offset while border touches top */
  padding-bottom: 30px;
  border-right: 3px solid #c59100;
  box-shadow: 5px 0 20px rgba(197, 145, 0, 0.3);
  backdrop-filter: blur(10px);
  box-sizing: border-box; /* احسب الحشوات ضمن الارتفاع لعدم قصّ المحتوى */
  overscroll-behavior: contain; /* منع تمرير الجسم أثناء تمرير القائمة */
}

/* Animated golden shine around the menu border */
.menu-pane::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px; /* border thickness */
  border-radius: 0;
  background: conic-gradient(
    from 0deg,
    rgba(255, 224, 138, 0.95),
    rgba(197, 145, 0, 0.9),
    rgba(255, 224, 138, 0.95),
    rgba(197, 145, 0, 0.9),
    rgba(255, 224, 138, 0.95)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude; /* show only the ring */
  animation: none;
  pointer-events: none;
  opacity: 0.3; /* تقليل اللمعان لتظهر الخلفية ذهبية وليست صفراء */
  z-index: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .menu-pane::after { animation: none; opacity: 0.35; }
}
#openmenu:checked ~ .menu-pane {
  transform: translateX(0);
}

/* تعطيل أي لمعان/دوران عند فتح القائمة لتجنب اهتزاز بصري مع التمرير */
#openmenu:checked ~ .hamburger-icon span::before { animation: none; }
#openmenu:checked ~ .menu-pane::after { animation: none; }
@media screen and (min-width: 769px) {
  .menu-pane {
    width: 50vw;
  }
}
@media screen and (max-width: 768px) {
  .menu-pane {
    width: 80vw;
    height: 100vh; /* تأكيد ملء الشاشة */
    overflow-y: auto;
    padding-bottom: 20px;
    margin-top: 0;
    padding-top: 70px; /* مساحة كافية تحت شريط الأخبار دون فقدان روابط */
  }
  /* توزيع روابط القائمة عموديًا أعلى الصفحة لمنع التكدس في المنتصف */
  .menu-links {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px; /* تقليل التباعد لعرض روابط أكثر */
    min-height: auto;
    padding-top: 2vh;
    padding-bottom: 2vh;
    max-height: calc(100vh - 120px); /* اجعل الروابط قابلة للتمرير ضمن اللوحة */
    overflow-y: auto;
  }
  .menu-links li { padding: 0; margin: 0; }
}
@media screen and (max-width: 480px) {
  .menu-pane {
    width: 90vw;
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 16px;
    margin-top: 0;
    padding-top: 70px;
  }
}
.menu-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}
.menu-links li {
  padding: 10px 0;
}
.menu-links li a {
  color: #333;
  text-decoration: none;
  font-size: 1em;
  font-family: 'Libre Caslon Text', serif;
  padding: 12px 18px; /* مساحة لمس أكبر وروابط أوضح */
  line-height: 1.6;  /* تحسين التباعد العمودي داخل الزر */
  border-radius: 8px;
  transition: all 0.3s ease;
  display: block;
  position: relative;
  background: linear-gradient(135deg, #c59100 0%, #ffe08a 50%, #c59100 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(197, 145, 0, 0.25);
  font-weight: 600;
  text-align: center;
}

/* Arabic menu links should use the official Arabic headings font */
html[lang="ar"] .menu-links li a {
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
}

.menu-links li a:hover {
  background: linear-gradient(135deg, #a37800, #f0d080);
  color: #333;
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(197, 145, 0, 0.6), 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
#openmenu:checked ~ .hamburger-icon span:nth-of-type(2) {
  transform: translate(0%, 175%) rotate(-45deg);
  background: linear-gradient(90deg, #ffe08a 0%, #c59100 100%);
  box-shadow: 0 2px 8px rgba(255, 224, 138, 0.5);
}
#openmenu:checked ~ .hamburger-icon span:nth-of-type(3) {
  transform: rotate(45deg);
  background: linear-gradient(90deg, #c59100 0%, #ffe08a 100%);
  box-shadow: 0 2px 8px rgba(197, 145, 0, 0.5);
}
#openmenu:checked ~ .hamburger-icon span:nth-of-type(1) {
  opacity: 0;
}

/* Ensure menu appears below the fixed news bar (handled with inner padding instead of margin) */
.menu-pane { margin-top: 0; padding-top: 100px; }

/* Golden menu header */
.menu-pane::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c59100 0%, #ffe08a 50%, #c59100 100%);
  box-shadow: 0 2px 8px rgba(197, 145, 0, 0.5);
}

/* Menu title styling */
/* .menu-links::before {
  content: 'ICOMOS Sudan';
  display: block;
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
  margin-bottom: 30px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} */
@media screen and (max-width: 768px) {
  .menu-pane { margin-top: 0; padding-top: 100px; }
}

/* Desktop: اجعل الروابط أعلى قليلاً فقط على الشاشات الكبيرة */
@media screen and (min-width: 769px) {
  .menu-pane {
    padding-top: 70px; /* تقليل الحشو العلوي لسحب الروابط للأعلى */
  }
}


@media screen and (max-width: 768px) {
  .hamburger-icon {
    position: fixed;
    z-index: 1002;
    top: 80px;
    left: 15px;
    cursor: pointer;
    width: 40px;
    height: auto;
  }
  
  .hamburger-icon span {
    height: 4px;
    width: 40px;
    margin: 4px 0px;
  }
  
  .menu-pane {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.6s ease-in-out;
    z-index: 1001;
    margin-top: 0;
    padding-top: 100px;
  }
  
  #openmenu:checked ~ .menu-pane {
    transform: translateX(0);
  }
}

@media screen and (max-width: 480px) {
  .hamburger-icon {
    width: 27px;
    top: 50px;
    left: 8px;
    z-index: 2002;
  }
  
  .hamburger-icon span {
    width: 27px;
    height: 3px;
    margin: 3px 0;
  }
  
  input.hamburger-checkbox {
    position: fixed; /* ثبّت الموضع لتجنب التمرير للأعلى */
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
  }
  
  .menu-pane {
    width: 85vw;
    padding: 16px 12px 24px 12px; /* زيادة الحشو السفلي لتوازن الروابط */
    padding-top: 80px; /* تقليل فراغ أعلى داخل اللوحة */
    z-index: 2001;
  }
  
  .menu-links li {
    margin: 12px 0; /* تباعد أكبر بين العناصر */
  }
  
  .menu-links li a {
    font-size: 1em; /* تقليل حجم الروابط قليلًا */
    padding: 14px 18px;
    line-height: 1.6;
  }

  /* توزيع الروابط عمودياً من الأعلى على الشاشات الصغيرة جداً */
  .menu-links {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px; /* تباعد أصغر لروابط أكثر */
    min-height: auto;
    padding-top: 2vh;  /* مسافة علوية بسيطة */
    padding-bottom: 2vh;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .menu-links li { padding: 0; margin: 0; }
}

@media screen and (max-width: 320px) {
  .hamburger-icon {
    width: 25px;
    top: 65px;
    left: 5px;
    z-index: 2002;
  }
  
  .hamburger-icon span {
    width: 25px;
    height: 3px;
    margin: 3px 0;
  }
  
  input.hamburger-checkbox {
    top: 8px;
    left: 5px;
    width: 25px;
    height: 25px;
  }
  
  .menu-pane {
    width: 90vw;
    padding: 10px;
    z-index: 2001;
  }
  
  .menu-links li {
    margin: 5px 0;
  }
  
  .menu-links li a {
    font-size: 0.7em;
    padding: 5px 8px;
  }
}

/* Menu Styles for Small Screens */
@media screen and (max-width: 768px) {
  .menu-links li a {
    font-size: 1em; /* تقليل حجم الروابط قليلًا */
    padding: 14px 18px;
  }
}

@media screen and (max-width: 480px) {
  .menu-links li a {
    font-size: 1em;
    padding: 14px 18px;
  }
}

@media screen and (max-width: 320px) {
  .menu-links li a {
    font-size: 0.6em;
    padding: 4px 6px;
  }
}
.news-message {
    text-align: center;
    margin: 60px auto 40px auto;
    font-size: 1.7em;
    color: #c59100;
    background: #fffbe6;
    border-radius: 12px;
    padding: 30px 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    max-width: 600px;
}

@media (max-width: 600px) {
    .news-message { font-size: 1.1em; padding: 18px 4px; }
}



