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

:root {
    --primary-color: #0EA5E9;
    --secondary-color: #F59E0B;
    --accent-color: #10B981;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --glow: 0 0 30px rgba(14, 165, 233, 0.3);
}

body {
    font-family: 'Cal Sans', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

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

[dir="rtl"] .logo,
[dir="rtl"] .hero-buttons,
[dir="rtl"] .contact-method,
[dir="rtl"] .highlight,
[dir="rtl"] .footer-logo {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
    gap: 1rem;
}

[dir="rtl"] .logo {
    gap: 0.5rem;
}

[dir="rtl"] .hero-text,
[dir="rtl"] .contact-info,
[dir="rtl"] .contact-method .method-details {
    text-align: right;
}


/* Cursor Glow Effect */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    transition: background 0.3s, backdrop-filter 0.3s;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
    animation: spark 2s infinite;
}

@keyframes spark {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.language-switcher {
    border: 1px solid var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.language-switcher:hover {
    background-color: var(--primary-color);
    color: white;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger .fa-times { display: none; }
.hamburger.active .fa-bars { display: none; }
.hamburger.active .fa-times { display: block; }

/* Main Content */
main {
    padding-top: 80px; 
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 30%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: slideUp 0.8s ease forwards;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.8s forwards;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    opacity: 0;
    animation: fadeIn 0.8s ease 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeIn 0.8s ease 1.2s forwards;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: var(--shadow);
}

.secondary-btn {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.primary-btn:hover, .secondary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-cards-preview {
    position: relative;
    width: 350px; 
    height: 350px;
}

.preview-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    box-shadow: var(--shadow);
    animation: orbit 10s infinite linear;
    animation-delay: var(--delay);
    top: 50%;
    left: 50%;
    margin-top: -40px;
    margin-left: -40px;
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(130px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(130px) rotate(-360deg); }
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Services Section */
.services {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

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

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .card-glow {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

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

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

[dir="rtl"] .contact-method:hover {
    transform: translateX(-10px);
}

.method-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.method-details h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.method-details p {
    opacity: 0.8;
    margin: 0;
}

.contact-visual {
    display: flex;
    justify-content: center;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    max-width: 300px;
}

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

.card-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.service-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.highlight i {
    width: 30px;
    text-align: center;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.footer-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 75px; /* Adjust based on navbar height */
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    }
    .nav-menu.active {
        display: flex;
        max-height: 50vh;
        opacity: 1;
    }
    .nav-menu .nav-link {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    [dir="rtl"] .nav-menu .nav-link { text-align: center; }
    .nav-menu .nav-link:last-child { border-bottom: none; }
    .nav-menu .nav-link::after { display: none; }

    .hamburger {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    [dir="rtl"] .hero-content { text-align: center; }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        display: none; /* Hide complex visual on smaller screens */
    }
}


@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .primary-btn, .secondary-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .cta-button span {
        display: none;
    }
    .cta-button {
        padding: 0.75rem; /* Make it a circle */
    }
    .hero-title {
        font-size: 2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .contact-info h2 {
        font-size: 2rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
}