/* ═══════════════════════════════════════════════════════════
   ITService Iraq — Cyber-Circuit Design System
   Shared stylesheet for all pages
═══════════════════════════════════════════════════════════ */

:root {
  --bg:           #0A192F;
  --surface:      #112240;
  --surface-2:    #1F2942;
  --surface-3:    #2A344D;
  --accent:       #00D4FF;
  --accent-dim:   rgba(0,212,255,0.10);
  --accent-glow:  rgba(0,212,255,0.28);
  --text:         #CCD6F6;
  --text-muted:   #8892B0;
  --border:       #233554;
  --white:        #FFFFFF;
  --success:      #00E676;

  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    16px;
  --nav-h:        72px;
  --ease:         cubic-bezier(0.4,0,0.2,1);
  --t:            0.25s;
  --max-w:        1280px;
}

/* ─── Reset ───────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  background:var(--bg); color:var(--text);
  font-family:var(--font-body); font-size:16px;
  line-height:1.6; overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
a { color:inherit; text-decoration:none; }
ul { list-style:none; }
img { max-width:100%; display:block; }
button { cursor:pointer; font-family:var(--font-body); border:none; background:none; }
input,textarea,select { font-family:var(--font-body); }

/* ─── Accessibility ──────────────────────────────────────── */
.skip-link {
  position:absolute; top:-100px; left:0;
  background:var(--accent); color:var(--bg);
  padding:8px 16px; font-weight:700; z-index:9999;
  border-radius:0 0 var(--radius-sm) 0; transition:top 0.2s;
}
.skip-link:focus { top:0; }
.sr-only {
  position:absolute; width:1px; height:1px; padding:0;
  margin:-1px; overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border-width:0;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container { max-width:var(--max-w); margin:0 auto; padding:0 48px; }
section { scroll-margin-top:var(--nav-h); }

/* ─── Typography ─────────────────────────────────────────── */
.mono-label {
  font-family:var(--font-mono); font-size:11px; font-weight:500;
  letter-spacing:0.14em; color:var(--accent);
  text-transform:uppercase; margin-bottom:14px; display:block;
}
.section-h2 {
  font-size:clamp(1.9rem,3.5vw,2.8rem); font-weight:800;
  color:var(--white); letter-spacing:-0.03em; line-height:1.15; margin-bottom:14px;
}
.section-sub {
  font-size:1.05rem; color:var(--text-muted); line-height:1.75; max-width:520px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--accent); color:var(--bg);
  font-size:14px; font-weight:700; letter-spacing:0.02em;
  padding:12px 28px; border-radius:var(--radius-sm);
  border:none; white-space:nowrap;
  transition:background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn-primary:hover {
  background:#fff;
  box-shadow:0 0 24px var(--accent-glow);
  transform:translateY(-1px);
}
.btn-ghost {
  display:inline-flex; align-items:center; gap:8px;
  background:transparent; color:var(--accent);
  font-size:14px; font-weight:600; letter-spacing:0.02em;
  padding:11px 28px; border-radius:var(--radius-sm);
  border:1.5px solid var(--accent); white-space:nowrap;
  transition:background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn-ghost:hover {
  background:var(--accent-dim);
  box-shadow:0 0 16px var(--accent-glow);
  transform:translateY(-1px);
}
.btn-sm { font-size:13px !important; padding:9px 20px !important; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:28px;
  position:relative; overflow:hidden;
  transition:border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background:linear-gradient(90deg,var(--accent),rgba(0,212,255,0.15));
  opacity:0; transition:opacity 0.3s;
}
.card:hover {
  border-color:rgba(0,212,255,0.35);
  box-shadow:0 0 28px rgba(0,212,255,0.07), 0 8px 24px rgba(0,0,0,0.25);
  transform:translateY(-3px);
}
.card:hover::before { opacity:1; }

.card-icon {
  width:44px; height:44px;
  background:var(--accent-dim); border:1px solid rgba(0,212,255,0.18);
  border-radius:var(--radius-sm);
  display:flex; align-items:center; justify-content:center; margin-bottom:18px;
  color:var(--accent);
}
.card-icon svg { width:20px; height:20px; }
.card h3 {
  font-size:1.05rem; font-weight:700; color:var(--white);
  letter-spacing:-0.01em; margin-bottom:9px;
}
.card p { font-size:0.875rem; color:var(--text-muted); line-height:1.7; margin-bottom:16px; }
.card-cta {
  font-size:13px; font-weight:600; color:var(--accent);
  display:inline-flex; align-items:center; gap:6px;
  transition:gap 0.2s, color 0.2s;
}
.card-cta:hover { gap:10px; color:var(--white); }

/* ─── Feat list ──────────────────────────────────────────── */
.feat-list { margin-bottom:16px; }
.feat-list li {
  font-size:0.85rem; color:var(--text-muted);
  padding:4px 0; display:flex; align-items:center; gap:10px;
}
.feat-list li::before {
  content:''; width:5px; height:5px; flex-shrink:0;
  background:var(--accent); border-radius:50%;
  box-shadow:0 0 5px var(--accent);
}

/* ─── Scroll reveal ──────────────────────────────────────── */
.reveal { opacity:0; transform:translateY(24px); transition:opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }
.d1 { transition-delay:0.10s; }
.d2 { transition-delay:0.18s; }
.d3 { transition-delay:0.26s; }
.d4 { transition-delay:0.34s; }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════ */
#navbar {
  position:fixed; top:0; left:0; right:0;
  height:var(--nav-h); z-index:1000;
  transition:background 0.3s, border-color 0.3s;
  border-bottom:1px solid transparent;
}
#navbar.scrolled {
  background:rgba(10,25,47,0.92);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-bottom-color:var(--border);
}
.nav-inner {
  display:flex; align-items:center; justify-content:space-between;
  height:var(--nav-h);
}
.nav-logo { display:flex; align-items:center; flex-shrink:0; }
.nav-logo img { height:40px; width:auto; }

.nav-links { display:flex; align-items:center; gap:2px; }
.nav-links a {
  font-size:14px; font-weight:500; color:var(--text-muted);
  padding:8px 14px; border-radius:var(--radius-sm);
  transition:color var(--t); position:relative;
}
.nav-links a::after {
  content:''; position:absolute; bottom:4px; left:50%; transform:translateX(-50%);
  width:0; height:2px; background:var(--accent);
  border-radius:2px; transition:width 0.25s;
}
.nav-links a:hover,.nav-links a.active { color:var(--white); }
.nav-links a:hover::after,.nav-links a.active::after { width:55%; }

.nav-right { display:flex; align-items:center; gap:12px; }
.lang-toggle {
  display:flex; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden;
}
.lang-toggle button {
  padding:6px 12px; font-size:11px; font-weight:700;
  font-family:var(--font-mono); color:var(--text-muted);
  transition:color var(--t);
}
.lang-toggle button.active { background:var(--accent); color:var(--bg); }
.lang-toggle button:hover:not(.active) { color:var(--white); }

.hamburger { display:none; flex-direction:column; gap:5px; padding:8px; border-radius:var(--radius-sm); }
.hamburger span { display:block; width:22px; height:2px; background:var(--text); border-radius:2px; transition:transform var(--t), opacity var(--t); }
.hamburger.open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity:0; }
.hamburger.open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position:fixed; top:var(--nav-h); left:0; right:0; bottom:0;
  background:rgba(8,19,42,0.98); backdrop-filter:blur(24px);
  padding:20px 16px 32px;
  z-index:999; flex-direction:column; gap:4px;
  overflow-y:auto;
  /* slide-in animation */
  transform:translateY(-8px); opacity:0;
  pointer-events:none;
  display:flex;
  transition:transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.mobile-menu.open {
  transform:translateY(0); opacity:1;
  pointer-events:auto;
}
.mobile-menu a {
  padding:16px 16px; font-size:16px; font-weight:500;
  color:var(--text-muted); border-radius:var(--radius-sm);
  border-bottom:1px solid var(--border);
  transition:color var(--t), background var(--t);
  /* touch-friendly minimum height */
  min-height:52px; display:flex; align-items:center;
}
.mobile-menu a:last-of-type { border-bottom:none; }
.mobile-menu a:hover, .mobile-menu a:active { color:var(--white); background:var(--surface); }
.mobile-menu .btn-primary { margin-top:16px; justify-content:center; min-height:52px; font-size:15px; }

/* ═══════════════════════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════════════════════ */
.stats-bar { background:var(--surface); border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.stats-inner { display:grid; grid-template-columns:repeat(4,1fr); }
.stat-item { padding:32px 36px; border-right:1px solid var(--border); position:relative; }
.stat-item:last-child { border-right:none; }
.stat-item::after {
  content:''; position:absolute; bottom:0; left:0; right:0; height:2px;
  background:linear-gradient(90deg,transparent,var(--accent),transparent);
  opacity:0; transition:opacity 0.3s;
}
.stat-item:hover::after { opacity:1; }
.stat-val { font-size:2.4rem; font-weight:800; color:var(--accent); letter-spacing:-0.03em; line-height:1; margin-bottom:6px; }
.stat-key { font-family:var(--font-mono); font-size:10px; letter-spacing:0.10em; color:var(--text-muted); text-transform:uppercase; }

/* ═══════════════════════════════════════════════════════════
   CTA BANNER
═══════════════════════════════════════════════════════════ */
.cta-section { padding:100px 0; }
.cta-box {
  background:var(--surface); border:1px solid rgba(0,212,255,0.20);
  border-radius:var(--radius-lg); padding:64px;
  text-align:center; position:relative; overflow:hidden;
}
.cta-box::before {
  content:''; position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:50%; height:1px; background:linear-gradient(90deg,transparent,var(--accent),transparent);
}
.cta-glow {
  position:absolute; width:400px; height:400px;
  background:radial-gradient(circle,rgba(0,212,255,0.07) 0%,transparent 70%);
  top:50%; left:50%; transform:translate(-50%,-50%); border-radius:50%; pointer-events:none;
}
.cta-box h2 { font-size:clamp(1.8rem,3.5vw,2.8rem); font-weight:800; color:var(--white); letter-spacing:-0.03em; margin-bottom:14px; position:relative; }
.cta-box p { font-size:1rem; color:var(--text-muted); max-width:480px; margin:0 auto 36px; line-height:1.75; position:relative; }
.cta-buttons { display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; position:relative; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
#footer { background:#060f1f; border-top:1px solid var(--border); padding:72px 0 0; }
.footer-grid { display:grid; grid-template-columns:2.2fr 1fr 1fr 1fr; gap:48px; margin-bottom:56px; }
.footer-brand-logo { margin-bottom:14px; }
.footer-brand-logo img { height:38px; width:auto; }
.footer-brand p { font-size:0.875rem; color:var(--text-muted); line-height:1.7; max-width:280px; margin-bottom:20px; }
.footer-socials { display:flex; gap:8px; }
.social-btn {
  width:34px; height:34px; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--radius-sm);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-muted); font-size:12px; font-weight:700;
  transition:border-color var(--t), color var(--t), box-shadow var(--t);
}
.social-btn:hover { border-color:var(--accent); color:var(--accent); box-shadow:0 0 10px rgba(0,212,255,0.18); }
.footer-col h4 { font-size:11px; font-weight:700; font-family:var(--font-mono); letter-spacing:0.12em; color:var(--accent); text-transform:uppercase; margin-bottom:18px; }
.footer-col ul li { margin-bottom:9px; }
.footer-col ul li a { font-size:0.875rem; color:var(--text-muted); transition:color var(--t); display:inline-flex; align-items:center; gap:8px; }
.footer-col ul li a::before { content:''; width:4px; height:4px; background:var(--border); border-radius:50%; transition:background 0.2s; flex-shrink:0; }
.footer-col ul li a:hover { color:var(--white); }
.footer-col ul li a:hover::before { background:var(--accent); }
.newsletter-desc { font-size:0.8rem; color:var(--text-muted); margin-bottom:12px; line-height:1.6; }
.newsletter-form { display:flex; gap:8px; }
.newsletter-form input {
  flex:1; min-width:0; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:9px 12px; font-size:13px; color:var(--text);
  outline:none; transition:border-color 0.2s;
}
.newsletter-form input::placeholder { color:var(--text-muted); }
.newsletter-form input:focus { border-color:var(--accent); }
.newsletter-form button {
  background:var(--accent); color:var(--bg); padding:9px 16px;
  border-radius:var(--radius-sm); font-size:12px; font-weight:700;
  white-space:nowrap; transition:background var(--t), box-shadow var(--t);
}
.newsletter-form button:hover { background:#fff; box-shadow:0 0 12px var(--accent-glow); }
.footer-bottom {
  border-top:1px solid var(--border); padding:22px 0;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px;
}
.footer-bottom p { font-size:0.8rem; color:var(--text-muted); font-family:var(--font-mono); }
.footer-bottom-links { display:flex; gap:18px; }
.footer-bottom-links a { font-size:0.8rem; color:var(--text-muted); transition:color 0.2s; }
.footer-bottom-links a:hover { color:var(--accent); }

/* WhatsApp FAB */
.whatsapp-fab {
  position:fixed; bottom:28px; right:28px; z-index:999;
  display:flex; align-items:center; gap:10px;
  background:#25D366; color:#fff;
  padding:12px 20px 12px 14px; border-radius:100px;
  font-size:13px; font-weight:700;
  box-shadow:0 4px 20px rgba(37,211,102,0.35);
  transition:transform var(--t), box-shadow var(--t);
}
.whatsapp-fab:hover { transform:translateY(-2px); box-shadow:0 8px 28px rgba(37,211,102,0.5); }
.whatsapp-fab svg { width:20px; height:20px; flex-shrink:0; }

/* ─── RTL overrides ──────────────────────────────────────── */
[dir="rtl"] { font-family:'Inter','Segoe UI',Tahoma,Arial,sans-serif; }
[dir="rtl"] .nav-inner { flex-direction:row-reverse; }
[dir="rtl"] .nav-links { flex-direction:row-reverse; }
[dir="rtl"] .nav-right { flex-direction:row-reverse; }
[dir="rtl"] .footer-grid { direction:rtl; }
[dir="rtl"] .footer-col ul li a { flex-direction:row-reverse; }
[dir="rtl"] .footer-brand { text-align:right; }
[dir="rtl"] .footer-socials { flex-direction:row-reverse; }
[dir="rtl"] .feat-list li { flex-direction:row-reverse; text-align:right; }
[dir="rtl"] .card-cta { flex-direction:row-reverse; }
[dir="rtl"] .btn-primary,[dir="rtl"] .btn-ghost { flex-direction:row-reverse; }
[dir="rtl"] .mono-label { direction:rtl; letter-spacing:0; }
[dir="rtl"] .cat-inner { flex-direction:row-reverse; }
[dir="rtl"] .svc-inner,[dir="rtl"] .contact-grid,[dir="rtl"] .trust-layout,
[dir="rtl"] .story-grid,[dir="rtl"] .vm-grid { direction:rtl; }
[dir="rtl"] .ci-item { flex-direction:row-reverse; text-align:right; }
[dir="rtl"] .newsletter-form { flex-direction:row-reverse; }
[dir="rtl"] .footer-bottom { flex-direction:row-reverse; }
[dir="rtl"] .footer-bottom-links { flex-direction:row-reverse; }
[dir="rtl"] .pillar { flex-direction:row-reverse; text-align:right; }
[dir="rtl"] .whatsapp-fab { right:auto; left:28px; flex-direction:row-reverse; }
[dir="rtl"] .section-h2,[dir="rtl"] .section-sub { text-align:right; }
[dir="rtl"] .cta-box h2,[dir="rtl"] .cta-box p { direction:rtl; }
[dir="rtl"] .form-group label { text-align:right; }
[dir="rtl"] .form-group input,[dir="rtl"] .form-group select,
[dir="rtl"] .form-group textarea { text-align:right; direction:rtl; }
[dir="rtl"] .contact-info { direction:rtl; }
[dir="rtl"] .story-right { direction:rtl; }
[dir="rtl"] .story-badge h3,[dir="rtl"] .story-badge p { text-align:right; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   960px  tablet breakpoint (hamburger appears)
   768px  small tablet
   640px  large phone
   480px  medium phone
   380px  small phone
═══════════════════════════════════════════════════════════ */

/* ─── 960px — tablet ─────────────────────────────────────── */
@media (max-width:960px) {
  :root { --nav-h: 64px; }
  .container { padding:0 20px; }

  /* Nav */
  .nav-logo img { height:36px; }
  .nav-links { display:none; }
  .nav-right .btn-primary { display:none; }
  .hamburger { display:flex; }
  .mobile-menu a { font-size:16px; padding:15px 16px; }

  /* Stats */
  .stats-inner { grid-template-columns:1fr 1fr; }
  .stat-item { padding:24px 20px; border-bottom:1px solid var(--border); }
  .stat-item:nth-child(2) { border-right:none; }
  .stat-item:nth-child(3),.stat-item:nth-child(4) { border-bottom:none; }
  .stat-val { font-size:2rem; }

  /* CTA */
  .cta-section { padding:64px 0; }
  .cta-box { padding:40px 24px; }
  .cta-box h2 { font-size:1.7rem; }
  .cta-buttons { gap:12px; }

  /* Footer */
  .footer-grid { grid-template-columns:1fr 1fr; gap:32px; }
  #footer { padding:56px 0 0; }

  /* Cards */
  .card { padding:22px; }

  /* Buttons — bigger touch targets */
  .btn-primary,.btn-ghost { padding:13px 24px; font-size:14px; }
}

/* ─── 768px — small tablet ───────────────────────────────── */
@media (max-width:768px) {
  /* Stats: keep 2-col */
  .stat-item { padding:20px 16px; }
  .stat-val { font-size:1.8rem; }

  /* Footer */
  .footer-grid { grid-template-columns:1fr 1fr; gap:28px; }
  .footer-brand { grid-column:1 / -1; }
  .footer-brand p { max-width:100%; }

  /* Section spacing */
  .section-h2 { font-size:1.7rem; }
}

/* ─── 640px — large phone ────────────────────────────────── */
@media (max-width:640px) {
  .container { padding:0 16px; }
  :root { --nav-h: 60px; }

  /* Stats: 1 column */
  .stats-inner { grid-template-columns:1fr; }
  .stat-item { border-right:none !important; border-bottom:1px solid var(--border); }
  .stat-item:last-child { border-bottom:none; }
  .stat-val { font-size:2.2rem; }
  .stat-key { font-size:11px; }

  /* CTA */
  .cta-box { padding:32px 16px; border-radius:var(--radius-md); }
  .cta-box h2 { font-size:1.5rem; }
  .cta-buttons { flex-direction:column; align-items:stretch; }
  .cta-buttons .btn-primary,.cta-buttons .btn-ghost { justify-content:center; }

  /* Footer */
  .footer-grid { grid-template-columns:1fr; gap:28px; }
  .footer-brand { grid-column:auto; }
  .footer-bottom { flex-direction:column; gap:8px; text-align:center; }
  .footer-bottom-links { flex-wrap:wrap; justify-content:center; gap:12px; }
  #footer { padding:44px 0 0; }
  .footer-col h4 { margin-bottom:12px; }

  /* WhatsApp FAB — smaller on mobile */
  .whatsapp-fab { padding:10px 16px 10px 12px; font-size:12px; bottom:20px; right:16px; }
  [dir="rtl"] .whatsapp-fab { left:16px; right:auto; }

  /* Section heading */
  .section-h2 { font-size:1.5rem; }
  .section-sub { font-size:0.95rem; }

  /* Mono label */
  .mono-label { font-size:10px; }

  /* Mobile menu */
  .mobile-menu { padding:12px; }
  .mobile-menu a { font-size:15px; padding:13px 14px; }
}

/* ─── 480px — medium phone ───────────────────────────────── */
@media (max-width:480px) {
  /* Cards */
  .card { padding:18px; }
  .card h3 { font-size:0.95rem; }
  .card p { font-size:0.84rem; }
  .feat-list li { font-size:0.82rem; }

  /* Nav logo */
  .nav-logo img { height:32px; }

  /* Buttons */
  .btn-primary,.btn-ghost { padding:12px 20px; font-size:13px; }
  .btn-sm { padding:10px 16px !important; font-size:12px !important; }

  /* Stats */
  .stat-val { font-size:2rem; }

  /* Footer socials */
  .social-btn { width:38px; height:38px; font-size:14px; }
}

/* ─── 380px — small phone ────────────────────────────────── */
@media (max-width:380px) {
  .container { padding:0 12px; }
  .nav-logo img { height:28px; }
  .cta-box { padding:24px 12px; }
  .cta-box h2 { font-size:1.35rem; }
  .stat-val { font-size:1.8rem; }
  .whatsapp-fab span { display:none; }
  .whatsapp-fab { padding:12px; border-radius:50%; }
}
