/* ==========================================================================
   أمين رجب | رواد البرمجيات - التصميم المعماري الملكي (أسود × ذهبي × أزرق)
   ========================================================================== */

:root {
    /* الألوان الأساسية (الأسود الملكي والطبقات) */
    --bg-main: #07090e;
    --bg-surface: #0d111a;
    --bg-card: rgba(17, 23, 34, 0.75);
    --bg-card-hover: rgba(23, 31, 46, 0.95);
    
    /* درجات الذهبي الفخم (Metallic Gold) */
    --gold-primary: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #aa7c11;
    --gold-glow: rgba(212, 175, 55, 0.22);
    --gold-border: rgba(212, 175, 55, 0.35);

    /* درجات الأزرق الملكي (Royal Sapphire Blue) */
    --blue-primary: #2563eb;
    --blue-light: #60a5fa;
    --blue-dark: #1d4ed8;
    --blue-glow: rgba(37, 99, 235, 0.25);
    --blue-border: rgba(59, 130, 246, 0.35);

    /* النصوص والحدود */
    --text-white: #f8fafc;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    --border-subtle: rgba(255, 255, 255, 0.07);
    
    /* الانتقالات */
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* إعدادات عامة وإلغاء أي سكرول جانبي نهائياً */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* خلفية شبكية هندسية خفيفة جداً تعطي عمق معماري */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

/* إضاءات محيطية في الخلفية (الذهبي والأزرق) */
.ambient-light {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.55;
}

.gold-glow {
    top: -10%;
    right: -5%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%);
}

.blue-glow {
    bottom: 5%;
    left: -10%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 70%);
}

/* شريط التمرير (Scrollbar) */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid var(--gold-border);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

/* الحاوية القياسية */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* ==========================================================================
   1. شاشة التحميل السينمائية (Preloader)
   ========================================================================== */
#preloader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-main);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-wrapper {
    text-align: center;
    width: 240px;
}

.loader-logo {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.loader-logo span {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loader-line {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-progress {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--blue-primary), var(--gold-primary));
    border-radius: 10px;
    animation: loadingSlide 1.2s ease-in-out infinite alternate;
}

@keyframes loadingSlide {
    0% { transform: translateX(120%); }
    100% { transform: translateX(-120%); }
}

/* ==========================================================================
   2. الهيدر العائم وشريط التنقل (Navbar)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(7, 9, 14, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.nav-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text strong {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
}

.logo-text small {
    font-size: 12px;
    color: var(--gold-primary);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-item {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 600;
    position: relative;
    padding: 6px 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-primary), var(--blue-light));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-white);
}

.nav-item:hover::after, .nav-item.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-gold-sm {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-main);
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-gold-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(212, 175, 55, 0.4);
}

.btn-install {
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid var(--blue-border);
    color: var(--blue-light);
    padding: 9px 16px;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-install:hover {
    background: var(--blue-primary);
    color: #fff;
}

/* زرار قائمة الموبايل */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 2.5px;
    background-color: var(--gold-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   3. القسم الرئيسي (Hero Section)
   ========================================================================== */
.hero-section {
    padding-top: 140px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    align-items: center;
    gap: 50px;
    padding-bottom: 70px;
}

.royal-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--gold-border);
    color: var(--gold-light);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gold-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-primary);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.hero-title {
    font-size: clamp(34px, 4.5vw, 54px);
    font-weight: 900;
    line-height: 1.25;
    color: var(--text-white);
    margin-bottom: 22px;
}

.gold-gradient {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 55%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-text {
    color: var(--gold-primary);
}

.hero-description {
    color: var(--text-light);
    font-size: 18px;
    line-height: 1.85;
    margin-bottom: 24px;
    max-width: 620px;
}

.hero-description strong {
    color: var(--gold-light);
    font-weight: 700;
}

/* شريط الكتابة الديناميكي */
.dynamic-role {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(13, 17, 26, 0.9);
    border: 1px solid var(--border-subtle);
    border-right: 3px solid var(--blue-primary);
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 34px;
    min-height: 52px;
}

.gold-icon {
    color: var(--gold-primary);
    font-size: 18px;
}

.typed-text {
    color: var(--blue-light);
    font-weight: 700;
    font-size: 17px;
}

.cursor {
    display: inline-block;
    width: 2.5px;
    height: 22px;
    background-color: var(--gold-primary);
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* أزرار الهيرو الملكية */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn-royal-gold {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-main);
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 25px var(--gold-glow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-royal-gold:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(212, 175, 55, 0.38);
}

.btn-royal-blue {
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid var(--blue-border);
    color: var(--text-white);
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-royal-blue i {
    color: var(--blue-light);
    font-size: 20px;
}

.btn-royal-blue:hover {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--blue-glow);
}

.btn-royal-blue:hover i {
    color: #fff;
}

/* البرواز الهندسي للصورة الشخصية */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-showcase {
    position: relative;
    width: 340px;
    height: 410px;
}

.frame-border-gold {
    position: absolute;
    inset: -12px;
    border: 2px solid var(--gold-border);
    border-radius: 28px;
    transform: rotate(-3deg);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.frame-border-blue {
    position: absolute;
    inset: -12px;
    border: 2px solid var(--blue-border);
    border-radius: 28px;
    transform: rotate(3deg);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.profile-showcase:hover .frame-border-gold {
    transform: rotate(0deg) scale(1.02);
    border-color: var(--gold-primary);
}

.profile-showcase:hover .frame-border-blue {
    transform: rotate(0deg) scale(0.98);
    border-color: var(--blue-light);
}

.image-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.75);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

.profile-showcase:hover .image-wrapper img {
    transform: scale(1.04);
}

/* البطاقات العائمة حول الصورة */
.floating-badge {
    position: absolute;
    z-index: 3;
    background: rgba(13, 17, 26, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    padding: 10px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    animation: floatSlow 4s ease-in-out infinite;
}

.floating-badge i {
    font-size: 22px;
}

.floating-badge div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.floating-badge strong {
    font-size: 13px;
    color: var(--text-white);
}

.floating-badge span {
    font-size: 11px;
    color: var(--text-muted);
}

.badge-top {
    top: 20px;
    right: -35px;
    border-right: 3px solid var(--gold-primary);
}

.badge-top i {
    color: var(--gold-primary);
}

.badge-bottom {
    bottom: 25px;
    left: -35px;
    border-left: 3px solid var(--blue-light);
    animation-delay: 2s;
}

.badge-bottom i {
    color: var(--blue-light);
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* شريط التقنيات السفلي في الهيرو */
.tech-strip {
    background: rgba(13, 17, 26, 0.85);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px 0;
}

.tech-strip-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-weight: 700;
    font-size: 15px;
}

.tech-item i {
    color: var(--gold-primary);
    font-size: 18px;
}

.tech-divider {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--blue-primary);
}

/* ==========================================================================
   4. إعدادات الأقسام العامة (Sections)
   ========================================================================== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 65px;
}

.section-tag {
    display: inline-block;
    color: var(--blue-light);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--blue-border);
    padding: 5px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-desc {
    color: var(--text-muted);
    font-size: 17px;
}

/* ==========================================================================
   5. قسم التخصص والمهارات (Bento Grid)
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 36px 30px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* إضاءة الماوس التفاعلية داخل الكروت */
.bento-card::after, .portfolio-card::after {
    content: "";
    position: absolute;
    top: var(--y, 0);
    left: var(--x, 0);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.bento-card:hover::after, .portfolio-card:hover::after {
    opacity: 1;
}

.bento-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold-border);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.bento-large {
    grid-column: span 1;
    grid-row: span 2;
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.08) 0%, var(--bg-card) 60%);
    border-color: rgba(212, 175, 55, 0.2);
}

.bento-wide {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, var(--bg-card) 70%);
}

.bento-wide-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.bento-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--gold-border);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 22px;
}

.bento-icon.blue {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--blue-border);
    color: var(--blue-light);
}

.bento-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 12px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 15.5px;
    line-height: 1.75;
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.bento-tags span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--gold-light);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
}

.bento-link {
    white-space: nowrap;
    color: var(--gold-primary);
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gold-border);
}

.bento-link:hover {
    background: var(--gold-primary);
    color: var(--bg-main);
}

/* ==========================================================================
   6. قسم الكيان المؤسسي والإحصائيات (رواد البرمجيات)
   ========================================================================== */
.agency-section {
    background: linear-gradient(180deg, transparent, rgba(13, 17, 26, 0.8), transparent);
}

.agency-showcase {
    background: linear-gradient(135deg, #0d121d 0%, #070a10 100%);
    border: 1px solid var(--gold-border);
    border-radius: 28px;
    padding: 55px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 50px;
    align-items: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(212, 175, 55, 0.04);
    position: relative;
    overflow: hidden;
}

.agency-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-primary);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
}

.agency-title {
    font-size: clamp(28px, 3.5vw, 38px);
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 18px;
}

.agency-title span {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    color: var(--blue-light);
    letter-spacing: 1.5px;
    margin-top: 4px;
    text-transform: uppercase;
}

.agency-lead {
    color: var(--text-light);
    font-size: 16.5px;
    margin-bottom: 24px;
    line-height: 1.8;
}

.agency-features {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agency-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 15.5px;
    font-weight: 500;
}

.agency-features li i {
    color: var(--gold-primary);
    font-size: 18px;
}

/* شبكة الإحصائيات داخل الكيان المؤسسي */
.agency-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-box.gold-border {
    border-bottom: 3px solid var(--gold-primary);
}

.stat-box.blue-border {
    border-bottom: 3px solid var(--blue-light);
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: var(--gold-primary);
    line-height: 1.1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 700;
}

/* ==========================================================================
   7. قسم سابقة الأعمال والتطبيقات (Portfolio)
   ========================================================================== */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 45px;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-light);
    padding: 11px 24px;
    border-radius: 50px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    border-color: var(--gold-border);
    color: var(--text-white);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-main);
    border-color: transparent;
    box-shadow: 0 6px 20px var(--gold-glow);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 28px;
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-border);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.card-media {
    position: relative;
    height: 215px;
    background: linear-gradient(135deg, #131b2e, #0a0e17);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.card-media img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.portfolio-card:hover .card-media img {
    transform: scale(1.06);
}

.floating-category {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--gold-border);
    color: var(--gold-light);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}

.card-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12.5px;
    font-weight: 700;
}

.store-badge.play-store {
    color: #34d399;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.store-badge.web-live {
    color: var(--blue-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.platform-tag {
    color: var(--text-muted);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11.5px;
}

.card-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 10px;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 22px;
    flex: 1;
}

.card-action {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gold-primary);
    font-weight: 800;
    font-size: 14px;
}

.portfolio-card:hover .card-action {
    color: var(--gold-light);
}

.portfolio-card:hover .card-action i {
    transform: translate(-4px, -4px);
}

.card-action i {
    transition: transform 0.3s ease;
}

/* ==========================================================================
   8. قسم التواصل (VIP Contact Channels)
   ========================================================================== */
.contact-box {
    background: linear-gradient(145deg, rgba(17, 23, 34, 0.9), rgba(7, 9, 14, 0.95));
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    padding: 60px 45px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-header {
    max-width: 650px;
    margin: 0 auto 45px;
}

.contact-header p {
    color: var(--text-muted);
    font-size: 16.5px;
}

.contact-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 980px;
    margin: 0 auto;
}

.channel-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: right;
    transition: var(--transition-smooth);
}

.channel-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.whatsapp-card .channel-icon {
    background: rgba(37, 211, 102, 0.12);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.telegram-card .channel-icon {
    background: rgba(0, 136, 204, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(0, 136, 204, 0.3);
}

.facebook-card .channel-icon {
    background: rgba(24, 119, 242, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(24, 119, 242, 0.3);
}

.channel-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.channel-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.channel-info strong {
    font-size: 18px;
    color: var(--text-white);
    margin: 2px 0;
}

.channel-info small {
    font-size: 13.5px;
    color: var(--gold-light);
    font-weight: 700;
}

.channel-arrow {
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.channel-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--gold-border);
}

.channel-card:hover .channel-arrow {
    color: var(--gold-primary);
    transform: translateX(-5px);
}

/* ==========================================================================
   9. نافذة تفاصيل المشروع (Modal)
   ========================================================================== */
.project-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 11, 0.88);
    backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--gold-border);
    border-radius: 24px;
    width: 100%;
    max-width: 820px;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.92) translateY(20px);
    transition: var(--transition-smooth);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

.project-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.close-modal {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-white);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
}

.close-modal:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
}

.modal-image-container {
    background: linear-gradient(135deg, #131b2e, #090d16);
    padding: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image-container img {
    max-height: 240px;
    border-radius: 12px;
}

.modal-details {
    padding: 36px;
}

.app-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-primary);
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-details h3 {
    font-size: 26px;
    color: var(--text-white);
    margin-bottom: 14px;
}

.modal-details p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 20px;
}

.modal-tech h4 {
    color: var(--gold-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.tech-tags span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-light);
}

/* ==========================================================================
   10. الفوتر الرسمي (Footer)
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-subtle);
    background: #05070b;
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14.5px;
}

.footer-brand strong {
    color: var(--text-white);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-copy span {
    color: var(--gold-primary);
    font-weight: 700;
}
/* ==========================================================================
   إضافات الإبهار البصري السينمائي (Ultra Royal Animations & 3D Effects)
   ========================================================================== */

/* 1. شريط التقدم العلوي الذهبي المضيء */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--blue-light), var(--gold-primary), var(--gold-light));
    box-shadow: 0 0 15px var(--gold-primary), 0 0 30px var(--blue-primary);
    z-index: 9999999;
    transition: width 0.08s ease-out;
}

/* 2. هالة إضاءة سينمائية تتبع الماوس في خلفية الموقع */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.07) 0%, rgba(37, 99, 235, 0.04) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

/* 3. لمعة المعدن الذهبي المتحركة على العناوين والأزرار (Shimmer Effect) */
.gold-gradient {
    background: linear-gradient(
        110deg,
        var(--gold-light) 0%,
        var(--gold-primary) 25%,
        #ffffff 45%,
        var(--gold-primary) 65%,
        var(--blue-light) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: royalShine 5s linear infinite;
}

@keyframes royalShine {
    to {
        background-position: 200% center;
    }
}

/* لمعة ضوئية تمر على الأزرار الذهبية الملكية */
.btn-royal-gold, .btn-gold-sm {
    position: relative;
    overflow: hidden;
}

.btn-royal-gold::before, .btn-gold-sm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.45),
        transparent
    );
    transform: skewX(-25deg);
    animation: btnSweep 4.5s infinite;
    pointer-events: none;
}

@keyframes btnSweep {
    0% { left: -120%; }
    25%, 100% { left: 150%; }
}

/* 4. تهيئة الأبعاد الثلاثية (3D Perspective) للكروت وبرواز الصورة */
.profile-showcase {
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
}

.profile-showcase .frame-border-gold,
.profile-showcase .frame-border-blue {
    transform: translateZ(-15px) rotate(-3deg);
}

.profile-showcase .frame-border-blue {
    transform: translateZ(-25px) rotate(3deg);
}

.profile-showcase .image-wrapper {
    transform: translateZ(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-showcase .floating-badge {
    animation: floatSlow3D 4s ease-in-out infinite;
    z-index: 10;
}

.profile-showcase .badge-bottom {
    animation-delay: 2s;
}

@keyframes floatSlow3D {
    0%, 100% { transform: translateZ(60px) translateY(0); }
    50% { transform: translateZ(60px) translateY(-8px); }
}

.bento-icon, .bento-card h3, .bento-card p, .bento-tags {
    transform: translateZ(25px);
    position: relative;
    z-index: 2;
}

/* 5. نظام الظهور السينمائي المتدرج عند التمرير (Scroll Reveal) */
.reveal-item {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* توهج حدود الكروت عند التحويم بشكل أكثر فخامة */
.bento-card:hover, .portfolio-card:hover {
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.14);
}
/* ==========================================================================
   11. التجاوب الكامل مع الشاشات والهواتف (Responsive Design)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 45px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-wide {
        grid-column: span 1;
    }

    .bento-wide-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .agency-showcase {
        grid-template-columns: 1fr;
        padding: 36px 26px;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* تحويل الهيدر لقائمة موبايل احترافية */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 74px;
        right: 0;
        width: 100%;
        background: rgba(10, 14, 22, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 28px 24px;
        gap: 18px;
        border-bottom: 1px solid var(--gold-border);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-smooth);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .btn-gold-sm span {
        display: none;
    }

    .profile-showcase {
        width: 280px;
        height: 340px;
    }

    .badge-top {
        right: -10px;
        top: 10px;
    }

    .badge-bottom {
        left: -10px;
        bottom: 10px;
    }

    .tech-strip-inner {
        justify-content: center;
        text-align: center;
    }

    .tech-divider {
        display: none;
    }

    /* جعل الفلاتر قابلة للسحب أفقياً بنعومة على الموبايل */
    .portfolio-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-box {
        padding: 40px 20px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
    }
}
