/* Font Face */
@font-face {
    font-family: 'Nahdi-Black';
    src: url('fonts/Nahdi-Black.woff2') format('woff2'),
         url('fonts/Nahdi-Black.woff') format('woff'),
         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;
}

*:focus {
    outline: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #0F0C29 0%, #24243e 50%, #302B63 100%);
    font-family: var(--font-primary);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    /* Performance optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* 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;
    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;
}

/* Photoshop Icon */
.hero-adobe-icons .adobe-icon:nth-child(1) {
    position: absolute;
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    opacity: 0.25;
    animation: floatIcon1 18s infinite ease-in-out;
}

.hero-adobe-icons .adobe-icon:nth-child(1)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/a/af/Adobe_Photoshop_CC_icon.svg') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 15px rgba(49, 168, 255, 0.6));
}

/* Illustrator Icon */
.hero-adobe-icons .adobe-icon:nth-child(2) {
    position: absolute;
    width: 70px;
    height: 70px;
    top: 60%;
    right: 15%;
    opacity: 0.25;
    animation: floatIcon2 20s infinite ease-in-out;
}

.hero-adobe-icons .adobe-icon:nth-child(2)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/f/fb/Adobe_Illustrator_CC_icon.svg') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 15px rgba(255, 154, 0, 0.6));
}

/* InDesign Icon */
.hero-adobe-icons .adobe-icon:nth-child(3) {
    position: absolute;
    width: 75px;
    height: 75px;
    bottom: 20%;
    left: 15%;
    opacity: 0.25;
    animation: floatIcon3 19s infinite ease-in-out;
}

.hero-adobe-icons .adobe-icon:nth-child(3)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/4/48/Adobe_InDesign_CC_icon.svg') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 15px rgba(255, 61, 127, 0.6));
}

/* After Effects Icon */
.hero-adobe-icons .adobe-icon:nth-child(4) {
    position: absolute;
    width: 65px;
    height: 65px;
    top: 35%;
    right: 10%;
    opacity: 0.25;
    animation: floatIcon4 22s infinite ease-in-out;
}

.hero-adobe-icons .adobe-icon:nth-child(4)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/c/cb/Adobe_After_Effects_CC_icon.svg') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 15px rgba(153, 153, 255, 0.6));
}

/* Premiere Pro Icon */
.hero-adobe-icons .adobe-icon:nth-child(5) {
    position: absolute;
    width: 70px;
    height: 70px;
    top: 70%;
    left: 50%;
    opacity: 0.25;
    animation: floatIcon5 21s infinite ease-in-out;
}

.hero-adobe-icons .adobe-icon:nth-child(5)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/4/40/Adobe_Premiere_Pro_CC_icon.svg') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 15px rgba(153, 153, 255, 0.6));
}

/* XD Icon */
.hero-adobe-icons .adobe-icon:nth-child(6) {
    position: absolute;
    width: 68px;
    height: 68px;
    top: 25%;
    right: 25%;
    opacity: 0.25;
    animation: floatIcon6 23s infinite ease-in-out;
}

.hero-adobe-icons .adobe-icon:nth-child(6)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/c/c2/Adobe_XD_CC_icon.svg') no-repeat center;
    background-size: contain;
    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;
}

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: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 87, 34, 0.1);
    z-index: 1000;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.main-header.scrolled {
    background-color: rgba(0, 0, 0, 0.98);
    border-bottom: 1px solid rgba(255, 87, 34, 0.2);
}

.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;
    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;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    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%;
}

.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;
}

/* 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;
    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;
}

.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-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
    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(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.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: 20px;
    font-size: 1.3rem;
}

.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;
}

/* 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(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    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;
}

.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;
}

/* Portfolio Grid - عرض 3 بطاقات فقط */
.portfolio .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 30px;
    padding: 60px 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

/* صور مربعة مع حواف مستديرة وظل جانبي */
.portfolio .portfolio-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* تأثير hover ��ميز */
.portfolio .portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* إزالة التأثير البرتقالي */

/* الصورة داخل العنصر - بسيطة */
.portfolio .portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
}

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

/* تأثير إعادة الترتيب - 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;
}
.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: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* 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) {
    /* 6 صور في الشاشات الكبيرة */
    .portfolio .portfolio-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@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;
    }
    
    /* 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;
    }
    
    /* 6 صور في التابلت */
    .portfolio .portfolio-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    /* تصغير شامل للمحتويات على الهواتف */
    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: 1rem;
    }
    
    .achievement-card {
        padding: 30px 20px;
    }
    
    .achievement-number {
        font-size: 2.5rem;
    }
    
    .achievement-number::after {
        font-size: 2rem;
    }
    
    .achievement-label {
        font-size: 0.95rem;
    }
    
    /* تصغير العناوين */
    .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;
    }
    
    .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);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 50px;
        flex-direction: column;
        background-color: rgba(18, 18, 18, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 1.5rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 0.8rem 0;
        width: 100%;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    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: flex;
        justify-content: center;
        align-items: center;
        gap: 0.8rem;
        padding: 20px 1rem;
        max-width: 100%;
        flex-wrap: wrap;
    }

    .portfolio .portfolio-item {
        width: calc(33.333% - 0.6rem);
        min-width: 100px;
        max-width: 140px;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 480px) {
    /* شاشات صغيرة جداً */
    .portfolio .portfolio-grid {
        gap: 0.6rem;
        padding: 20px 0.8rem;
    }
    
    .portfolio .portfolio-item {
        width: calc(33.333% - 0.5rem);
        min-width: 95px;
        max-width: 120px;
    }
}

/* 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: hidden;
    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;
}

.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(4, 1fr);
    gap: 1rem;
    margin-top: 30px;
    justify-items: center;
}

.portfolio-item {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 15px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    cursor: default;
}

.portfolio-item:hover {
    transform: scale(0.98);
}

/* 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 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 1rem;
        padding: 0 1rem 2rem;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
    }

    .portfolio-item {
        flex: 0 0 calc(25% - 0.75rem);
        max-width: 120px;
        height: 120px;
        padding-bottom: 0;
        border-radius: 8px;
    }
}

/* 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;
    }
}
