/* APCA Systems - Design System Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-deep: #020204;
  --bg-base: #050508;
  --bg-elevated: #0d0e16;
  --bg-glass: rgba(13, 14, 22, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --primary: #c8ad73; /* Elegant Gold */
  --primary-rgb: 200, 173, 115;
  --accent-cyan: #06b6d4; /* Tech Cyan */
  --accent-blue: #3b82f6; /* Trust Blue */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  /* Gradients */
  --gradient-tech: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  --gradient-gold: linear-gradient(135deg, #e5c07b, #c8ad73, #a38548);
  --gradient-dark: linear-gradient(180deg, var(--bg-base), var(--bg-deep));
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  
  /* Glow Effects */
  --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.35);
  --glow-gold: 0 0 20px rgba(200, 173, 115, 0.25);
  
  /* Fonts */
  --font-en: 'Inter', sans-serif;
  --font-ar: 'Cairo', sans-serif;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Transitions */
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-en);
  overflow-x: hidden;
}

/* Language Override rules */
html[dir="rtl"] {
  font-family: var(--font-ar);
}

body {
  background: var(--gradient-dark);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography & Links */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

p {
  color: var(--text-muted);
}

/* Utility Layout Classes */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 6rem 0;
}

/* Header & Navigation */
header.apca-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(2, 2, 4, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

header.apca-nav.scrolled {
  padding: 0.5rem 0;
  background: rgba(2, 2, 4, 0.9);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-con {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-svg {
  width: 45px;
  height: 45px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  transition: var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.right-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: var(--glow-gold);
}

.btn-primary {
  background: var(--gradient-gold);
  color: #000;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-glass);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.glass-card * {
  position: relative;
  z-index: 1;
}

.glass-card:hover {
  border-color: rgba(200, 173, 115, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--glow-gold);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.shape-1 {
  background: var(--accent-blue);
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  animation: float 25s infinite alternate;
}

.shape-2 {
  background: var(--primary);
  width: 400px;
  height: 400px;
  bottom: -150px;
  left: -50px;
  animation: float 20s infinite alternate-reverse;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-content h1 span {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cta-group {
  display: flex;
  gap: 1.5rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--text-muted);
}

/* Division / Services Cards Grid */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header h2 span {
  color: var(--primary);
}

.section-header p {
  font-size: 1.1rem;
}

.divisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.div-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.div-icon {
  width: 60px;
  height: 60px;
  background: rgba(200, 173, 115, 0.1);
  border: 1px solid rgba(200, 173, 115, 0.2);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.div-card:hover .div-icon {
  background: var(--gradient-gold);
  color: #000;
}

.div-card h3 {
  margin-bottom: 1rem;
}

.div-features {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.div-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.div-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
}

/* Hot Products Showcase */
.products-showcase {
  background: #04050a;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  position: relative;
}

.prod-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.tab-btn:hover,
.tab-btn.active {
  color: #000;
  background: var(--gradient-gold);
  border-color: var(--primary);
  box-shadow: var(--glow-gold);
}

.prod-content-wrapper {
  min-height: 450px;
}

.prod-slide {
  display: none;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.prod-slide.active {
  display: grid;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.prod-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  aspect-ratio: 16/10;
}

.prod-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.prod-image-wrapper:hover .prod-image {
  transform: scale(1.05);
}

.badge-hot {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ef4444;
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 10;
}

.prod-info h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.prod-info h3 span {
  color: var(--primary);
}

.prod-desc {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.prod-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.spec-item h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.spec-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Integrations section */
.integrations-section {
  position: relative;
  overflow: hidden;
}

.integration-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.integrations-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.partner-logo-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.5;
  transition: var(--transition-smooth);
}

.partner-logo-card img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  filter: grayscale(1) brightness(1.5);
  transition: var(--transition-smooth);
}

.partner-logo-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-gold);
}

.partner-logo-card:hover img {
  filter: grayscale(0) brightness(1);
}

/* Client logos marquee */
.client-marquee-wrapper {
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: 2.5rem 0;
  background: rgba(2,2,4,0.4);
  overflow: hidden;
}

.marquee-title {
  text-align: center;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  display: flex;
  gap: 4rem;
  animation: scrollMarquee 30s linear infinite;
  min-width: 100%;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  height: 40px;
  display: flex;
  align-items: center;
}

.marquee-item img {
  height: 100%;
  max-width: 150px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.5) brightness(1.5);
  transition: var(--transition-fast);
}

.marquee-item:hover img {
  filter: grayscale(0) opacity(1) brightness(1);
}

/* RTL Adjustments for Marquee and Sliders */
html[dir="rtl"] .marquee-content {
  animation: scrollMarqueeRTL 30s linear infinite;
}

@keyframes scrollMarqueeRTL {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* Contact Page specific classes */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.info-icon {
  font-size: 1.5rem;
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(200, 173, 115, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.info-text p, .info-text a {
  color: var(--text-muted);
}

.info-text a:hover {
  color: var(--primary);
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-control {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(200, 173, 115, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Mock Map styling */
.mock-map {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: #080911;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.map-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 20px 20px;
}

.map-radar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(200, 173, 115, 0.05);
  border: 1px dashed rgba(200, 173, 115, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: radarPulse 4s infinite linear;
}

@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

.map-pin {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: var(--glow-gold), 0 0 0 8px rgba(200,173,115,0.2);
  position: absolute;
}

/* Footer Section */
footer.apca-footer {
  border-top: 1px solid var(--border-glass);
  background: #020204;
  padding: 4rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.footer-links h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--primary);
  padding-inline-start: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border-glass);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Menu Toggle for Mobile */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.75rem;
  cursor: pointer;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  
  .hero-grid, .integration-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .prod-slide {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .cta-group {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Mobile menu hidden by default */
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .right-controls {
    display: flex;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Mobile Menu Active State */
.nav-links.mobile-active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  background: rgba(2, 2, 4, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  border-bottom: 1px solid var(--border-glass);
  gap: 1.5rem;
  text-align: center;
}
