@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #ffffff;
    --surface-color: #f8fafc;
    --surface-hover: #f1f5f9;
    --accent-color: #0A2540; /* Navy Blue */
    --accent-blue: #1e3a8a;
    --text-primary: #0f172a; /* Dark gray for high contrast */
    --text-secondary: #475569; /* Slate gray for readability */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(10, 37, 64, 0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--surface-hover);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

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

section {
    padding: 100px 0;
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.2;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-size: 1.1rem;
    gap: 10px;
}

.btn-primary {
    background: var(--accent-color);
    color: #ffffff;
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(10, 37, 64, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-5px);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
    background: transparent; /* Transparent Header */
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.05);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color); /* Navy Blue Logo */
    text-decoration: none;
    display: flex;
    align-items: baseline;
    letter-spacing: -1px; /* Premium tight look */
    transition: var(--transition-smooth);
}

.logo span {
    color: var(--accent-blue);
    font-size: 2.2rem;
    line-height: 0;
    margin-left: 2px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    display: inline-block;
}

.logo:hover span {
    transform: scale(1.3) translateY(-2px);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--accent-color); /* Navy Blue Text */
    text-decoration: none;
    font-size: 1.15rem; /* Increased size */
    font-weight: 600;
    transition: var(--transition-smooth);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8)); 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/images/hero_bg.png') center/cover no-repeat;
    opacity: 0.3;
    z-index: -1;
}

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

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--accent-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* Services */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Image right, Text left */
    gap: 5rem;
    align-items: center;
}

.about-img {
    position: relative;
    max-width: 100%;
}

.about-text {
    text-align: right; /* Text remains RTL but is in the left column */
}

.about-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: right;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.2rem;
    line-height: 1;
}

.stat-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.about-img {
    position: relative;
    max-width: 450px;
    margin-right: auto; /* Push image to the left in RTL */
}

.img-wrapper {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    background: var(--accent-color); /* Navy Blue */
    padding: 1rem 0;
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.1);
}

.img-wrapper img {
    width: 100%;
    display: block;
    filter: grayscale(20%);
    transition: var(--transition-smooth);
}

.img-wrapper:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.about-img::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px; /* Position shadow frame behind the image */
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 40px;
    z-index: -1;
    transition: var(--transition-smooth);
}

.stat-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }
    .stats {
        justify-content: center;
    }
}

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

.service-card {
    background: var(--surface-color);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    background: var(--surface-hover);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
}

/* Projects */
.projects-slider-wrapper {
    position: relative;
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider-container {
    display: flex !important;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 2rem;
    padding: 20px 5px;
    scroll-snap-type: x mandatory;
    cursor: grab;
    user-select: none;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.slider-container:active {
    cursor: grabbing;
    scroll-snap-type: none; /* Disable snap during manual drag for smoothness */
    scroll-behavior: auto;
}

.slider-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.slider-container .project-card {
    min-width: 380px;
    scroll-snap-align: center;
}

.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 100;
    flex-shrink: 0;
}

.slider-btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .slider-container .project-card {
        min-width: 300px;
    }
    .slider-btn { display: none; } /* Hide buttons on mobile, touch is enough */
}

.project-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(10, 37, 64, 0.08);
    box-shadow: 0 4px 6px -1px rgba(10, 37, 64, 0.05), 0 2px 4px -2px rgba(10, 37, 64, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-15px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.1);
}

.project-img {
    height: 240px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-card:hover .project-img img {
    transform: scale(1.15) rotate(-2deg);
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.project-tags span {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-service {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.tag-tech {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.project-info {
    padding: 2.2rem 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.project-details-btn {
    margin-top: 2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.project-details-btn i {
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.project-details-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(212, 175, 55, 0.05);
}

.project-details-btn:hover i {
    transform: translateX(-5px);
}

/* Why Choose Me */
.why-section {
    background: var(--surface-color);
}

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

.why-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.why-icon {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .about-text h1 {
        font-size: 2.2rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    .about-text p {
        font-size: 1rem;
    }
    .stats {
        gap: 1.5rem;
    }
    .stat-item h3 {
        font-size: 1.8rem;
    }
    .hero h1 { 
        font-size: 2.2rem; 
        line-height: 1.3;
    }
    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    .nav-links { display: none; }
    .why-grid { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; gap: 1rem; }
    .btn { width: 100%; }
    .section-title h2 { font-size: 2.2rem; }
}

/* Projects Page Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.8rem 1.8rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.filter-tab:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-tab.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none !important; }
    .menu-toggle { display: flex !important; }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.close-menu {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 3rem;
    text-align: right;
}

.mobile-nav-links li {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.mobile-nav-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    transition: var(--transition-smooth);
    display: block;
    padding: 0.5rem 0;
}

.mobile-nav-links a:hover, .mobile-nav-links a.active {
    color: var(--accent-blue);
    transform: translateX(-5px);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-bottom: 2rem;
}

/* Premium Testimonials Section */
.testimonial-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 30px;
    position: relative;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    background: var(--surface-hover);
    border-color: var(--accent-color);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.1);
}

.quote-icon-bg {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 5rem;
    color: var(--accent-color);
    opacity: 0.05;
    z-index: 0;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.client-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.client-info h4 {
    color: var(--accent-color);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.client-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =========================================
   PREMIUM FEATURES (Cursor, WhatsApp, Animations)
   ========================================= */

/* Page Transition */
body {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}
body.page-loaded {
    opacity: 1;
}

/* Scroll Animations (Reveal) */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}
.custom-cursor.cursor-hover {
    width: 50px;
    height: 50px;
    background-color: rgba(10, 37, 64, 0.1);
    border-color: transparent;
}

/* Sticky WhatsApp */
.sticky-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Left side for RTL */
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: var(--transition-smooth);
    animation: float-wa 3s ease-in-out infinite;
}
.sticky-whatsapp:hover {
    transform: scale(1.1) rotate(-10deg);
    color: white;
}
@keyframes float-wa {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@media (max-width: 768px) {
    .custom-cursor { display: none; }
    .sticky-whatsapp { width: 50px; height: 50px; font-size: 30px; bottom: 20px; left: 20px; }
}

/* =========================================
   PREMIUM HERO BACKGROUND (Particles, Grid, Fluid)
   ========================================= */

.hero {
    position: relative;
    overflow: hidden; 
    background: linear-gradient(-45deg, #ffffff, #f1f5f9, #e2e8f0, #e0f2fe);
    background-size: 400% 400%;
    animation: fluidGradient 15s ease infinite;
}

@keyframes fluidGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dot-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(10, 37, 64, 0.08) 1.5px, transparent 1.5px);
    background-size: 30px 30px; 
    z-index: 1;
    pointer-events: none;
}

.particles-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

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

