:root{
  --bg:#141414;
  --text:#ffffff;
  --border: rgba(255,255,255,0.14);
  --surface: rgba(255,255,255,0.06);
  --link: rgba(255,255,255,0.78);
  --link-hover:#ffffff;
  --accent:#e34334;
}

body.light{
  --bg:#f5f5f5;
  --text:#141414;
  --border: rgba(0,0,0,0.14);
  --surface: rgba(0,0,0,0.06);
  --link: rgba(0,0,0,0.75);
  --link-hover:#141414;
  --accent:#e34334;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
  font-family: "Cairo", sans-serif;
  display:flex;
  flex-direction:column;
  transition: background .25s ease, color .25s ease;
}

/* Shared controls */
.ctrl-btn{
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:40px;
  padding:0 14px;
  gap:10px;

  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius:999px;

  cursor:pointer;
  font-size:14px;
  line-height:1;
  white-space: nowrap;

  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(6px);
}
.ctrl-btn:hover{ opacity:.9; transform: translateY(-1px); }

#langToggle{
  position:fixed;
  top:16px;
  left:16px;     /* ثابت دائمًا */
  z-index:9999;
  width: 92px;   /* تثبيت العرض */
  direction:ltr;
}

#themeToggle{
  position:fixed;
  top:16px;
  right:16px;    /* ثابت دائمًا */
  z-index:9999;
  direction:ltr;
}

/* Page shell */
main{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 88px 18px 24px;
  text-align:center;
}

.wrap{ width: min(780px, 92vw); }

h1{
  margin:0 0 10px;
  font-size: 28px;
  letter-spacing: 0.2px;
}

.subtitle{
  margin:0 auto;
  max-width: 70ch;
  opacity: .84;
  font-size: 16px;
  line-height: 1.7;
}

.card{
  margin: 18px auto 0;
  padding: 0px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  text-align: start;
}

.icons{
  display:flex;
  justify-content:center;
  gap:22px;
  font-size:18px;
}

.icons a{
  color: var(--text);
  text-decoration:none;
  opacity:.85;
  transition: opacity .15s ease;
}

.icons a:hover{
  opacity:1;
}
.contact-link{
  display: inline-flex;
  align-items: center;
  gap: 8px; /* المسافة بين أيقونة الواتساب والنص */
}


/* Footer stable */
footer{
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  text-align:center;
  flex-wrap: wrap;
}

footer a{
  color: var(--link);
  text-decoration:none;
  transition: opacity .15s ease, color .15s ease;
}
footer a:hover{ color: var(--link-hover); opacity:1; }

.footer-label{
  display:inline-block;
  line-height:1;       /* يمنع اختلاف AR/EN */
  padding: 8px 10px;
  white-space: nowrap;
}

/* Accordion */
.accordion{
  margin: 22px auto 0;
  width: min(520px, 92vw);
  border-top: 1px solid var(--border);
  text-align: start;
}

.acc-item{
  border-bottom: 1px solid var(--border);
}

.acc-btn{
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 18px 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 20px;
  font-family: "Cairo", sans-serif;
  font-weight: 500;
}

.acc-title{
  line-height: 1.2; /* يمنع اختلاف العربي/الإنجليزي */
}

.acc-icon{
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-2px);
  font-size: 24px;
}

.acc-btn .acc-icon{
  transition: color .25s ease, opacity .25s ease;
}

/* الشكل الافتراضي للأيقونة */
.acc-btn .acc-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 28px;
  line-height: 1;
  transition: opacity .2s ease, transform .2s ease;
}

/* عند التبويب النشط نخفي الرمز */
.acc-btn:has(+ .acc-panel.open) .acc-icon{
  font-size: 0;          /* يخفي + أو − */
}

/* دائرة مصمتة للتبويب النشط */
/* لازم يكون الحاوي مرجع للموجة */
.acc-btn:has(+ .acc-panel.open) .acc-icon{
  position: relative;
  width: 16px;
  height: 16px;
}

/* النقطة (ثابتة) */
.acc-btn:has(+ .acc-panel.open) .acc-icon::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* الموجة (تخرج من نفس المركز) */
.acc-btn:has(+ .acc-panel.open) .acc-icon::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent); /* أفضل من background للموجة */
  transform: translate(-50%, -50%);
  opacity: .7;
  z-index: 1;
  animation: acc-pulse 1.6s infinite ease-out;
}

@keyframes acc-pulse{
  0%{
    transform: translate(-50%, -50%) scale(1);
    opacity: .7;
  }
  100%{
    transform: translate(-50%, -50%) scale(3.4);
    opacity: 0;
  }
}

.acc-btn:has(+ .acc-panel.open) .acc-title{
  /* بدون تغيير لون */
  font-weight: 700;      /* اجعله أعرض/أثقل */
  opacity: 1;
  letter-spacing: .9px;
}

/* تجهيز العنوان */
.acc-title{
  position: relative;
  padding-inline-start: 18px;
  font-size: 18px;
}

/* السهم (افتراضي) */
.acc-item:has(.acc-panel) .acc-title::before{
  content: "▸";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text);
}
.acc-item:has(.acc-panel.open) .acc-title::before{
  content: "▾";
  color: var(--accent);
}


/* RTL: لا ننقل السهم بعد النص، فقط نقلب اتجاهه */
:dir(rtl) .acc-item:has(.acc-panel) .acc-title::before{
  transform: translateY(-50%) scaleX(-1); /* ▸ ← ◂ */
}


.acc-panel{
  max-height: 0;
  overflow: hidden;

  padding: 0;
  font-size: 16px;
  line-height: 1.9;
  opacity: 0;

  transition:
    max-height 260ms ease,
    opacity 220ms ease,
    padding 220ms ease;
}

.acc-panel.open{
  opacity: 0.85;
  margin-bottom: 16px;
}
.acc-panel p{
  margin-bottom: 10px; /* مسافة أسفل كل فقرة */
  margin-top:0;
  line-height: 1.7;
}

.acc-panel h3{
margin-top: 8px;
margin-bottom: 3px;
border-bottom: 1px solid var(--border);
}

.acc-panel ul, .acc-panel ol{
  margin: 0;
  line-height: 1.6;
}

.acc-panel a{
  color: var(--link);
}

.acc-panel a:hover{
  color: var(--link-hover);
}


/* Blog Last 10 Posts */
/* Blog Last 10 Posts */
.blog-list{
  display: grid;
  gap: 10px;

  /* العناوين دائمًا RTL */
  direction: rtl;
  text-align: right;
}

.blog-link{
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
  background: var(--surface);
  font-weight: 500; 
}

.blog-link:hover{ opacity: 1; }

/* ===============================
   Blog date (language aware)
   =============================== */
.blog-meta{
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
}

/* ✅ عربي → التاريخ يمين */
html[lang="ar"] .blog-meta{
  direction: rtl;
  text-align: right;
}

/* ✅ إنجليزي → التاريخ يسار */
html[lang="en"] .blog-meta{
  direction: ltr;
  text-align: left;
}

  .pay-img { display:none; }
  html[lang^="ar"] .pay-img-ar { display:block; }
  html[lang^="en"] .pay-img-en { display:block; }

  .pay-img { display:none; }
  html[dir="rtl"] .pay-img-ar { display:block; }
  html[dir="ltr"] .pay-img-en { display:block; }
  
.behance-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.behance-link::before {
  content: "Be";
  font-weight: 700;
  font-size: 1em;
  padding: 4px 0px;
  color:var(--text);
  line-height: 1;
}

.v-space{
  height: 10px; /* غيّر الارتفاع حسب الحاجة */
}