/* =============================================
   Programiel - Corporate Website Styles
   Color: #1B4965 primary, #3B82F6 accent
   Font: Heebo (Hebrew), RTL
   ============================================= */

:root {
  --primary-50: #EBF5FF;
  --primary-100: #D6EBFF;
  --primary-200: #ADD6FF;
  --primary-300: #85C2FF;
  --primary-400: #5FA8D3;
  --primary-500: #1B4965;
  --primary-600: #163D54;
  --primary-700: #113143;
  --primary-800: #0C2532;
  --primary-900: #071921;
  --accent: #3B82F6;
  --accent-light: #60A5FA;
  --success: #22C55E;
  --warning: #F59E0B;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary-900); }
::-webkit-scrollbar-thumb { background: var(--primary-600); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Selection */
::selection { background: var(--accent); color: white; }

/* Body */
body {
  overflow-x: hidden;
  font-feature-settings: 'kern' 1;
  -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
}
.navbar.scrolled {
  background: rgba(7, 25, 33, 0.95) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.nav-link {
  position: relative;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
  border-radius: 1px;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Hero */
.hero-gradient {
  background: linear-gradient(135deg, #071921 0%, #0C2532 30%, #1B4965 60%, #163D54 100%);
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 20%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-20px, 10px) rotate(1deg); }
  66% { transform: translate(15px, -15px) rotate(-1deg); }
}

/* Floating particles */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* Grid pattern overlay */
.grid-pattern {
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Section animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Service cards */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(59, 130, 246, 0.1);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(27, 73, 101, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}
.service-card .icon-wrapper {
  transition: all 0.4s;
}
.service-card:hover .icon-wrapper {
  transform: scale(1.1);
  background: var(--accent) !important;
}
.service-card:hover .icon-wrapper svg { color: white; }

/* Process timeline */
.timeline-line {
  position: absolute;
  top: 40px;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-700), var(--accent), var(--primary-700));
  z-index: 0;
}
.timeline-step {
  position: relative;
  z-index: 1;
  transition: all 0.4s;
}
.timeline-step:hover { transform: translateY(-5px); }
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  background: var(--primary-700);
  color: var(--accent-light);
  border: 3px solid var(--accent);
  transition: all 0.4s;
  margin: 0 auto 16px;
}
.timeline-step:hover .step-number {
  background: var(--accent);
  color: white;
  transform: scale(1.15);
}

/* Tech logos */
.tech-item {
  transition: all 0.3s;
  filter: grayscale(0.3);
}
.tech-item:hover {
  filter: grayscale(0);
  transform: scale(1.1);
}

/* Stats counter */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}

/* Project cards */
.project-card {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-6px);
}
.project-card .overlay {
  opacity: 0;
  transition: all 0.4s;
}
.project-card:hover .overlay {
  opacity: 1;
}

/* Testimonial carousel */
.testimonial-track {
  display: flex;
  gap: 24px;
  animation: scrollTestimonials 30s linear infinite;
}
.testimonial-track:hover { animation-play-state: paused; }
@keyframes scrollTestimonials {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Contact form */
.form-input {
  transition: all 0.3s;
  border: 2px solid rgba(59, 130, 246, 0.15);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* CTA Button */
.btn-primary {
  background: linear-gradient(135deg, #3B82F6, #1B4965);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }

/* WhatsApp floating button */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s;
  animation: whatsappPulse 2s ease-in-out infinite;
}
.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}
@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 48px;
  height: 48px;
  background: var(--primary-600);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s;
  cursor: pointer;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--accent);
}

/* Typing effect */
.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--accent-light);
  margin-right: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .timeline-line { display: none; }
  .hero-gradient { min-height: auto; padding-top: 120px; padding-bottom: 80px; }
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY MODES (SI 5568 / WCAG 2.0 AA)
   ═══════════════════════════════════════════ */

/* High Contrast */
html.high-contrast body { background: #000 !important; color: #FFD700 !important; }
html.high-contrast * { border-color: #FFD700 !important; }
html.high-contrast a { color: #00FF00 !important; text-decoration: underline !important; }
html.high-contrast .btn-primary,
html.high-contrast button { background: #FFD700 !important; color: #000 !important; }
html.high-contrast img { filter: contrast(1.5); }

/* Grayscale */
html.grayscale-mode body { filter: grayscale(100%); }

/* Highlight Links */
html.highlight-links a { outline: 3px solid #FFD700 !important; outline-offset: 2px; text-decoration: underline !important; }

/* Readable Font */
html.readable-font * { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: 0.05em !important; word-spacing: 0.1em !important; }

/* Focus visible for keyboard nav (WCAG) */
*:focus-visible {
  outline: 3px solid #60A5FA !important;
  outline-offset: 3px;
}

/* Print */
@media print {
  .navbar, .whatsapp-btn, .back-to-top, .mobile-menu, #accessibilityWidget { display: none !important; }
  body { color: #1e293b; background: white; }
}
