@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@500;600;700;800&family=Tajawal:wght@400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.35; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.section { padding: 120px 0; }
#home, #about, #services, #whyus, #gallery, #contact { scroll-margin-top: 88px; }
@media (max-width: 720px) { .section { padding: 76px 0; } #home, #about, #services, #whyus, #gallery, #contact { scroll-margin-top: 74px; } }

/* ---------- الطابع الزجاجي (Glassmorphism) ---------- */
.glass {
  background: linear-gradient(165deg, var(--glass-from), var(--glass-to));
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.ambient-blob {
  position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .35; pointer-events: none;
}
.blob-1 { top: -120px; right: -100px; width: 420px; height: 420px; background: hsl(var(--brand)); }
.blob-2 { top: 55vh; left: -140px; width: 380px; height: 380px; background: hsl(var(--brand-dark)); opacity: .22; }
.blob-3 { bottom: -160px; right: 15%; width: 460px; height: 460px; background: hsl(var(--brand)); opacity: .18; }
@media (max-width: 720px) {
  .ambient-blob { filter: blur(60px); }
  .blob-1, .blob-2, .blob-3 { width: 260px; height: 260px; }
}

.eyebrow-free h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head p { color: hsl(var(--muted-foreground)); margin-top: 14px; font-size: 17px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-md); border: 1px solid transparent;
  font-weight: 700; font-size: 15px; transition: transform .18s ease, box-shadow .18s ease, background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: hsl(var(--brand)); color: #171310; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px hsla(var(--brand)/.55); }
.btn-outline { border-color: hsla(var(--foreground)/.22); color: hsl(var(--foreground)); }
.btn-outline:hover { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }
.btn-ghost { color: hsl(var(--muted-foreground)); padding: 10px 14px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid hsl(var(--brand)); outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  border: none; border-bottom: 1px solid var(--glass-border);
  transition: box-shadow .25s ease;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand-mark { display: flex; align-items: center; gap: 12px; }
.brand-mark img { height: 46px; width: 46px; }
.brand-mark span { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .2px; }
.brand-mark small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12.5px; color: hsl(var(--muted-foreground)); }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a { font-weight: 600; font-size: 15px; color: hsl(var(--muted-foreground)); transition: color .2s; position: relative; }
.main-nav a:hover, .main-nav a.active { color: hsl(var(--foreground)); }
.main-nav a::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: -8px; height: 2px;
  background: hsl(var(--brand)); transform: scaleX(0); transition: transform .25s ease; transform-origin: center;
}
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid hsla(var(--foreground)/.16);
  background: hsl(var(--card)); color: hsl(var(--foreground)); display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: hsl(var(--brand)); }
.icon-btn svg { width: 19px; height: 19px; }
.lang-btn { font-family: var(--font-display); font-weight: 800; font-size: 13.5px; letter-spacing: .3px; }

.burger { display: none; }
.mobile-cta { display: none; }
@media (max-width: 900px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-cta { display: none; }
  .mobile-cta { display: flex; align-self: center; justify-content: center; width: 220px; max-width: 100%; margin: 4px auto 0; }
}
@media (max-width: 420px) {
  .header-actions { gap: 6px; }
  .icon-btn { width: 38px; height: 38px; }
  .brand-mark small { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 128px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: hsl(var(--brand)); font-weight: 700; font-size: 14px; margin-bottom: 18px; }
.hero-kicker::before { content: ""; width: 26px; height: 2px; background: hsl(var(--brand)); }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: hsl(var(--brand)); }
.hero p.lead { margin-top: 22px; font-size: 18px; color: hsl(var(--muted-foreground)); max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 52px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-family: var(--font-display); font-size: 26px; color: hsl(var(--foreground)); }
.hero-stats div span { font-size: 14px; color: hsl(var(--muted-foreground)); line-height: 1.5; }
@media (max-width: 720px) {
  .hero-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  }
  .hero-stats div {
    text-align: center; padding: 16px 10px; border-radius: 14px;
    background: hsla(var(--foreground)/.03); border: 1px solid hsla(var(--foreground)/.06);
  }
  .hero-stats div:nth-child(3) { grid-column: 1 / -1; }
  .hero-stats div b { font-size: 21px; }
  .hero-stats div span { font-size: 12.5px; }
}

.hero-visual { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); aspect-ratio: 4/5; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, hsla(var(--background)/0) 40%, hsla(var(--background)/.85) 100%);
}
.hero-badge {
  position: absolute; z-index: 2; bottom: 22px; right: 22px; left: 22px;
  border-radius: var(--radius-md); padding: 16px 18px; display: flex; align-items: center; gap: 12px;
}
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--brand)); flex: none; }
.hero-badge strong { font-size: 14.5px; display: block; }
.hero-badge span { font-size: 13.5px; color: hsl(var(--muted-foreground)); }

/* ---------- خدماتنا (قائمة تفاعلية سلسة تتوسّع بالمكان) ---------- */
.journey-list { display: flex; flex-direction: column; gap: 14px; }
.service-item { border-radius: var(--radius-lg); transition: border-radius .32s ease; opacity: 0; position: relative; }

/* ---------- لمسة ابداعية: انبثاق سلس وخفيف لعناصر قائمة الخدمات عند ظهورها ---------- */
.journey-list.in-view .service-item {
  animation: servicePopIn .5s cubic-bezier(.22,.75,.3,1) both;
}
.journey-list.in-view .service-item:nth-child(1)  { animation-delay: .02s; }
.journey-list.in-view .service-item:nth-child(2)  { animation-delay: .06s; }
.journey-list.in-view .service-item:nth-child(3)  { animation-delay: .1s; }
.journey-list.in-view .service-item:nth-child(4)  { animation-delay: .14s; }
.journey-list.in-view .service-item:nth-child(5)  { animation-delay: .18s; }
.journey-list.in-view .service-item:nth-child(6)  { animation-delay: .22s; }
.journey-list.in-view .service-item:nth-child(7)  { animation-delay: .26s; }
.journey-list.in-view .service-item:nth-child(8)  { animation-delay: .3s; }
.journey-list.in-view .service-item:nth-child(9)  { animation-delay: .34s; }
.journey-list.in-view .service-item:nth-child(n+10) { animation-delay: .36s; }
@keyframes servicePopIn {
  0%   { opacity: 0; transform: translateY(12px) scale(.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .service-item { opacity: 1; }
  .journey-list.in-view .service-item { animation: none; }
}
.service-row {
  width: 100%; display: flex; align-items: center; gap: 20px; padding: 22px 26px; border-radius: var(--radius-lg);
  text-align: start; color: hsl(var(--foreground)); cursor: pointer; position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-radius .32s ease;
}
.service-item.open .service-row { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; box-shadow: var(--shadow-2); }
.service-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), 0 0 0 1px hsla(var(--brand)/.25); transition: transform .18s ease, box-shadow .18s ease, border-radius .45s ease; }
.journey-num {
  flex: none; width: 46px; height: 46px; border-radius: 50%; background: hsla(var(--brand)/.14); color: hsl(var(--brand));
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 15px;
  transition: background-color .25s, color .25s, border-radius .45s ease;
}
.service-row:hover .journey-num, .service-item.open .journey-num { background: hsl(var(--brand)); color: #fff; }
.journey-titles { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.journey-titles strong { font-family: var(--font-display); font-size: 17px; }
.journey-titles em { font-style: normal; font-size: 14px; color: hsl(var(--muted-foreground)); }
.journey-chevron { flex: none; color: hsl(var(--muted-foreground)); transition: transform .3s ease, color .2s ease; }
.service-row:hover .journey-chevron { color: hsl(var(--brand)); }
.service-item.open .journey-chevron { transform: rotate(90deg); color: hsl(var(--brand)); }
@media (max-width: 640px) { .service-row { padding: 18px; gap: 14px; } }

/* ---------- إضاءة تفاعلية عند الضغط على عناصر القائمة (بديل الإضاءة العامة للمؤشر) ---------- */
.service-press {
  position: absolute; width: 16px; height: 16px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--brand-rgb), .55), rgba(var(--brand-rgb), .18) 45%, transparent 72%);
  transform: translate(-50%, -50%) scale(0); opacity: .9;
  animation: servicePress .55s ease-out forwards;
}
@keyframes servicePress {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: .8; }
  100% { transform: translate(-50%, -50%) scale(16); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .service-press { display: none; } }

/* توسّع سلس بتقنية grid-template-rows (0fr → 1fr) بدل max-height التقليدية */
.service-panel {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .36s cubic-bezier(.4,0,.2,1);
}
.service-item.open .service-panel { grid-template-rows: 1fr; }
.service-panel-inner {
  overflow: hidden; min-height: 0; border-top: none;
  border-top-left-radius: 0; border-top-right-radius: 0;
  border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg);
  padding: 0 26px; opacity: 0; transform: translateY(-6px);
  transition: padding .32s ease, border-radius .32s ease, opacity .28s ease, transform .28s ease;
}
.service-item.open .service-panel-inner { padding: 6px 26px 26px; opacity: 1; transform: translateY(0); }
@media (max-width: 640px) {
  .service-panel-inner { padding: 0 18px; }
  .service-item.open .service-panel-inner { padding: 4px 18px 20px; }
}
.service-panel-inner .sd-block { margin-bottom: 16px; }
.service-panel-inner .sd-block h5 { font-size: 13.5px; color: hsl(var(--muted-foreground)); font-weight: 700; margin-bottom: 6px; }
.service-panel-inner .sd-block p { font-size: 15.5px; line-height: 1.8; color: hsl(var(--foreground)); }
.service-panel-inner .sd-cta { display: inline-flex; }

/* ---------- لماذا نحن ---------- */
.whyus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .whyus-grid { grid-template-columns: 1fr; } }
.whyus-card { border-radius: var(--radius-lg); padding: 32px 28px; transition: transform .25s, box-shadow .25s; }
.whyus-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.whyus-card h3 { font-size: 20px; margin-bottom: 12px; color: hsl(var(--brand)); }
.whyus-card p { color: hsl(var(--muted-foreground)); font-size: 15.5px; margin-bottom: 18px; }
.whyus-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.whyus-card li { font-size: 15px; font-weight: 600; padding-inline-end: 22px; position: relative; }
.whyus-card li::before {
  content: ""; position: absolute; inset-inline-end: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: hsl(var(--brand));
}

/* ---------- الصور العامة (لوحة الإدارة) ---------- */
.admin-images-panel { display: none; padding: 20px; border-radius: var(--radius-lg); margin-bottom: 22px; }
body.admin-mode .admin-images-panel { display: block; }
.admin-images-panel h4 { font-size: 15px; margin-bottom: 16px; }
.admin-images-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.admin-image-tile { text-align: center; }
.admin-image-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-md); border: 1px solid hsla(var(--foreground)/.12); margin-bottom: 8px; }
.admin-image-tile span { display: block; font-size: 13.5px; color: hsl(var(--muted-foreground)); margin-bottom: 6px; }
.admin-image-tile .btn { width: 100%; padding: 8px; font-size: 13.5px; }
.btn-sm { padding: 7px !important; font-size: 13px !important; }
.tile-status { min-height: 15px; font-size: 12.5px; line-height: 1.6; margin-bottom: 6px; color: hsl(var(--muted-foreground)); }
.tile-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tile-actions .btn { flex: 1; min-width: 64px; width: auto; }

/* ---------- Gallery ---------- */
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  padding: 8px 18px; border-radius: 999px; border: 1px solid hsla(var(--foreground)/.16); background: transparent;
  color: hsl(var(--muted-foreground)); font-size: 14px; font-weight: 600; transition: all .2s;
}
.filter-chip.active, .filter-chip:hover { border-color: hsl(var(--brand)); color: hsl(var(--brand)); background: hsla(var(--brand)/.1); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 940px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item {
  position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
  aspect-ratio: 4/3.1; border: 1px solid hsla(var(--foreground)/.08);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .g-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
  background: linear-gradient(180deg, transparent 45%, hsla(0,0%,0%,.75) 100%); color: #fff;
}
.gallery-item .g-cat { font-size: 12.5px; color: hsl(var(--brand)); font-weight: 700; margin-bottom: 4px; }
.gallery-item .g-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.gallery-item .g-remove {
  position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(20,10,10,.72); color: #fff; display: none; align-items: center; justify-content: center; z-index: 3;
}
body.admin-mode .gallery-item .g-remove { display: flex; }
.gallery-empty { text-align: center; padding: 60px 20px; color: hsl(var(--muted-foreground)); border: 1px dashed hsla(var(--foreground)/.2); border-radius: var(--radius-md); }

.admin-bar {
  display: none; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: hsla(var(--brand)/.12); border: 1px solid hsla(var(--brand)/.4); border-radius: var(--radius-md);
  padding: 14px 18px; margin-bottom: 22px; font-size: 14.5px;
}
body.admin-mode .admin-bar { display: flex; }
.admin-bar strong { color: hsl(var(--brand)); }
.admin-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-bar-actions button { font-size: 14px; padding: 8px 14px; border-radius: 8px; }

/* ---------- About ---------- */
/* align-items: stretch (بدل center) يخلي عمود الكتابة يمتد لنفس ارتفاع
   عمود الصورة تمامًا بدل ما يبقى بحجمه الطبيعي الأصغر بمنتصف المساحة. */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: stretch; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; align-items: initial; } }
.about-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); height: 100%; }
.about-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
@media (max-width: 900px) { .about-media img { min-height: 260px; } }
/* عمود الكتابة: يمتد بنفس امتداد (ارتفاع) الصورة، ويوزّع المقدمة وقائمة
   النقاط الثلاث بالتساوي على كامل هذا الامتداد بدل تكدّسها أعلى العمود. */
.about-content { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
@media (max-width: 900px) { .about-content { height: auto; gap: 28px; } }
.about-points { display: grid; gap: 18px; margin-top: 28px; }
@media (max-width: 900px) { .about-points { margin-top: 0; } }
.about-point { display: flex; gap: 14px; align-items: flex-start; }
.about-point .num { font-family: var(--font-display); font-weight: 800; color: hsl(var(--brand)); font-size: 18px; }
.about-point h4 { font-size: 16.5px; margin-bottom: 5px; }
.about-point p { font-size: 15px; color: hsl(var(--muted-foreground)); line-height: 1.7; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-card {
  border-radius: var(--radius-lg); padding: 34px;
}
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 4px; border-bottom: 1px solid hsla(var(--foreground)/.08); border-radius: 10px; transition: background-color .2s ease, transform .2s ease; cursor: pointer; }
.contact-info-item:hover { background: hsla(var(--brand)/.08); transform: translateY(-1px); }
.contact-info-item:last-child { border-bottom: none; }
.contact-info-item .ic { width: 40px; height: 40px; border-radius: 10px; background: hsla(var(--brand)/.14); color: hsl(var(--brand)); display: flex; align-items: center; justify-content: center; flex: none; transition: background-color .2s, color .2s; }
.contact-info-item:hover .ic { background: hsl(var(--brand)); color: #fff; }
.contact-info-item .ic svg { width: 19px; height: 19px; }
.contact-info-item strong { display: block; font-size: 15.5px; }
.contact-info-item span { font-size: 14.5px; color: hsl(var(--muted-foreground)); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14.5px; font-weight: 600; color: hsl(var(--muted-foreground)); }
.field input, .field select, .field textarea {
  background: hsl(var(--secondary)); border: 1px solid hsla(var(--foreground)/.14); border-radius: 10px;
  padding: 13px 14px; color: hsl(var(--foreground)); font-family: inherit; font-size: 15.5px; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: hsl(var(--brand)); outline: none; }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 13.5px; color: hsl(var(--muted-foreground)); margin-top: 6px; line-height: 1.6; }
.form-status { font-size: 14.5px; margin-top: 12px; display: none; padding: 10px 14px; border-radius: 8px; }
.form-status.show { display: block; }
.form-status.ok { background: hsla(150,60%,45%,.15); color: #4ade80; }
.form-status.err { background: hsla(0,70%,50%,.15); color: #f87171; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid hsla(var(--foreground)/.08); padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h5 { font-size: 15px; margin-bottom: 16px; }
.footer-links-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-links-cols { display: flex; gap: 44px; }
.footer-links { display: grid; gap: 10px; }
@media (max-width: 420px) { .footer-links-cols { gap: 26px; } }
.footer-links a { font-size: 15px; color: hsl(var(--muted-foreground)); transition: color .2s; }
.footer-links a:hover { color: hsl(var(--brand)); }
.footer-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid hsla(var(--foreground)/.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13.5px; color: hsl(var(--muted-foreground)); }
.social-row { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6,4,2,.92); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox-inner { max-width: 900px; width: 100%; }
.lightbox-inner img { width: 100%; border-radius: var(--radius-md); max-height: 72vh; object-fit: contain; background: #000; }
.lightbox-caption { color: #fff; margin-top: 16px; text-align: center; }
.lightbox-caption strong { display: block; font-family: var(--font-display); font-size: 17px; margin-bottom: 4px; }
.lightbox-caption span { font-size: 14px; color: rgba(255,255,255,.75); }
.lightbox-close { position: absolute; top: 20px; left: 24px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: flex; align-items: center; justify-content: center; }

/* ---------- Modal (admin login) ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 210; background: rgba(6,4,2,.7); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { width: 100%; max-width: 380px; border-radius: var(--radius-lg); padding: 28px; }
.modal-box h3 { font-size: 18px; margin-bottom: 6px; }
.modal-box p { font-size: 14.5px; color: hsl(var(--muted-foreground)); margin-bottom: 18px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; padding: 12px; }

/* ---------- Chatbot ---------- */
.chat-fab {
  position: fixed; bottom: 24px; left: 24px; z-index: 150; width: 66px; height: 66px; border-radius: 50%;
  background: hsl(var(--brand)); color: #171310; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -10px hsla(var(--brand)/.6); border: none; transition: transform .2s;
  animation: robotFloat 3.4s ease-in-out infinite;
}
.chat-fab:hover { transform: scale(1.07); }
.chat-fab.fab-pulse { animation: robotFloat 3.4s ease-in-out infinite, fabPulse .26s ease-out; }
@keyframes fabPulse {
  0% { transform: scale(1); }
  45% { transform: scale(.92) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}
.chat-fab .ping { position: absolute; top: -3px; right: -3px; width: 14px; height: 14px; background: #ef4444; border-radius: 50%; border: 2px solid hsl(var(--background)); z-index: 2; }

/* ---------- الروبوت ---------- */
.robot-svg { width: 42px; height: 42px; overflow: visible; }
.robot-svg.mini { width: 34px; height: 34px; }
@keyframes robotFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.robot-antenna-dot { animation: antennaPulse 1.8s ease-in-out infinite; transform-origin: 50px 4px; }
@keyframes antennaPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.robot-eye { transition: transform .25s ease; transform-origin: center; }
.robot-eyes.blink .robot-eye { transform: scaleY(.12); }
.robot-eyes.bored .robot-eye { transform: scaleY(.55) translateY(2px); }
.robot-pupil { transition: transform .12s ease-out; }
.robot-mouth { transition: d .3s ease; }

.robot-svg.robot-bored { animation: robotFloat 3.4s ease-in-out infinite, robotBoredTilt 2.6s ease-in-out infinite; }
@keyframes robotBoredTilt { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }

.robot-svg.robot-happy { animation: robotHappyBounce .5s ease-in-out 3; }
@keyframes robotHappyBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-9px) scale(1.06); }
  60% { transform: translateY(0) scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab, .robot-svg.robot-bored, .robot-svg.robot-happy, .robot-antenna-dot { animation: none; }
}

.chat-window {
  position: fixed; bottom: 98px; left: 24px; z-index: 150; width: 360px; max-width: calc(100vw - 32px);
  height: 500px; max-height: 72vh;
  border-radius: var(--radius-lg); display: none; flex-direction: column; overflow: hidden;
  transform-origin: 40px calc(100% + 52px); /* نقطة ارتكاز الحركة عند زر البوت العائم */
}
.chat-window.open { display: flex; }

/* ---------- حركة انبثاق/تصغير خفيفة وسلسة شبيهة بتأثير "الجني" في ماك عند فتح/تصغير النوافذ ---------- */
.chat-window.genie-open { animation: chatGenieOpen .38s cubic-bezier(.22,.75,.3,1) both; }
.chat-window.genie-close { animation: chatGenieClose .28s cubic-bezier(.45,0,.7,.2) both; }
@keyframes chatGenieOpen {
  0%   { opacity: 0; transform: scale(.5, .5) translate(4%, 22%); border-radius: 38px; }
  60%  { opacity: 1; transform: scale(1.015, .99) translate(-.5%, -1%); border-radius: var(--radius-lg); }
  100% { opacity: 1; transform: scale(1, 1) translate(0, 0); border-radius: var(--radius-lg); }
}
@keyframes chatGenieClose {
  0%   { opacity: 1; transform: scale(1, 1) translate(0, 0); border-radius: var(--radius-lg); }
  100% { opacity: 0; transform: scale(.5, .5) translate(4%, 22%); border-radius: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-window.genie-open, .chat-window.genie-close { animation: none; }
}
.chat-head { padding: 16px 18px; background: hsla(var(--brand)/.12); display: flex; align-items: center; gap: 10px; border-bottom: 1px solid hsla(var(--foreground)/.08); }
.chat-head img { width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--secondary)); padding: 5px; }
.chat-head strong { display: block; font-size: 14px; }
.chat-head span { font-size: 12.5px; color: hsl(var(--muted-foreground)); display: flex; align-items: center; gap: 5px; }
.chat-head span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.chat-head button { margin-inline-start: auto; color: hsl(var(--muted-foreground)); }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.7; }
.chat-msg.bot { align-self: flex-start; background: hsl(var(--secondary)); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: hsl(var(--brand)); color: #171310; border-bottom-right-radius: 4px; }
.chat-msg.typing { display: flex; gap: 4px; align-items: center; padding: 14px; }
.chat-msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--muted-foreground)); animation: blink 1.2s infinite ease-in-out; }
.chat-msg.typing span:nth-child(2) { animation-delay: .2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.chat-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.chat-quick button { font-size: 13px; padding: 7px 12px; border-radius: 999px; background: hsl(var(--secondary)); color: hsl(var(--foreground)); border: 1px solid hsla(var(--foreground)/.1); }
.chat-quick button:hover { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }

.chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid hsla(var(--foreground)/.08); }
.chat-input-row input { flex: 1; background: hsl(var(--secondary)); border: 1px solid hsla(var(--foreground)/.12); border-radius: 10px; padding: 11px 14px; color: hsl(var(--foreground)); font-family: inherit; font-size: 14.5px; }
.chat-input-row input:focus { outline: none; border-color: hsl(var(--brand)); }
.chat-input-row button { width: 42px; height: 42px; border-radius: 10px; background: hsl(var(--brand)); color: #171310; display: flex; align-items: center; justify-content: center; flex: none; }
.chat-input-row button svg { width: 18px; height: 18px; }

/* ---------- زر العودة للأعلى ---------- */
.to-top-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 140; width: 46px; height: 46px; border-radius: 50%;
  color: hsl(var(--foreground));
  display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, border-color .2s;
}
.to-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
/* يمنع تداخل زر العودة للأعلى مع نافذة الدردشة المفتوحة على الشاشات الضيقة */
body.chat-open .to-top-btn { opacity: 0 !important; visibility: hidden !important; }
.to-top-btn:hover { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }

/* reveal-on-scroll (single orchestrated effect) */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* scrollbar in chat */
.chat-body::-webkit-scrollbar { width: 5px; }
.chat-body::-webkit-scrollbar-thumb { background: hsla(var(--foreground)/.2); border-radius: 4px; }
