/* Font Face */
@font-face {
    font-family: 'Nahdi-Black';
    src: url('fonts/Nahdi-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables (New Dark/Orange Theme) */
:root {
    --bg-dark: #121212;
    --accent-orange: #FF5722;
    --text-light: #f5f5f5;
    --text-muted: #aaaaaa;
    --text-on-accent: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --font-primary: 'Nahdi-Black', sans-serif;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance optimizations */
* {
    -webkit-tap-highlight-color: transparent;
    /* GPU acceleration for all elements */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

*:focus {
    outline: none;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: -webkit-linear-gradient(135deg, #0a0820 0%, #151525 50%, #1a1840 100%);
    background: linear-gradient(135deg, #0a0820 0%, #151525 50%, #1a1840 100%);
    font-family: var(--font-primary);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    /* Performance optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
    /* Fix white flashes on scroll */
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: scroll-position;
}

/* Hardware acceleration for animations - REDUCED */
.portfolio-item,
.skill-card,
.service-card,
.achievement-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize images */
img {
    image-rendering: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 200px 90px, #ffffff, transparent),
        radial-gradient(1px 1px at 240px 20px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 280px 110px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 320px 50px, #ffffff, transparent),
        radial-gradient(1px 1px at 360px 130px, rgba(255,255,255,0.6), transparent);
    background-repeat: repeat;
    background-size: 400px 200px;
    z-index: -3;
    pointer-events: none;
    animation: starsMove 100s linear infinite;
}

@keyframes starsMove {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-400px) translateY(-200px);
    }
}

@keyframes starsMove {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-400px) translateY(-200px);
    }
}

/* طبقة نجوم إضافية */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(1px 1px at 50px 60px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 100px 100px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 150px 140px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 200px 180px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 250px 20px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 300px 60px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 350px 100px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 400px 140px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 450px 180px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 500px 20px, rgba(255,255,255,0.4), transparent);
    background-repeat: repeat;
    background-size: 600px 300px;
    z-index: -2;
    pointer-events: none;
    animation: starsMove2 120s linear infinite reverse;
    opacity: 0.8;
}

@keyframes starsMove2 {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-600px) translateY(-300px);
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0F0C29 0%, #24243e 50%, #302B63 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    position: relative;
}

.loading-logo {
    width: 150px;
    height: auto;
    margin-bottom: 30px;
    border-radius: 20px;
    animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 87, 34, 0.2);
    border-top: 4px solid var(--accent-orange);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


@keyframes gridMove {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 50px 50px, 50px 50px;
    }
}

/* Adobe Icons in Hero Section Only - OPTIMIZED */
.hero-adobe-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    /* Performance optimization */
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Trophy/Cup Icon */
.hero-adobe-icons .adobe-icon:nth-child(1) {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    opacity: 0.25;
    animation: floatIcon1 18s infinite ease-in-out;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-adobe-icons .adobe-icon:nth-child(1)::before {
    content: '\f54f';
    font-size: 60px;
    color: #31A8FF;
    filter: drop-shadow(0 0 15px rgba(49, 168, 255, 0.6));
}

/* Handshake Icon */
.hero-adobe-icons .adobe-icon:nth-child(2) {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 60%;
    right: 15%;
    opacity: 0.25;
    animation: floatIcon2 20s infinite ease-in-out;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-adobe-icons .adobe-icon:nth-child(2)::before {
    content: '\f2b5';
    font-size: 50px;
    color: #FF9A00;
    filter: drop-shadow(0 0 15px rgba(255, 154, 0, 0.6));
}

/* Target Icon */
.hero-adobe-icons .adobe-icon:nth-child(3) {
    position: absolute;
    width: 55px;
    height: 55px;
    bottom: 20%;
    left: 15%;
    opacity: 0.25;
    animation: floatIcon3 19s infinite ease-in-out;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-adobe-icons .adobe-icon:nth-child(3)::before {
    content: '\f140';
    font-size: 55px;
    color: #FF3D7F;
    filter: drop-shadow(0 0 15px rgba(255, 61, 127, 0.6));
}

/* Chart Line Icon */
.hero-adobe-icons .adobe-icon:nth-child(4) {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 35%;
    right: 10%;
    opacity: 0.25;
    animation: floatIcon4 22s infinite ease-in-out;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-adobe-icons .adobe-icon:nth-child(4)::before {
    content: '\f201';
    font-size: 50px;
    color: #9999FF;
    filter: drop-shadow(0 0 15px rgba(153, 153, 255, 0.6));
}

/* Users/Team Icon */
.hero-adobe-icons .adobe-icon:nth-child(5) {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 70%;
    left: 50%;
    opacity: 0.25;
    animation: floatIcon5 21s infinite ease-in-out;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-adobe-icons .adobe-icon:nth-child(5)::before {
    content: '\f500';
    font-size: 50px;
    color: #9999FF;
    filter: drop-shadow(0 0 15px rgba(153, 153, 255, 0.6));
}

/* Lightbulb/Idea Icon */
.hero-adobe-icons .adobe-icon:nth-child(6) {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 25%;
    right: 25%;
    opacity: 0.25;
    animation: floatIcon6 23s infinite ease-in-out;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-adobe-icons .adobe-icon:nth-child(6)::before {
    content: '\f0eb';
    font-size: 50px;
    color: #FF61F6;
    filter: drop-shadow(0 0 15px rgba(255, 97, 246, 0.6));
}

/* Optimized Float Animations */
@keyframes floatIcon1 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.25;
    }
    50% { 
        transform: translate(15px, -20px) rotate(5deg);
        opacity: 0.35;
    }
}

@keyframes floatIcon2 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.25;
    }
    50% { 
        transform: translate(-15px, 15px) rotate(-5deg);
        opacity: 0.35;
    }
}

@keyframes floatIcon3 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.25;
    }
    50% { 
        transform: translate(12px, 18px) rotate(4deg);
        opacity: 0.35;
    }
}

@keyframes floatIcon4 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.25;
    }
    50% { 
        transform: translate(-18px, -15px) rotate(-6deg);
        opacity: 0.35;
    }
}

@keyframes floatIcon5 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.25;
    }
    50% { 
        transform: translate(20px, -12px) rotate(7deg);
        opacity: 0.35;
    }
}

@keyframes floatIcon6 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.25;
    }
    50% { 
        transform: translate(-12px, 20px) rotate(-8deg);
        opacity: 0.35;
    }
}

/* Glassmorphism Effect - SIMPLIFIED */
.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 60px 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

h1, h2, h3 {
    font-weight: 900;
    line-height: 1.4;
    color: var(--text-light);
}

p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--text-on-accent);
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

.btn-primary:hover {
    background: #E64A19;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}
.section-header p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Header Styles - OPTIMIZED */
.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.98);
    border-bottom: 1px solid rgba(255, 87, 34, 0.2);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* مجموعة اللوجو وزر اللغة */
.logo-language-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* زر اللغة بجوار اللوجو */
.language-toggle {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-toggle:hover {
    background: #FF7043;
    transform: translateY(-2px);
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0 !important;
    height: 2px;
    background-color: var(--accent-orange);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-orange);
}

.nav-link:hover::after {
    width: 100%;
}

/* Force remove any active/current states on desktop */
.nav-link.active,
.nav-link.active-section,
.nav-link.current,
.nav-link[aria-current] {
    color: var(--text-light) !important;
    background: transparent !important;
    font-weight: 600 !important;
    border: none !important;
}

.nav-link.active::after,
.nav-link.active-section::after,
.nav-link.current::after {
    width: 0 !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animations - DISABLED FOR PERFORMANCE */
.fade-up {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Fix scroll performance */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Hero Animated Background - SIMPLIFIED */
.hero::before {
    content: '';
    position: fixed;
    width: 800px;
    height: 800px;
    top: 45vh;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(255, 87, 34, 0.3) 0%,
        rgba(255, 87, 34, 0.15) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

.hero::after {
    display: none;
}

/* Hero Decorative Elements */
.hero-bg-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 { 
    font-size: clamp(3rem, 7vw, 5rem);
    color: #ffffff;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
}

.hero .subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 20px auto 40px;
    color: var(--text-light);
    animation: fadeInUp 1.2s ease-out;
    line-height: 1.8;
}

.hero .btn-primary {
    animation: fadeInUp 1.4s ease-out;
    position: relative;
    overflow: hidden;
}

.hero .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.centered-subtitle {
    text-align: center;
    width: 100%;
}

/* Hero Floating Particles - DISABLED */
.hero .container::before,
.hero .container::after {
    display: none;
}

/* About Section - OPTIMIZED */
.about {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 0 2rem 4rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.9);
}

.about-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    align-items: center; 
    gap: 5rem; 
}

.about-image {
    width: 100%;
    max-width: 350px;
    height: 350px;
    background-color: var(--accent-orange);
    border-radius: 30px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(255, 87, 34, 0.3);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    transform: translate(-20px, -20px);
    border: 5px solid #000;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

.about-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.about-item i {
    font-size: 1.5rem;
    color: var(--accent-orange);
    flex-shrink: 0;
    background: rgba(255, 87, 34, 0.1);
    border: 2px solid rgba(255, 87, 34, 0.3);
    border-radius: 12px;
    padding: 15px;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 87, 34, 0.3);
    transition: all 0.3s ease;
}

.about-item:hover i {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(255, 87, 34, 0.5);
    background: rgba(255, 87, 34, 0.2);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 0;
    display: block;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Achievements Section - OPTIMIZED */
.achievements {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 0 2rem 4rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.9);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    position: relative;
    overflow: hidden;
}

.achievement-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 87, 34, 0.1);
    position: relative;
}

.achievement-icon i {
    font-size: 2.5rem;
    color: var(--accent-orange);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), #FF9800);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.achievement-card:hover::before {
    transform: scaleX(1);
}

.achievement-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 87, 34, 0.6);
    box-shadow: 0 12px 40px rgba(255, 87, 34, 0.2);
}

.achievement-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-orange);
    margin-bottom: 15px;
    line-height: 1;
}

.achievement-number::after {
    content: '+';
    font-size: 3rem;
    margin-left: 5px;
}

.achievement-card:last-child .achievement-number::after {
    content: '%';
}

.achievement-label {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Skills Section - OPTIMIZED */
.skills {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 0 2rem 4rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.skill-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.skill-card:hover {
    transform: translateY(-10px);
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 87, 34, 0.6);
    box-shadow: 0 12px 40px rgba(255, 87, 34, 0.3);
}

.skill-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon img {
    transform: scale(1.1);
}

.skill-card h3 {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skill-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), #FF9800);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-out;
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

.skill-card.visible .skill-progress {
    width: var(--progress-width);
}

.skill-percentage {
    color: var(--accent-orange);
    font-size: 1.4rem;
    font-weight: 700;
}

/* Clients Logos Section */
.clients-logos {
    padding: 0;
    margin: 0 0 4rem 0;
}

.clients-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 3rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
    padding: 2rem 0;
}

.logo-item {
    width: 100%;
    max-width: 140px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
    overflow: visible;
}

.logo-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.logo-item:hover img {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 87, 34, 0.4);
}

.clients-btn-container {
    text-align: center;
    margin-top: 2rem;
}

.btn-view-more {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #E64A19 100%);
    color: white;
    border: none;
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-view-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.5);
}

/* Clients Page Specific Styles */
.clients-page-section {
    padding: 80px 0;
    min-height: calc(100vh - 400px);
    overflow: visible;
}

.clients-page-section .container {
    max-width: 1400px;
}

.all-clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
    margin-bottom: 3rem;
    align-items: center;
    justify-items: center;
}

.clients-btn-container {
    text-align: center;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .all-clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .clients-card {
        padding: 60px 20px;
        margin: 2rem 1rem;
    }
    
    .clients-page-section {
        padding: 40px 0;
    }
}

/* Work Process Section */
.work-process {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 3rem 2rem 4rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
    overflow: visible;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
}

.process-step {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.1) 0%, rgba(255, 87, 34, 0.05) 100%);
    border: 2px solid rgba(255, 87, 34, 0.3);
    border-radius: 20px;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    overflow: visible;
}

.process-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.process-step:hover {
    transform: translateY(-10px);
    border-color: var(--accent-orange);
    box-shadow: 0 15px 40px rgba(255, 87, 34, 0.3);
}

.process-step:hover::before {
    opacity: 1;
}

.step-number {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #E64A19 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.5);
    z-index: 2;
}

.step-icon {
    margin: 1rem 0 1.5rem;
    font-size: 3rem;
    color: var(--accent-orange);
    transition: transform 0.4s ease;
}

.process-step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
}

.process-step h3 {
    font-size: 1.3rem;
    color: var(--accent-orange);
    margin-bottom: 1rem;
    font-weight: 700;
}

.process-step p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

@media (max-width: 1200px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .work-process {
        padding: 60px 20px;
        margin: 2rem 1rem 3rem 1rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        top: -20px;
    }
    
    .step-icon {
        font-size: 2.5rem;
        margin: 1.5rem 0 1rem;
    }
    
    .process-step h3 {
        font-size: 1.2rem;
    }
    
    .process-step p {
        font-size: 0.95rem;
    }
}

/* Services Section - OPTIMIZED */
.services {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 0 2rem 4rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 87, 34, 0.6);
    box-shadow: 0 12px 40px rgba(255, 87, 34, 0.3);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--accent-orange);
    margin-bottom: 20px;
}

.service-card h3 { 
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p { 
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Why Me Section - OPTIMIZED */
.why-me {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 0 2rem 4rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
}

.why-me-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; }
.why-me-image { 
    width: 100%; 
    max-width: 500px;
    aspect-ratio: 1 / 1;
    border-radius: 30px; 
    overflow: hidden;
    position: relative;
    background: transparent;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(255, 87, 34, 0.2);
}
.why-me-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    mix-blend-mode: normal;
    opacity: 0;
}
.why-me-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    filter: none;
    mix-blend-mode: normal;
    background: transparent;
}
.why-me-content ul { list-style: none; }
.why-me-content li {
    font-size: 1.2rem;
    padding: 15px 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}
.why-me-content li i {
    color: var(--accent-orange);
    font-size: 1.5rem;
    margin-left: 15px;
}

/* Portfolio Section - OPTIMIZED */
.portfolio {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 0 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
    overflow: visible;
    height: auto;
    min-height: auto;
}

.portfolio-cta {
    text-align: center;
    margin-top: 40px;
}

/* --- Portfolio Section on Index Page --- */
.portfolio-header {
    text-align: center;
    margin-bottom: 60px;
}

.portfolio-header .section-header {
    margin-bottom: 20px;
}

/* Featured Projects Grid - Stacked Cards */
.featured-slider-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 40px;
}

.featured-slider {
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    position: relative;
    width: 100%;
    max-width: 1000px;
    min-height: 450px;
}

.slider-item {
    width: 350px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    position: absolute;
    cursor: pointer;
    transition: all 0.4s ease;
    background: #000;
}

.slider-item:nth-child(1) {
    left: 0;
    z-index: 1;
    transform: translateX(-15%) rotate(-3deg);
}

.slider-item:nth-child(2) {
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.slider-item:nth-child(3) {
    right: 0;
    z-index: 1;
    transform: translateX(15%) rotate(3deg);
}

.slider-item:hover {
    z-index: 10;
    transform: translateY(-15px) scale(1.05) rotate(0deg) !important;
    box-shadow: 0 20px 60px rgba(255, 87, 34, 0.5);
}

.slider-item:nth-child(2):hover {
    transform: translateX(-50%) translateY(-15px) scale(1.05);
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.slider-item:hover img {
    transform: scale(1.1);
}

/* Pulsing Animation with Glow and Tilt */
@keyframes pulseZoom {
    0%, 100% {
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.4),
            0 0 0 0 rgba(255, 87, 34, 0);
    }
    50% {
        box-shadow: 
            0 20px 50px rgba(255, 87, 34, 0.5),
            0 0 40px 15px rgba(255, 87, 34, 0.6);
    }
}

@keyframes pulseZoomFirst {
    0%, 100% {
        transform: translateX(-15%) rotate(-3deg);
    }
    50% {
        transform: translateX(-15%) rotate(-3deg) scale(1.03);
    }
}

@keyframes pulseZoomCenter {
    0%, 100% {
        transform: translateX(-50%);
    }
    50% {
        transform: translateX(-50%) scale(1.03);
    }
}

@keyframes pulseZoomLast {
    0%, 100% {
        transform: translateX(15%) rotate(3deg);
    }
    50% {
        transform: translateX(15%) rotate(3deg) scale(1.03);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

.slider-item.pulse {
    animation: pulseZoom 2s ease-in-out;
}

.slider-item:nth-child(1).pulse {
    animation: pulseZoom 2s ease-in-out, pulseZoomFirst 2s ease-in-out;
}

.slider-item:nth-child(2).pulse {
    animation: pulseZoom 2s ease-in-out, pulseZoomCenter 2s ease-in-out;
}

.slider-item:nth-child(3).pulse {
    animation: pulseZoom 2s ease-in-out, pulseZoomLast 2s ease-in-out;
}

.slider-item.pulse::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 22px;
    border: 3px solid rgba(255, 87, 34, 0.5);
    animation: glowPulse 2s ease-in-out;
    pointer-events: none;
    z-index: -1;
}

.slider-item.pulse::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 24px;
    border: 2px solid rgba(255, 87, 34, 0.3);
    animation: glowPulse 2s ease-in-out 0.2s;
    pointer-events: none;
    z-index: -2;
}

/* Portfolio Grid - عرض 3 بطاقات فقط */
.portfolio .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 30px;
    padding: 60px 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

/* صور بأحجامها الطبيعية مع حواف مستديرة وتوهج */
.portfolio .portfolio-item {
    width: 100%;
    height: auto;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 0 30px rgba(255, 87, 34, 0.4);
    display: block;
    line-height: 0;
}

/* تأثير hover ��ميز */
.portfolio .portfolio-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 25px rgba(255, 87, 34, 0.6), 0 0 40px rgba(255, 87, 34, 0.3), 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* إزالة التأثير البرتقالي */

/* الصورة داخل العنصر - تحافظ على نسبها الأصلية */
.portfolio .portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.portfolio .portfolio-item:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(255, 87, 34, 0.5));
}

/* تأثير إعادة الترتيب - DISABLED FOR PERFORMANCE */
.portfolio .portfolio-item.shuffling {
    opacity: 0.7;
}

.portfolio .portfolio-item {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* جعل النصوص في المنتصف */
.portfolio .portfolio-grid p {
    text-align: center;
    width: 100%;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* إخفاء الفئات في الصفحة الرئيسية فقط */
.portfolio .category-list {
    display: none !important;
}

/* إظهار الفئات في صفحة المشاريع */
.portfolio-categories .category-list {
    display: flex !important;
}

.category-btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    background-color: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-btn.active, .category-btn:hover {
    background-color: var(--accent-orange);
    color: var(--text-on-accent);
}

/* Contact Section */
.contact-wrapper { 
    padding-top: 0;
    margin-top: 4rem;
}

/* Success Stories Grid */
#successStoriesList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

#successStoriesList .image-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

#successStoriesList .image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 87, 34, 0.3);
}

#successStoriesList .image-card img {
    width: 100%;
    height: 250px !important;
    object-fit: cover !important;
    display: block;
    border-radius: 15px 15px 0 0;
    flex-shrink: 0;
}

#successStoriesList .image-card h4 {
    padding: 1rem;
    color: var(--accent-orange);
    margin: 0;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.2);
    flex-grow: 1;
}

#successStoriesList .image-card .btn {
    margin: 1rem;
    margin-top: 0;
}

.contact {
    background-image: linear-gradient(45deg, #FF5722, #FF9800);
    padding: 80px 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(255, 87, 34, 0.3);
}
.contact h2 { font-size: 3rem; color: var(--text-on-accent); }
.contact p { color: var(--text-on-accent); max-width: 600px; margin: 20px auto 40px; opacity: 0.9; }
.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.contact-card {
    background: rgba(255,255,255,0.1);
    padding: 20px 30px;
    border-radius: 15px;
    color: var(--text-on-accent);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    backdrop-filter: blur(5px);
    padding: 0;
}
.contact-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}
.contact-card i { 
    font-size: 1.8rem; 
    color: var(--text-on-accent); 
    margin: 0;
}
.contact-card span {
    display: none;
}


/* Floating WhatsApp Icon */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.3);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6), 0 0 0 0 rgba(37, 211, 102, 0.2);
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5), 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.3);
    }
}

/* Footer */
.main-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 100px;
}
.copyright { 
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 15px;
}
.footer-social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.footer-social-icons a {
    color: var(--accent-orange);
    font-size: 1.5rem;
    transition: color 0.3s ease;
    text-decoration: none;
}
.footer-social-icons a:hover {
    color: var(--text-light);
}


/* Responsive Design */
@media (max-width: 1200px) {
    /* 3 صور في الشاشات الكبيرة */
    .portfolio .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .slider-track {
        max-width: 900px;
    }

    .slider-item {
        width: 320px;
        height: 360px;
    }

    .slider-item:nth-child(1) {
        transform: translateX(-10%) rotate(-3deg);
    }

    .slider-item:nth-child(3) {
        transform: translateX(10%) rotate(3deg);
    }
}

@media (max-width: 992px) {
    .about-grid, .why-me-grid { grid-template-columns: 1fr; }
    .about-image { margin: 2rem auto 0; }
    .why-me-image { height: 300px; order: -1; margin-bottom: 2rem; }
    
    /* Achievements Grid - 2 columns on tablets */
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .achievement-card {
        padding: 40px 25px;
        min-height: 220px;
    }
    
    .achievement-icon {
        width: 70px;
        height: 70px;
    }
    
    .achievement-icon i {
        font-size: 2.2rem;
    }
    
    .achievement-number {
        font-size: 3.2rem;
    }
    
    .achievement-number::after {
        font-size: 2.5rem;
    }
    
    .achievement-label {
        font-size: 1.1rem;
    }
    
    /* Services Grid - 2 columns on tablets */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .service-card:nth-child(4),
    .service-card:nth-child(5) {
        margin: 0;
    }
    
    .service-card:nth-child(5) {
        grid-column: span 2;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Slider adjustments for tablets */
    .featured-slider-container {
        padding: 0 20px;
    }

    .slider-track {
        max-width: 700px;
    }

    .slider-item {
        width: 280px;
        height: 320px;
    }

    .slider-item:nth-child(1) {
        transform: translateX(-8%) rotate(-2deg);
    }

    .slider-item:nth-child(3) {
        transform: translateX(8%) rotate(2deg);
    }

    /* 2 صور في التابلت */
    .portfolio .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    /* Slider adjustments for mobile - Keep all 3 visible side by side */
    .featured-slider-container {
        padding: 0;
        overflow: visible;
    }

    .featured-slider {
        padding: 50px 10px;
        overflow: visible;
    }

    .slider-track {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        position: relative;
        margin: 0 auto;
    }

    .slider-item {
        position: relative !important;
        width: 30% !important;
        min-width: 90px !important;
        max-width: 110px !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
    }

    .slider-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .slider-item:nth-child(1) {
        transform: rotate(-2deg) !important;
    }

    .slider-item:nth-child(2) {
        transform: scale(1.05) !important;
        z-index: 2;
    }

    .slider-item:nth-child(3) {
        transform: rotate(2deg) !important;
    }

    .slider-item:hover {
        transform: scale(1.1) rotate(0deg) !important;
    }

    .slider-item:nth-child(2):hover {
        transform: scale(1.15) !important;
    }

    /* تصغير شامل للمحتويات على الهواتف */
    body {
        font-size: 14px;
    }
    
    /* نجوم أقل في الموبايل */
    body::before {
        background: 
            radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
            radial-gradient(1px 1px at 60px 70px, rgba(255,255,255,0.6), transparent),
            radial-gradient(1px 1px at 100px 40px, rgba(255,255,255,0.9), transparent),
            radial-gradient(1px 1px at 140px 80px, rgba(255,255,255,0.5), transparent),
            radial-gradient(1px 1px at 180px 30px, rgba(255,255,255,0.7), transparent),
            radial-gradient(1px 1px at 220px 90px, rgba(255,255,255,0.8), transparent);
        background-repeat: repeat;
        background-size: 300px 150px;
        animation: starsMove 80s linear infinite;
    }
    
    /* نجوم إضافية للموبايل */
    body::after {
        background: 
            radial-gradient(1px 1px at 40px 60px, rgba(255,255,255,0.4), transparent),
            radial-gradient(1px 1px at 80px 100px, rgba(255,255,255,0.6), transparent),
            radial-gradient(1px 1px at 120px 140px, rgba(255,255,255,0.3), transparent),
            radial-gradient(1px 1px at 160px 180px, rgba(255,255,255,0.5), transparent),
            radial-gradient(1px 1px at 200px 20px, rgba(255,255,255,0.7), transparent);
        background-repeat: repeat;
        background-size: 250px 200px;
        animation: starsMove2 90s linear infinite reverse;
        opacity: 0.6;
    }
    
    /* تصغير أيقونات Adobe في الموبايل */
    .hero-adobe-icons .adobe-icon:nth-child(1) {
        width: 50px;
        height: 50px;
        top: 15%;
        left: 5%;
    }
    
    .hero-adobe-icons .adobe-icon:nth-child(2) {
        width: 45px;
        height: 45px;
        top: 65%;
        right: 8%;
    }
    
    .hero-adobe-icons .adobe-icon:nth-child(3) {
        width: 48px;
        height: 48px;
        bottom: 15%;
        left: 8%;
    }
    
    .hero-adobe-icons .adobe-icon:nth-child(4) {
        width: 42px;
        height: 42px;
        top: 40%;
        right: 5%;
    }
    
    .hero-adobe-icons .adobe-icon:nth-child(5) {
        width: 45px;
        height: 45px;
        top: 75%;
        left: 45%;
    }
    
    .hero-adobe-icons .adobe-icon:nth-child(6) {
        width: 44px;
        height: 44px;
        top: 20%;
        right: 20%;
    }
    
    p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    /* تصغير البطاقات الزجاجية */
    .about, .skills, .services, .why-me, .portfolio, .achievements {
        padding: 40px 20px;
        margin: 0 1rem 2rem 1rem;
        border-radius: 20px;
    }
    
    /* Achievements Grid - 2 columns on mobile */
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .achievement-card {
        padding: 35px 15px;
        min-height: 200px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .achievement-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .achievement-icon i {
        font-size: 2rem;
    }
    
    .achievement-number {
        font-size: 2.8rem;
        margin-bottom: 10px;
    }
    
    .achievement-number::after {
        font-size: 2.2rem;
    }
    
    .achievement-label {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* تصغير العناوين */
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    /* تصغير قسم About */
    .about-image {
        max-width: 250px;
        height: 250px;
    }
    
    .about-content h3 {
        font-size: 1.1rem;
    }
    
    .about-content p {
        font-size: 0.85rem;
    }
    
    /* تصغير بطاقات المهارات */
    .skill-card {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .skill-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .skill-card h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .skill-bar {
        height: 6px;
        margin-bottom: 10px;
    }
    
    .skill-percentage {
        font-size: 1rem;
    }
    
    /* تصغير بطاقات الخدمات */
    .service-card {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .service-card i {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
    
    .service-card h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* تصغير قسم Why Me */
    .why-me-content li {
        font-size: 0.95rem;
        padding: 10px 0;
    }
    
    .why-me-content li i {
        font-size: 1.2rem;
        margin-left: 10px;
    }
    
    /* تصغير قسم Contact */
    .contact {
        padding: 40px 20px;
        border-radius: 20px;
    }
    
    .contact h2 {
        font-size: 2rem;
    }
    
    .contact p {
        font-size: 0.9rem;
        margin: 15px auto 25px;
    }
    
    .contact-card {
        width: 45px;
        height: 45px;
    }
    
    .contact-card i {
        font-size: 1.3rem;
    }
    
    /* تصغير الأزرار */
    .btn {
        padding: 10px 24px;
        font-size: 0.95rem;
    }

    /* Skills Grid - 1 column on mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    /* Header Mobile Styles - تصغير الهيدر واللوجو */
    .navbar {
        padding: 0.5rem 0;
    }
    
    /* تصغير اللوجو وزر اللغة على الهواتف */
    .logo img {
        height: 35px;
    }
    
    .language-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Hide nav-menu by default on mobile */
    .nav-menu {
        display: flex !important;
    }
    
    .menu-toggle span {
        width: 22px;
        height: 2px;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Mobile Navigation Menu - Dropdown from Header */
    .nav-menu {
        position: fixed;
        right: 0;
        top: -100vh;
        flex-direction: column;
        background: linear-gradient(180deg, rgba(18, 18, 18, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
        backdrop-filter: blur(10px);
        width: 100%;
        max-height: calc(100vh - 60px);
        text-align: center;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
        padding: 20px 0;
        margin: 0;
        gap: 0;
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex !important;
        justify-content: flex-start;
        border: none;
        outline: none;
        border-radius: 0 0 20px 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }

    .nav-menu.active {
        top: 60px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu li {
        padding: 0;
        width: 100%;
        margin: 0;
        list-style: none;
        flex-shrink: 0;
    }

    .nav-link {
        font-size: 1.05rem;
        display: block;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: transparent !important;
        white-space: nowrap;
        text-align: center;
        margin: 0 20px;
        position: relative;
        color: var(--text-light) !important;
        font-weight: 400 !important;
        border: none !important;
        border-left: none !important;
        border-right: none !important;
        box-shadow: none !important;
    }

    .nav-link:hover,
    .nav-link:active {
        background: rgba(255, 87, 34, 0.15) !important;
        transform: scale(1.02);
        color: var(--accent-orange) !important;
    }
    
    /* Force remove any active states */
    .nav-link.active,
    .nav-link.active-section,
    .nav-link.current,
    .nav-link[aria-current] {
        background: transparent !important;
        color: var(--text-light) !important;
        font-weight: 400 !important;
        border: none !important;
    }

    section { padding: 40px 0; }
    .contact-methods { flex-direction: row; gap: 0.8rem; }
    .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 20px;
    }
    .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
    .hero .subtitle { font-size: 0.95rem; }

    /* Services Grid - 1 column on mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .service-card:nth-child(4),
    .service-card:nth-child(5) {
        margin: 0;
        grid-column: span 1;
        max-width: 100%;
    }

    /* 3 صور في الموبايل - في المنتصف */
    .portfolio .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 20px 1rem;
        max-width: 100%;
    }

    .portfolio .portfolio-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* شاشات صغيرة جداً */
    .portfolio .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 20px 0.8rem;
    }
    
    .portfolio .portfolio-item {
        width: 100%;
    }
    
    /* تحسين بطاقات الإنجازات على الشاشات الصغيرة جداً */
    .achievements-grid {
        gap: 0.8rem;
    }
    
    .achievement-card {
        padding: 30px 12px;
        min-height: 180px;
    }
    
    .achievement-number {
        font-size: 2.5rem;
    }
    
    .achievement-number::after {
        font-size: 2rem;
    }
    
    .achievement-label {
        font-size: 0.9rem;
    }
}

/* Projects Page Specific Styles - SAME AS HERO */
.projects-hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 50px;
    position: relative;
    overflow: visible;
    z-index: 1;
}

/* Hero Animated Background - SAME AS HOME */
.projects-hero::before {
    content: '';
    position: fixed;
    width: 800px;
    height: 800px;
    top: 45vh;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(255, 87, 34, 0.3) 0%,
        rgba(255, 87, 34, 0.15) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

.projects-hero::after {
    display: none;
}

/* Hero Decorative Elements */
.projects-hero .hero-bg-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.projects-hero .container {
    position: relative;
    z-index: 1;
}

.projects-hero h1 {
    font-size: clamp(3rem, 7vw, 5rem);
    color: #ffffff;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8),
                 0 2px 10px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(255, 87, 34, 0.6));
}

.projects-hero .subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 20px auto 40px;
    color: var(--text-light);
    animation: fadeInUp 1.2s ease-out;
    line-height: 1.8;
}

.portfolio-categories {
    margin-top: 0;
    padding: 40px 0;
}

.category-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.category-btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    background-color: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-btn.active, .category-btn:hover {
    background-color: var(--accent-orange);
    color: var(--text-on-accent);
}

.portfolio-grid-section {
    padding-top: 50px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 30px;
    justify-items: center;
    grid-auto-rows: min-content;
    align-items: start;
}

.portfolio-item {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    background: transparent;
    line-height: 0;
    align-self: start;
    justify-self: center;
}

/* Folder Items */
.folder-item {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.1), rgba(255, 87, 34, 0.2));
    border: 2px solid var(--accent-orange);
    cursor: pointer !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    min-height: 200px;
    transition: all 0.3s ease;
}

.folder-item:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.2), rgba(255, 87, 34, 0.3));
    box-shadow: 0 10px 30px rgba(255, 87, 34, 0.4);
}

.folder-icon {
    margin-bottom: 15px;
    animation: folderBounce 2s ease-in-out infinite;
}

@keyframes folderBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.folder-name {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 87, 34, 0.6), 0 0 40px rgba(255, 87, 34, 0.3);
}

.portfolio-item:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(255, 87, 34, 0.5));
}

/* Responsive Design for Projects Page */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid-section {
        padding-top: 30px;
    }
    .projects-hero {
        min-height: 40vh;
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .projects-hero h1 {
        font-size: clamp(2rem, 7vw, 2.5rem);
    }
    
    .projects-hero .subtitle {
        font-size: 1rem;
    }
    
    .portfolio-categories {
        padding: 30px 0;
    }
    
    .category-list {
        flex-direction: row;
        justify-content: center;
        gap: 0.6rem;
        padding: 15px;
    }
    
    .category-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem 2rem;
    }

    .portfolio-item {
        width: 100%;
    }
}

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-toggle {
    background: linear-gradient(45deg, var(--accent-orange), #ff7043);
    color: var(--text-on-accent);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    position: relative;
    overflow: hidden;
}

.language-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.language-toggle:hover::before {
    left: 100%;
}

.language-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.3);
}

/* English Language Styles */
html[lang="en"] {
    direction: ltr;
}

html[lang="en"] body {
    font-family: 'Arial', 'Helvetica', sans-serif;
}

html[lang="en"] .nav-menu {
    flex-direction: row;
}

html[lang="en"] .navbar {
    flex-direction: row;
}

html[lang="en"] .logo {
    order: 0;
}

html[lang="en"] .language-toggle {
    order: 2;
}

html[lang="en"] .about-grid {
    grid-template-columns: 1fr 300px;
}

html[lang="en"] .about-content {
    order: 1;
}

html[lang="en"] .about-image {
    order: 2;
}

html[lang="en"] .why-me-grid {
    grid-template-columns: 300px 1fr;
}

html[lang="en"] .why-me-image {
    order: 1;
}

html[lang="en"] .why-me-content {
    order: 2;
}

/* RTL/LTR Responsive Adjustments */
@media (max-width: 768px) {
    html[lang="en"] .about-grid,
    html[lang="en"] .why-me-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    html[lang="en"] .about-content,
    html[lang="en"] .about-image,
    html[lang="en"] .why-me-image,
    html[lang="en"] .why-me-content {
        order: unset;
    }
    
    .language-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Smooth transitions for language switching */
* {
    transition: text-align 0.3s ease, direction 0.3s ease;
}

/* إظهار زر اللغة في أقصى يمين الهيدر على الهواتف */
@media (max-width: 768px) {
    .mobile-header-lang {
        display: block !important;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }
    
    /* إخفاء زر اللغة من القائمة الجانبية */
    .sidebar .language-toggle {
        display: none !important;
    }
    
    /* تعديل موضع القائمة للهواتف */
    .menu-toggle {
        right: 60px;
    }
}

/* Portfolio Grid Override - 4 columns with glow */
.portfolio .portfolio-item:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 0 25px rgba(255, 87, 34, 0.6), 0 0 40px rgba(255, 87, 34, 0.3), 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.portfolio .portfolio-item:hover img {
    transform: scale(1.05) !important;
    filter: drop-shadow(0 0 15px rgba(255, 87, 34, 0.5)) !important;
}

.portfolio .portfolio-item.shuffling {
    opacity: 1 !important;
}

/* Portfolio Animation - Zoom Out with Glow */
@keyframes portfolioZoomGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(255, 87, 34, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 50px rgba(255, 87, 34, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(255, 87, 34, 0.4);
    }
}

.portfolio .portfolio-item.animate-glow {
    animation: portfolioZoomGlow 2s ease-in-out;
}

/* Skeleton Loading */
.skeleton-loader {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.skeleton-item {
    width: 100%;
    height: 250px;
    border-radius: 15px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.2) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Skeleton Loader */
@media (max-width: 1200px) {
    .skeleton-loader {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .skeleton-loader {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .skeleton-loader {
        grid-template-columns: 1fr;
    }
}
