/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&family=Inter:wght@400;700;900&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --color-primary: #00d4ff;
    --color-secondary: #8338ec;
    --color-accent: #06ffa5;
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-light: #f0f0f0;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-shadow-primary: 0 0 15px rgba(0, 212, 255, 0.5), 0 0 30px rgba(0, 212, 255, 0.3);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

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

input, button, textarea, select {
    font: inherit;
    border: none;
    outline: none;
}

/* ===== UTILITIES ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3rem);
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.section-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== GRIDS ===== */
#statistics-grid, #services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s, border-color 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(5, 5, 8, 0.9);
    border-bottom: 1px solid var(--border-color);
}

#header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 6rem;
}

/* ============================================= */
/* LOGO - OPTIMIZED SIZE WITH VIBRANT GRADIENT */
/* ============================================= */

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-image {
  height: 55px;  /* Balanced size - won't break layout */
  width: auto;
  max-width: 280px;
  display: block;
  
  /* Match the Send Message button gradient colors! */
  filter: 
    brightness(1.15)
    saturate(1.3)
    drop-shadow(0 0 12px rgba(0, 212, 255, 0.8))
    drop-shadow(0 0 25px rgba(131, 56, 236, 0.7))
    drop-shadow(0 0 35px rgba(167, 104, 255, 0.5));
  
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-image:hover {
  filter: 
    brightness(1.3)
    saturate(1.5)
    drop-shadow(0 0 18px rgba(0, 212, 255, 1))
    drop-shadow(0 0 35px rgba(131, 56, 236, 1))
    drop-shadow(0 0 50px rgba(167, 104, 255, 0.8));
  transform: scale(1.08);
}

/* ============================================= */
/* RESPONSIVE SIZING - CONSERVATIVE */
/* ============================================= */

@media (max-width: 1024px) {
  .logo-image {
    height: 52px;
    max-width: 260px;
  }
}

@media (max-width: 768px) {
  .logo-image {
    height: 48px;
    max-width: 240px;
  }
}

@media (max-width: 480px) {
  .logo-image {
    height: 42px;
    max-width: 200px;
  }
}

/* Smaller when header is scrolled */
.header.scrolled .logo-image {
  height: 50px;
}

@media (max-width: 768px) {
  .header.scrolled .logo-image {
    height: 45px;
  }
}

@media (max-width: 480px) {
  .header.scrolled .logo-image {
    height: 40px;
  }
}

/* ============================================= */
/* RTL SUPPORT */
/* ============================================= */

[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

/* ============================================= */
/* HIDE OLD LOGO ELEMENTS */
/* ============================================= */

.logo-svg,
.dd-logo-header,
.logo-text-container,
.d-shape-header,
.data-bars-header,
.binary-arc-header,
.bar-header,
.binary-num,
.arrow-header {
  display: none !important;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

.nav-link.active::after,
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

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

.lang-switcher {
    display: flex;
    background: var(--bg-darker);
    border-radius: 50px;
    padding: 0.25rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.nav-toggle {
    display: none; /* Hidden on desktop */
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Particles.js Container */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  background: linear-gradient(-45deg, #0a0a0f, #1a1a2e, #16213e, #0f3460);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* Hide old manual particles */
.particle {
  display: none !important;
}

.animated-gradient {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(-45deg, var(--bg-dark), var(--color-secondary), var(--bg-dark), var(--color-primary));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.2;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    opacity: 0.9;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(131, 56, 236, 0.4);
}

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

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--bg-dark);
}

/* ===== CARDS ===== */
.glassmorphism-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.glassmorphism-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow-shadow-primary);
    border-color: var(--color-primary);
}

/* ===== STATISTICS SECTION ===== */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
.stat-icon i {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    width: 48px;
    height: 48px;
}
.stat-number, .stat-suffix {
    display: inline;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}
.stat-number {
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}
.stat-suffix {
    color: var(--color-accent);
}
.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ===== SERVICES SECTION ===== */
.service-card {
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    border-color: var(--color-primary);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(131, 56, 236, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(131, 56, 236, 0.2));
    transform: scale(1.1) rotate(5deg);
}

.service-icon i {
    color: var(--color-primary);
    width: 40px;
    height: 40px;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.service-description {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.service-category {
    display: none !important;
}

.services-action {
    margin-top: 4rem;
    text-align: center;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.form-group-full {
    grid-column: 1 / -1;
}

.contact-form label {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: white;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

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

.form-submit-btn {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-darker);
    padding: 4rem 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 1rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-logo .logo-dd {
    font-size: 3.5rem;
}

.footer-company-name {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.footer-links li, .footer-contact li {
    margin-bottom: 0.8rem;
}

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

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

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

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-contact a:hover {
    color: var(--color-primary);
}

.footer-socials {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

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

.footer-socials a:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.footer-copyright {
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
}


/* ===== FIXED ELEMENTS ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(15deg);
}

.back-to-top {
    position: fixed;
    bottom: 6.5rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-secondary);
    color: white;
}

/* ===== ANIMATIONS & UTILITIES ===== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}