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

/* CSS Variables - Design System */
:root {
    --header-height: 5rem; /* fallback/default */
    /* Core Brand Colors */
    --color-background: #fff;
    --color-foreground: #222F36;

    /* Primary Brand - Logic Blue */
    --color-primary: #005B8A;
    --color-primary-foreground: #fff;
    --color-primary-hover: #00486d;
    --color-primary-light: #e2eef6;

    /* Secondary - Accent Orange */
    --color-secondary: #E78B3C;
    --color-secondary-foreground: #fff;
    --color-secondary-light: #fff6ec;

    /* Accent Colors */
    --color-accent: #E78B3C;
    --color-accent-foreground: #fff;
    --color-accent-light: #fff6ec;

    /* Neutral Grays */
    --color-muted: #f6f8fa;
    --color-muted-foreground: #607080;
    --color-muted-darker: #e9eef2;

    /* Surface Colors */
    --color-card: #fff;
    --color-card-foreground: #222F36;
    --color-card-hover: #f6f8fa;

    /* Interactive Elements */
    --color-border: #e2eef6;
    --color-input: #f1f8fc;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #005B8A 0%, #E78B3C 100%);
    --gradient-hero: linear-gradient(135deg, #005B8A 0%, #E78B3C 100%);
    --gradient-card: linear-gradient(180deg, #fff, #f6f8fa);

    /* Shadows */
    --shadow-soft: 0 2px 10px -2px rgba(0, 91, 138, 0.10);
    --shadow-medium: 0 8px 30px -8px rgba(0, 91, 138, 0.15);
    --shadow-strong: 0 20px 50px -12px rgba(0, 91, 138, 0.25);
    --shadow-glow: 0 0 40px rgba(0, 91, 138, 0.18);

    /* Typography */
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Spacing */
    --section-padding: 5rem;
    --container-padding: 2rem;
    --border-radius: 0.75rem;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Logo image styling */
/* Logo image styling */
.main-logo {
    height: 3.8rem;
    width: auto;
    display: block;
    margin-right: 1rem;
    margin-left: 0;
    object-fit: contain;
    /* Remove background/border for clarity */
    background: none;
    border-radius: 0;
}

.footer-logo-img {
    height: 3.2rem;
    width: auto;
    display: block;
    margin-bottom: 0.5rem;
    object-fit: contain;
    background: none;
    border-radius: 0;
}

.logo,
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* Base Typography */
body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-foreground);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 700;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: hsla(0, 0%, 100%, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-foreground);
    font-weight: bold;
    font-size: 1.125rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-foreground);
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--color-muted-foreground);
    transition: var(--transition-smooth);
    font-weight: 500;
}

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

.cta-desktop {
    display: none;
}

.mobile-menu-btn {
    position: absolute;
    top: 0.7rem;      /* كان 1.2rem، جرب أقل */
    right: 1rem;
    z-index: 1100;
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}

.hamburger {
    width: 24px;
    height: 3px;
    background-color: var(--color-foreground);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.mobile-menu-btn.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-mobile {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

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

.nav-mobile-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-link-mobile {
    text-decoration: none;
    color: var(--color-muted-foreground);
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
    font-weight: 500;
}

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

.mobile-cta {
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn-sm {
    height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    height: 2.75rem;
    padding: 0 2rem;
    font-size: 1rem;
}

.btn {
    height: 2.5rem;
    padding: 0 1rem;
}

.btn-hero {
    background: var(--gradient-primary);
    color: var(--color-primary-foreground);
    box-shadow: var(--shadow-soft);
    transform: translateY(0);
}

.btn-hero:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background-color: var(--color-card-hover);
    border-color: var(--color-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary);
}

.btn-ghost:hover {
    background-color: var(--color-muted);
    color: var(--color-foreground);
}

/* Hero Section */
.hero {
    padding-top: var(--header-height);
    --padding-top: 5rem;
    padding-bottom: var(--section-padding);
    background: linear-gradient(135deg, var(--color-background) 0%, var(--color-muted) 30%, var(--color-primary-light) 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 600px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-foreground);
    line-height: 1.1;
}

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

.hero-description {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-foreground);
    --background: rgba(255,255,255,0.95); /* Soft white background for pop */
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 12px -2px rgba(0,91,138,0.10);
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.company-name-highlight {
    color: #E78B3C;              /* Your accent orange */
    font-weight: 800;
    font-size: 1.35em;
    letter-spacing: 0.5px;
    background: none;
    padding: 0 0.2em;
    border-radius: 0.3em;
    text-shadow: 0 1px 4px rgba(231,139,60,0.08);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    z-index: 10;
}

.hero-img {
    width: 100%;
    height: auto;
    max-width: 400px;
    filter: drop-shadow(var(--shadow-strong));
}

.hero-bg-decoration {
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 3rem;
    transform: rotate(-6deg) scale(1.1);
    filter: blur(3rem);
}

/* Sections */
.services {
    padding: var(--section-padding) 0;
    background-color: var(--color-muted);
}

.products {
    padding: var(--section-padding) 0;
    background-color: var(--color-background);
}

.partners {
    padding: var(--section-padding) 0;
    background-color: var(--color-muted);
}

.contact {
    padding: var(--section-padding) 0;
    background-color: var(--color-background);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-foreground);
    margin-bottom: 1.5rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition-smooth);
    text-align: center;
}

.service-card:hover {
    box-shadow: var(--shadow-medium);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.service-header {
    margin-bottom: 1rem;
}

.service-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background-color: var(--color-primary-light);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.icon {
    width: 2rem;
    height: 2rem;
    color: var(--color-primary);
}

.service-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-foreground);
    margin-bottom: 0.5rem;
}

.service-subtitle {
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

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

.service-description {
    color: var(--color-muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.product-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.product-card:hover {
    box-shadow: var(--shadow-strong);
    transform: translateY(-4px);
}

.product-card-blue {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, transparent 100%);
}

.product-card-green {
    background: linear-gradient(135deg, var(--color-accent-light) 0%, transparent 100%);
}

.product-header {
    margin-bottom: 1.5rem;
}

.product-image {
    width: 100%;
    height: 12rem;
    background-color: var(--color-muted);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon {
    width: 6rem;
    height: 6rem;
    color: var(--color-primary);
}

.product-card-green .product-icon {
    color: var(--color-accent);
}

.product-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-foreground);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--color-muted-foreground);
    line-height: 1.6;
}

.product-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.875rem;
    border-radius: 9999px;
}

.product-card-green .feature-tag {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
}

.product-btn {
    width: 100%;
}

/* Partners Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.partner-logo {
    width: 5rem;
    height: 5rem;
    background-color: var(--color-muted-darker);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.partner-item:hover .partner-logo {
    background-color: var(--color-primary-light);
    box-shadow: var(--shadow-medium);
}

.partner-logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-muted-foreground);
    transition: var(--transition-smooth);
}

.partner-item:hover .partner-logo span {
    color: var(--color-primary);
}

/* Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.card-header {
    padding: 1.5rem 1.5rem 0;
}

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-foreground);
}

.card-content {
    padding: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-weight: 500;
    color: var(--color-foreground);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: calc(var(--border-radius) - 2px);
    background-color: var(--color-input);
    color: var(--color-foreground);
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--color-primary-light);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-label {
    font-weight: 500;
    color: var(--color-foreground);
    margin-bottom: 0.25rem;
}

.contact-value {
    color: var(--color-muted-foreground);
}

.mission-card {
    background: var(--gradient-card);
}

.mission-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-foreground);
    margin-bottom: 1rem;
}

.mission-text {
    color: var(--color-muted-foreground);
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: var(--color-secondary);
    color: var(--color-secondary-foreground);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-description {
    color: var(--color-secondary-foreground);
    opacity: 0.8;
    max-width: 400px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--color-secondary-light);
    opacity: 0.2;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary-foreground);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-link:hover {
    background-color: var(--color-primary);
    opacity: 1;
    transform: translateY(-2px);
}

.footer-section-title {
    font-weight: 600;
    color: var(--color-secondary-foreground);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--color-secondary-foreground);
    opacity: 0.7;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-secondary-foreground);
}

.footer-bottom {
    border-top: 1px solid var(--color-secondary-foreground);
    border-opacity: 0.2;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-copyright,
.footer-made {
    color: var(--color-secondary-foreground);
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    padding: 1rem;
    max-width: 350px;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-title {
    color: var(--color-foreground);
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
}

.toast-description {
    color: var(--color-muted-foreground);
    font-size: 0.875rem;
    margin: 0;
}

#clients {
  margin: 3rem 0;
  text-align: center;
}

#clients h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #235081; /* Brand blue or your accent */
}

.partners-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 12px -4px rgba(50,80,129,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.partner:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 4px 20px -2px rgba(50,80,129,0.18);
}

.partner-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: #f5f7fa;
  box-shadow: 0 2px 8px -4px rgba(50,80,129,0.08);
}

.partner-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d2d2d;
  margin-top: 0.25rem;
}

#chat-loader {
  position: fixed; /* <--- change from absolute to fixed! */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.92);
  padding: 2rem 2.5rem;
  border-radius: 1.2rem;
  box-shadow: 0 4px 32px -4px rgba(50,80,129,0.09);
  transition: opacity 0.3s;
}

#chat-loader.hidden {
  display: none;
  opacity: 0;
}

.loader-spinner {
  border: 6px solid #e3eaf3;
  border-top: 6px solid #235081;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 1.2rem;
}

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

.loader-text {
  color: #235081;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Responsive Design */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .cta-desktop {
        display: block;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1280px) {
    .hero-title {
        font-size: 4rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 767px) {
  .partners-list {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
}