/* Root Variables */
:root {
    --primary-color: #00A896;
    --secondary-color: #1A365D;
    --accent-color: #F6511D;
    --dark-color: #0D1B2A;
    --light-color: #F8F9FA;
    --transition-speed: 0.3s;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Font Families */
.font-arabic {
    font-family: 'Tajawal', sans-serif;
}

.font-english {
    font-family: 'Inter', sans-serif;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

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

/* Navigation Styles */
nav {
    transition: all var(--transition-speed) ease;
}

nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

nav a:hover::after,
nav a.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.9) 0%, rgba(0, 168, 150, 0.8) 100%);
    z-index: 1;
}

.hero-section > * {
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[dir="rtl"] @keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[dir="rtl"] @keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 1s ease-out 0.3s both;
}

.animate-slide-right {
    animation: slideInRight 1s ease-out 0.5s both;
}

.animate-slide-left {
    animation: slideInLeft 1s ease-out 0.5s both;
}

/* Card Hover Effects */
.service-card,
.project-card {
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: #008c7a;
    transform: scale(1.05);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #152a4a;
    transform: scale(1.05);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background: #d94515;
    transform: scale(1.05);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-speed) ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

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

/* Counter Styles */
.counter {
    display: inline-block;
    font-size: inherit;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--primary-color);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: var(--secondary-color);
    color: white;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

[dir="rtl"] .timeline::before {
    right: 20px;
}

[dir="ltr"] .timeline::before {
    left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

[dir="rtl"] .timeline-item {
    padding-right: 60px;
}

[dir="ltr"] .timeline-item {
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 5px;
}

[dir="rtl"] .timeline-dot {
    right: 14px;
}

[dir="ltr"] .timeline-dot {
    left: 14px;
}

/* Project Gallery Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Stats Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stats-number {
    animation: countUp 0.8s ease-out;
}

/* Language Toggle Button */
#languageToggle {
    transition: all var(--transition-speed) ease;
}

#languageToggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu Transition */
#mobileMenu {
    transition: all var(--transition-speed) ease;
}

/* FAQ Styles */
.faq-question {
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-answer {
    transition: all var(--transition-speed) ease;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-speed);
    font-size: 14px;
    white-space: nowrap;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Print Styles */
@media print {
    nav,
    footer,
    #scrollTop,
    #languageToggle {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    #languageToggle {
        padding: 8px 16px;
        font-size: 14px;
    }
}

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

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Language-specific adjustments */
[lang="ar"] {
    letter-spacing: 0;
}

[lang="en"] {
    letter-spacing: 0.3px;
}

/* Smooth transitions for language switching */
body,
[data-ar],
[data-en] {
    transition: opacity 0.3s ease;
}

/* Partners Logo Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    align-items: center;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}