/* Main styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --section-spacing: 4rem;
    --element-spacing: 2rem;
}

/* Base styles */
body {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container > * + * {
    margin-top: var(--element-spacing);
}

/* Navigation */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 500;
    margin: 0 0.5rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Navigation Styles */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu .nav-item {
    padding: 0.5rem 1rem;
    position: relative;
}

.nav-menu .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu .nav-link:hover::after,
.nav-menu .nav-link.active::after {
    width: 100%;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block; /* Ensure the button is visible */
    border-radius: 9999px; /* Ensure rounded corners regardless of Tailwind classes */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    transition: all 0.3s ease;
    border-radius: 9999px; /* Added rounded corners for consistency */
}

/* Language Toggle */
.language-toggle {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 20px;
    padding: 2px;
    min-width: 80px; /* Slightly reduced width since no flags */
    height: 30px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.language-toggle:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: rgba(203, 213, 225, 0.6);
}

.lang-option {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 3px 6px;
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    outline: none;
    border-radius: 16px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.01em;
}

.lang-option.active {
    color: #065f46;
    font-weight: 600;
}

.slider {
    position: absolute;
    z-index: 1;
    top: 2px;
    left: 2px;
    bottom: 2px;
    width: calc(50% - 2px);
    background: rgba(167, 243, 208, 0.7);
    border-radius: 16px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Mobile language toggle improvements */
@media (max-width: 768px) {
    .language-toggle {
        min-width: 76px; /* Reduced width for mobile */
        height: 28px;
        border-color: rgba(226, 232, 240, 0.4);
    }
    
    .lang-option {
        padding: 2px 3px;
        font-size: 0.75rem;
    }
}

/* Dark mode support for language toggle */
@media (prefers-color-scheme: dark) {
    .language-toggle {
        background: transparent;
        border-color: rgba(71, 85, 105, 0.4);
    }
    
    .language-toggle:hover {
        border-color: rgba(100, 116, 139, 0.5);
    }
    
    .lang-option {
        color: #94a3b8;
    }
    
    .lang-option.active {
        color: #d1fae5;
    }
    
    .slider {
        background: rgba(6, 78, 59, 0.7);
    }
}

/* RTL support for language toggle */
[dir="rtl"] .slider {
    left: auto;
    right: 2px;
}

[dir="rtl"] .slider.ar-active {
    transform: translateX(calc(-100%));
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}

/* Make sure CTA button in header is visible */
.header .btn-primary {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure header CTA button text is perfectly centered */
header .btn-primary,
header #cta-btn,
header #mobile-cta-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* Desktop header button centering */
header .hidden.md\\:flex {
    display: none !important;
}

@media (min-width: 768px) {
    header .hidden.md\\:flex {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Mobile Menu */
.mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
}

.mobile-menu.show {
    opacity: 1;
    visibility: visible;
}

/* Arabic Version Styles */
[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
    text-align: right;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

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

[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .btn i,
[dir="rtl"] .nav-link i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .flex > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

/* LTR specific styles */
[dir="ltr"] {
    font-family: 'Poppins', sans-serif;
    text-align: left;
}

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

[dir="ltr"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(1rem * var(--tw-space-x-reverse));
    margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
}

[dir="ltr"] input,
[dir="ltr"] textarea,
[dir="ltr"] select {
    text-align: left;
    direction: ltr;
}

[dir="ltr"] .btn i,
[dir="ltr"] .nav-link i {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="ltr"] .flex > * + * {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="ltr"] .nav-link::after {
    left: 0;
    right: auto;
}

/* Page Sections */
.page-header {
    padding-top: 8rem;
    padding-bottom: 4rem;
}

section {
    padding-top: 7rem;
    padding-bottom: 5rem;
}

.section + .section {
    margin-top: var(--section-spacing);
}

/* Cards and Sections */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.card > * + * {
    margin-top: 1.5rem;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Loading State */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hide scrollbar */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .page-header {
        padding-top: 6rem;
    }
    
    .mt-24 {
        margin-top: 4rem;
    }
    
    .mb-16 {
        margin-bottom: 3rem;
    }
    
    section {
        padding-top: 5rem;
        padding-bottom: 4rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .nav-menu .nav-item {
        width: 100%;
        text-align: center;
    }
}

/* Spacing Utilities */
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 1rem;
}

/* Form Styles */
input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

/* Component Transitions */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Grid and flex spacing */
.grid {
    gap: 2rem;
}

.flex > * + * {
    margin-left: 1rem;
}

/* Vertical spacing between sections */
.mt-24 {
    margin-top: 6rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

/* Section Spacing */
.page-header {
    padding-top: 8rem;
    padding-bottom: 4rem;
}

/* Vertical Spacing */
section {
    margin-bottom: 5rem;
}

.section-spacing {
    margin-bottom: 4rem;
}

/* Navigation Spacing */
.nav-item {
    margin: 0 1rem;
}

/* Card and Content Spacing */
.content-section {
    margin-bottom: 3rem;
}

.card-spacing {
    margin-bottom: 2rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-header {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }

    section {
        margin-bottom: 3rem;
    }

    .section-spacing {
        margin-bottom: 2.5rem;
    }

    .nav-item {
        margin: 0.5rem;
    }
}

/* Grid Gaps */
.grid-gap {
    gap: 2rem;
}

/* Container Padding */
.container-padding {
    padding: 2rem;
}

/* Section Spacing Improvements */
.section {
    padding: 5rem 0;
}

.section > * + * {
    margin-top: 3rem;
}

.section-content > * + * {
    margin-top: 2rem;
}

/* Card Grid Spacing */
.card-grid {
    display: grid;
    gap: 2.5rem;
}

/* Direction-specific styles */
[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Layout direction utilities */
.ltr\:text-left[dir="ltr"] {
    text-align: left;
}

.rtl\:text-right[dir="rtl"] {
    text-align: right;
}

.ltr\:ml-auto[dir="ltr"] {
    margin-left: auto;
}

.rtl\:mr-auto[dir="rtl"] {
    margin-right: auto;
}

.ltr\:ml-8[dir="ltr"] {
    margin-left: 2rem;
}

.rtl\:mr-8[dir="rtl"] {
    margin-right: 2rem;
}

.ltr\:mr-2[dir="ltr"] {
    margin-right: 0.5rem;
}

.rtl\:ml-2[dir="rtl"] {
    margin-left: 0.5rem;
}

/* Navigation direction utilities */
.ltr\:justify-start[dir="ltr"] {
    justify-content: flex-start;
}

.rtl\:justify-end[dir="rtl"] {
    justify-content: flex-end;
}

/* Footer logo white filter */
footer img.h-12 {
    filter: brightness(0) invert(1);
}

/* Enhanced Social Media Hover Effects with Brand Colors - CLEAN VERSION */

/* Base styles for social media icons */
.social-icon-enhanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #374151;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.social-icon-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.social-icon-enhanced i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    font-size: 16px;
}

/* LinkedIn hover effect */
.social-icon-enhanced.linkedin:hover::before {
    background: #0077b5;
    opacity: 1;
}

.social-icon-enhanced.linkedin:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.3);
}

/* Facebook hover effect */
.social-icon-enhanced.facebook:hover::before {
    background: #1877f2;
    opacity: 1;
}

.social-icon-enhanced.facebook:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.3);
}

/* Instagram hover effect with gradient */
.social-icon-enhanced.instagram:hover::before {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    opacity: 1;
}

.social-icon-enhanced.instagram:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.3);
}

/* Enhanced hover animation */
.social-icon-enhanced:hover i {
    transform: scale(1.1);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .social-icon-enhanced {
        width: 36px;
        height: 36px;
    }
    
    .social-icon-enhanced:hover {
        transform: translateY(-2px);
    }
}
