/* ============================================
   RESET
   ============================================ */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
img,svg{display:block;max-width:100%}
button{font-family:inherit}

/* ============================================
   THEME TOKENS — Corporate / Accounting
   ============================================ */
:root,
[data-theme="light"]{
  /* الأزرق المؤسسي */
  --primary:#1E40AF;
  --primary-dark:#1E3A8A;
  --primary-deep:#172554;
  --primary-soft:rgba(30,64,175,.06);
  --primary-line:rgba(30,64,175,.22);

  /* الألوان الأساسية */
  --bg:#EEF2F6;
  --bg-2:#ffffff;
  --card:#ffffff;
  --card-2:#F8FAFC;

  /* الحدود */
  --line:#CBD5E1;
  --line-2:#94A3B8;
  --line-soft:#E2E8F0;

  /* الهيدر والـ tabs */
  --navy:#1E293B;
  --navy-deep:#0F172A;
  --navy-border:#334155;

  /* النصوص */
  --text:#0F172A;
  --text-2:#1E293B;
  --muted:#64748B;
  --muted-2:#94A3B8;

  /* حالات */
  --green:#15803D;
  --green-dark:#14532D;
  --green-soft:rgba(21,128,61,.10);
  --red:#B91C1C;
  --red-soft:rgba(185,28,28,.08);
  --amber:#B45309;
  --amber-soft:rgba(180,83,9,.10);

  /* WhatsApp */
  --wa:#25D366;
  --wa-dark:#128C7E;

  /* الأشكال */
  --radius:4px;
  --radius-sm:3px;
  --radius-lg:6px;

  /* الظلال */
  --shadow:0 1px 3px rgba(15,23,42,.08);
  --shadow-md:0 4px 12px rgba(15,23,42,.10);
  --shadow-lg:0 12px 28px rgba(15,23,42,.15);

  --featured-bg:linear-gradient(180deg,#EFF6FF 0%,#ffffff 55%);
}

[data-theme="dark"]{
  --primary:#3B82F6;
  --primary-dark:#2563EB;
  --primary-deep:#1E40AF;
  --primary-soft:rgba(59,130,246,.10);
  --primary-line:rgba(59,130,246,.25);

  --bg:#0A0A0A;
  --bg-2:#0F172A;
  --card:#141414;
  --card-2:#1a1a1a;

  --line:#2A2A2A;
  --line-2:#3A3A3A;
  --line-soft:#242424;

  --navy:#0F172A;
  --navy-deep:#020617;
  --navy-border:#1E293B;

  --text:#FFFFFF;
  --text-2:#E6E6E6;
  --muted:#9A9A9A;
  --muted-2:#6A6A6A;

  --green:#22C55E;
  --green-dark:#15803D;
  --green-soft:rgba(34,197,94,.12);
  --red:#EF4444;
  --red-soft:rgba(239,68,68,.12);
  --amber:#F59E0B;
  --amber-soft:rgba(245,158,11,.12);

  --shadow:0 1px 3px rgba(0,0,0,.45);
  --shadow-md:0 4px 12px rgba(0,0,0,.55);
  --shadow-lg:0 12px 28px rgba(0,0,0,.65);

  --featured-bg:linear-gradient(180deg,rgba(59,130,246,.08) 0%,var(--card) 55%);
}

/* ============================================
   BASE
   ============================================ */
body{
  font-family:'Cairo',system-ui,-apple-system,'Segoe UI',sans-serif;
  background:var(--bg);
  color:var(--text);
  font-size:13.5px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
  transition:background .25s ease,color .25s ease;
}

.container{max-width:1240px;margin:0 auto;padding:0 20px}

/* ============================================
   TOP CONTROLS
   ============================================ */
.top-actions{
  position:fixed;top:16px;left:16px;z-index:120;
  display:flex;gap:8px;align-items:center;
}
.theme-toggle{
  width:42px;height:42px;border-radius:var(--radius);
  background:var(--card);
  border:1px solid var(--line);
  color:var(--text);
  display:grid;place-items:center;
  cursor:pointer;
  box-shadow:var(--shadow);
  transition:.15s;
}
.theme-toggle:hover{
  border-color:var(--primary);
  color:var(--primary);
  box-shadow:0 4px 12px rgba(30,64,175,.20);
}
.theme-toggle svg{width:20px;height:20px}
[data-theme="light"] .theme-toggle .icon-sun{display:none}
[data-theme="dark"]  .theme-toggle .icon-moon{display:none}

/* ============================================
   HERO
   ============================================ */
.hero{
  background:linear-gradient(180deg,var(--navy-deep) 0%,var(--navy) 100%);
  border-bottom:3px solid var(--primary);
  padding:22px 0;
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size:40px 40px;
  pointer-events:none;
}
.hero .container{position:relative;z-index:2}

.brand{
  display:flex;align-items:center;gap:18px;
  justify-content:center;
}
.brand-logo-img{
  height:58px;width:auto;
  object-fit:contain;
  background:#fff;
  padding:6px;
  border-radius:var(--radius);
  border:1px solid var(--navy-border);
}
.brand-text{display:flex;flex-direction:column;text-align:right}
.brand h1{
  font-size:23px;font-weight:900;
  color:#fff;letter-spacing:-.2px;line-height:1.2;
}
.brand p{
  font-size:12.5px;color:#94A3B8;
  font-weight:600;line-height:1.4;margin-top:3px;
  letter-spacing:.3px;
}

/* ============================================
   NAVBAR / TABS
   ============================================ */
.tabs-wrap{
  position:sticky;top:0;z-index:60;
  background:var(--bg-2);
  border-bottom:1px solid var(--line);
  box-shadow:var(--shadow);
}
.navbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:20px;padding:12px 0;
}
.tabs{
  display:flex;gap:0;overflow-x:auto;
  scrollbar-width:none;flex:1;min-width:0;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
  padding:3px;
}
.tabs::-webkit-scrollbar{display:none}
.tab{
  flex-shrink:0;cursor:pointer;white-space:nowrap;
  background:transparent;color:var(--muted);
  border:none;
  font-size:13px;font-weight:700;
  padding:9px 20px;border-radius:var(--radius-sm);
  transition:.15s;
  letter-spacing:.2px;
}
.tab:hover{color:var(--text);background:var(--card-2)}
.tab.active{
  background:var(--primary);
  color:#fff;
  box-shadow:0 2px 6px rgba(30,64,175,.30);
}

.nav-meta{
  display:flex;gap:0;flex-shrink:0;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
  overflow:hidden;
}
.nav-meta-item{
  display:flex;flex-direction:column;
  padding:7px 16px;
  background:transparent;
  border-left:1px solid var(--line);
  min-width:118px;
  transition:.15s;
}
.nav-meta-item:last-child{border-left:none}
.nav-meta-item:hover{background:var(--primary-soft)}
.nav-meta-item small{
  font-size:10px;color:var(--muted);
  font-weight:600;line-height:1.3;
  letter-spacing:.3px;text-transform:uppercase;
}
.nav-meta-item strong{
  font-size:12px;font-weight:800;
  color:var(--text);line-height:1.3;
  white-space:nowrap;font-family:'Consolas',monospace;
}
.nav-meta-item strong.text-ar{font-family:inherit}

/* ============================================
   PANELS
   ============================================ */
main{padding:34px 0 90px}
.panel{display:none;animation:fade .25s ease}
.panel.active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ============================================
   SECTION HEAD
   ============================================ */
.sec-head{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px 22px;
  margin-bottom:22px;
  border-right:4px solid var(--primary);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.sec-head-text{text-align:right;flex:1;min-width:240px}
.sec-head h3{
  font-size:18px;font-weight:800;
  color:var(--text);margin-bottom:3px;
  letter-spacing:-.2px;
  display:flex;align-items:center;gap:8px;
}
.sec-head h3::before{
  content:"";display:inline-block;
  width:6px;height:6px;border-radius:50%;
  background:var(--primary);
}
.sec-head p{
  color:var(--muted);font-size:12.5px;
  line-height:1.7;font-weight:500;
}
.sec-head-meta{
  display:flex;gap:8px;flex-shrink:0;
}
.sec-head-chip{
  padding:6px 12px;
  background:var(--primary-soft);
  border:1px solid var(--primary-line);
  border-radius:var(--radius-sm);
  font-size:11.5px;font-weight:700;
  color:var(--primary);
  white-space:nowrap;
}
.sec-head-chip.green{
  background:var(--green-soft);
  border-color:rgba(21,128,61,.25);
  color:var(--green);
}

/* ============================================
   CAROUSEL
   ============================================ */
.carousel{position:relative;padding:0 52px}
.carousel-viewport{
  overflow:hidden;
  padding:10px 0 20px;
  margin:-10px 0 -20px;
  touch-action:pan-y;
  -webkit-user-select:none;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.carousel-track{
  display:flex;gap:16px;align-items:stretch;
  transition:transform .32s cubic-bezier(.4,.2,.2,1);
  will-change:transform;
}
.carousel-slide{
  flex:0 0 calc((100% - 32px) / 3);
  min-width:0;display:flex;
}
.carousel-slide > *{flex:1 1 auto;width:100%;min-width:0}

.carousel-arrow{
  position:absolute;top:50%;transform:translateY(-50%);
  width:40px;height:40px;border-radius:var(--radius);
  background:var(--card);border:1px solid var(--line);
  color:var(--text);display:grid;place-items:center;
  cursor:pointer;z-index:10;transition:.15s;
  box-shadow:var(--shadow);
  -webkit-tap-highlight-color:transparent;
}
.carousel-arrow:hover:not(:disabled){
  background:var(--primary);
  color:#fff;border-color:var(--primary);
  box-shadow:0 4px 12px rgba(30,64,175,.30);
}
.carousel-arrow:disabled{opacity:.35;cursor:not-allowed}
.carousel-arrow svg{
  width:18px;height:18px;stroke:currentColor;fill:none;
  stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;
}
.carousel-arrow.prev{right:0}
.carousel-arrow.next{left:0}

.carousel-dots{
  display:flex;justify-content:center;align-items:center;
  gap:6px;margin-top:22px;
}
.carousel-dot{
  width:24px;height:5px;border-radius:99px;
  background:var(--line);border:none;cursor:pointer;
  transition:.2s;padding:0;
  -webkit-tap-highlight-color:transparent;
}
.carousel-dot:hover{background:var(--line-2)}
.carousel-dot.active{
  width:36px;
  background:var(--primary);
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.card{
  position:relative;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  display:flex;flex-direction:column;
  overflow:hidden;height:100%;
  transition:border-color .15s,box-shadow .15s;
}
.card:hover{
  border-color:var(--primary);
  box-shadow:0 8px 22px rgba(30,64,175,.12);
}
.card-header{
  background:linear-gradient(180deg,#F8FAFC 0%,#F1F5F9 100%);
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
[data-theme="dark"] .card-header{
  background:linear-gradient(180deg,#1a1a1a 0%,#141414 100%);
}
.card-header .title-wrap{
  display:flex;align-items:center;gap:10px;
  text-align:right;flex:1;min-width:0;
}
.card-icon{
  width:36px;height:36px;border-radius:var(--radius-sm);
  display:grid;place-items:center;font-size:18px;
  background:var(--primary-soft);
  border:1px solid var(--primary-line);
  color:var(--primary);
  flex-shrink:0;
}
.card-header h4{
  font-size:14px;font-weight:800;
  color:var(--text);letter-spacing:-.2px;
  line-height:1.3;
}
.card-tag{
  font-size:10.5px;font-weight:700;
  color:var(--primary);
  background:var(--primary-soft);
  border:1px solid var(--primary-line);
  padding:2px 9px;border-radius:var(--radius-sm);
  letter-spacing:.3px;
  white-space:nowrap;
}

.card-body{padding:14px 16px;flex:1;display:flex;flex-direction:column}

.card-desc{
  font-size:12.5px;color:var(--muted);
  padding-bottom:12px;
  border-bottom:1px solid var(--line-soft);
  margin-bottom:12px;
  line-height:1.7;
  min-height:58px;
}

.features{
  list-style:none;flex:1;
  display:flex;flex-direction:column;gap:7px;
}
.features li{
  position:relative;
  font-size:12.5px;color:var(--text-2);
  padding-right:22px;
  line-height:1.55;
  padding-top:1px;
}
.features li::before{
  content:"✓";
  position:absolute;
  right:0;top:0;
  width:16px;height:16px;
  border-radius:2px;
  background:var(--green-soft);
  color:var(--green);
  display:grid;place-items:center;
  font-size:10px;font-weight:900;
  line-height:1;
}

.card-footer{
  padding:12px 16px;
  background:var(--card-2);
  border-top:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.price-block{line-height:1.2;text-align:right}
.price-block small{
  display:block;font-size:10.5px;
  color:var(--muted);font-weight:600;
  margin-bottom:2px;letter-spacing:.2px;
}
.price-block .amount{
  font-size:20px;font-weight:900;
  color:var(--text);
  font-family:'Consolas',monospace;
  letter-spacing:-.5px;
}
.price-block .currency{
  font-size:12px;font-weight:700;
  color:var(--primary);
  margin-right:3px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  font-family:inherit;font-size:12.5px;font-weight:700;
  padding:9px 16px;border-radius:var(--radius-sm);border:1px solid transparent;
  cursor:pointer;text-decoration:none;white-space:nowrap;
  transition:.15s;
  line-height:1.3;
  letter-spacing:.2px;
}
.btn svg{width:15px;height:15px;flex-shrink:0}
.btn-wa{
  background:linear-gradient(180deg,var(--wa) 0%,var(--wa-dark) 100%);
  color:#fff;
  box-shadow:0 2px 6px rgba(37,211,102,.28);
}
.btn-wa:hover{
  filter:brightness(1.05);
  box-shadow:0 4px 12px rgba(37,211,102,.45);
}
.btn-block{width:100%}
.btn-lg{padding:12px 20px;font-size:13.5px}

/* ============================================
   PACKAGES
   ============================================ */
.pack{
  position:relative;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  display:flex;flex-direction:column;height:100%;
  overflow:hidden;
  transition:border-color .15s,box-shadow .15s;
}
.pack:hover{
  border-color:var(--primary);
  box-shadow:0 10px 28px rgba(30,64,175,.15);
}
.pack.featured{
  border-color:var(--primary);
  border-width:2px;
  background:var(--featured-bg);
}
.pack.featured:hover{
  box-shadow:0 12px 32px rgba(30,64,175,.22);
}

.pack-badge{
  position:absolute;top:0;right:0;
  background:var(--primary);
  color:#fff;font-size:10.5px;font-weight:800;
  padding:5px 14px;
  border-radius:0 var(--radius) 0 var(--radius);
  letter-spacing:.3px;
  box-shadow:0 2px 8px rgba(30,64,175,.30);
}

.pack-header{
  padding:20px 18px 16px;
  border-bottom:1px dashed var(--line);
  text-align:center;
  background:linear-gradient(180deg,var(--primary-soft) 0%,transparent 100%);
}
.pack-emoji{
  font-size:32px;display:block;margin-bottom:6px;line-height:1;
}
.pack-header h4{
  font-size:17px;font-weight:900;
  color:var(--text);letter-spacing:-.3px;
  margin-bottom:4px;
}
.pack-header .sub{
  font-size:11.5px;color:var(--muted);
  line-height:1.6;font-weight:500;
  min-height:36px;
}

.pack-price{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--line-soft);
  line-height:1.2;
}
.pack-price .old{
  display:block;font-size:12px;
  color:var(--muted-2);
  text-decoration:line-through;
  margin-bottom:3px;
  font-family:'Consolas',monospace;
}
.pack-price .amount{
  font-size:32px;font-weight:900;
  color:var(--text);
  font-family:'Consolas',monospace;
  letter-spacing:-1.2px;
}
.pack-price .currency{
  font-size:13px;font-weight:700;
  color:var(--primary);
  margin-right:4px;
}

.pack-body{padding:16px 18px;flex:1;display:flex;flex-direction:column}
.pack-list{
  list-style:none;margin-bottom:14px;flex:1;
  display:flex;flex-direction:column;gap:8px;
}
.pack-list li{
  position:relative;
  font-size:12.5px;color:var(--text-2);
  padding-right:24px;
  line-height:1.55;
}
.pack-list li::before{
  content:"✓";
  position:absolute;right:0;top:0;
  width:17px;height:17px;border-radius:50%;
  background:var(--green-soft);
  color:var(--green);
  display:grid;place-items:center;
  font-size:10px;font-weight:900;
  line-height:1;
}

.pack-note{
  background:var(--amber-soft);
  border:1px dashed rgba(180,83,9,.35);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  font-size:11.5px;
  color:var(--text-2);
  margin-bottom:14px;
  line-height:1.7;
  font-weight:500;
}
.pack-note b{color:var(--amber);font-weight:800}

.pack-footer{
  padding:12px 18px;
  border-top:1px solid var(--line);
  background:var(--card-2);
}

/* ============================================
   SYSTEM CARDS — برامج وأنظمة إدارية
   ============================================ */
.system-card{
  position:relative;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  display:flex;flex-direction:column;
  overflow:hidden;height:100%;
  transition:border-color .15s,box-shadow .15s;
}
.system-card:hover{
  border-color:var(--primary);
  box-shadow:0 10px 28px rgba(30,64,175,.15);
}

.system-card .system-image{
  position:relative;
  width:100%;
  aspect-ratio:16 / 10;
  background:linear-gradient(135deg,#1E40AF 0%,#172554 100%);
  overflow:hidden;
  border-bottom:3px solid var(--primary);
}
.system-card .system-image img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
  transition:transform .5s ease;
}
.system-card:hover .system-image img{transform:scale(1.04)}

.system-card .system-image .image-badge{
  position:absolute;
  top:10px;right:10px;
  background:rgba(15,23,42,.85);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  color:#fff;
  padding:5px 12px;
  border-radius:var(--radius-sm);
  font-size:11px;font-weight:800;
  letter-spacing:.3px;
  border:1px solid rgba(255,255,255,.15);
}
.system-card .system-image .image-badge.green{
  background:rgba(21,128,61,.92);
}

.system-card .system-header{
  background:linear-gradient(180deg,#F8FAFC 0%,#F1F5F9 100%);
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
[data-theme="dark"] .system-card .system-header{
  background:linear-gradient(180deg,#1a1a1a 0%,#141414 100%);
}
.system-card .system-header h4{
  font-size:15px;font-weight:900;
  color:var(--text);letter-spacing:-.2px;
  line-height:1.3;
}
.system-card .system-header .tag{
  font-size:10.5px;font-weight:700;
  color:var(--primary);
  background:var(--primary-soft);
  border:1px solid var(--primary-line);
  padding:2px 9px;border-radius:var(--radius-sm);
  white-space:nowrap;
}

.system-card .system-body{
  padding:14px 16px;
  flex:1;
  display:flex;flex-direction:column;
}
.system-card .system-desc{
  font-size:12.5px;color:var(--muted);
  padding-bottom:12px;
  border-bottom:1px solid var(--line-soft);
  margin-bottom:12px;
  line-height:1.75;
}
.system-card .system-desc b{color:var(--primary);font-weight:800}

.system-card .system-features{
  list-style:none;
  display:flex;flex-direction:column;gap:7px;
  margin-bottom:14px;
  flex:1;
}
.system-card .system-features li{
  position:relative;
  font-size:12.5px;color:var(--text-2);
  padding-right:22px;
  line-height:1.55;
}
.system-card .system-features li::before{
  content:"✓";
  position:absolute;right:0;top:0;
  width:16px;height:16px;
  border-radius:2px;
  background:var(--green-soft);
  color:var(--green);
  display:grid;place-items:center;
  font-size:10px;font-weight:900;
  line-height:1;
}
.system-card .system-features li b{
  color:var(--text);font-weight:800;
}

.system-card .system-highlight{
  background:var(--primary-soft);
  border:1px dashed var(--primary-line);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  font-size:11.5px;
  color:var(--primary);
  font-weight:600;
  line-height:1.7;
  margin-bottom:14px;
}
.system-card .system-highlight b{color:var(--primary-dark);font-weight:900}

.system-card .system-footer{
  padding:12px 16px;
  background:var(--card-2);
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.system-card .system-price{line-height:1.2;text-align:right}
.system-card .system-price small{
  display:block;font-size:10.5px;
  color:var(--muted);font-weight:600;
  margin-bottom:2px;
}
.system-card .system-price .amount{
  font-size:19px;font-weight:900;
  color:var(--text);
  font-family:'Consolas',monospace;
  letter-spacing:-.5px;
}
.system-card .system-price .currency{
  font-size:12px;font-weight:700;
  color:var(--primary);
  margin-right:3px;
}

/* شبكة الأنظمة (2 عمود) */
.systems-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}
@media (max-width:900px){
  .systems-grid{grid-template-columns:1fr;}
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio{
  margin-top:52px;
  padding-top:44px;
  border-top:1px solid var(--line);
}
.portfolio-head{
  background:var(--card);
  border:1px solid var(--line);
  border-right:4px solid var(--primary);
  border-radius:var(--radius);
  padding:16px 22px;
  margin-bottom:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.portfolio-head h4{
  font-size:16px;font-weight:800;
  color:var(--text);letter-spacing:-.2px;
  display:flex;align-items:center;gap:8px;
  margin-bottom:3px;
}
.portfolio-head h4::before{
  content:"";display:inline-block;
  width:6px;height:6px;border-radius:50%;
  background:var(--primary);
}
.portfolio-head p{
  color:var(--muted);font-size:12.5px;
  line-height:1.7;font-weight:500;
}
.portfolio-count{
  background:var(--primary-soft);
  border:1px solid var(--primary-line);
  color:var(--primary);
  padding:6px 14px;
  border-radius:var(--radius-sm);
  font-size:12px;font-weight:800;
  font-family:'Consolas',monospace;
  white-space:nowrap;
}

.portfolio-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:12px;
}

.portfolio-item{
  position:relative;
  border:1px solid var(--line);
  background:var(--card);
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
  aspect-ratio:4 / 3;
  padding:0;
  transition:border-color .15s,box-shadow .15s;
  -webkit-tap-highlight-color:transparent;
}
.portfolio-item:hover{
  border-color:var(--primary);
  box-shadow:0 6px 20px rgba(30,64,175,.18);
}
.portfolio-item img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
  transition:transform .4s ease;
}
.portfolio-item:hover img{transform:scale(1.05)}

.portfolio-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(to top,
              rgba(15,23,42,.90) 0%,
              rgba(15,23,42,.40) 60%,
              transparent 100%);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:flex-start;
  padding:14px;
  gap:2px;
  opacity:0;
  transition:opacity .25s;
  text-align:right;
  pointer-events:none;
}
.portfolio-item:hover .portfolio-overlay{opacity:1}

.portfolio-overlay .zoom-icon{
  position:absolute;
  top:10px;left:10px;
  width:34px;height:34px;
  border-radius:var(--radius-sm);
  background:rgba(30,64,175,.85);
  border:1px solid rgba(255,255,255,.25);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  display:grid;place-items:center;
  transform:scale(.85);
  transition:transform .25s;
}
.portfolio-item:hover .zoom-icon{transform:scale(1)}
.portfolio-overlay .zoom-icon svg{
  width:15px;height:15px;
  stroke:#fff;fill:none;stroke-width:2.5;
  stroke-linecap:round;stroke-linejoin:round;
}
.portfolio-overlay strong{
  font-size:13px;
  font-weight:800;
  line-height:1.4;
  text-shadow:0 1px 3px rgba(0,0,0,.5);
}
.portfolio-overlay small{
  font-size:11px;
  color:rgba(255,255,255,.75);
  font-weight:600;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox{
  position:fixed;inset:0;
  background:rgba(6,6,10,.94);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  z-index:200;
  display:none;
  align-items:center;justify-content:center;
  padding:24px;
  animation:lbFade .22s ease;
}
.lightbox.open{display:flex}
@keyframes lbFade{from{opacity:0}to{opacity:1}}

.lightbox-content{
  position:relative;
  max-width:1100px;width:100%;
  max-height:92vh;
  display:flex;flex-direction:column;
  align-items:center;gap:12px;
}
.lightbox-img-wrap{
  position:relative;
  max-width:100%;
  max-height:calc(92vh - 80px);
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.15);
  box-shadow:0 30px 80px rgba(0,0,0,.6);
  background:rgba(255,255,255,.04);
}
.lightbox img{
  max-width:100%;
  max-height:calc(92vh - 80px);
  display:block;object-fit:contain;
}
.lightbox-caption{
  color:#fff;font-size:13.5px;
  font-weight:700;text-align:center;
  line-height:1.5;
}
.lightbox-caption small{
  display:block;
  color:rgba(255,255,255,.6);
  font-size:11.5px;font-weight:500;
  margin-top:2px;
}
.lightbox-close{
  position:absolute;
  top:-50px;left:0;
  width:40px;height:40px;
  border-radius:var(--radius-sm);
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;cursor:pointer;
  font-size:18px;font-weight:400;
  display:grid;place-items:center;
  transition:.15s;
}
.lightbox-close:hover{
  background:var(--red);
  border-color:var(--red);
}
.lightbox-nav{
  position:absolute;
  top:50%;transform:translateY(-50%);
  width:46px;height:46px;
  border-radius:var(--radius);
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;cursor:pointer;
  display:grid;place-items:center;
  transition:.15s;z-index:5;
  -webkit-tap-highlight-color:transparent;
}
.lightbox-nav:hover{
  background:var(--primary);
  border-color:var(--primary);
}
.lightbox-nav svg{
  width:20px;height:20px;
  stroke:currentColor;fill:none;
  stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;
}
.lightbox-nav.prev{right:-64px}
.lightbox-nav.next{left:-64px}

@media (max-width:1100px){
  .lightbox-nav.prev{right:8px}
  .lightbox-nav.next{left:8px}
}

/* ============================================
   NOTES
   ============================================ */
.notes{
  margin-top:40px;
  background:var(--card);
  border:1px solid var(--line);
  border-right:4px solid var(--amber);
  border-radius:var(--radius);
  padding:18px 22px;
}
.notes h5{
  font-size:14px;font-weight:800;
  color:var(--text);
  margin-bottom:14px;
  display:flex;align-items:center;gap:8px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line-soft);
}
.notes ul{
  list-style:none;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:10px;
}
.notes li{
  position:relative;
  font-size:12.5px;color:var(--muted);
  padding-right:20px;line-height:1.7;
  font-weight:500;
}
.notes li::before{
  content:"◆";
  position:absolute;right:0;top:4px;
  color:var(--primary);font-size:9px;
}
.notes li.highlight{
  color:var(--green);font-weight:800;
  background:var(--green-soft);
  padding:6px 10px 6px 20px;
  border-radius:var(--radius-sm);
  border-right:2px solid var(--green);
}
.notes li.highlight::before{
  color:var(--green);
  right:6px;top:10px;
}

/* ============================================
   FOOTER
   ============================================ */
footer{
  background:var(--navy-deep);
  color:#94A3B8;
  padding:32px 0;
  text-align:center;
  font-size:12.5px;
  border-top:3px solid var(--primary);
}
footer strong{
  display:block;
  color:#fff;
  font-size:16px;font-weight:800;
  margin-bottom:6px;
  letter-spacing:-.2px;
}
footer .contacts{
  margin-top:14px;
  display:flex;
  justify-content:center;
  gap:0;
  flex-wrap:wrap;
  border:1px solid var(--navy-border);
  border-radius:var(--radius);
  overflow:hidden;
  max-width:640px;
  margin:14px auto 0;
  background:rgba(255,255,255,.03);
}
footer .contacts a,
footer .contacts span{
  color:#CBD5E1;
  text-decoration:none;
  font-weight:600;
  padding:10px 18px;
  border-left:1px solid var(--navy-border);
  transition:.15s;
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:12.5px;
  font-family:'Consolas',monospace;
}
footer .contacts a:last-child,
footer .contacts span:last-child{border-left:none}
footer .contacts a:hover{
  color:#fff;
  background:var(--primary);
}

/* ============================================
   FLOATING WHATSAPP
   ============================================ */
.wa-float{
  position:fixed;bottom:22px;right:22px;z-index:90;
  width:54px;height:54px;border-radius:50%;
  display:grid;place-items:center;
  background:linear-gradient(135deg,var(--wa),var(--wa-dark));
  color:#fff;text-decoration:none;
  box-shadow:0 10px 26px rgba(37,211,102,.42);
  transition:.15s;
}
.wa-float:hover{
  transform:scale(1.08);
  box-shadow:0 14px 32px rgba(37,211,102,.55);
}
.wa-float svg{width:28px;height:28px}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width:1024px){
  .navbar{flex-direction:column;align-items:stretch;gap:10px;padding:10px 0}
  .nav-meta{
    justify-content:center;flex-wrap:wrap;
    border-radius:var(--radius);
  }
  .nav-meta-item{
    flex:1;min-width:100px;text-align:center;align-items:center;
  }
  .carousel-slide{flex:0 0 calc((100% - 16px) / 2)}
  .carousel-track{gap:16px}
}

@media (max-width:760px){
  .hero{padding:12px 0}

  /* ===== الهيدر على الهاتف: لوجو صغير على أقصى اليمين + إخفاء النص ===== */
  .brand{
    flex-direction:row;
    justify-content:flex-start;
    gap:0;
    text-align:right;
  }
  .brand-logo-img{
    height:34px;
    padding:4px;
    border-radius:var(--radius-sm);
    margin-right:0;
  }
  .brand-text{display:none !important;}

  /* ===== إخفاء الـ sec-head بالكامل على الهاتف ===== */
  .sec-head{display:none !important;}

  .tabs{padding:2px}
  .tab{padding:8px 14px;font-size:12px}

  .carousel{padding:0 40px}
  .carousel-slide{flex:0 0 100%}

  .card-footer{flex-direction:column;align-items:stretch}
  .card-footer .btn-wa{width:100%}
  .price-block{text-align:center}

  .pack-header{padding:16px 14px 14px}
  .pack-body{padding:14px}
  .pack-price .amount{font-size:28px}

  .carousel-arrow{width:36px;height:36px}
  .carousel-arrow svg{width:15px;height:15px}
  .carousel-arrow.prev{right:-2px}
  .carousel-arrow.next{left:-2px}

  .wa-float{width:48px;height:48px;bottom:16px;right:16px}
  .wa-float svg{width:24px;height:24px}

  .top-actions{top:10px;left:10px}
  .theme-toggle{width:38px;height:38px}

  .notes{padding:14px 16px}
  .nav-meta-item{min-width:90px;padding:5px 10px}
  .nav-meta-item strong{font-size:11px}

  .system-card .system-footer{flex-direction:column;align-items:stretch}
  .system-card .system-footer .btn{width:100%}
  .system-card .system-price{text-align:center}

  .portfolio{margin-top:36px;padding-top:30px}
  .portfolio-head{padding:14px 16px;flex-direction:column;align-items:flex-start}
  .portfolio-grid{
    grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
    gap:8px;
  }
  .portfolio-overlay{padding:10px}
  .portfolio-overlay strong{font-size:12px}
  .portfolio-overlay small{font-size:10px}
  .portfolio-overlay .zoom-icon{width:28px;height:28px;top:6px;left:6px}
  .portfolio-overlay .zoom-icon svg{width:13px;height:13px}

  .lightbox{padding:12px}
  .lightbox-close{
    top:6px;left:6px;
    background:rgba(0,0,0,.65);
    border-color:rgba(255,255,255,.35);
  }
  .lightbox-nav{width:40px;height:40px}
  .lightbox-nav svg{width:16px;height:16px}
  .lightbox-caption{font-size:12px}

  footer .contacts{flex-direction:column}
  footer .contacts a,
  footer .contacts span{border-left:none;border-top:1px solid var(--navy-border)}
  footer .contacts a:first-child,
  footer .contacts span:first-child{border-top:none}
}

@media (max-width:400px){
  .nav-meta-item{min-width:0;flex:1 1 100px}
  .carousel{padding:0 34px}
  .carousel-arrow{width:32px;height:32px}
  .carousel-arrow svg{width:14px;height:14px}
  .portfolio-grid{grid-template-columns:repeat(2,1fr)}
}
