/* الأساسيات */
:root {
  --bg-color: #0B0B0D;
  --gold: #D4AF37;
  --navy: #F5F3ED;
  --beige: #2E2E38;
}

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

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-color);
  color: var(--navy);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar-inner {
  background-color: rgba(11,11,13,0.95);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.navbar-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold);
  text-decoration: none;
}

.navbar-menu {
  list-style: none;
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.navbar-menu li a {
  color: var(--navy);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.navbar-menu li a:hover {
  color: var(--gold);
}


/* تأثير الورق */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/paper-fibers.png');
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

/* الهيكل الرئيسي */
.layout {
  display: flex;
  min-height: 100vh;
  justify-content: center;  /* توسيط الأقسام أفقياً */
  align-items: flex-start;  /* توسيط المحتوى في الأعلى */
}

/* ✅ الصورة الجانبية */
.side-image {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 35vw; /* عرض الصورة */
  height: 100%; /* جعل الصورة تأخذ كامل الارتفاع */
  background: linear-gradient(to right, rgba(0, 0, 0, 0.6), transparent),
              url('../img/background.png') center / cover no-repeat; /* استخدام cover لملء الإطار */
  z-index: 1;
  filter: contrast(110%) saturate(110%);
}

/* المحتوى الرئيسي */
.main-content {
  margin-left: 35vw;
  width: 65vw;
  padding: 40px;
  position: relative;
  z-index: 2;
  background-color: transparent;
}

/* توسيط المحتوى داخل الحاوية */
.content-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px; /* تقليل المسافة بين الأقسام */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  
}



/* الرأس */
.site-header {
  text-align: center;
  position: relative;
  margin-bottom: 40px; /* لتوفير مساحة أسفل العنوان */
  
}

.front-header {
  margin-left: 35vw; /* يجعل الهيدر يبدأ بعد الصورة الجانبية */
  background-color: var(--bg-color);
  padding: 40px 20px 60px;
  position: relative;
  z-index: 2;
  text-align: center;
}

/* محتوى الهيدر */
.front-header .header-inner {
  max-width: 700px;
  margin: 0 auto;
}

/* عنوان الموقع */
.front-header h1 {
  font-size: 2.8rem;
  background: linear-gradient(to right, #B89240, #cba45a);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 8px rgba(185,146,64,0.3);
  margin-bottom: 0.5rem;
}

/* وصف الموقع */
.front-header p {
  font-size: 1.1rem;
  color: var(--navy);
}

/* الخط الفاصل */
.site-header::after {
  content: "";
  display: block;
  height: 2px;
  width: 100%; /* ✅ يمكنك التعديل على الطول */
  margin: 20px auto 0;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.9;
  border-radius: 1px;
}

.front-header {
  background: transparent;
  padding: 2rem 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

.site-header h1 {
  font-size: 3rem;
  background: linear-gradient(to right, #B89240, #cba45a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 8px rgba(185,146,64,0.3);
  margin-bottom: 0; /* إزالة المسافة أسفل العنوان */
}


.site-header p {
  font-size: 1.2rem;
  color: var(--navy);
}

/* الأقسام */
/* الأقسام */
.section {
  display: block;          /* القسم ياخذ سطر كامل */
  width: 100%;             /* عرض كامل */
  margin: 0 auto 60px;     /* مسافة أسفل وتوسيط */
  text-align: center;      /* توسيط النصوص */
}

/* توسيط النص داخل العناوين في الأقسام */
.section-title {
  text-align: center; /* تأكد من توسيط النص */
  font-size: 2rem;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 10px;
  margin-bottom: 30px;
}

/* نظام البطاقات */
.cards-grid {
  display: flex;
  justify-content: center; /* كل الكروت في الوسط */
  flex-wrap: wrap;          /* نزول الكروت لسطر جديد */
  gap: 20px;                /* مسافة بين الكروت */
  max-width: 1200px;        /* حد أقصى للعرض */
  margin: 0 auto;           /* توسيط الشبكة */
}
/* تصميم البطاقة */
.card {
  width: 250px;
  height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* محتوى القسم */
.section .card-content {
  text-align: center; /* توسيط النص داخل البطاقة */
  font-size: 16px;
  color: var(--navy);
  padding: 0 20px; /* إضافة حواف لتوسيع النص قليلاً */
}

.card:hover::before {
  opacity: 1;
}

.card-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  object-fit: cover;
  transition: transform 10s ease; /* تأثير التوسع التدريجي */
}

.card:hover .card-image {
  transform: scale(1.2); /* تكبير الصورة بنسبة 20% عند التحويم */
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center; /* توسيط العناصر عموديًا داخل البطاقة */
  align-items: center; /* توسيط العناصر أفقيًا داخل البطاقة */
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  padding: 0 25px;
  z-index: 2;
}

.card-title {
  color: white;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0.9;
}

.card-excerpt {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
  opacity: 0;
}

.card:hover .card-title {
  font-size: 28px; /* زيادة حجم النص */
  transform: translateY(-30px); /* رفع النص لأعلى */
  opacity: 1;
}

.card:hover .card-excerpt {
  font-size: 18px; /* تكبير حجم النص */
  max-height: 200px; /* زيادة ارتفاع المقالة لتناسب عدد الأحرف */
  opacity: 1;
  margin-top: 20px;
  text-align: center;
  padding: 10px; /* إضافة الحواف لتوسيع النص */
  overflow: visible; /* التأكد من ظهور النص بالكامل */
}

/* تأثيرات سينمائية للأقسام */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 40px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.section:hover .section-title::after {
  transform: scaleX(1);
}

/* الحاوية الأفقية للبطاقات */
.cards-wrapper {
  display: flex;
  flex-wrap: nowrap;  /* يمنع تكدس البطاقات في أسطر متعددة */
  overflow-x: auto;   /* يتيح التمرير الأفقي إذا كانت البطاقات أكبر من العرض */
  gap: 5px;           /* المسافة بين البطاقات */
  padding-bottom: 10px;
  margin-top: 20px;
}

/* تأثير دخول البطاقات */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: cardEntrance 0.8s ease forwards;
  animation-delay: calc(var(--order) * 0.1s);
  opacity: 0;
}

/* الفوتر الجديد */
.custom-footer {
  background-color: var(--bg-color);
  color: var(--navy);
  text-align: center;
  padding: 60px 20px;
  font-family: 'Tajawal', sans-serif;
  border-top: 1px solid rgba(212,175,55,0.3);
}

.custom-footer h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--gold);
}

.footer-inner {
  background-color: transparent;
}

.custom-footer .subscribe-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.custom-footer input[type="email"] {
  padding: 12px 16px;
  border: 1px solid var(--gold);
  background-color: transparent;
  color: var(--navy);
  border-radius: 8px;
  width: 300px;
  font-size: 16px;
}

.custom-footer button {
  padding: 12px 24px;
  background-color: var(--gold);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.custom-footer button:hover {
  background-color: var(--gold);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.footer-links a {
  color: var(--navy);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: all 0.3s ease;
  font-size: 16px;
}

.footer-social a:hover {
  background-color: var(--gold);
  color: white;
}

.footer-copy {
  font-size: 13px;
  color: #666;
  margin-top: 20px;
}

/* ✅ دفع الفوتر لليمين في الصفحة الرئيسية */
body.front-page .custom-footer {
  margin-left: 35vw;
}

/* ✅ تمديد الفوتر بالكامل في باقي الصفحات */
.front-footer {
  margin-left: 35vw; /* ✅ يحرك الفوتر ليبدأ بعد الصورة */
  width: 65vw;               /* ✅ ليأخذ نفس عرض المحتوى */
  box-sizing: border-box;    /* يضمن أن البادينغ لا يكسر التنسيق */
  background-color: var(--bg-color);
  text-align: center;
  padding: 60px 20px;
}

.front-footer .footer-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
@media (max-width: 768px) {
  body.front-page .custom-footer {
    margin-left: 0 !important;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .side-image {
    display: block !important;
    position: relative;
    width: 100%;
    height: 260px;
    background-size: cover !important;
    background-position: center !important;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
  }

  .custom-footer {
    padding: 40px 20px;
    margin-left: 0 !important;
  }

  .cards-grid {
    flex-direction: column;
    align-items: center;
  }

  .main-content .section {
    padding: 0 15px;
  }
  .hero-wrapper {
  position: relative;
  width: 100%;
  height: 360px;
  background: url('path-to-your-hero.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero-title {
  font-size: 2.8rem;
  background: linear-gradient(to right, #B89240, #cba45a);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 8px rgba(185,146,64,0.3);
  margin-bottom: 0.5rem;
}
  
.hero-title:hover {
  text-shadow: 0 0 15px #c29b53, 0 0 30px #c29b53;
}

.hero-overlay {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3), transparent 60%);
  animation: moveOverlay 8s linear infinite;
}

@keyframes moveOverlay {
  0% { transform: translate(0, 0) rotate(0); }
  100% { transform: translate(50%, 50%) rotate(360deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
  .article-container {
    width: 90% !important;
    margin: 20px auto !important;
    padding: 20px !important;
  }

  .article-buttons {
    flex-direction: column !important;
    gap: 15px !important;
  }

  .article-buttons a {
    width: 100%;
    justify-content: center;
    font-size: 15px;
  }
.hero-dust {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://cdn.pixabay.com/photo/2020/06/07/13/51/gold-5272286_1280.png') center center / cover no-repeat;
  opacity: 0.07;
  animation: dustFloat 12s infinite linear;
  z-index: 1;
}

@keyframes dustFloat {
  from {
    transform: scale(1) rotate(0deg) translateY(0);
  }
  to {
    transform: scale(1.2) rotate(360deg) translateY(-10px);
  }

}

/* 🔥 المرحلة الثالثة: تحسين النصوص والعناصر التفاعلية */

/* 1. خط مطبوع فكري للنصوص الطويلة */
body p,
.article-body {
  font-family: 'Crimson Text', serif;
  font-size: 1.15rem;
  line-height: 1.9;
  background-image: url('https://www.transparenttextures.com/patterns/old-mathematics.png');
  background-repeat: repeat;
  background-blend-mode: multiply;
}

/* 2. تأثير توهج ديناميكي للعناوين */
.glow-title {
  animation: glowAnim 2.5s ease-in-out infinite alternate;
  color: transparent;
  background: linear-gradient(to right, #B89240, #cba45a);
  -webkit-background-clip: text;
}

@keyframes glowAnim {
  from { text-shadow: 0 0 5px var(--gold); }
  to { text-shadow: 0 0 20px var(--gold); }
}

/* 3. Shine Hover على البطاقات */
.card::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -45%;
  width: 60%;
  height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3) 0%, transparent 80%);
  transform: rotate(25deg);
  animation: shine 5s infinite;
}

@keyframes shine {
  0% { transform: translateX(-150%) rotate(25deg); }
  100% { transform: translateX(150%) rotate(25deg); }
}

/* 4. تحسين أزرار ذهبية فخمة */
.btn {
  padding: 12px 24px;
  background-color: var(--gold);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--gold);
  box-shadow: 0 8px 24px rgba(194, 155, 83, 0.4);
  transform: scale(1.03);
}

/* 5. Scroll-in للنصوص باستخدام AOS */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
}

[data-aos].aos-animate {
  opacity: 1;
}
/* 🌟 تأثير العنوان الذهبي داخل الصورة الرئيسية للمقال */

.hero-post-title {
  font-size: 3rem;
  color: white;
  background: linear-gradient(120deg, var(--gold), #FFD700);
  padding: 10px 25px;
  border-radius: 10px;
  display: inline-block;
  position: relative;
  overflow: hidden;
  animation: fadeInSlide 1.5s ease-out forwards;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* لمعة تمر فوق النص */
.hero-post-title::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  transform: skewX(-20deg);
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
  0% { left: -75%; }
  100% { left: 125%; }
}
  
  
  [data-aos] {
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos].aos-animate {
  opacity: 1;
}
#newstller.newsletter-block {
  margin-bottom: 40px;
}

#newstller .subscribe-form input[type="email"] {
  background-color: transparent;
  border: 1px solid var(--gold);
  color: var(--navy);
}

#newstller .subscribe-form input::placeholder {
  color: rgba(245, 243, 237, 0.7); /* درجـة من الأبيض العاجي */
}

#newstller .subscribe-form button {
  background-color: var(--gold);
  color: #0B0B0D; /* أسود مخملي لقراءة أوضح على الذهبي */
}

#newstller .subscribe-form button:hover {
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}


/* ==============================================
   📱 In-page Sections Navbar (Mobile Only)
   - Appears inside page frame on mobile
   - Sticky, scrollable "chips" linking to sections
   - Works with existing sections having IDs (#...)
   ============================================== */

:root {
  --nav-height: 56px; /* adjust if your top navbar is taller/shorter on mobile */
  --chip-bg: rgba(255, 255, 255, 0.04);
  --chip-bg-active: rgba(212, 175, 55, 0.18);
  --chip-border: rgba(212, 175, 55, 0.35);
}

.inpage-nav {
  display: none; /* hidden by default, shown on mobile below */
}

@media (max-width: 768px) {
  .inpage-nav {
    display: block;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0) + var(--nav-height));
    z-index: 998;
    margin: 8px 12px 6px;
    padding: 10px;
    border: 1px solid var(--chip-border);
    background-color: rgba(11,11,13,0.7);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  }

  .inpage-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 2px;
    margin: 0;
  }

  .inpage-nav ul::-webkit-scrollbar { height: 6px; }
  .inpage-nav ul::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
  }

  .inpage-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--chip-border);
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--navy);
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    scroll-snap-align: start;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  }

  .inpage-nav a:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
    border-color: var(--gold);
  }

  /* Active chip when targeting a section (#id in URL) */
  .inpage-nav a[aria-current="true"],
  .inpage-nav a.active,
  .inpage-nav a:focus-visible {
    background: var(--chip-bg-active);
    border-color: var(--gold);
    outline: none;
  }

  /* Make anchor jumps land with comfortable offset (below both navbars) */
  .section,
  [id] {
    scroll-margin-top: calc(var(--nav-height) + 72px);
  }
}


/* ================================
   ✨ Scrollbar للأقسام (Cards) — داخل إطار الصفحة
   ================================ */
.section .cards-wrapper,
.section .cards-grid {
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) rgba(255,255,255,0.08);
  scrollbar-gutter: stable both-edges;
}

/* حجز مساحة للسكروول كي يظهر داخل الإطار */
@media (max-width: 768px) {
  .section .cards-wrapper,
  .section .cards-grid {
    padding-bottom: 22px;
  }
}

/* تخصيص شكل السكروول — WebKit */
.section .cards-wrapper::-webkit-scrollbar,
.section .cards-grid::-webkit-scrollbar {
  height: 10px;
}

.section .cards-wrapper::-webkit-scrollbar-track,
.section .cards-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.25);
}

.section .cards-wrapper::-webkit-scrollbar-thumb,
.section .cards-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--gold), #cba45a);
  border-radius: 999px;
  border: 2px solid rgba(11,11,13,0.85);
}

.section .cards-wrapper::-webkit-scrollbar-thumb:hover,
.section .cards-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #cba45a, var(--gold));
}

.section .cards-wrapper::-webkit-scrollbar-corner,
.section .cards-grid::-webkit-scrollbar-corner {
  background: transparent;
}

/* تكبير طفيف على الجوال لتسهيل السحب */
@media (max-width: 768px) {
  .section .cards-wrapper::-webkit-scrollbar,
  .section .cards-grid::-webkit-scrollbar {
    height: 12px;
  }
}

/* تقليل البروز على الديسكتوب */
@media (min-width: 769px) {
  .section .cards-wrapper::-webkit-scrollbar,
  .section .cards-grid::-webkit-scrollbar {
    height: 8px;
  }
  .section .cards-wrapper { padding-bottom: 12px; }
  .section .cards-grid { padding-bottom: 12px; }
}


/* ================================
   📱 Footer mobile full width
   ================================ */
@media (max-width: 768px) {
  footer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
    border-radius: 0 !important;
    box-sizing: border-box;
  }
}


/* ================================
   📱 تحسين الصور الجانبية على الموبايل (نسبة وتناسب)
   ================================ */
@media (max-width: 768px) {
  .side-image, 
  .side-image img {
    max-width: 100%;
    height: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
    display: block;
    margin: 0 auto;
  }
}


/* ================================
   📱 Side-image on mobile — keep face visible (proportional)
   - Uses CSS variables for easy tuning
   ================================ */
:root {
  --side-mobile-height: clamp(180px, 58vw, 320px);
  --side-mobile-focal-y: 25%; /* push view a bit up to avoid cutting faces */
}

@media (max-width: 768px) {
  body.front-page .side-image {
    /* proportional banner instead of fixed px that was cutting faces */
    height: var(--side-mobile-height) !important;
    background-size: cover !important;
    background-position: 50% var(--side-mobile-focal-y) !important; /* center X, shift Y */
  }
}

/* Extra safeguard for short/landscape phones */
@media (max-width: 768px) and (max-height: 480px) {
  body.front-page .side-image {
    height: clamp(140px, 38vw, 220px) !important;
    background-position: 50% 20% !important;
  }
}


/* ================================
   📱 Side-image on mobile — shrink inside frame
   ================================ */
@media (max-width: 768px) {
  body.front-page .side-image {
	  
    height: clamp(160px, 50vw, 280px) !important;
    background-size: contain !important; /* shrink image to fit */
    background-repeat: no-repeat !important;
    background-position: center top !important;
    padding: 10px; /* create breathing space inside frame */
  }
}


/* ================================
   ✅ Mobile side-image visibility fix
   - Use single image layer with contain
   - Move gradient to ::after so it doesn't shrink the image
   ================================ */
@media (max-width: 768px) {
  body.front-page .side-image {
    position: relative !important;
    height: clamp(180px, 55vw, 320px) !important;
    background-image: url('../img/background.png') !important; /* image only */
    background-size: contain !important;   /* fit inside frame */
    background-repeat: no-repeat !important;
    background-position: center center !important;
    padding: 8px;                          /* breathing space around */
    border-radius: 10px;                   /* optional nice frame */
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  }
  /* overlay gradient sits above without affecting image scaling */
  body.front-page .side-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.28), rgba(0,0,0,0));
    pointer-events: none;
    border-radius: inherit;
  }
}

/* Extra safety: if device height is very small, still keep it visible */
@media (max-width: 768px) and (max-height: 480px) {
  body.front-page .side-image {
    height: clamp(150px, 42vw, 240px) !important;
    background-position: center 30% !important;
  }
}


/* === Moved from header.php inline <style> === */
/* ✅ إظهار الصورة على الجوال */
    @media (max-width: 768px) {
      .side-image {
        display: block !important;
        position: relative;
        width: 100%;
        height: 250px;
        background-size: cover !important;
        background-position: center !important;
      }
      .main-content,
      .front-header,
      body.front-page .custom-footer {
        margin-left: 0 !important;
        width: 100% !important;
      }
    }

    /* ✅ قائمة الجوال */
    .menu-toggle {
      display: none;
      flex-direction: column;
      gap: 5px;
      background: none;
      border: none;
      cursor: pointer;
    }
    .menu-toggle span {
      width: 25px;
      height: 3px;
      background-color: var(--gold);
      border-radius: 3px;
      transition: 0.3s;
    }
    @media (max-width: 768px) {
      .menu-toggle {
        display: flex;
      }
      .navbar-menu {
        display: none;
        flex-direction: column;
        background-color: var(--bg-color);
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        padding: 10px 0;
        z-index: 999;
      }
      .navbar-menu li {
        text-align: center;
        padding: 10px 0;
      }
      .navbar-menu li a {
        color: var(--navy);
        font-size: 18px;
      }
      .navbar-menu.active {
        display: flex;
      }
    }/* العداد أسفل الأقسام — نفس خلفية الموقع (شفاف) ونص أبيض */
.section--visitors{
  margin: 32px auto 16px;
  background: transparent;      /* نفس خلفية الموقع */
}
.section--visitors .counter-center{
  text-align: center;
  padding: 8px 0;
}

/* العنوان فوق الرقم */
.madar-counter--medium .madar-vc__label{
  display:block;
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing:.05em;
  margin-bottom: .25rem;
  color: rgba(255,255,255,.85);  /* أبيض فاتح */
}

/* الرقم نفسه — أبيض صريح وإلغاء التدرّج */
.madar-counter--medium .madar-vc__value{
  font-size: clamp(40px, 5.5vw, 88px);
  font-weight: 800;
  line-height: 1;
  color: #fff !important;                       /* أبيض */
  background: none !important;                  /* إلغاء أي خلفية نصية */
  -webkit-background-clip: initial !important;  /* إلغاء قصّ الخلفية (Safari/Chrome) */
  background-clip: initial !important;
  -webkit-text-fill-color: #fff !important;     /* فرض اللون في WebKit */
}
.intro-about { margin: 2rem 0 2.5rem; }
.intro-about__content{
  position: relative;
  white-space: pre-wrap;
  text-align: right;
  direction: rtl;
  line-height: 1.9;
  background: rgba(0,0,0,0.03);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 1.05rem;
}
.intro-about__content .caret{
  display: inline-block;
  width: 2px;
  height: 1em;
  background: currentColor;
  margin: 0 2px;
  vertical-align: -0.15em;
  animation: blink 1s steps(1) infinite;
}
.intro-about__content .caret.done{ animation: none; opacity: 0; }

@keyframes blink { 50% { opacity: 0; } }
