@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;700;800&display=swap');

:root {
  /* DPE Premium Cyber Palette */
  --primary-color: #755de9; /* Cyber Purple */
  --primary-light: #9c7dff;
  --primary-dark: #5842b5;
  
  --secondary-color: #3772ff; /* Glow Blue */
  --secondary-light: #6ea4ff;
  --secondary-dark: #0047cc;

  --accent-gold: #ffd700;
  
  --text-main: #ffffff;
  --text-muted: #e2e8f0; /* SLATE-200: Much brighter for dark mode */
  --text-light: #f8fafc;
  
  --bg-body: #02000f; /* Deep Navy/Black */
  --bg-surface: #0f0b29; /* Darker, slightly blue-tinted surface for better contrast */
  --bg-surface-light: #181730;
  
  /* Digital Gradients */
  --gradient-primary: linear-gradient(135deg, #755de9 0%, #5842b5 100%);
  --gradient-accent: linear-gradient(135deg, #3772ff 0%, #0047cc 100%);
  --gradient-digital: linear-gradient(45deg, #755de9, #3772ff);
  --gradient-glow: radial-gradient(circle at center, rgba(117, 93, 233, 0.4) 0%, transparent 70%);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(117, 93, 233, 0.5);
  --shadow-glow-blue: 0 0 20px rgba(55, 114, 255, 0.5);
}

/* Cyber Grid Pattern */
.bg-grid {
    background-color: var(--bg-body);
    background-image: 
        linear-gradient(rgba(117, 93, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(117, 93, 233, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

body {
  font-family: 'Inter', sans-serif; /* Fallback to Inter, will try to use Arabic fonts in Views */
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .navbar-brand {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Glassmorphism Dark - Higher Contrast */
.glass-effect {
  background: rgba(15, 11, 41, 0.7); /* Much darker background for text readability */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(117, 93, 233, 0.2); /* Purple tint border */
  box-shadow: var(--shadow-md);
}

.glass-card {
  background: rgba(15, 11, 41, 0.6); /* Darker base */
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(117, 93, 233, 0.2);
  border-color: rgba(117, 93, 233, 0.3);
}

/* Navbar Dark */
.navbar {
  background: rgba(2, 0, 15, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.nav-link {
  color: #e2e8f0 !important; /* Explicitly brighter color */
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
  background: rgba(117, 93, 233, 0.1);
  text-shadow: 0 0 10px rgba(117, 93, 233, 0.5);
}

/* Buttons */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 8px; /* Sharper edges */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #283593 0%, #1a237e 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 35, 126, 0.4);
}

.btn-secondary {
    background: var(--gradient-accent);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 191, 165, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1de9b6 0%, #00bfa5 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 191, 165, 0.4);
    color: #fff;
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
}

/* Forms */
.form-control {
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
}

.input-group-text {
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-muted);
}

/* Cards Dark */
.card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  color: var(--text-main);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(117, 93, 233, 0.3);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem;
}

.card-header h5 {
    margin-bottom: 0;
    color: var(--text-main);
}

.card-body {
  padding: 2rem;
}

/* Footer Dark */
.footer-distributed {
    background-color: #010008;
    box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    width: 100%;
    text-align: left;
    font: normal 16px 'Inter', sans-serif;
    padding: 45px 50px;
    color: #fff;
}

.footer-distributed .footer-left p {
    color: #8f9296;
    font-size: 14px;
    margin: 0;
}

.footer-links {
    color: #ffffff;
    margin: 20px 0 12px;
}

.footer-links a {
    display: inline-block;
    line-height: 1.8;
    text-decoration: none;
    color: inherit;
    margin-right: 15px;
}
.footer-links a:hover {
    color: var(--secondary-color);
}

/* Utility Animations */
@keyframes float {
	0% {
		transform: translatey(0px);
	}
	50% {
		transform: translatey(-15px);
	}
	100% {
		transform: translatey(0px);
	}
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* RTL Support for layout elements */
html[dir="rtl"] .footer-distributed {
    text-align: right;
}
html[dir="rtl"] .footer-links a {
    margin-right: 0;
    margin-left: 15px;
}

/* Spinner */
/* Spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.loading-spinner {
    color: var(--primary-color);
    width: 3.5rem;
    height: 3.5rem;
}

main {
    flex: 1 0 auto;
}

body > .container {
    padding-bottom: 3rem;
}

/* Hero Section Specifics */
/* Hero Section Specifics */
.hero-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    background-color: #f8fafc;
}

.pixel-shape {
    position: absolute;
    background: var(--primary-light);
    opacity: 0.1;
    z-index: 0;
}

.pixel-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
    background: var(--gradient-digital);
    mask-image: linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black), linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black);
    mask-size: 60px 60px;
    mask-position: 0 0, 30px 30px;
}

.pixel-2 { 
    width: 200px; 
    height: 200px; 
    bottom: 50px; 
    left: -40px;
    background: var(--secondary-color);
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 100%, 50% 75%, 0% 75%);
}

.square-dots {
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(var(--secondary-color) 20%, transparent 20%);
    background-size: 20px 20px;
    opacity: 0.2;
}
.dots-1 { top: 10%; left: 10%; }
.dots-2 { bottom: 10%; right: 10%; }

