/* CSS Custom Properties */
:root {
    --background: 0 0% 100%;
    --foreground: 0 0% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3.9%;
    --primary: 0 0% 0%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 96.1%;
    --secondary-foreground: 0 0% 9%;
    --muted: 0 0% 96.1%;
    --muted-foreground: 0 0% 45.1%;
    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 89.8%;
    --input: 0 0% 89.8%;
    --ring: 0 0% 3.9%;
    --radius: 0.5rem;
    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
}

.dark {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: hsl(var(--border));
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body {
    font-family: 'Cairo', 'Poppins', sans-serif;
}

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

@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.25;
}

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

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
    transform: translateY(-1px);
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: hsl(var(--accent));
}

/* Logo */
.logo-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: hsl(var(--primary)); /* Maintains color variable */
    transition: transform 0.3s ease; /* For float animation */
}

/* Dark mode support */
.dark .logo-icon {
    filter: invert(1); /* Inverts logo colors in dark mode */
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background-color: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    transition: all 0.3s ease;
}

.header.scrolled {
    background-color: hsl(var(--background) / 0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    color: hsl(var(--foreground) / 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: hsl(var(--foreground));
}

.header-actions-desktop {
    display: none;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .header-actions-desktop {
        display: flex;
    }
}

.header-actions-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .header-actions-mobile {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 320px;
    background-color: hsl(var(--background));
    border-left: 1px solid hsl(var(--border));
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.mobile-nav-link {
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
    color: hsl(var(--foreground));
    padding: 0.5rem 0;
}

.mobile-menu-cta {
    margin-top: 1rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Sections */
section {
    padding: 5rem 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--secondary)) 100%);
    text-align: center;
    padding: 8rem 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, hsl(var(--foreground)), hsl(var(--primary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* Services Section */
.services-section {
    background-color: hsl(var(--background));
}

.section-header {
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-description {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

/* Process Section */
.process-section {
    background-color: hsl(var(--secondary));
}

.process-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

.process-step {
    background-color: hsl(var(--background));
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

.process-step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--primary));
}

.process-step-description {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

/* About Section */
.about-section {
    background-color: hsl(var(--background));
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
    line-height: 1.7;
    text-align: left;
}

.about-content .btn {
    margin-top: 1rem;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
    color: hsl(var(--primary-foreground));
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-section .section-title,
.contact-section .section-subtitle {
    color: hsl(var(--primary-foreground));
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .contact-info {
        flex-direction: row;
        gap: 2rem;
    }
}

.contact-link {
    color: hsl(var(--primary-foreground) / 0.8);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: hsl(var(--primary-foreground));
}

/* Footer */
.footer {
    background-color: hsl(var(--secondary));
    border-top: 1px solid hsl(var(--border));
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
    }
}

.footer-copy {
    font-size: 0.875rem;
    color: hsl(var(--foreground) / 0.6);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-copy {
        text-align: right;
    }
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #10b981;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

.whatsapp-button svg {
    width: 1.75rem;
    height: 1.75rem;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-2rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(2rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(2rem);
    transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-2rem);
    transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(2rem);
    transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.slide-in-top {
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.slide-in-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Continuous Animations */
.bounce-animation {
    animation: bounce 2s infinite;
}

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

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

/* Hover Animations */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* RTL Support */
[dir="rtl"] .header-content {
    direction: rtl;
}

[dir="rtl"] .nav-desktop {
    direction: rtl;
}

[dir="rtl"] .mobile-menu {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid hsl(var(--border));
    transform: translateX(-100%);
}

[dir="rtl"] .mobile-menu.open {
    transform: translateX(0);
}

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

[dir="rtl"] .whatsapp-button {
    right: auto;
    left: 1.5rem;
}

/* Language Toggle Active State */
.language-toggle.active {
    background-color: hsl(var(--accent));
}

/* Responsive Design */
@media (max-width: 767px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
}

/* Smooth transitions for language switching */
[data-key] {
    transition: opacity 0.2s ease;
}
