/* Root Variables for Theming */
:root {
    --primary-color: #00d2ff;     /* Cyber Cyan */
    --secondary-color: #3a7bd5;   /* Deep Blue */
    --bg-dark: #050b14;           /* Deep Space */
    --bg-card: rgba(16, 25, 43, 0.7); /* Glass Card */
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --font-arabic: 'Cairo', sans-serif;
    --font-latin: 'Outfit', sans-serif;
    --border-radius: 16px;
    --transition: 0.3s ease-in-out;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-arabic);
}

html {
    scroll-behavior: initial !important; /* Managed by Lenis */
    overflow-x: hidden;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}


body {
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
}

/* Background Glow Effects */
body::before, body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.4;
    animation: drift 20s infinite alternate ease-in-out;
}

body::before {
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, var(--secondary-color), transparent);
}

body::after {
    bottom: -200px;
    left: -200px;
    background: radial-gradient(circle, var(--primary-color), transparent);
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.section { padding: 100px 0; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.section-heading {
    margin-bottom: 60px;
}

.section-heading h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

div.heading-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 10px auto 20px;
    border-radius: 2px;
}

.highlight {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
    transform: translateY(-3px);
}

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

.btn-secondary:hover {
    background: rgba(0, 210, 255, 0.1);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.2);
    transform: translateY(-3px);
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(5, 11, 20, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-latin);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-right: -20px;
}

.logo img {
    height: 45px;
    border-radius: 8px; /* Depending on the logo style */
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links li a:hover::after, .nav-links li a.active::after {
    width: 100%;
}

.nav-links li a:hover, .nav-links li a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    user-select: none;
}

.lang-toggle:hover {
    border-color: var(--primary-color);
    background: rgba(0, 210, 255, 0.08);
}

.lang-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
}

.lang-toggle span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.lang-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 25, 43, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.lang-option:hover,
.lang-option.active {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-color);
}

.lang-option.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: auto;
    margin-left: 5px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

/* Hero Background Slideshow */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 11, 20, 0.55);
    z-index: 2;
}

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

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
    transform: scale(1.2);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-latin);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-text .subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-buttons-only {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

.hero-buttons-only .hero-buttons {
    justify-content: center;
}

.floating-logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-logo {
    width: 100%;
    max-width: 400px;
    border-radius: 50%; /* or another shape */
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.glow-effect {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.3;
    z-index: 1;
    filter: blur(50px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.1); opacity: 0.4; }
    100% { transform: scale(1); opacity: 0.2; }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: bounce 2s infinite;
    color: var(--text-muted);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* About Section */
.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.about-img {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.giant-icon {
    font-size: 8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.4));
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.features-list li {
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.features-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    transition: var(--transition);
    text-align: center;
    padding: 40px 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,210,255,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition);
}

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

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
}

/* Specialized Solutions Grid */
.solutions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.solution-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.solution-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    background: rgba(0, 210, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    min-width: 60px;
    display: flex;
    justify-content: center;
}

.solution-item p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Partners / Our Work Section */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.partner-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.partner-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
    transition: var(--transition);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.partner-card:hover .partner-logo {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.5));
}

.partner-card h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.5;
    transition: var(--transition);
}

.partner-card:hover h4 {
    color: var(--primary-color);
}

/* Contact Section */
.contact-container {
    margin-top: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.input-group textarea {
    resize: vertical;
}

.input-group input:focus, .input-group textarea:focus {
    border-color: var(--primary-color);
    background: rgba(0, 210, 255, 0.05);
}

.input-group label {
    position: absolute;
    top: 15px;
    right: 20px; /* RTL aware */
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition);
}

/* Floating Label Logic */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    right: 15px;
    font-size: 0.85rem;
    background: var(--bg-dark); /* Hack for cover */
    padding: 0 5px;
    color: var(--primary-color);
    border-radius: 4px;
}

.btn-block {
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1); /* RTL border */
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: rgba(0, 210, 255, 0.1);
    padding: 15px;
    border-radius: 50%;
}

.info-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-muted);
}

.form-message {
    margin-top: 10px;
    font-weight: 600;
}

.success-text { color: #4ade80; }
.error-text { color: #f87171; }

.centered-contact-card {
    max-width: 600px;
    margin: 40px auto 0;
}

.contact-info.no-border {
    border-right: none;
    padding-right: 0;
    align-items: center;
}

.contact-info.no-border .info-item {
    align-items: center;
    text-align: center;
    flex-direction: column;
}

.contact-info.no-border .info-item i {
    margin-bottom: 0px;
}

.whatsapp-container {
    margin-top: 10px;
}

.whatsapp-btn {
    background: linear-gradient(90deg, #25D366, #128C7E);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    background: linear-gradient(90deg, #2ae06d, #149a8b);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background: rgba(5, 11, 20, 0.9);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-latin);
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .contact-container {
        display: block;
    }

    .contact-info {
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 30px;
        padding-right: 0;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(16, 25, 43, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: var(--transition);
        padding-top: 50px;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
    }
    
    .floating-logo {
        max-width: 300px;
    }
}

/* ==========================================
   LTR (English) Direction Overrides
   ========================================== */
html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] .nav-links li a::after {
    right: auto;
    left: 0;
}

html[dir="ltr"] .contact-info {
    padding-right: 0;
    padding-left: 20px;
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

html[dir="ltr"] .contact-info.no-border {
    border-left: none;
    padding-left: 0;
}

html[dir="ltr"] .input-group label {
    right: auto;
    left: 20px;
}

html[dir="ltr"] .input-group input:focus ~ label,
html[dir="ltr"] .input-group input:not(:placeholder-shown) ~ label,
html[dir="ltr"] .input-group textarea:focus ~ label,
html[dir="ltr"] .input-group textarea:not(:placeholder-shown) ~ label {
    right: auto;
    left: 15px;
}

html[dir="ltr"] .features-list li {
    flex-direction: row;
}

html[dir="ltr"] .solution-item {
    flex-direction: row;
}

html[dir="ltr"] .hero-text {
    text-align: left;
}

html[dir="ltr"] .hero-text h1 {
    font-family: var(--font-latin);
}

@media screen and (max-width: 768px) {
    html[dir="ltr"] .nav-links {
        right: auto;
        left: -100%;
    }

    html[dir="ltr"] .nav-links.active {
        left: 0;
        right: auto;
    }

    html[dir="ltr"] .hero-text {
        text-align: center;
    }
}

@media screen and (max-width: 992px) {
    html[dir="ltr"] .contact-info {
        border-left: none;
        padding-left: 0;
    }

    html[dir="ltr"] .hero-text {
        text-align: center;
    }
}
