/* ============================================
   EOC - SPECIALIZED EPOXY SOLUTIONS
   Material Design 3 Dark/Light Theme
   ============================================ */

/* ============================================
   1. CSS CUSTOM PROPERTIES (M3 Design Tokens)
   ============================================ */
:root {
  /* Primary Colors */
  --md-sys-color-primary: #FFDE21;
  --md-sys-color-on-primary: #000000;
  --md-sys-color-primary-container: #3D3000;
  --md-sys-color-on-primary-container: #FFE566;

  /* Accent */
  --md-sys-color-accent: #F4B400;

  /* Background & Surface */
  --md-sys-color-background: #121212;
  --md-sys-color-surface: #1E1E1E;
  --md-sys-color-surface-variant: #2A2A2A;
  --md-sys-color-surface-container: #252525;
  --md-sys-color-surface-container-high: #303030;

  /* Text */
  --md-sys-color-on-background: #FFFFFF;
  --md-sys-color-on-surface: #FFFFFF;
  --md-sys-color-on-surface-variant: #B0B0B0;
  --md-sys-color-outline: #444444;

  /* Semantic */
  --md-sys-color-error: #CF6679;
  --md-sys-color-success: #00C853;

  /* Typography */
  --md-sys-typescale-display-large: 700 4rem/1.1 'Inter', 'Roboto', sans-serif;
  --md-sys-typescale-display-medium: 700 3rem/1.15 'Inter', 'Roboto', sans-serif;
  --md-sys-typescale-headline-large: 700 2rem/1.2 'Inter', 'Roboto', sans-serif;
  --md-sys-typescale-headline-medium: 600 1.5rem/1.3 'Inter', 'Roboto', sans-serif;
  --md-sys-typescale-title-large: 600 1.25rem/1.35 'Inter', 'Roboto', sans-serif;
  --md-sys-typescale-body-large: 400 1.125rem/1.6 'Inter', 'Roboto', sans-serif;
  --md-sys-typescale-body-medium: 400 1rem/1.6 'Inter', 'Roboto', sans-serif;
  --md-sys-typescale-label-large: 500 0.875rem/1.4 'Inter', 'Roboto', sans-serif;

  /* Elevation Shadows */
  --md-sys-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.24);
  --md-sys-elevation-2: 0 3px 6px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.28);
  --md-sys-elevation-3: 0 10px 20px rgba(0, 0, 0, 0.5), 0 6px 6px rgba(0, 0, 0, 0.26);
  --md-sys-elevation-4: 0 14px 28px rgba(0, 0, 0, 0.5), 0 10px 10px rgba(0, 0, 0, 0.22);

  /* Border Radius */
  --md-sys-shape-corner-none: 0;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Glassmorphism */
  --glass-bg: rgba(30, 30, 30, 0.7);
  --glass-border: rgba(255, 215, 0, 0.15);
  --glass-blur: blur(20px);

  /* Neon Glow */
  --neon-glow: 0 0 10px rgba(255, 215, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2), 0 0 40px rgba(255, 215, 0, 0.1);
  --neon-glow-strong: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.2);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Logo filter - Yellow/Gold in dark mode */
  --logo-filter: brightness(0) saturate(100%) invert(80%) sepia(90%) saturate(500%) hue-rotate(5deg) brightness(105%);
}

/* ============================================
   LIGHT MODE THEME
   ============================================ */
[data-theme="light"] {
  /* Primary Colors - Darker gold for light mode */
  --md-sys-color-primary: #B8860B;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #FFE566;
  --md-sys-color-on-primary-container: #3D3000;

  /* Accent */
  --md-sys-color-accent: #996600;

  /* Background & Surface */
  --md-sys-color-background: #FAFAFA;
  --md-sys-color-surface: #FFFFFF;
  --md-sys-color-surface-variant: #F5F5F5;
  --md-sys-color-surface-container: #EEEEEE;
  --md-sys-color-surface-container-high: #E0E0E0;

  /* Text */
  --md-sys-color-on-background: #1A1A1A;
  --md-sys-color-on-surface: #1A1A1A;
  --md-sys-color-on-surface-variant: #555555;
  --md-sys-color-outline: #CCCCCC;

  /* Semantic */
  --md-sys-color-error: #B00020;
  --md-sys-color-success: #00873D;

  /* Elevation Shadows - softer for light mode */
  --md-sys-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12);
  --md-sys-elevation-2: 0 3px 6px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
  --md-sys-elevation-3: 0 10px 20px rgba(0, 0, 0, 0.12), 0 6px 6px rgba(0, 0, 0, 0.08);
  --md-sys-elevation-4: 0 14px 28px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.1);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(184, 134, 11, 0.2);

  /* Gold Glow (subtler for light mode) */
  --neon-glow: 0 0 10px rgba(184, 134, 11, 0.2), 0 0 20px rgba(184, 134, 11, 0.1);
  --neon-glow-strong: 0 0 15px rgba(184, 134, 11, 0.3), 0 0 30px rgba(184, 134, 11, 0.15);

  /* Logo filter - keep dark for light mode */
  --logo-filter: brightness(1);
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font: var(--md-sys-typescale-body-medium);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--md-sys-color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ============================================
   3. UTILITY CLASSES
   ============================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.text-primary {
  color: var(--md-sys-color-primary);
}

.text-secondary {
  color: var(--md-sys-color-on-surface-variant);
}

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

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.text-center {
  text-align: center;
}

.bg-surface {
  background-color: var(--md-sys-color-surface);
}

.bg-surface-variant {
  background-color: var(--md-sys-color-surface-variant);
}

/* ============================================
   4. TYPOGRAPHY
   ============================================ */
.display-large {
  font: var(--md-sys-typescale-display-large);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.display-medium {
  font: var(--md-sys-typescale-display-medium);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.headline-large {
  font: var(--md-sys-typescale-headline-large);
  text-transform: uppercase;
}

.headline-medium {
  font: var(--md-sys-typescale-headline-medium);
}

.title-large {
  font: var(--md-sys-typescale-title-large);
}

.body-large {
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface-variant);
}

.label-large {
  font: var(--md-sys-typescale-label-large);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   5. BUTTONS (M3)
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font: var(--md-sys-typescale-label-large);
  border: none;
  border-radius: var(--md-sys-shape-corner-medium);
  cursor: pointer;
  transition: all var(--transition-medium);
  text-decoration: none;
  white-space: nowrap;
}

.btn-filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.btn-filled:hover {
  background-color: var(--md-sys-color-accent);
  box-shadow: var(--neon-glow);
  transform: translateY(-2px);
}

.btn-outlined {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  border: 2px solid var(--md-sys-color-primary);
}

.btn-outlined:hover {
  background-color: rgba(255, 215, 0, 0.1);
  box-shadow: var(--neon-glow);
}

.btn-text {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  padding: var(--space-sm) var(--space-md);
}

.btn-text:hover {
  background-color: rgba(255, 215, 0, 0.1);
}

/* ============================================
   6. CARDS (M3)
   ============================================ */
.card {
  background-color: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-corner-large);
  padding: var(--space-xl);
  box-shadow: var(--md-sys-elevation-2);
  border: 1px solid var(--md-sys-color-outline);
  transition: all var(--transition-medium);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--md-sys-elevation-4), var(--neon-glow);
  border-color: var(--md-sys-color-primary);
}

.card-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-radius: var(--md-sys-shape-corner-medium);
  margin-bottom: var(--space-lg);
  color: var(--md-sys-color-primary);
  font-size: 1.75rem;
}

.card-title {
  font: var(--md-sys-typescale-headline-medium);
  margin-bottom: var(--space-sm);
}

.card-description {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
}

/* ============================================
   7. NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: all var(--transition-medium);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--md-sys-elevation-2);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo img {
  height: 40px;
  filter: brightness(0) invert(1);
  transition: transform var(--transition-fast);
}

.navbar-logo:hover img {
  transform: scale(1.05);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar-link {
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface);
  position: relative;
  padding: var(--space-sm) 0;
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--md-sys-color-primary);
  transition: width var(--transition-medium);
}

.navbar-link:hover {
  color: var(--md-sys-color-primary);
}

.navbar-link:hover::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--md-sys-color-on-surface);
  transition: all var(--transition-fast);
}

/* ============================================
   8. HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #121212 0%, #1a1a1a 50%, #121212 100%);
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(18, 18, 18, 0.8) 70%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--space-lg);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 50px;
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-primary);
  margin-bottom: var(--space-xl);
}

.hero-title {
  font: var(--md-sys-typescale-display-large);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, #FFFFFF 0%, #FFDE21 50%, #FFFFFF 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

.hero-subtitle {
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface-variant);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-label-large);
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ============================================
   9. ESD SECTION (CRITICAL CENTERPIECE)
   ============================================ */
.esd-section {
  position: relative;
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, var(--md-sys-color-background) 0%, var(--md-sys-color-surface) 50%, var(--md-sys-color-background) 100%);
  overflow: hidden;
}

.esd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.esd-content {
  position: relative;
  z-index: 10;
}

.esd-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-primary);
  margin-bottom: var(--space-lg);
}

.esd-label::before {
  content: '⚡';
}

.esd-title {
  font: var(--md-sys-typescale-display-medium);
  margin-bottom: var(--space-lg);
}

.esd-description {
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-xl);
}

.esd-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.esd-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--md-sys-shape-corner-small);
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-primary);
}

.esd-feature-tag svg {
  width: 16px;
  height: 16px;
}

/* ESD Interactive Diagram */
.esd-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.esd-diagram {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.esd-diagram svg {
  width: 100%;
  height: auto;
}

/* Layer labels */
.esd-layer-label {
  position: absolute;
  right: -120px;
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-medium);
}

.esd-diagram:hover .esd-layer-label {
  opacity: 1;
  transform: translateX(0);
}

/* Electric current animation */
.current-path {
  stroke: var(--md-sys-color-primary);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 10 5;
  stroke-dashoffset: 0;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.esd-diagram:hover .current-path {
  opacity: 1;
  animation: currentFlow 1s linear infinite;
}

@keyframes currentFlow {
  to {
    stroke-dashoffset: -15;
  }
}

/* Layer hover effects */
.esd-layer {
  transition: all var(--transition-medium);
  cursor: pointer;
}

.esd-layer:hover {
  filter: brightness(1.3);
  transform: translateY(-5px);
}

/* ============================================
   10. SERVICES SECTION
   ============================================ */
.services-section {
  padding: var(--space-3xl) 0;
  background-color: var(--md-sys-color-background);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-primary);
  margin-bottom: var(--space-md);
  display: block;
}

.section-title {
  font: var(--md-sys-typescale-display-medium);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface-variant);
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

/* ============================================
   11. TECH SPECS SECTION
   ============================================ */
.tech-section {
  padding: var(--space-3xl) 0;
  background: var(--md-sys-color-surface);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-xl);
  background: var(--md-sys-color-surface-variant);
  border-radius: var(--md-sys-shape-corner-large);
  overflow: hidden;
}

.specs-table th,
.specs-table td {
  padding: var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.specs-table th {
  background: var(--md-sys-color-surface-container-high);
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-primary);
  text-transform: uppercase;
}

.specs-table td {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.specs-table tr:hover td {
  background: rgba(255, 215, 0, 0.05);
}

.compliance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  justify-content: center;
}

.compliance-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--md-sys-color-surface-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  border: 1px solid var(--md-sys-color-outline);
  transition: all var(--transition-medium);
}

.compliance-badge:hover {
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--neon-glow);
}

.compliance-badge svg {
  width: 48px;
  height: 48px;
  color: var(--md-sys-color-primary);
}

.compliance-badge span {
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface-variant);
}

/* ============================================
   12. FOOTER
   ============================================ */
.footer {
  background-color: var(--md-sys-color-surface);
  border-top: 1px solid var(--md-sys-color-outline);
  padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo img {
  height: 36px;
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-lg);
}

.footer-description {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
}

.footer-title {
  font: var(--md-sys-typescale-title-large);
  margin-bottom: var(--space-lg);
  color: var(--md-sys-color-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--md-sys-color-primary);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.footer-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--md-sys-color-surface-variant);
  border-radius: 50%;
  color: var(--md-sys-color-on-surface-variant);
  transition: all var(--transition-medium);
}

.footer-social a:hover {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--neon-glow);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--md-sys-color-outline);
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface-variant);
}

/* ============================================
   13. FLOATING ACTION BUTTON (FAB)
   ============================================ */
.fab {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 1000;
  width: 64px;
  height: 64px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--md-sys-elevation-3);
  transition: all var(--transition-medium);
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: var(--md-sys-elevation-4), var(--neon-glow-strong);
}

.fab svg {
  width: 28px;
  height: 28px;
}

.fab-tooltip {
  position: absolute;
  right: 100%;
  margin-right: var(--space-md);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--md-sys-shape-corner-small);
  font: var(--md-sys-typescale-label-large);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition-fast);
  pointer-events: none;
  box-shadow: var(--md-sys-elevation-2);
}

.fab:hover .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   14. ANIMATIONS - Content Always Visible
   ============================================ */
.fade-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Optional animation enhancement when triggered */
.fade-in.animate {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0.8;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scale-in {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* ============================================
   15. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .esd-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .esd-visual {
    order: -1;
  }

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

@media (max-width: 768px) {
  :root {
    --md-sys-typescale-display-large: 700 2.5rem/1.1 'Inter', 'Roboto', sans-serif;
    --md-sys-typescale-display-medium: 700 2rem/1.15 'Inter', 'Roboto', sans-serif;
  }

  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    flex-direction: column;
    justify-content: center;
    padding: var(--space-2xl);
    transition: right var(--transition-medium);
    border-left: 1px solid var(--glass-border);
  }

  .navbar-menu.active {
    right: 0;
  }

  .navbar-toggle {
    display: flex;
    z-index: 1001;
  }

  .navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .navbar-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .footer-brand {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .fab {
    width: 56px;
    height: 56px;
    bottom: var(--space-lg);
    right: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

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

/* ============================================
   16. THEME TOGGLE
   ============================================ */
.theme-toggle {
  position: fixed;
  top: 100px;
  right: var(--space-lg);
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--md-sys-color-surface);
  border: 2px solid var(--md-sys-color-outline);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--md-sys-elevation-2);
  transition: all var(--transition-medium);
}

.theme-toggle:hover {
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--neon-glow);
  transform: scale(1.1);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  color: var(--md-sys-color-primary);
  transition: transform var(--transition-medium);
}

.theme-toggle:hover svg {
  transform: rotate(30deg);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

/* Update logo filter to use variable */
.navbar-logo img,
.footer-logo img {
  filter: var(--logo-filter);
}

/* Light mode hero background adjustment */
[data-theme="light"] .hero {
  background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 50%, #FAFAFA 100%);
}

[data-theme="light"] .hero-overlay {
  background: radial-gradient(ellipse at center, transparent 0%, rgba(250, 250, 250, 0.5) 70%);
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #1A1A1A 0%, #B8860B 50%, #1A1A1A 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   17. INTERACTIVE INFOGRAPHICS
   ============================================ */
.infographic-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.infographic-container svg {
  width: 100%;
  height: auto;
}

/* Animated flow paths */
.flow-path {
  fill: none;
  stroke: var(--md-sys-color-primary);
  stroke-width: 3;
  stroke-dasharray: 20 10;
  animation: flowAnimation 2s linear infinite;
}

@keyframes flowAnimation {
  to {
    stroke-dashoffset: -30;
  }
}

/* Pulse animation for nodes */
.pulse-node {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    transform: scale(1.05);
  }
}

/* Hover reveal layers */
.interactive-layer {
  transition: all var(--transition-medium);
  cursor: pointer;
}

.interactive-layer:hover {
  filter: brightness(1.2);
  transform: translateY(-5px);
}

.interactive-layer:hover+.layer-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.layer-tooltip {
  position: absolute;
  background: var(--md-sys-color-surface);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--md-sys-shape-corner-small);
  border: 1px solid var(--md-sys-color-outline);
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface);
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-medium);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--md-sys-elevation-2);
}

/* Light mode adjustments for infographics */
[data-theme="light"] .flow-path {
  stroke: #B8860B;
}

[data-theme="light"] .pulse-node {
  animation: pulseGlowLight 2s ease-in-out infinite;
}

@keyframes pulseGlowLight {

  0%,
  100% {
    filter: drop-shadow(0 0 5px rgba(184, 134, 11, 0.2));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 15px rgba(184, 134, 11, 0.4));
    transform: scale(1.05);
  }
}
/* ============================================
   COMPARE PAGE STYLES
   ============================================ */
.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
}

.compare-table th,
.compare-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.compare-table th {
    background: var(--md-sys-color-surface-container);
    font-weight: 600;
    position: sticky;
    top: 70px;
    z-index: 10;
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.compare-table tbody tr:hover {
    background: var(--md-sys-color-surface-container);
}

.system-header {
    background: linear-gradient(135deg, var(--md-sys-color-surface) 0%, var(--md-sys-color-surface-container) 100%);
    border-radius: 12px 12px 0 0;
}

.system-header .system-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.system-header .system-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

.check-yes {
    color: var(--md-sys-color-success);
}

.check-no {
    color: var(--md-sys-color-error);
    opacity: 0.5;
}

.check-partial {
    color: var(--md-sys-color-accent);
}

.rating-bar {
    width: 100%;
    height: 8px;
    background: var(--md-sys-color-surface-container);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.rating-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* FAQ Accordion Styles */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font: var(--md-sys-typescale-title-large);
    color: var(--md-sys-color-on-surface);
    text-align: left;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--md-sys-color-surface-container);
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--md-sys-color-primary);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.7;
}

.faq-answer-content ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.faq-answer-content li {
    margin-bottom: 0.5rem;
}

/* Recommendation Card */
.recommendation-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
    border: 2px solid var(--md-sys-color-primary);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.select-btn {
    min-width: 120px;
}

.select-btn.selected {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

/* ============================================
   BLOG STYLES
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.blog-card {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-large);
    overflow: hidden;
    transition: all var(--transition-medium);
}

.blog-card:hover {
    border-color: var(--md-sys-color-primary);
    transform: translateY(-4px);
    box-shadow: var(--md-sys-elevation-3);
}

.blog-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.blog-card-content {
    padding: var(--space-lg);
}

.blog-card-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: var(--space-md);
}

.blog-card-title {
    font: var(--md-sys-typescale-headline-medium);
    margin-bottom: var(--space-sm);
    color: var(--md-sys-color-on-surface);
}

.blog-card-title a {
    color: inherit;
}

.blog-card-title a:hover {
    color: var(--md-sys-color-primary);
}

.blog-card-excerpt {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.read-more {
    color: var(--md-sys-color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Single Post */
.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(80px + var(--space-3xl)) var(--space-lg) var(--space-3xl);
}

.single-post-header {
    margin-bottom: var(--space-2xl);
}

.single-post-title {
    font: var(--md-sys-typescale-display-medium);
    margin-bottom: var(--space-lg);
}

.single-post-meta {
    display: flex;
    gap: var(--space-lg);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.single-post-featured {
    margin-bottom: var(--space-2xl);
    border-radius: var(--md-sys-shape-corner-large);
    overflow: hidden;
}

.single-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post-content h2 {
    font: var(--md-sys-typescale-headline-large);
    margin: var(--space-2xl) 0 var(--space-lg);
    color: var(--md-sys-color-primary);
}

.single-post-content h3 {
    font: var(--md-sys-typescale-headline-medium);
    margin: var(--space-xl) 0 var(--space-md);
}

.single-post-content p {
    margin-bottom: var(--space-lg);
    color: var(--md-sys-color-on-surface-variant);
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
    color: var(--md-sys-color-on-surface-variant);
    list-style: disc;
}

.single-post-content li {
    margin-bottom: var(--space-sm);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-md);
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-small);
    color: var(--md-sys-color-on-surface);
    transition: all var(--transition-fast);
}

.pagination a:hover {
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
}

.pagination .current {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.navbar-link.active {
    color: var(--md-sys-color-primary);
}

.navbar-link.active::after {
    width: 100%;
}

/* ============================================
   ARABIC FONT SUPPORT - CAIRO
   ============================================ */
   
/* Apply Cairo font for Arabic content */
:lang(ar),
[lang="ar"],
.rtl,
html[dir="rtl"] {
    font-family: 'Cairo', 'Inter', sans-serif !important;
}

/* Single post content with Cairo for articles */
.single-post-content,
.blog-card-title,
.blog-card-excerpt,
.entry-content {
    font-family: 'Cairo', 'Inter', sans-serif;
}

/* Better Arabic typography */
:lang(ar) .hero-title,
:lang(ar) .section-title,
:lang(ar) .headline-large,
:lang(ar) .display-large {
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0;
}

/* RTL Support */
html[dir="rtl"] .blog-card-meta {
    direction: rtl;
}

html[dir="rtl"] .read-more {
    direction: rtl;
}

/* ============================================
   ENHANCED BLOG PAGE STYLES
   ============================================ */

/* Category Pills */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 50px;
    color: var(--md-sys-color-on-surface);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-pill:hover {
    background: rgba(255, 222, 33, 0.1);
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
}

.category-pill.active {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    color: #121212;
}

.category-count {
    background: rgba(0,0,0,0.2);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.category-pill.active .category-count {
    background: rgba(0,0,0,0.3);
}

/* Enhanced Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Blog Card */
.blog-card {
    background: var(--md-sys-color-surface-container);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--md-sys-color-outline);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-color: var(--md-sys-color-primary);
}

.blog-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 222, 33, 0.15);
    color: var(--md-sys-color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.blog-card-category:hover {
    background: var(--md-sys-color-primary);
    color: #121212;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 0.75rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.blog-card-title a {
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--md-sys-color-primary);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--md-sys-color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

.read-more svg {
    transition: transform 0.3s ease;
}

.read-more:hover svg {
    transform: translateX(4px);
}

/* Featured Post */
.featured-post {
    background: var(--md-sys-color-surface-container);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline);
}

@media (max-width: 992px) {
    .featured-post {
        grid-template-columns: 1fr !important;
    }
    
    .featured-post-content {
        padding: 2rem !important;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 1rem;
    background: var(--md-sys-color-surface-container);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 8px;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: rgba(255, 222, 33, 0.1);
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
}

.pagination .current {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    color: #121212;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 222, 33, 0.15);
    border: 1px solid rgba(255, 222, 33, 0.3);
    border-radius: 50px;
    color: var(--md-sys-color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ============================================
   SINGLE POST STYLES
   ============================================ */

.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
}

.single-post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.95rem;
}

.single-post-featured {
    margin-bottom: 3rem;
    border-radius: 16px;
    overflow: hidden;
}

.single-post-featured img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.single-post-content {
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface);
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.single-post-content h2 {
    font-size: 1.75rem;
}

.single-post-content h3 {
    font-size: 1.5rem;
}

.single-post-content p {
    margin-bottom: 1.5rem;
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.single-post-content li {
    margin-bottom: 0.5rem;
}

.single-post-content blockquote {
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: var(--md-sys-color-surface-container);
    border-left: 4px solid var(--md-sys-color-primary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1.1rem;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.single-post-content a {
    color: var(--md-sys-color-primary);
    text-decoration: underline;
}

.single-post-content a:hover {
    text-decoration: none;
}

.single-post-content pre {
    background: var(--md-sys-color-surface-container);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
}

.single-post-content code {
    font-family: 'Fira Code', monospace;
    background: var(--md-sys-color-surface-container);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .single-post {
        padding: 100px 1rem 3rem;
    }
    
    .single-post-title {
        font-size: 1.75rem;
    }
    
    .single-post-content {
        font-size: 1rem;
    }
}
