/* Root Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #059669;
    --success-light: #10b981;
    --warning-color: #f59e0b;
    --accent-color: #8b5cf6;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-900: #0f172a;
    --font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-arabic: 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 0.75rem;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* RTL Support */
body.rtl {
    font-family: var(--font-family-arabic);
    direction: rtl;
}

body.rtl .navbar-brand {
    margin-right: 0;
    margin-left: auto;
}

body.rtl .me-1, body.rtl .me-2, body.rtl .me-3 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

body.rtl .me-2 {
    margin-left: 0.5rem !important;
}

body.rtl .me-3 {
    margin-left: 1rem !important;
}

body.rtl .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 2px;
}

body.rtl .section-title::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

.navbar-scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--box-shadow-md);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
    margin: 0 0.25rem;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(37, 99, 235, 0.05);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.language-switcher .btn {
    border-radius: 25px;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(5, 150, 105, 0.75)),
                url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80') center/cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(30, 41, 59, 0.3));
    z-index: 1;
}

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

.hero-features {
    margin: 2rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out infinite;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--box-shadow-xl);
}

.feature-card i {
    font-size: 2rem;
    color: var(--warning-color);
}

.hero-cta .btn {
    margin: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

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

/* Services Section */
.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--box-shadow-xl);
    border-color: var(--primary-light);
}

.service-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    color: var(--white);
    transform: scale(1.05);
    box-shadow: var(--box-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card.highlight:hover {
    transform: scale(1.08) translateY(-5px);
}

.service-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--success-light));
    color: var(--white);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition);
}

.service-card.highlight .service-icon {
    background: var(--white);
    color: var(--primary-color) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.service-card.highlight .service-icon i {
    color: var(--primary-color) !important;
    font-size: 1.5rem !important;
    display: block !important;
    opacity: 1 !important;
}

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

.service-card h5 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-card ul li {
    margin: 0.5rem 0;
    color: var(--secondary-color);
}

.service-card.highlight ul li {
    color: rgba(255, 255, 255, 0.9);
}

.price-badge {
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 0.25rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 1rem;
    display: inline-block;
}

/* Pricing Section */
.pricing-table {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow-md);
    border: 1px solid var(--gray-200);
}

.table {
    margin: 0;
}

.table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #e9ecef;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.info-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-md);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
    border-left-color: var(--primary-light);
}

/* Location Section */
.location-info {
    padding: 2rem;
}

.address-block {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.address-block i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.hours-grid {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.hour-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.hour-row:last-child {
    border-bottom: none;
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

/* Contact Section */
.contact-form {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-form:hover {
    box-shadow: var(--box-shadow-lg);
}

.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.contact-info-card {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    box-shadow: var(--box-shadow);
}

.contact-info-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--box-shadow-xl);
    border-color: var(--primary-light);
}

.contact-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--success-light));
    color: var(--white);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition);
}

.contact-info-card:hover .contact-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--box-shadow-lg);
}

.social-links .btn {
    margin: 0.25rem;
    border-radius: 25px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color), #343a40);
}

footer h5, footer h6 {
    color: var(--white);
    margin-bottom: 1rem;
}

footer p {
    color: var(--white) !important;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer a {
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.9) !important;
}

footer a:hover {
    color: var(--primary-light) !important;
}

/* Animations */
.animate-in {
    animation: slideUp 0.6s ease-out forwards;
}

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .service-card.highlight {
        transform: none;
    }
    
    .service-card.highlight:hover {
        transform: translateY(-5px);
    }
    
    .hero-cta .btn {
        display: block;
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .language-switcher {
        text-align: center;
        margin: 1rem 0;
    }
    
    .contact-info-card {
        margin-bottom: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .pricing-table .badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

/* RTL Specific Adjustments */
body.rtl .address-block {
    flex-direction: row-reverse;
}

body.rtl .hour-row {
    flex-direction: row-reverse;
}

body.rtl .service-card ul {
    text-align: right;
}


body.rtl .info-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

body.rtl .section-title::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .service-card:not(.highlight) {
        background: #2d3748;
        color: #f7fafc;
        border-color: #4a5568;
    }
    
    .info-card {
        background: #2d3748;
        color: #f7fafc;
    }
    
    .contact-info-card {
        background: #2d3748;
        color: #f7fafc;
        border-color: #4a5568;
    }
}

/* Print styles */
@media print {
    .navbar, .hero-cta, .contact-form, footer, .social-links {
        display: none;
    }
    
    .hero-section {
        background: none;
        color: var(--dark-color);
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section-title {
        color: var(--dark-color);
    }
    
    .service-card, .info-card, .contact-info-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

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

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}