@font-face {
  font-family: 'NewBlackTypeface';
  src: url('../fonts/NewBlackTypeface-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'NewBlackTypeface';
  src: url('../fonts/NewBlackTypeface-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'NewBlackTypeface';
  src: url('../fonts/NewBlackTypeface-UltraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
}
@font-face {
  font-family: 'NewBlackTypeface';
  src: url('../fonts/NewBlackTypeface-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'NewBlackTypeface';
  src: url('../fonts/NewBlackTypeface-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'NewBlackTypeface';
  src: url('../fonts/NewBlackTypeface-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'NewBlackTypeface';
  src: url('../fonts/NewBlackTypeface-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}
@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&display=swap');

:root {
  /* Fonts */
  --font-en: 'NewBlackTypeface', sans-serif;
  --font-ar: 'Readex Pro', sans-serif;
  
  /* Brand Colors */
  --brand-blue: #002FA7;
  --brand-blue-hover: #002175;
  --brand-blue-glow: rgba(0, 47, 167, 0.15);
  --brand-yellow: #F2B705;
  --brand-yellow-hover: #cfa004;
  --brand-yellow-glow: rgba(242, 183, 5, 0.25);
  
  /* Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(0, 47, 167, 0.06);
  --grid-color: rgba(0, 47, 167, 0.02);
  --gradient-glow: radial-gradient(circle at 50% -20%, rgba(0, 47, 167, 0.05), transparent 70%);
  --slider-track: #e2e8f0;
  
  /* UI Constants */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-theme: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(0, 47, 167, 0.05);
  --shadow-lg: 0 20px 50px rgba(0, 47, 167, 0.08);
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-primary: #050814;
  --bg-secondary: #0a0f24;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --nav-bg: rgba(5, 8, 20, 0.8);
  --card-bg: rgba(10, 15, 36, 0.6);
  --card-border: rgba(255, 255, 255, 0.05);
  --grid-color: rgba(255, 255, 255, 0.015);
  --gradient-glow: radial-gradient(circle at 50% -20%, rgba(0, 47, 167, 0.25), transparent 60%),
                    radial-gradient(circle at 80% 40%, rgba(242, 183, 5, 0.1), transparent 50%);
  --slider-track: #1e293b;
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition-theme);
}

/* Language specific font family overrides */
html[lang="ar"] body {
  font-family: var(--font-ar);
}

/* Background Grid Pattern (Stripe aesthetic) */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center center;
  pointer-events: none;
  z-index: 1;
}

.gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1200px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
  transition: var(--transition-theme);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--brand-blue-glow);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-blue);
}

/* Typography & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

section {
  padding: 100px 0;
  position: relative;
}

section:not(.hero-section) {
  background-color: var(--bg-secondary) !important;
}

/* Navigation Bar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition-theme);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 18px;
  border-radius: 100px;
  border: 1px solid rgba(0, 47, 167, 0.08);
  box-shadow: 0 4px 15px rgba(0, 47, 167, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}

.logo-link:hover {
  border-color: var(--brand-yellow);
  box-shadow: 0 4px 20px rgba(242, 183, 5, 0.2);
  transform: translateY(-1px);
}

.logo-link span {
  color: #ffffff !important;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--brand-blue);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--brand-blue-glow);
}

.btn-primary:hover {
  background-color: var(--brand-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 47, 167, 0.25);
}

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

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--brand-yellow);
  color: #0f172a;
  box-shadow: 0 4px 14px var(--brand-yellow-glow);
}

.btn-accent:hover {
  background-color: var(--brand-yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 183, 5, 0.4);
}

/* Controls */
.control-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  width: 40px;
  height: 40px;
  border: 1px solid var(--card-border);
}

.control-btn:hover {
  color: var(--brand-blue);
  background-color: var(--bg-secondary);
}

#theme-toggle .fa-sun {
  color: var(--brand-yellow) !important;
  text-shadow: 0 0 10px var(--brand-yellow-glow);
}

/* Hero Section */
.hero-section {
  padding-top: 180px;
  padding-bottom: 120px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
}

/* Canvas Hologram (Global Background covering the entire page) */
#hologram-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  display: none !important; /* Hidden on mobile/tablets by default */
}

html.device-desktop #hologram-canvas {
  display: block !important; /* Visible only on PCs/laptops */
}

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

.hero-content {
  position: relative;
  z-index: 3;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--brand-blue-glow);
  color: var(--brand-blue);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(0, 47, 167, 0.1);
}

[data-theme="dark"] .badge {
  color: var(--brand-yellow);
  background-color: var(--brand-yellow-glow);
  border-color: rgba(242, 183, 5, 0.15);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--brand-blue), #5d75f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-title span {
  background: linear-gradient(135deg, #6088ff, var(--brand-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-btns {
  display: flex;
  gap: 16px;
}

.hero-visual {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Glass Card */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 47, 167, 0.15);
}

/* Drag-Drop Showcase */
.showcase-container {
  width: 100%;
  max-width: 850px;
  height: 580px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.revit-mock {
  width: 100%;
  height: 100%;
  background: #0f172a;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.revit-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.revit-window {
  display: flex;
  flex: 1;
  gap: 12px;
}

.revit-sidebar {
  width: 130px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.revit-sidebar-title {
  color: #fff;
  font-weight: bold;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.revit-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.revit-item:hover {
  background: var(--brand-blue-hover);
  color: #fff;
  border-color: var(--brand-yellow);
}

.revit-canvas {
  flex: 1;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.drop-target-text {
  text-align: center;
  pointer-events: none;
}

/* Compare Slider Section */
.section-title-wrap {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.compare-card {
  height: 100%;
}

.compare-card.old-way {
  border-left: 4px solid #ef4444;
}

.compare-card.new-way {
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, var(--card-bg), rgba(16, 185, 129, 0.03));
}

.compare-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
}

.compare-list i {
  margin-top: 4px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.feature-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  background-color: var(--brand-blue-glow);
  color: var(--brand-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

[data-theme="dark"] .feature-icon-wrapper {
  background-color: rgba(242, 183, 5, 0.1);
  color: var(--brand-yellow);
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Video Section */
.video-wrapper {
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
  position: relative;
  background: #000;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.7)), url('../images/video_thumbnail.jpg') no-repeat center center;
  background-size: cover;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.video-placeholder:hover {
  opacity: 0.9;
}

.video-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 30px var(--brand-blue-glow);
  transition: var(--transition-smooth);
}

.video-placeholder:hover .video-play-btn {
  transform: scale(1.1);
  background: var(--brand-yellow);
  color: #000;
  box-shadow: 0 0 30px var(--brand-yellow-glow);
}

/* Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: stretch;
}

.pricing-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.pricing-card.featured {
  border: 2px solid var(--brand-blue);
}

[data-theme="dark"] .pricing-card.featured {
  border-color: var(--brand-yellow);
}

.pricing-card.free-trial {
  border: 2px solid #10b981 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .pricing-card.free-trial {
  border-color: #10b981 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35) !important;
}

.pricing-card:hover {
  transform: translateY(-8px) !important;
  border-color: var(--brand-yellow) !important;
  box-shadow: 0 0 35px rgba(242, 183, 5, 0.65), 0 15px 45px rgba(0, 0, 0, 0.45) !important;
}

.pricing-card.free-trial:hover {
  border-color: #10b981 !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.65), 0 15px 45px rgba(0, 0, 0, 0.45) !important;
}

.pricing-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.45);
}

[data-theme="dark"] .pricing-badge {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.45);
}

.pricing-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pricing-features i {
  color: #10b981;
}

/* FAQ Accordions */
.faq-wrap {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-header {
  padding: 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

html[lang="ar"] .faq-header {
  text-align: right;
}

.faq-icon {
  transition: var(--transition-smooth);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--brand-blue);
}

[data-theme="dark"] .faq-item.active .faq-icon {
  color: var(--brand-yellow);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-content p {
  padding: 0 24px 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  padding: 60px 0;
  transition: var(--transition-theme);
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.footer-logo span {
  font-weight: 800;
  font-size: 1.3rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  list-style: none;
  margin-bottom: 30px;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--brand-blue);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* RTL Override Classes (for Arabic) */
html[lang="ar"] {
  direction: rtl;
}

html[lang="ar"] .nav-menu {
  flex-direction: row-reverse;
}

html[lang="ar"] .hero-title span {
  background: linear-gradient(135deg, var(--brand-blue), #5d75f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] html[lang="ar"] .hero-title span {
  background: linear-gradient(135deg, #6088ff, var(--brand-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Mobile Responsiveness */
@media (max-width: 850px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .compare-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    display: none; /* simple mobile version triggers WhatsApp or stays simple */
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.8rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-btns .btn {
    width: 100%;
  }
}

/* Drag and Drop animations and node styles */
@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes popOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.dropped-family-node {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease !important;
}

.dropped-family-node:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 0 25px var(--brand-yellow) !important;
}

@keyframes bounceGuide {
  0%, 100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -12px);
  }
}

.bouncing-guide {
  animation: bounceGuide 1.6s infinite ease-in-out;
}

/* Responsive adjustments for 3D Playground and buttons on Mobile */
@media (max-width: 850px) {
  .hero-section {
    padding-top: 140px !important;
    padding-bottom: 40px !important;
  }
  
  .hero-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 40px !important;
  }
  
  .hero-content {
    width: 100% !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }
  
  .hero-visual {
    width: 100% !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .showcase-container {
    max-width: 100% !important;
    height: 480px !important;
    margin: 0 auto !important;
  }
  
  .revit-window {
    height: 380px !important;
  }
  
  .revit-sidebar {
    width: 70px !important;
    padding: 10px 4px !important;
  }
  
  .revit-item {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.3rem !important;
  }
  
  #camera-rotate-btn {
    left: 80px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 0.95rem !important;
    top: 12px !important;
  }
  
  #viewer-3d-guide-alert {
    top: 80px !important;
    font-size: 0.8rem !important;
    padding: 8px 16px !important;
  }
  
  /* Touch target sizes for header toggles */
  .control-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.3rem !important;
  }
}

@media (max-width: 576px) {
  header .nav-actions .btn {
    display: none !important; /* Hide WhatsApp button in header on small mobile to save space */
  }
  .nav-container {
    padding: 0 12px !important;
  }
}

/* Force global background layouts below body content to prevent blocking clicks */
.hero-section, section {
  position: relative;
  z-index: 5 !important;
}

header {
  z-index: 120 !important;
}

.grid-overlay, .gradient-bg {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

@keyframes pulseArrowBtn {
  0%, 100% {
    box-shadow: 0 0 10px var(--brand-yellow-glow);
    transform: translateY(-50%) scale(1);
  }
  50% {
    box-shadow: 0 0 20px var(--brand-yellow);
    transform: translateY(-50%) scale(1.08);
  }
}

@keyframes pulseArrowBtnRTL {
  0%, 100% {
    box-shadow: 0 0 10px var(--brand-yellow-glow);
    transform: translateY(-50%) scale(1);
  }
  50% {
    box-shadow: 0 0 20px var(--brand-yellow);
    transform: translateY(-50%) scale(1.08);
  }
}

/* Force Desktop layout on all Laptop/Desktop computers regardless of window size/zoom */
html.device-desktop .hero-section {
  padding-top: 180px !important;
  padding-bottom: 120px !important;
}

html.device-desktop .hero-grid {
  display: grid !important;
  grid-template-columns: 0.8fr 1.2fr !important;
  gap: 48px !important;
  text-align: right !important;
}

html[lang="en"].device-desktop .hero-grid {
  text-align: left !important;
}

html.device-desktop .hero-content {
  width: 100% !important;
  padding: 0 !important;
  display: block !important;
}

html.device-desktop .hero-visual {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  display: flex !important;
  transform: none !important;
  padding: 0 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

html.device-desktop .showcase-container {
  max-width: 850px !important;
  height: 580px !important;
}

html.device-desktop .revit-window {
  height: 512px !important;
}

html.device-desktop .revit-sidebar {
  width: 80px !important;
  padding: 15px 8px !important;
}

html.device-desktop .revit-item {
  width: 56px !important;
  height: 56px !important;
  font-size: 1.5rem !important;
}

html.device-desktop #camera-rotate-btn {
  left: 96px !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 1rem !important;
  top: 15px !important;
}

html.device-desktop #viewer-3d-guide-alert {
  top: 90px !important;
  font-size: 0.9rem !important;
  padding: 10px 20px !important;
}

html.device-desktop .control-btn {
  width: 40px !important;
  height: 40px !important;
  font-size: 1.2rem !important;
}

/* Globe and Ray Sections Styling */
#world-reach, #tech-engine {
  padding: 100px 0;
  background-color: var(--bg-secondary) !important;
}

.globe-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 480px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.globe-overlay-info {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 10;
  max-width: 320px;
}

html[lang="en"] .globe-overlay-info {
  right: auto;
  left: 24px;
}

.globe-stat-card {
  background: rgba(10, 15, 36, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.globe-stat-card h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.globe-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.country-tag.active {
  background: rgba(242, 183, 5, 0.15) !important;
  border-color: var(--brand-yellow) !important;
  color: var(--brand-yellow) !important;
}

/* Light Theme overrides for Globe active network panel and country tags */
[data-theme="light"] .globe-stat-card {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .globe-stat-card h4 {
  color: var(--text-primary) !important;
}

[data-theme="light"] .country-tag {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.05) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .country-tag.active {
  background: rgba(242, 183, 5, 0.18) !important;
  border-color: var(--brand-yellow) !important;
  color: #a37500 !important;
}

/* The Speed Engine (Rays) Wrapper */
.rays-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 360px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

#rays-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.rays-overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.rays-stats-grid {
  display: flex;
  gap: 60px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.ray-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ray-stat-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand-yellow);
  text-shadow: 0 0 15px var(--brand-yellow-glow);
  margin-bottom: 8px;
}

[data-theme="light"] .ray-stat-val {
  color: var(--brand-blue);
  text-shadow: 0 0 15px var(--brand-blue-glow);
}

.ray-stat-lbl {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Responsive Overrides for Globe & Rays */
@media (max-width: 768px) {
  #world-reach, #tech-engine {
    padding: 60px 0;
  }

  .globe-wrapper {
    height: 380px;
  }

  .globe-overlay-info {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    margin: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  .globe-stat-card {
    padding: 10px !important;
  }

  .globe-stat-card h4 {
    text-align: center;
    font-size: 0.85rem !important;
    margin-bottom: 8px !important;
  }

  .globe-countries {
    justify-content: center;
    gap: 6px !important;
  }

  .country-tag {
    padding: 3px 8px !important;
    font-size: 0.7rem !important;
  }

  .rays-wrapper {
    height: 380px !important;
    position: relative !important;
  }

  .rays-overlay-content {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
  }

  .rays-stats-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }

  .ray-stat-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .ray-stat-val {
    font-size: 1.8rem !important;
    margin-bottom: 2px !important;
  }

  .ray-stat-lbl {
    font-size: 0.75rem !important;
  }
}

/* Floating Chat Widget CSS styling */
#afoshy-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

/* RTL-aware spacing overrides if language is English */
html[lang="en"] #afoshy-chat-widget {
  right: auto;
  left: 24px;
  align-items: flex-start;
}

#chat-trigger-btn {
  width: 48px;
  height: 110px;
  border-radius: 0px !important;
  background: rgba(242, 183, 5, 0.12) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--brand-yellow) !important;
  border: 1px solid var(--brand-yellow) !important;
  border-right: 3px solid var(--brand-yellow) !important;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(242, 183, 5, 0.2) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden;
  padding: 8px 0;
}

html[lang="en"] #chat-trigger-btn {
  border-right: 1px solid var(--brand-yellow) !important;
  border-left: 3px solid var(--brand-yellow) !important;
}

#chat-trigger-btn:hover {
  background: rgba(242, 183, 5, 0.28) !important;
  box-shadow: 0 0 30px rgba(242, 183, 5, 0.5) !important;
  transform: translateY(-5px) scale(1.03) !important;
}

#chat-trigger-btn i {
  transition: transform 0.3s ease;
}

#chat-trigger-btn:hover i {
  transform: scale(1.1);
}

.btn-vertical-txt {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-top: 6px;
}

.chat-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0px !important;
  border: 1px dashed var(--brand-yellow);
  animation: chat-pulse-anim-rect 2.5s infinite linear;
  pointer-events: none;
}

@keyframes chat-pulse-anim-rect {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.12, 1.06); opacity: 0; }
}

/* Chat Window */
#chat-window-box {
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 520px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
  opacity: 1;
  transform: translateY(0) scale(1);
}

html[lang="en"] #chat-window-box {
  transform-origin: bottom left;
}

#chat-window-box.hidden {
  opacity: 0;
  transform: translateY(30px) scale(0.85);
  pointer-events: none;
  display: none !important;
}

/* Header */
.chat-header {
  padding: 16px 20px;
  background: rgba(10, 15, 36, 0.55);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

[data-theme="light"] .chat-header {
  background: rgba(255, 255, 255, 0.7);
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(242, 183, 5, 0.15);
  border: 1px solid var(--brand-yellow);
  color: var(--brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.chat-title-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.chat-status {
  font-size: 0.7rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-status i {
  font-size: 0.5rem;
  animation: chat-status-blink 1.5s infinite;
}

@keyframes chat-status-blink {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

#chat-close-btn {
  margin-right: auto;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

html[lang="en"] #chat-close-btn {
  margin-right: 0;
  margin-left: auto;
}

#chat-close-btn:hover {
  color: #f87171;
}

/* Body */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.chat-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.chat-screen.hidden {
  display: none !important;
}

.chat-intro-msg {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 8px;
}

/* Department buttons */
.dept-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dept-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: right;
  color: var(--text-primary);
}

html[lang="en"] .dept-btn {
  text-align: left;
}

.dept-btn:hover {
  background: rgba(242, 183, 5, 0.04);
  border-color: var(--brand-yellow);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(242, 183, 5, 0.08);
}

[data-theme="light"] .dept-btn:hover {
  background: rgba(0, 47, 167, 0.03);
  border-color: var(--brand-blue);
}

.dept-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.3s;
  flex-shrink: 0;
}

.dept-btn:hover .dept-icon {
  background: rgba(242, 183, 5, 0.15);
  border-color: var(--brand-yellow);
  color: var(--brand-yellow);
}

.dept-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dept-text strong {
  font-size: 0.88rem;
  font-weight: 700;
}

.dept-text span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Conversation Screen */
#chat-back-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

html[lang="en"] #chat-back-btn {
  align-self: flex-end;
}

html[lang="en"] #chat-back-btn i {
  transform: rotate(180deg);
}

#chat-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

#chat-messages-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  padding-right: 2px;
}

/* Messages */
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-msg.agent {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  align-self: flex-start;
  border-top-right-radius: 2px;
}

html[lang="en"] .chat-msg.agent {
  border-top-right-radius: 12px;
  border-top-left-radius: 2px;
}

.chat-msg.user {
  background: var(--brand-blue);
  color: #fff;
  align-self: flex-end;
  border-top-left-radius: 2px;
}

html[lang="en"] .chat-msg.user {
  border-top-left-radius: 12px;
  border-top-right-radius: 2px;
}

.chat-msg-time {
  font-size: 0.62rem;
  opacity: 0.5;
  align-self: flex-end;
}

.chat-msg-pending-tag {
  font-size: 0.62rem;
  color: var(--brand-yellow);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Waiting / Loading state */
#chat-waiting-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  align-self: center;
  margin-top: auto;
}

#chat-waiting-indicator.hidden {
  display: none !important;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 3px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--brand-yellow);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Footer / Input Area */
.chat-footer {
  padding: 12px 16px;
  background: rgba(10, 15, 36, 0.45);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-footer.hidden {
  display: none !important;
}

[data-theme="light"] .chat-footer {
  background: rgba(255, 255, 255, 0.6);
}

#chat-textarea {
  flex: 1;
  height: 38px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.8rem;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.3;
  transition: all 0.3s;
}

#chat-textarea:focus {
  border-color: var(--brand-yellow);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] #chat-textarea:focus {
  border-color: var(--brand-blue);
}

#chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.3s;
}

#chat-send-btn:hover {
  background: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

html[lang="en"] #chat-send-btn i {
  transform: scaleX(-1);
}

/* Light Theme overrides for Floating Chat elements */
[data-theme="light"] #chat-window-box {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .chat-msg.agent {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .dept-btn {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .dept-icon {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] #chat-textarea {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] #chat-back-btn {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] #chat-waiting-indicator {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: var(--text-secondary) !important;
}


