:root {
    /* Colors - Dark Theme (Default) */
    --bg-body: #0f1115;
    --bg-surface: #181b21;
    --bg-surface-alt: #13161b;
    --text-primary: #ffffff;
    --text-secondary: #a0a6b1;
    --primary: #10b981;
    /* Emerald 500 */
    --primary-dark: #059669;
    /* Emerald 600 */
    --primary-glow: rgba(16, 185, 129, 0.3);
    --accent: #3b82f6;
    /* Blue 500 */
    --border: #2d333b;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Transitions */
    --transition: 0.3s ease;
}

[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #eff6ff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary: #059669;
    /* Emerald 600 */
    --primary-dark: #047857;
    /* Emerald 700 */
    --primary-glow: rgba(5, 150, 105, 0.2);
    --border: #e2e8f0;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-alt {
    background-color: var(--bg-surface-alt);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn.sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(15, 17, 21, 0.8);
    /* Dark default */
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.logo i {
    color: var(--primary);
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--primary);
}

/* Theme Toggle */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--primary);
    transform: rotate(15deg);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 60px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.abstract-shape {
    position: relative;
    width: 100%;
    height: 400px;
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.abstract-shape i {
    font-size: 15rem;
    color: var(--primary);
    opacity: 0.8;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Section Common */
.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-subtitle {
    display: block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
}

/* About Section */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.image-card {
    position: relative;
    height: 400px;
    background: var(--bg-surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    /* Slight offset for style */
    background: var(--bg-surface);
    padding: 20px 40px;
    border-radius: 16px;
    box-shadow: -10px -10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Fix for badge position inside container */
.image-card .experience-badge {
    bottom: 20px;
    right: 20px;
}

.experience-badge .number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.experience-badge .text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lead {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.feature-list {
    margin-top: 30px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.feature-list li i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Cards (Expertise & Projects) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.75rem;
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Services Wrapper */
.services-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-row:hover {
    border-color: var(--primary);
    transform: translateX(10px);
}

.service-icon {
    font-size: 2rem;
    color: var(--primary);
    min-width: 60px;
    text-align: center;
}

.service-info h3 {
    margin-bottom: 8px;
}

.service-info p {
    color: var(--text-secondary);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

./* تنسيق صور المشاريع الجديد */
.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* لضمان ملء الصورة للمربع دون تشويه */
}

.project-card {
    height: 300px;
    background: var(--bg-surface);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
}

/* طبقة ظلال فوق الصورة لجعل النص واضحاً */
/* Projects Section Modified */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    height: 350px;
    background: var(--bg-surface);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
}

/* صورة الخلفية داخل الكارد */
.project-img-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-bg {
    transform: scale(1.1); /* تأثير زووم عند تمرير الماوس */
}

/* طبقة الظل لضمان وضوح الكتابة */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 1;
}

.project-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
}

/* إزالة الأنماط القديمة التي كانت تمنع ظهور الصور */
.project-card::after {
    display: none; 
}

/* Career Objective */
.objective-section {
    padding: 100px 0;
    background: linear-gradient(45deg, var(--bg-surface), var(--bg-surface-alt));
    text-align: center;
}

.objective-box {
    max-width: 800px;
    margin: 0 auto;
}

.objective-box h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.objective-box p {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.5;
    font-style: italic;
    color: var(--text-primary);
}

/* Contact */
.contact-card {
    background: var(--bg-surface);
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    border: 1px solid var(--border);
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .contact-card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.contact-card .section-title {
    margin-bottom: 16px;
}

.contact-card p {
    margin-bottom: 40px;
    color: var(--text-secondary);
}

.contact-details {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    background-color: var(--bg-body);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo i {
    color: var(--primary);
    font-size: 1.25rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 1.25rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

.back-to-top {
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.back-to-top:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Animation Classes (used by JS) */
.fade-in,
.fade-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.visible {
    opacity: 1;
    transform: none;
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* Responsive */
@media (min-width: 768px) {
    .copyright {
        width: auto;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content,
    .section-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero p {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--bg-body);
        width: 100%;
        height: calc(100vh - var(--header-height));
        padding: 40px;
        transition: 0.3s;
        border-right: 1px solid var(--border);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-image {
        order: -1;
    }

    .feature-list li {
        justify-content: center;
    }

    .contact-card {
        padding: 40px 20px;
    }
}
/* Shop Styles */
/* تحسين عرض صور المنتجات */
.card-image-container {
    width: 100%;
    height: 250px; /* زيادة الطول قليلاً ليعطي مظهر أفضل */
    background-color: #f9f9f9; /* خلفية فاتحة جداً تليق بالمنتجات */
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.product-img {
    width: 100%;
    height: 100%;
    /* التغيير الأساسي هنا: cover تجعل الصورة تملأ المربع بالكامل */
    object-fit: cover; 
    transition: transform 0.5s ease;
}

/* في حالة كانت الصورة ذات خلفية بيضاء وتريد رؤيتها كاملة، استخدم هذه الخاصية بدلاً من cover */
/* object-fit: contain; padding: 10px; */