/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors - Updated to match logo */
    --primary-color: #1DD1A1;
    /* Bright teal from logo */
    --secondary-color: #0891B2;
    /* Deeper blue-green from logo */
    --accent-color: #06B6D4;
    /* Medium cyan */
    --success-color: #10B981;
    /* Green success */
    --warning-color: #F59E0B;
    /* Amber warning */
    --danger-color: #EF4444;
    /* Red danger */

    /* Background Colors - Dark */
    --bg-primary: #0f0f23;
    --bg-secondary: #16213e;
    --bg-tertiary: #1a1a2e;
    --bg-card: #16213e;
    --bg-gradient: linear-gradient(135deg, #1DD1A1 0%, #0891B2 100%);
    /* Logo gradient */

    /* Text Colors - Dark */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6c757d;

    /* Border Colors - Dark */
    --border-color: #2d3748;
    --border-light: #4a5568;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;

    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Light Theme Colors */
.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --border-light: #ced4da;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* Arabic RTL Support */
[dir="rtl"] {
    font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', Arial, sans-serif;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition-normal);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-inner {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
    margin: 7px auto;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 1000;
}

.btn-lang {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-lang:hover {
    background: var(--bg-gradient);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Navigation */
.custom-navbar {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: var(--transition-normal);
    border-bottom: 1px solid var(--border-color);
}

.light-theme .custom-navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
}

.custom-navbar.scrolled {
    padding: 10px 0;
    background: rgba(15, 15, 35, 0.98);
}

.light-theme .custom-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    /* background: var(--bg-gradient); */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-text {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 8px 20px !important;
    margin: 0 5px;
    border-radius: 25px;
    transition: var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(29, 209, 161, 0.1);
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: calc(100vh - 80px);
    /* Subtract navbar height */
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 80px;
    /* Push down by navbar height */
}

@media (max-width: 768px) {
    .hero-section {
        min-height: calc(100vh - 70px);
        margin-top: 70px;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(253, 121, 168, 0.1) 0%, transparent 50%),
        var(--bg-primary);
    z-index: -1;
    transition: var(--transition-normal);
}

.light-theme .hero-background {
    background:
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(253, 121, 168, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(108, 92, 231, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(253, 121, 168, 0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(162, 155, 254, 0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(0, 184, 148, 0.3), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: float 20s linear infinite;
}

.light-theme .hero-particles {
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(108, 92, 231, 0.2), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(253, 121, 168, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(162, 155, 254, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(0, 184, 148, 0.2), transparent);
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px);
    }

    33% {
        transform: translateY(-10px) translateX(10px);
    }

    66% {
        transform: translateY(5px) translateX(-5px);
    }

    100% {
        transform: translateY(0px) translateX(0px);
    }
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.hero-buttons .btn-primary {
    background: var(--bg-gradient);
    border: none;
    color: white;
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.hero-buttons .btn-outline-light {
    border: 2px solid var(--border-light);
    color: var(--text-primary);
    background: transparent;
}

.hero-buttons .btn-outline-light:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

.light-theme .hero-buttons .btn-outline-light:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
    animation: fadeInRight 1s ease 0.8s both;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
}

.floating-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.floating-card:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: floatAnimation 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    top: 50%;
    right: 20%;
    animation: floatAnimation 6s ease-in-out infinite 2s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    left: 30%;
    animation: floatAnimation 6s ease-in-out infinite 4s;
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.floating-card span {
    font-weight: 600;
    color: var(--text-primary);
}

@keyframes floatAnimation {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--text-secondary);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Styles */
section {
    position: relative;
    padding: 80px 0;
    transition: var(--transition-normal);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-section {
    background: var(--bg-secondary);
    transition: var(--transition-normal);
}

.about-content {
    padding-right: 2rem;
}

.rtl .about-content {
    padding-right: 0;
    padding-left: 2rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 300px;
}

.tech-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.tech-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tech-item span {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

/* Services Section */
.services-section {
    background: var(--bg-primary);
    transition: var(--transition-normal);
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    height: 100%;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--bg-gradient);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.8rem;
    color: white;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-tech span {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.light-theme .service-tech span {
    background: rgba(108, 92, 231, 0.15);
}

/* Portfolio Section */
.portfolio-section {
    background: var(--bg-secondary);
    transition: var(--transition-normal);
}

.portfolio-filters {
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--bg-gradient);
    border-color: var(--primary-color);
    color: white;
}

.portfolio-item {
    margin-bottom: 2rem;
    opacity: 1;
    transition: var(--transition-normal);
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.portfolio-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(108, 92, 231, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-content {
    text-align: center;
    color: white;
    padding: 2rem;
}

.portfolio-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.portfolio-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.portfolio-tech {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-tech span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Team Section */
.team-section {
    background: var(--bg-primary);
    transition: var(--transition-normal);
}

.team-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 1;
}

.team-card:hover::before {
    opacity: 0.1;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.team-image {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.team-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    transition: var(--transition-normal);
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.team-card:hover .team-overlay {
    opacity: 1;
}

.team-social {
    display: flex;
    gap: 10px;
}

.team-social a {
    width: 35px;
    height: 35px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-fast);
}

.team-social a:hover {
    transform: scale(1.1);
}

.team-info {
    z-index: 2;
    position: relative;
}

.team-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.team-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    background: var(--bg-secondary);
    transition: var(--transition-normal);
}

.contact-form-wrapper {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    padding-left: 2rem;
}

.rtl .contact-info {
    padding-left: 0;
    padding-right: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.rtl .contact-item {
    flex-direction: row-reverse;
    justify-content: space-between;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.rtl .contact-icon {
    margin-right: 0;
    margin-left: 1rem;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.social-links {
    margin-top: 3rem;
}

.social-links h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.social-icons {
    display: flex;
    gap: 10px;
}

.rtl .social-icons {
    justify-content: flex-end;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-registration small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.footer-links h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-newsletter h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-newsletter p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form .form-control {
    flex: 1;
    margin-bottom: 0;
}

.newsletter-form .btn {
    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0;
}

.footer-copyright {
    color: var(--text-secondary);
    margin: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-normal);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.rtl .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #0891B2 0%, #1DD1A1 100%);
    transform: translateY(-3px);
}

/* Button Styles */
.btn-primary {
    background: var(--bg-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 30px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0891B2 0%, #1DD1A1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 209, 161, 0.3);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px 20px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    max-width: 350px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rtl .notification {
    right: auto;
    left: 20px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.notification-close:hover {
    color: var(--text-primary);
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
}

.notification-warning {
    border-left: 4px solid var(--warning-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }

    .floating-card {
        padding: 15px;
    }

    .floating-card i {
        font-size: 1.5rem;
    }

    .about-content {
        padding-right: 1rem;
    }

    .rtl .about-content {
        padding-right: 0;
        padding-left: 1rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-visual {
        margin-top: 3rem;
        height: 300px;
    }

    .floating-card {
        position: relative !important;
        display: inline-block;
        margin: 1rem;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }

    .floating-elements {
        text-align: center;
    }

    .about-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }

    .rtl .about-content {
        padding-left: 0;
    }

    .contact-info {
        padding-left: 0;
        margin-top: 3rem;
    }

    .rtl .contact-info {
        padding-right: 0;
    }

    .language-toggle {
        top: 80px;
        right: 15px;
        z-index: 1050;
        /* Higher than navbar */
    }

    .rtl .language-toggle {
        right: auto;
        left: 15px;
    }

    .theme-toggle-container {
        top: 140px;
        right: 15px;
    }

    .rtl .theme-toggle-container {
        right: auto;
        left: 15px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons .btn {
        display: block;
        margin-bottom: 1rem;
        text-align: center;
    }

    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .tech-stack {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .portfolio-filters {
        text-align: left;
    }

    .filter-btn {
        margin: 0.25rem;
        padding: 6px 15px;
        font-size: 0.9rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .rtl .back-to-top {
        right: auto;
        left: 20px;
    }

    .language-toggle {
        top: 70px;
        right: 10px;
        z-index: 1060;
        /* Even higher for mobile */
    }

    .rtl .language-toggle {
        right: auto;
        left: 10px;
    }

    .theme-toggle-container {
        top: 130px;
        right: 10px;
    }

    .rtl .theme-toggle-container {
        right: auto;
        left: 10px;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
    }

    .btn-lang {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 80px;
        /* Ensure button is large enough to tap */
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card,
    .portfolio-card,
    .team-card,
    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form .btn {
        width: 100%;
        height: 45px;
    }

    .floating-card {
        margin: 0.5rem;
        padding: 15px;
    }

    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
        top: 10px;
    }

    .rtl .notification {
        left: 10px;
        right: 10px;
    }

    .language-toggle {
        top: 65px;
        right: 8px;
    }

    .rtl .language-toggle {
        right: auto;
        left: 8px;
    }

    .btn-lang {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 75px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --border-color: #555555;
        --bg-card: #222222;
    }

    .light-theme {
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #999999;
        --bg-card: #f0f0f0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-indicator {
        animation: none;
    }

    .floating-card {
        animation: none;
    }

    .hero-particles {
        animation: none;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .language-toggle,
    .theme-toggle-container,
    .back-to-top,
    .hero-background,
    .loading-screen,
    .notification {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .section-title,
    .hero-title {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }

    .hero-section,
    .about-section,
    .services-section,
    .portfolio-section,
    .team-section,
    .contact-section {
        background: white !important;
    }

    .service-card,
    .portfolio-card,
    .team-card,
    .contact-form-wrapper {
        border: 1px solid #ccc !important;
        background: white !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3);
}

/* Company Registration Styles */
.company-registration-details {
    margin-top: 0.5rem;
}

.registration-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.registration-item:last-child {
    border-bottom: none;
}

.registration-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex: 1;
}

.registration-value {
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-left: 1rem;
}

/* RTL Support for Registration Items */
.rtl .registration-item {
    flex-direction: row-reverse;
}

.rtl .registration-value {
    margin-left: 0;
    margin-right: 1rem;
}

/* Footer Registration Grid */
.registration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.registration-grid .registration-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.3rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.registration-grid .registration-label {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.registration-grid .registration-value {
    margin-left: 0;
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .registration-grid {
        grid-template-columns: 1fr;
    }

    .registration-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .registration-value {
        margin-left: 0;
        margin-top: 0.2rem;
    }
}

/* Enhanced RTL Support - Add after existing .rtl rules */

/* RTL text alignment for contact details */
.rtl .contact-details {
    text-align: right;
}

.rtl .contact-details h4 {
    text-align: right;
}

.rtl .contact-details p {
    text-align: right;
}

/* RTL support for registration items */
.rtl .registration-label {
    text-align: right;
}

.rtl .registration-value {
    text-align: right;
}

.rtl .company-registration-details {
    text-align: right;
}

/* RTL support for social links */
.rtl .social-links h4 {
    text-align: right;
}

/* Mobile language toggle in navbar - Enhanced */
.btn-lang-mobile {
    background: rgba(29, 209, 161, 0.1);
    border: 1px solid rgba(29, 209, 161, 0.3);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-lang-mobile:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-lang-mobile i {
    font-size: 0.9em;
}

/* Hide the fixed language toggle on mobile if using navbar approach */
@media (max-width: 991px) {
    .language-toggle {
        display: none;
    }
}

/* Navbar Mobile Styles - Enhanced */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 6px 10px;
    font-size: 1.1rem;
    border-radius: 4px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(29, 209, 161, 0.25);
    text-decoration: none;
    outline: 0;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.2em;
    height: 1.2em;
}

/* Light theme navbar toggler */
.light-theme .navbar-toggler {
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
}

.light-theme .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Mobile navbar container adjustments - UPDATED */
@media (max-width: 991.98px) {
    .custom-navbar .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .navbar-brand {
        flex: 1;
        max-width: calc(100% - 140px);
        /* More space for language toggle and burger menu */
    }

    /* Better spacing between language toggle and burger menu */
    .language-toggle-mobile {
        margin-right: 12px;
        /* Increased from 8px */
    }

    .navbar-toggler {
        margin-left: 8px;
        margin-right: 8px;
        /* Add left margin to burger menu */
    }

    .navbar-nav {
        padding-top: 1rem;
        background: var(--bg-card);
        margin: 10px -15px 0;
        padding: 1rem 15px;
        border-radius: 8px;
        border: 1px solid var(--border-color);
    }

    .navbar-nav .nav-link {
        padding: 12px 15px !important;
        margin: 2px 0;
        border-radius: 6px;
        color: var(--text-primary) !important;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: var(--primary-color);
        color: white !important;
    }
}

/* Enhanced mobile brand adjustments - UPDATED */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
        max-width: calc(100% - 150px);
        /* More space */
    }

    .brand-text {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 160px;
        display: inline-block;
    }

    .logo-img {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .language-toggle-mobile {
        margin-right: 15px;
        /* More spacing */
    }

    .btn-lang-mobile {
        padding: 7px 12px;
        /* Slightly larger */
        font-size: 0.8rem;
        /* Larger font */
        min-width: 85px;
        /* Ensure space for text */
        justify-content: center;
    }

    .navbar-toggler {
        padding: 8px 10px;
        /* Better padding */
        margin-left: 10px;
        margin-right: 10px;
        /* Space from language button */
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
        max-width: calc(100% - 130px);
    }

    .brand-text {
        font-size: 0.8rem;
        max-width: 130px;
    }

    .logo-img {
        width: 28px;
        height: 28px;
    }

    .language-toggle-mobile {
        margin-right: 12px;
    }

    .btn-lang-mobile {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 75px;
        /* Keep text visible */
    }

    /* REMOVE THIS RULE - Don't hide the text */
    /* .btn-lang-mobile span {
        display: none;
    } */

    .navbar-toggler {
        padding: 6px 8px;
        margin-left: 8px;
        margin-right: 8px;
    }
}

/* Fix for very small screens - UPDATED */
@media (max-width: 360px) {
    .brand-text {
        max-width: 90px;
        /* Smaller to make room */
        font-size: 0.75rem;
    }

    .custom-navbar .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .language-toggle-mobile {
        margin-right: 8px;
    }

    .btn-lang-mobile {
        padding: 5px 8px;
        font-size: 0.7rem;
        min-width: 65px;
    }

    .btn-lang-mobile span {
        font-size: 0.65rem;
        /* Smaller text instead of hiding */
    }

    .navbar-toggler {
        padding: 5px 7px;
        margin-left: 6px;
        margin-right: 6px;
    }
}

/* Desktop navbar adjustments - NEW */
@media (min-width: 992px) {
    .navbar-brand {
        max-width: 50%;
        /* Limit brand width on desktop */
        flex: 0 0 auto;
        /* Don't let it grow */
    }

    .brand-text {
        max-width: 400px;
        /* Limit text width */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-nav {
        flex-wrap: nowrap;
        /* Prevent wrapping */
    }

    .navbar-nav .nav-link {
        padding: 8px 15px !important;
        /* Slightly reduce padding */
        margin: 0 3px;
        /* Reduce margins */
        font-size: 0.95rem;
        /* Slightly smaller font */
    }
}

/* For larger desktops */
@media (min-width: 1200px) {
    .navbar-brand {
        max-width: 45%;
    }

    .brand-text {
        max-width: 500px;
    }

    .navbar-nav .nav-link {
        padding: 8px 18px !important;
        /* Restore normal padding */
        margin: 0 4px;
        font-size: 1rem;
    }
}

/* For extra large screens */
@media (min-width: 1400px) {
    .navbar-brand {
        max-width: 40%;
    }

    .brand-text {
        max-width: 600px;
        /* Allow more space for brand text */
    }

    .navbar-nav .nav-link {
        padding: 8px 20px !important;
        margin: 0 5px;
    }
}