/* ==========================================================================
   CESE B2B WEBSITE DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette (Deep switchgear tech theme) */
  --color-bg: #0B1220;
  --color-surface: #0E1627;
  --color-surface-card: #121B2E;
  --color-accent: #F5A623;
  /* Live Amber (electricity/hazard warning) */
  --color-accent-glow: rgba(245, 166, 35, 0.4);
  --color-secondary: #2DD4BF;
  /* Signal Cyan */
  --color-secondary-glow: rgba(45, 212, 191, 0.25);
  --color-text: #E8ECF1;
  /* Technical Off-White */
  --color-text-muted: #7C8AA0;
  /* Muted slate specs font */
  --color-border: rgba(124, 138, 160, 0.15);
  --color-border-active: rgba(45, 212, 191, 0.4);

  /* CESE Custom Logo Colors */
  --color-logo-blue: #0A3663;
  --color-logo-orange: #F58220;

  /* Fonts */
  --font-display: 'IBM Plex Sans Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Grid & Spacing */
  --container-max-width: 1200px;
  --header-height: 80px;
  --border-radius: 6px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* RTL Refinement override */
[dir="rtl"] {
  --font-body: 'IBM Plex Sans Arabic', sans-serif;
  --font-display: 'IBM Plex Sans Arabic', sans-serif;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
g.sld-node:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 4px;
}

/* Typography elements */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Utility layout wrapper */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.section-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

/* ==========================================================================
   BUTTONS & CTAs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #000;
}

.btn-primary:hover {
  background-color: #fff;
  box-shadow: 0 0 15px var(--color-accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--color-surface-card);
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-secondary);
  background-color: rgba(45, 212, 191, 0.05);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-text);
  background-color: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: var(--transition-smooth);
}

.header.scrolled {
  background-color: rgba(7, 12, 22, 0.95);
  height: 70px;
}

.header-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo block */
.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
  background-color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  object-fit: contain;
  transition: var(--transition-smooth);
}

.header.scrolled .logo-img {
  height: 36px;
  padding: 3px 6px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-text);
  line-height: 1;
}

.logo-subtitle {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--color-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.logo-arabic {
  font-size: 9px;
  color: var(--color-text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* Navigation links */
.nav-desktop {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition-smooth);
}

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

[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

/* Language Toggle Button */
.btn-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 6px 12px;
  border-radius: var(--border-radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-lang:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.lang-icon {
  width: 14px;
  height: 14px;
}

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

/* Mobile Nav Styles */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 30px;
  height: 30px;
  position: relative;
  cursor: pointer;
}

.hamburger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  transition: var(--transition-smooth);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  transition: var(--transition-smooth);
}

.hamburger::before {
  top: -6px;
  left: 0;
}

.hamburger::after {
  bottom: -6px;
  left: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger {
  background-color: transparent;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  bottom: 0;
}

.nav-mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 24px;
  display: none;
  transform: translateY(-20px);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 99;
}

.nav-mobile.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.nav-mobile-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-mobile-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav-mobile-link:hover {
  color: var(--color-text);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  position: relative;
  padding-top: calc(var(--header-height) + 40px);
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-secondary);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 12px var(--color-secondary);
  }

  100% {
    transform: scale(0.9);
    opacity: 0.5;
  }
}

.hero-headline {
  font-size: 52px;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-subheadline {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text-muted);
  max-width: 580px;
}

.hero-actions-group {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

/* Quick specs chips */
.hero-tags {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.tag-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 12px;
}

.tag-label-mono {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

/* SVG SLD Diagram styles */
.hero-diagram-container {
  position: relative;
  width: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.diagram-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  pointer-events: none;
  z-index: 5;
}

[dir="rtl"] .diagram-overlay {
  right: auto;
  left: 16px;
}

.diagram-tooltip {
  background-color: rgba(18, 27, 46, 0.95);
  border: 1px solid var(--color-secondary);
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  opacity: 0.9;
  max-width: 200px;
  transition: var(--transition-smooth);
}

.tooltip-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 2px;
}

.tooltip-desc {
  font-size: 10px;
  color: var(--color-text-muted);
}

.sld-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Electrical diagram elements typography */
.sld-text {
  fill: var(--color-text);
  font-family: var(--font-body);
  pointer-events: none;
  user-select: none;
}

.sld-text-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  fill: var(--color-text);
}

.sld-text-mono {
  font-family: var(--font-mono);
  font-size: 8px;
  fill: var(--color-text-muted);
}

.sld-text-mono-sub {
  font-family: var(--font-mono);
  font-size: 7px;
  fill: var(--color-secondary);
  opacity: 0.6;
}

.sld-text-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  fill: var(--color-text);
}

/* SVG Line Animations */
.sld-path-primary,
.sld-branch-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#path-main {
  animation-delay: 0.1s;
}

#busbar-main {
  stroke: var(--color-text-muted);
  opacity: 0;
  animation: fadeInBusbar 0.5s ease forwards;
  animation-delay: 0.6s;
}

.sld-branch-path {
  animation-delay: 0.8s;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeInBusbar {
  to {
    opacity: 1;
    stroke: var(--color-text-muted);
  }
}

/* Energized pulse path animation (applied dynamically) */
.sld-path-active {
  stroke: var(--color-accent) !important;
  filter: url(#glow);
  stroke-dasharray: 8 8;
  animation: activePulse 0.8s linear infinite !important;
}

@keyframes activePulse {
  to {
    stroke-dashoffset: -32;
  }
}

/* Interactive SVG nodes */
.sld-node {
  cursor: pointer;
  outline: none;
  opacity: 0;
  transform-origin: 50% 50%;
  animation: popNode 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#node-automation {
  animation-delay: 1.5s;
  transform-origin: 120px 200px;
}

#node-robotics {
  animation-delay: 1.6s;
  transform-origin: 160px 280px;
}

#node-electrical {
  animation-delay: 1.7s;
  transform-origin: 120px 400px;
}

#node-sensors {
  animation-delay: 1.8s;
  transform-origin: 480px 200px;
}

#node-valves {
  animation-delay: 1.9s;
  transform-origin: 440px 280px;
}

#node-pneumatics {
  animation-delay: 2.0s;
  transform-origin: 480px 400px;
}

@keyframes popNode {
  to {
    opacity: 1;
  }
}

.node-circle {
  fill: var(--color-surface);
  stroke: var(--color-text-muted);
  stroke-width: 1.5;
  transition: var(--transition-smooth);
}

.node-core {
  fill: var(--color-text-muted);
  transition: var(--transition-smooth);
}

.sld-node:hover .node-circle,
.sld-node.active .node-circle {
  stroke: var(--color-accent);
  fill: rgba(245, 166, 35, 0.1);
  r: 12px;
}

.sld-node:hover .node-core,
.sld-node.active .node-core {
  fill: var(--color-accent);
  r: 5px;
}

.sld-node:hover text,
.sld-node.active text {
  fill: var(--color-accent);
}

/* ==========================================================================
   LIVE TRACE SYSTEM SECTION DIVIDERS
   ========================================================================== */

.live-trace-divider {
  position: relative;
  width: 100%;
  height: 1px;
  overflow: hidden;
  background-color: var(--color-border);
}

.trace-line {
  width: 100%;
  height: 100%;
}

.trace-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
  animation: tracePulseAnim 4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes tracePulseAnim {
  0% {
    left: -10%;
  }

  100% {
    left: 110%;
  }
}

[dir="rtl"] .trace-pulse {
  animation-name: tracePulseAnimRtl;
}

@keyframes tracePulseAnimRtl {
  0% {
    right: -10%;
    left: auto;
  }

  100% {
    right: 110%;
    left: auto;
  }
}

/* ==========================================================================
   TRUSTED BRANDS MARQUEE
   ========================================================================== */

.brands-section {
  background-color: var(--color-surface);
  overflow: hidden;
}

.brands-section .section-container {
  padding-bottom: 24px;
  /* Reduce gap before marquee */
}

.section-header-minimal {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-secondary);
  letter-spacing: 0.1em;
}

/* Infinite Marquee Animation CSS */
.marquee-wrapper {
  width: 100%;
  display: flex;
  overflow: hidden;
  position: relative;
  padding: 10px 0;
}

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 150px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-surface), transparent);
}

.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(270deg, var(--color-surface), transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeLoop 35s linear infinite;
  gap: 32px;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeLoop {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Adjust translation for RTL marquee */
[dir="rtl"] .marquee-track {
  animation: marqueeLoopRtl 35s linear infinite;
}

@keyframes marqueeLoopRtl {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(50%);
  }
}

.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  background-color: #ffffff;
  padding: 6px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
}

.marquee-item:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  background-color: #ffffff;
}

.brand-logo-img {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: none;
  /* Show real brand colors */
  opacity: 1;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.marquee-item:hover .brand-logo-img {
  transform: scale(1.05);
}

/* ==========================================================================
   PRODUCT CATEGORIES
   ========================================================================== */

.products-section {
  position: relative;
}

.section-header {
  max-width: 650px;
  margin-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-subtext {
  font-size: 16px;
  color: var(--color-text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* Category card visual styling */
.category-card {
  position: relative;
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: var(--transition-smooth);
  overflow: hidden;
}

/* Card ambient glow effect on hover */
.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(45, 212, 191, 0.06), transparent 40%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.category-card:hover .card-glow {
  opacity: 1;
}

.category-card:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(-4px);
}

/* Highlighted node target from Hero click */
.category-card.target-highlight {
  border-color: var(--color-accent);
  box-shadow: 0 0 25px rgba(245, 166, 35, 0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.card-icon-box {
  width: 44px;
  height: 44px;
  background-color: rgba(45, 212, 191, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
}

.card-icon-box svg {
  width: 22px;
  height: 22px;
}

.card-meta-mono {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
}

.card-title {
  font-size: 22px;
  position: relative;
  z-index: 2;
}

.card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
  position: relative;
  z-index: 2;
}

.card-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.card-items-list li {
  position: relative;
  padding-left: 16px;
}

[dir="rtl"] .card-items-list li {
  padding-left: 0;
  padding-right: 16px;
}

.card-items-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1px;
  background-color: var(--color-secondary);
}

[dir="rtl"] .card-items-list li::before {
  left: auto;
  right: 0;
}

.card-footer {
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
}

.arrow-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.card-link:hover {
  color: var(--color-accent);
}

.card-link:hover .arrow-icon {
  transform: translateX(4px);
}

[dir="rtl"] .card-link:hover .arrow-icon {
  transform: translateX(-4px);
}

/* ==========================================================================
   STATS BAR
   ========================================================================== */

.stats-section {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 24px;
}

.stat-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 36px;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  font-size: 40px;
  text-transform: uppercase;
  line-height: 1.1;
}

.about-p {
  font-size: 16px;
}

.about-sectors {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.about-sectors h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--color-text);
  text-transform: uppercase;
}

.sector-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--color-secondary);
}

.about-graphics-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 24px;
}

.about-circuit-svg {
  width: 100%;
  height: auto;
  max-width: 320px;
}

/* ==========================================================================
   HOW WE WORK
   ========================================================================== */

.work-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: var(--transition-smooth);
}

.step-card:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 4px 8px;
  width: max-content;
  border-radius: 2px;
}

.step-title {
  font-size: 20px;
  text-transform: uppercase;
}

.step-desc {
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================================
   AUTOMATION & ENGINEERING SECTION
   ========================================================================== */

.engineering-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

/* Diagnostic terminal visual styling */
.terminal-mockup {
  background-color: #060910;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.terminal-header {
  background-color: #0c0f17;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.terminal-dot.red {
  background-color: #ff5f56;
}

.terminal-dot.yellow {
  background-color: #ffbd2e;
}

.terminal-dot.green {
  background-color: #27c93f;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}

.terminal-text {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.text-green {
  color: #27c93f;
}

.text-blue {
  color: var(--color-secondary);
}

.text-amber {
  color: var(--color-accent);
}

.eng-p {
  font-size: 16px;
  margin-bottom: 24px;
}

.eng-services-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.service-item {
  border-left: 2.5px solid var(--color-secondary);
  padding-left: 20px;
}

[dir="rtl"] .service-item {
  border-left: none;
  border-right: 2.5px solid var(--color-secondary);
  padding-left: 0;
  padding-right: 20px;
}

.service-item h4 {
  font-size: 16px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 6px;
}

.service-item p {
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   CONTACT & REQUEST FOR QUOTE
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 64px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-desc {
  font-size: 16px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}

.detail-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-mono {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-secondary);
}

.detail-val {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.4;
}

/* Coordinate Map SVG design */
.technical-map {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: 12px;
}

.map-grid-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-radar {
  animation: mapPulse 2s infinite;
  transform-origin: 150px 75px;
}

@keyframes mapPulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* RFQ Form panel */
.contact-form-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.form-title {
  font-size: 24px;
  text-transform: uppercase;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.rfq-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label-mono {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.required {
  color: var(--color-accent);
}

.rfq-form input,
.rfq-form textarea,
.rfq-form select {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition-smooth);
  width: 100%;
  outline: none;
}

.rfq-form input:hover,
.rfq-form textarea:hover,
.rfq-form select:hover {
  border-color: var(--color-text-muted);
}

.rfq-form input:focus,
.rfq-form textarea:focus,
.rfq-form select:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary-glow);
}

/* Spinner & Button submit state */
.btn-submit {
  position: relative;
  height: 46px;
}

.btn-spinner {
  position: absolute;
  width: 24px;
  height: 24px;
  animation: rotateSpinner 1s linear infinite;
  display: inline-block;
}

.btn-spinner .path {
  stroke: #000;
  stroke-linecap: round;
  animation: dashSpinner 1.5s ease-in-out infinite;
}

.hidden {
  display: none !important;
}

@keyframes rotateSpinner {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dashSpinner {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

.form-alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.form-alert.success {
  background-color: rgba(39, 201, 63, 0.1);
  border: 1px solid #27c93f;
  color: #27c93f;
}

.form-alert.error {
  background-color: rgba(255, 95, 86, 0.1);
  border: 1px solid #ff5f56;
  color: #ff5f56;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background-color: #070c16;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr;
  gap: 48px;
  padding: 64px 24px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.6;
}

.footer-heading {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.footer-links a {
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-text);
  padding-left: 4px;
}

[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 4px;
}

.lbl-light {
  color: var(--color-text);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
}

.footer-bottom-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-text-muted);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.social-link {
  color: var(--color-text-muted);
}

.social-link:hover {
  color: var(--color-secondary);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {

  .hero-grid,
  .about-grid,
  .engineering-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-headline {
    font-size: 40px;
  }

  .hero-diagram-container {
    max-width: 600px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .header-actions .btn-header-quote {
    display: none;
  }

  .nav-desktop {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .work-steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 32px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions-group {
    flex-direction: column;
  }
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .trace-pulse,
  .pulse-dot,
  .map-radar {
    animation: none !important;
  }

  .marquee-track {
    animation: none !important;
    flex-wrap: wrap;
    justify-content: center;
  }

  .sld-path-primary,
  .sld-branch-path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }

  .sld-node {
    animation: none !important;
    opacity: 1 !important;
  }

  #busbar-main {
    animation: none !important;
    opacity: 1 !important;
  }

  .category-card:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   PRODUCT SHOWCASE MODAL
   ========================================================================== */

.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.product-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.product-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 11, 22, 0.85);
  backdrop-filter: blur(8px);
}

.product-modal-content {
  position: relative;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  width: 90%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2001;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-modal.active .product-modal-content {
  transform: scale(1);
}

.product-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 10;
}

.product-modal-close:hover {
  color: var(--color-accent);
}

[dir="rtl"] .product-modal-close {
  right: auto;
  left: 16px;
}

.product-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 480px;
}

@media (max-width: 768px) {
  .product-modal-grid {
    grid-template-columns: 1fr;
  }
}

.product-modal-image-container {
  background-color: #0c1424;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--color-border);
  position: relative;
}

[dir="rtl"] .product-modal-image-container {
  border-right: none;
  border-left: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .product-modal-image-container {
    height: 250px;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--color-border);
  }
}

.product-modal-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 24px;
}

.product-modal-details {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 480px) {
  .product-modal-details {
    padding: 24px;
  }
}

.product-modal-title {
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.product-modal-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.product-modal-specs {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.product-modal-specs h4,
.product-modal-brands h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.product-modal-specs ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-modal-specs li {
  font-size: 13px;
  color: var(--color-text);
  position: relative;
  padding-left: 14px;
}

[dir="rtl"] .product-modal-specs li {
  padding-left: 0;
  padding-right: 14px;
}

.product-modal-specs li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-size: 10px;
  top: 1px;
}

[dir="rtl"] .product-modal-specs li::before {
  left: auto;
  right: 0;
}

.product-modal-brands {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.product-modal-brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-brand-badge {
  background-color: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.2);
  color: var(--color-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.product-modal-footer {
  margin-top: 10px;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}

#product-modal-quote-btn {
  width: 100%;
  text-align: center;
}

/* Category Card Product Images styling */
.category-card {
  padding: 0 0 24px 0 !important;
  gap: 16px !important;
}

.category-card .card-header,
.category-card .card-title,
.category-card .card-desc,
.category-card .card-items-list,
.category-card .card-footer {
  padding-left: 24px !important;
  padding-right: 24px !important;
}

.category-card .card-header {
  padding-top: 24px !important;
}

.card-image-container {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #060910;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-category-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-card:hover .card-category-img {
  transform: scale(1.05);
}