/* ==========================================================================
   1. متغيرات التصميم والتهيئة العامة (Design Tokens & Reset)
   ========================================================================== */
:root {
    /* ألوان زجاجية فاتحة متطابقة مع تموجات الفضي والكروم الأبيض للموقع الأبيض */
    --bg-page: #f8fafc;
    /* خلفية الصفحة بيضاء ناصعة مائلة للفضي */
    --bg-navbar: rgba(255, 255, 255, 0.45);
    /* نافبار زجاجي بلوري فاتح */
    --bg-dropdown: rgba(255, 255, 255, 0.6);
    /* منسدلة زجاجية فاتحة */
    --text-primary: #0f172a;
    /* نص أساسي داكن جداً (كحلي/أسود) للمقروئية */
    --text-secondary: #64748b;
    /* رمادي معدني للروابط والنصوص الثانوية */

    /* ألوان التركيز والأزرار - الفولاذي الداكن اللامع والكروم */
    --color-accent: #0f172a;
    /* كحلي داكن/أسود للتركيز والزر الأساسي */
    --color-accent-hover: #334155;
    /* درجة أفتح عند التمرير */

    --font-family: 'Cairo', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

::selection {
    background-color: #334155;
    color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-secondary);
    /* لون النص الأساسي الفضي المريح */
    line-height: 1.6;
    overflow-x: hidden;
}

/* تخصيص شريط التمرير الفاتح */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   2. تصميم النافبار الكبسولي اللامع (Glowing Notched Navbar)
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    pointer-events: none;
}

.navbar-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
}

.navbar-container {
    pointer-events: auto;
    /* خلفية متدرجة مع تأثير زجاجي (Glassmorphism) ودمج مع الداكن */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%), var(--bg-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1000px;
    height: 65px;
    padding: 0 30px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    position: relative;
    transition: var(--transition-smooth);
    overflow: hidden;

    /* ملامح علوية بيضاء ناصعة وظلال ناعمة جداً للموقع الأبيض */
    border-top: 2px solid rgba(255, 255, 255, 0.85);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 -3px 20px rgba(255, 255, 255, 0.4),
        /* توهج أبيض علوي ناعم */
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        /* لمعان علوي داخلي */
        0 10px 30px rgba(0, 0, 0, 0.05);
    /* ظل سفلي خفيف جداً على الخلفية البيضاء */
}

/* الانحناءات المقلوبة من الأعلى (Notch Ears) */
.navbar-container::before,
.navbar-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    transition: var(--transition-smooth);
    z-index: 5;
}

.navbar-container::before {
    right: -20px;
    background: radial-gradient(circle at 100% 100%, transparent 20px, var(--bg-navbar) 20px);
}

.navbar-container::after {
    left: -20px;
    background: radial-gradient(circle at 0% 100%, transparent 20px, var(--bg-navbar) 20px);
}

/* محاذاة عناصر النافبار */
.logo,
.nav-menu,
.header-actions {
    height: 65px;
    display: flex;
    align-items: center;
}

/* الشعار النصي في اليمين (بدون صورة) */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
}

.logo-text .highlight {
    color: var(--color-accent);
}

.logo:hover .logo-text {
    transform: scale(1.03);
}

/* الشعار المصور الجديد */
.logo-img {
    max-height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition-smooth);
}

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

/* قائمة التصفح */
.nav-menu {
    flex-grow: 1;
    justify-content: flex-start;
    padding-right: 40px;
    /* مسافة بين اللوجو والقسم */
}

.nav-list {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-accent);
}

.nav-link:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* إعادة تصفير الشكل الافتراضي لزر "أعمالي" (button) ليتطابق مع باقي الروابط */
button.dropdown-toggle {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

/* زر اتصل بي الشفاف الزجاجي بأسلوب آبل مع تباين ووضوح عالٍ */
.btn-contact {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    border: 1px solid rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-contact:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    border-color: rgba(15, 23, 42, 0.25);
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.btn-contact:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.8);
}

.mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    /* لون هادئ للمظهر الفخم */
    font-size: 1.25rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 1015;
    padding: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.mobile-toggle:hover {
    color: var(--text-primary);
}

.mobile-toggle:active {
    transform: scale(0.9);
    color: var(--color-accent);
}

.mega-dropdown {
    position: absolute;
    top: 65px;
    right: 0;
    width: 100%;
    background: transparent;
    border: none;
    padding: 20px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: var(--transition-smooth);
    z-index: 10;
}

.dropdown-list-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.dropdown-list-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
}

.dropdown-list-item:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transform: translateY(-4px);
}

.dropdown-list-item i {
    font-size: 1.3rem;
    color: var(--text-primary);
    opacity: 0.85;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.dropdown-list-item:hover i {
    color: var(--color-accent);
    transform: scale(1.15);
}

.dropdown-list-item .item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.dropdown-list-item:hover .item-title {
    color: var(--color-accent);
}

/* تأثير تمدد كبسولة النافبار للأسفل للكمبيوتر (بالهوفر) */
.navbar-container.expanded {
    height: 160px;
}

.navbar-container.expanded .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-container.expanded .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--color-accent);
}

@media (min-width: 993px) {
    .navbar-container {
        overflow: hidden;
    }
}

/* ==========================================================================
   4. واجهة التصفح للجوال (Mobile Drawer)
   ========================================================================== */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    z-index: 1010;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-drawer.open {
    right: 0;
}

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

.drawer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drawer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.drawer-link:hover,
.drawer-link.active {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-accent);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1005;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   5. قسم الرئيسية (Hero Section)
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 20px 80px 20px;
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.section-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 60px 40px;
    border-radius: 32px;
    max-width: 800px;
    box-shadow:
        0 30px 60px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.hero-container h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-background-fill-color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-container p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto 35px auto;
}

.hero-actions-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-actions-btns a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 12px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.btn-contact-hero {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
}

.btn-contact-hero:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.25);
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.btn-contact-hero:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.85);
}

.btn-secondary-hero {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
}

.btn-secondary-hero:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(15, 23, 42, 0.25);
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.btn-secondary-hero:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.45);
}


/* إخفاء خيارات الجوال في الشاشات الكبيرة */
.mobile-only-action,
.mobile-only-dropdown {
    display: none;
}

/* ==========================================================================
   6. ملاءمة الشاشات واستجابة التصميم (Media Queries)
   ========================================================================== */
@media screen and (max-width: 992px) {
    .navbar-container {
        max-width: 100%;
        height: auto;
        min-height: 60px;
        max-height: 60px;
        /* الارتفاع المغلق الافتراضي */
        overflow: hidden;
        transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
        padding: 0 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-container.menu-expanded {
        max-height: 800px;
    }

    .logo {
        position: absolute;
        top: 0;
        right: 20px;
        height: 60px;
        display: flex;
        align-items: center;
    }

    .header-actions {
        position: absolute;
        top: 0;
        left: 20px;
        height: 60px;
        display: flex;
        align-items: center;
    }

    .nav-menu {
        display: none;
        width: 100%;
        height: auto;
        margin-top: 60px;
        flex-direction: column;
        align-items: stretch;
        padding: 15px 0 20px 0;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .navbar-container.menu-expanded .nav-menu {
        display: flex;
        opacity: 1;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .nav-link,
    button.dropdown-toggle {
        width: 100%;
        padding: 12px 16px;
        border-radius: 10px;
        background: rgba(0, 0, 0, 0.02) !important;
        color: var(--text-secondary);
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }

    .nav-link.active,
    #worksDropdown.open button.dropdown-toggle {
        background: rgba(0, 0, 0, 0.05) !important;
        color: var(--text-primary) !important;
    }

    .mobile-toggle {
        display: flex;
    }

    .btn-contact {
        display: none;
    }

    /* إظهار وتنسيق زر الجوال المدمج داخل القائمة المنسدلة */
    .mobile-only-action {
        display: block;
        margin-top: 15px;
        width: 100%;
    }

    .mobile-nav-btn {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 12px;
        background: var(--text-primary) !important;
        border: none !important;
        color: #ffffff !important;
        border-radius: 12px;
        font-weight: 700;
        font-size: 0.95rem;
        transition: transform 0.2s ease, opacity 0.2s ease;
        box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
        text-decoration: none;
    }

    .mobile-nav-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* إخفاء القائمة المنسدلة للكمبيوتر على الهواتف */
    .desktop-only-dropdown,
    .mega-dropdown {
        display: none !important;
    }

    /* ----------------------------------------------------------------------
       تنسيقات قائمة "أعمالي" بالجوال - تحكم كامل بكلاس .open (جافاسكربت)
       بدون checkbox hack وبدون الاعتماد على :has()
       ---------------------------------------------------------------------- */

    /* تمدد إضافي للنافبار عند فتح القائمة الفرعية (شبكة أمان لو المحتوى زاد) */
    .navbar-container.submenu-open {
        max-height: 900px;
    }

    .mobile-only-dropdown {
        position: relative;
        width: 100%;
        display: block !important;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transform: translateY(-10px);
        transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin 0.4s ease;
        margin-top: 0;
        margin-bottom: 0;
        z-index: 5;
    }

    /* فتح القائمة الفرعية لما يتفعّل كلاس .open على العنصر #worksDropdown */
    #worksDropdown.open .mobile-only-dropdown {
        max-height: 450px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        margin-top: 15px;
        margin-bottom: 12px;
    }

    /* دوران سهم منسدلة الأعمال للجوال تلقائياً 180 درجة عند الفتح */
    #worksDropdown.open .dropdown-toggle .dropdown-arrow {
        transform: rotate(180deg);
        color: var(--color-accent);
    }

    .mobile-dropdown-items {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-dropdown-items li {
        opacity: 0;
        transform: translateY(-15px);
        transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* تأثير النزول بالتتابع للعناصر الأربعة عند الفتح */
    #worksDropdown.open .mobile-dropdown-items li:nth-child(1) {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.05s;
    }

    #worksDropdown.open .mobile-dropdown-items li:nth-child(2) {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.12s;
    }

    #worksDropdown.open .mobile-dropdown-items li:nth-child(3) {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.19s;
    }

    #worksDropdown.open .mobile-dropdown-items li:nth-child(4) {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.26s;
    }

    /* تأثير الغلق العكسي الذاتي للعناصر الأربعة */
    .mobile-dropdown-items li:nth-child(1) {
        transition-delay: 0.18s;
    }

    .mobile-dropdown-items li:nth-child(2) {
        transition-delay: 0.12s;
    }

    .mobile-dropdown-items li:nth-child(3) {
        transition-delay: 0.06s;
    }

    .mobile-dropdown-items li:nth-child(4) {
        transition-delay: 0s;
    }

    .mobile-dropdown-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px;
        text-decoration: none;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.4);
        border: 1px solid rgba(15, 23, 42, 0.05);
        color: var(--text-secondary);
        font-weight: 700;
        font-size: 0.95rem;
        transition: all 0.25s ease;
    }

    .mobile-dropdown-item i {
        font-size: 1.1rem;
        color: var(--text-primary);
        opacity: 0.8;
    }

    .mobile-dropdown-item:active {
        background: rgba(15, 23, 42, 0.06) !important;
        color: var(--text-primary) !important;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   7. أزرار الاتصل بي المخصصة (Custom Contact Buttons)
   ========================================================================== */


.drawer-actions {
    margin-top: auto;
    width: 100%;
    padding: 20px 0 10px 0;
}

.drawer-btn-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
}

/* ==========================================================================
   8. قسم معرض الأعمال (Portfolio Section)
   ========================================================================== */
.portfolio-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.45);
    color: var(--text-secondary);
    border: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.12);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

@media (min-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.portfolio-item {
    transition: var(--transition-smooth);
}

.project-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
}

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

#portfolio .project-image {
    height: 230px;
}

#portfolio .project-info {
    padding: 15px 20px;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

#portfolio .project-info h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 2;
}

.project-category {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    transition: var(--transition-fast);
}

.project-link i {
    transition: transform 0.2s ease;
}

.project-link:hover {
    color: var(--text-secondary);
}

.project-link:hover i {
    transform: translateX(-4px);
}

/* ==========================================================================
   9. قسم من أنا (About Section)
   ========================================================================== */
.about-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: flex;
    justify-content: center;
    width: 100%;
}

.story-card {
    width: 100%;
}

.skills-card-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.about-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 40px;
    border-radius: 24px;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.about-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

/* شريط التقنيات ولغات البرمجة المتحرك (Tech Ticker) */
.tech-ticker-section {
    width: 100%;
    background: transparent;
    padding: 10px 0;
    display: flex;
    justify-content: center;
}

.tech-ticker-container {
    max-width: 1200px;
    width: calc(100% - 40px);
    /* هوامش متناسقة على الجوانب */
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 22px 35px;
    display: flex;
    align-items: center;
    gap: 35px;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.tech-ticker-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    border-left: 2px solid rgba(15, 23, 42, 0.08);
    padding-left: 30px;
}

.tech-ticker-slider {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    direction: ltr;
    /* فرض الاتجاه من اليسار لليمين لمنع تعارض اتجاه الأنيميشن بالكونتينر */
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}

.tech-ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    direction: ltr;
    /* فرض الاتجاه من اليسار لليمين للعناصر الداخلية */
    animation: scroll-ticker 25s linear infinite;
}

/* إيقاف الحركة عند وقوف الماوس (Hover) */
.tech-ticker-slider:hover .tech-ticker-track {
    animation-play-state: paused;
}

.tech-ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    /* تكبير النصوص قليلاً */
    font-weight: 700;
    color: var(--text-primary);
    transition: transform 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.tech-ticker-item i,
.tech-ticker-item svg {
    font-size: 1.9rem;
    /* تكبير الأيقونات قليلاً */
    width: 1.9rem;
    height: 1.9rem;
    transition: transform 0.3s ease;
}

/* الخط الفاصل بين كل تقنية */
.tech-ticker-item::after {
    content: "";
    width: 2px;
    height: 18px;
    background: rgba(15, 23, 42, 0.12);
    margin-right: 40px;
    margin-left: 40px;
    display: inline-block;
}

.tech-ticker-item:hover {
    transform: scale(1.08);
}

.tech-ticker-item:hover i,
.tech-ticker-item:hover svg {
    transform: rotate(10deg);
}

/* حركة التمرير اللانهائي الدائرية للـ 3 مجموعات (100% / 3 = 33.333%) */
@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-100% / 3));
    }
}

/* التجاوب مع شاشات الهواتف والأجهزة اللوحية */
@media screen and (max-width: 768px) {
    .tech-ticker-section {
        padding: 15px 0;
    }

    .tech-ticker-container {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 20px;
    }

    .tech-ticker-title {
        border-left: none;
        border-bottom: 2px solid rgba(15, 23, 42, 0.08);
        padding-left: 0;
        padding-bottom: 12px;
        width: 100%;
        text-align: center;
    }

    .tech-ticker-slider {
        width: 100%;
    }
}

/* ==========================================================================
   10. قسم خدماتي (Services Section)
   ========================================================================== */
.services-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.services-header {
    text-align: center;
    margin-bottom: 60px;
}

.services-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.services-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.service-card {
    flex: 1 1 280px;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 25px auto;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--text-primary);
    color: #ffffff;
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   11. قسم اتصل بي (Contact Section)
   ========================================================================== */
.contact-section {
    padding: 80px 20px 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.contact-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.contact-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 40px;
}

.contact-info-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.contact-info-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 25px;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 30px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr;
    /* جعل الأيقونة على اليسار تماشياً مع اتجاه قراءة الايميل والرقم */
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    padding: 4px 0;
}

.contact-info-item i {
    font-size: 1.2rem;
    color: #ffffff;
    /* جعل الأيقونات بيضاء */
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-icons a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: #ffffff;
    color: var(--text-primary);
    transform: translateY(-3px);
}

.contact-form-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 40px;
    border-radius: 24px;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}

.btn-submit-contact {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text-primary);
    color: #ffffff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 35px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-contact:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

/* استجابة الأقسام للهواتف */
@media screen and (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-container h1 {
        font-size: 2.2rem;
    }

    .hero-container {
        padding: 40px 20px;
    }
}

@media screen and (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   12. حركات التحميل والظهور والتمرير (Scroll & Entrance Animations)
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(40px, -60px) scale(1.1);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.hero-glow-circle {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.035) 0%, transparent 70%);
    top: 5%;
    right: 10%;
    z-index: 1;
    filter: blur(60px);
    animation: floatGlow 12s ease-in-out infinite;
    pointer-events: none;
}

.hero-tag {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-container h1 {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.hero-container p {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-actions-btns {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

/* تأثير التمرير الذكي للجداول والكروت */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   13. قسم الفوتر الكبير (Footer Section)
   ========================================================================== */
.main-footer {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 80px 20px 30px 20px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 25px;
    position: relative;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 15px;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--text-primary);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.footer-links a i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-links a:hover i {
    transform: translateX(-4px);
}

.newsletter-col p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-form {
    display: flex;
    position: relative;
    width: 100%;
}

.footer-form input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 50px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.footer-form input:focus {
    outline: none;
    border-color: var(--text-primary);
    background: #ffffff;
}

.footer-form button {
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: 40px;
    background: var(--text-primary);
    border: none;
    border-radius: 9px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease;
}

.footer-form button:hover {
    background: rgba(15, 23, 42, 0.9);
}

.footer-bottom {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: var(--text-primary);
}

/* استجابة الفوتر لشاشات الهواتف */
@media screen and (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media screen and (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* الفواصل الرسومية الأنيقة بين الأقسام */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(15, 23, 42, 0.08) 50%, transparent 100%);
    max-width: 1200px;
    margin: 0 auto;
    border: none;
    display: block;
}

/* ==========================================================================
   14. تنسيقات الصفحات الفرعية (Subpages Layout)
   ========================================================================== */

/* العنوان الرئيسي للصفحات الفرعية */
.subpage-hero {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px 20px;
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.subpage-hero-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.subpage-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 15px 0;
}

.subpage-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* قسم مسيرة الأعمال (Timeline) */
.timeline-section {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-container {
    position: relative;
    margin: 40px auto 0 auto;
    padding-right: 30px;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 9px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.12) 50%, rgba(15, 23, 42, 0.03));
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    right: -25px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color, #1572b6);
    box-shadow: 0 0 10px rgba(21, 114, 182, 0.4);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.4);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-color, #1572b6);
    display: block;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.timeline-company {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 12px;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* قسم تفاصيل الخدمات المتقدم */
.detailed-services-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.services-detail-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.service-detail-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.04);
    transition: transform 0.3s ease;
}

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

.service-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.service-detail-icon {
    width: 60px;
    height: 60px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-color, #1572b6);
}

.service-detail-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.service-detail-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.service-features-list h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.service-features-list ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 0;
}

.service-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.service-features-list li i {
    color: #10b981;
}

/* باقات الأسعار */
.pricing-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.08);
}

.pricing-card.popular {
    border: 2px solid var(--accent-color, #1572b6);
}

.pricing-tag {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    align-self: flex-start;
    margin-bottom: 20px;
}

.pricing-tag.popular-tag {
    background: var(--accent-color, #1572b6);
    color: #ffffff;
    border-color: var(--accent-color, #1572b6);
}

.pricing-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.price {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.price span {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    vertical-align: middle;
}

.price-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
    min-height: 48px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
    padding: 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pricing-features li i {
    color: #10b981;
}

.pricing-features li.not-included {
    opacity: 0.5;
    text-decoration: line-through;
}

.pricing-features li.not-included i {
    color: #ef4444;
}

.btn-pricing {
    display: block;
    text-align: center;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-pricing:hover {
    background: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
}

.btn-pricing.btn-popular {
    background: var(--accent-color, #1572b6);
    color: #ffffff;
    border-color: var(--accent-color, #1572b6);
}

.btn-pricing.btn-popular:hover {
    background: #105990;
    border-color: #105990;
}

/* قسم نداء العمل CTA */
.cta-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cta-container {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 60px 40px;
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.04);
}

.cta-container h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.cta-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.btn-cta-action {
    display: inline-block;
    background: var(--accent-color, #1572b6);
    color: #ffffff;
    padding: 16px 36px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 10px 20px rgba(21, 114, 182, 0.15);
    transition: all 0.3s ease;
}

.btn-cta-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(21, 114, 182, 0.25);
    background: #105990;
}

/* النافذة المنبثقة للمشاريع (Detail Modals) */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    z-index: 1101;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 40px;
    border-radius: 28px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.1);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-modal.active .modal-content {
    transform: scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    line-height: 1;
}

.close-modal-btn:hover {
    background: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
}

.modal-body-content {
    text-align: right;
}

.modal-body-content img {
    width: 100%;
    border-radius: 18px;
    margin-bottom: 25px;
    object-fit: cover;
    max-height: 350px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.modal-body-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-project-category {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color, #1572b6);
    background: rgba(21, 114, 182, 0.08);
    padding: 4px 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-body-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.modal-project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
}

.meta-info-item h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.meta-info-item p {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

/* تنسيق إضافي لصفحة المعرض الفرعية */
.subpage-portfolio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 80px 20px;
}

.btn-project-details {
    background: transparent;
    border: none;
    color: #000000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-project-details:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.btn-project-details i {
    transition: transform 0.2s ease;
}

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

@media screen and (max-width: 768px) {
    .pricing-container {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: none;
    }

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

    .subpage-hero h1 {
        font-size: 2.2rem;
    }

    .timeline-container {
        padding-right: 20px;
    }

    .timeline-line {
        right: 4px;
    }

    .timeline-dot {
        right: -20px;
    }
}

/* ==========================================================================
   Project Detail Subpage Styles
   ========================================================================== */
.project-detail-section {
    padding: 60px 0 100px;
    position: relative;
    z-index: 10;
}

.project-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Back Link styling */
.back-link-wrapper {
    margin-bottom: 30px;
}

.btn-back-projects {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.25s ease, transform 0.25s ease;
}

.btn-back-projects i {
    transition: transform 0.25s ease;
}

.btn-back-projects:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.btn-back-projects:hover i {
    transform: translateX(4px);
}

/* Main Detail Grid Layout */
.project-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: start;
}

/* Media Showcase styling */
.project-detail-media {
    position: sticky;
    top: 100px;
}

.media-showcase-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 16px;
    box-shadow: var(--shadow-premium), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.media-showcase-card img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Information Container */
.project-detail-info {
    width: 100%;
}

.info-content-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

/* Category & Title */
.project-title-meta {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding-bottom: 20px;
}

.project-detail-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.project-title-meta h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
}

/* Descriptive Text */
.project-description {
    margin-bottom: 35px;
}

.project-description h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.project-description p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Meta Data Cards Grid */
.project-meta-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 35px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 25px 0;
}

.meta-card-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 16px 20px;
    border-radius: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.meta-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.meta-card-item .meta-icon {
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1.15rem;
}

.meta-card-item .meta-text h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
    font-weight: 600;
}

.meta-card-item .meta-text p {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Case Study details (Challenges & Solutions) */
.case-study-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.study-block {
    padding: 20px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    transition: all 0.3s ease;
}

.study-block h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.study-block:nth-child(1) h4 {
    color: #e11d48;
    /* Red/Rose shade for challenges */
}

.study-block:nth-child(2) h4 {
    color: #16a34a;
    /* Green shade for solutions */
}

.study-block p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Actions styling */
.project-actions {
    display: flex;
    gap: 15px;
}

.btn-live-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    padding: 15px;
    background: var(--text-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.btn-live-demo:hover {
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.9);
}

.btn-live-demo:active {
    transform: translateY(0);
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .project-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-detail-media {
        position: relative;
        top: 0;
    }

    .info-content-card {
        padding: 30px 20px;
    }

    .project-title-meta h2 {
        font-size: 1.6rem;
    }
}

/* View More Portfolio Link styling */
.view-more-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text-primary);
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
    cursor: pointer;
}

.btn-view-more i {
    transition: transform 0.25s ease;
}

.btn-view-more:hover {
    transform: translateY(-2px);
    background: var(--color-accent);
    box-shadow: 0 8px 25px rgba(21, 114, 182, 0.25);
    color: #ffffff;
}

.btn-view-more:hover i {
    transform: translateX(-4px);
}

.btn-view-more:active {
    transform: translateY(0);
}