/* ===================================================
   لوحة ألوان: كحلي ملكي + تموجات رمادية هادئة
   =================================================== */
:root {
    /* ألوان كحلية بديلة للأسود */
    --bg-main: #0b1528;
    --bg-surface: #101e38;
    --bg-surface-elevated: #162444;
    --bg-card: rgba(16, 30, 56, 0.75);

    /* درجات رمادي ناعمة */
    --gray-slate: #475569;
    --gray-soft: #94a3b8;
    --text-white: #ffffff;
    --text-gray-100: #e2e8f0;
    --text-gray-300: #cbd5e1;
    --text-gray-400: #94a3b8;
    --text-gray-500: #64748b;

    /* تدرجات الأزرق المريح */
    --blue-primary: #2563eb;
    --blue-soft: #60a5fa;
    --blue-light: #93c5fd;
    --blue-muted: #1e3a5f;
    --blue-glow: rgba(59, 130, 246, 0.2);

    /* الحدود والظلال المدمجة */
    --border-subtle: rgba(148, 163, 184, 0.15);
    --border-blue: rgba(96, 165, 250, 0.25);
    --glass-blur: blur(14px);
    --shadow-card: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 40px -8px rgba(30, 58, 95, 0.5);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* خلفية الصفحة: كحلي داكن مع تدرجات وتموجات رمادية هادئة */
body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(71, 85, 105, 0.25) 0px, transparent 50%),
        radial-gradient(at 100% 30%, rgba(30, 58, 95, 0.35) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(51, 65, 85, 0.3) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--text-gray-300);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* إضاءات التموج الجانبية */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    z-index: -1;
    pointer-events: none;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(100, 116, 139, 0.22), transparent 70%);
    top: -50px;
    right: -100px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(23, 37, 84, 0.55), transparent 70%);
    bottom: 0;
    left: -150px;
}

/* شريط التنقل */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 16, 23, 0.85);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.5px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background-color: var(--blue-soft);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--blue-soft);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray-400);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--blue-soft);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: var(--blue-soft);
    border-radius: 2px;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-white);
    transition: var(--transition);
}

/* قسم الواجهة (Hero) */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
}

.hero-content {
    max-width: 820px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 30px;
    background: rgba(30, 58, 95, 0.4);
    border: 1px solid var(--border-blue);
    font-size: 0.85rem;
    color: var(--blue-light);
    margin-bottom: 1.8rem;
}
 .pulse-indicator {
    width: 8px;
    height: 8px;
    background: var(--blue-soft);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(96, 165, 250, 0); }
    100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); }
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-white);
    margin-bottom: 1.4rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-white) 30%, var(--blue-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-gray-400);
    margin-bottom: 2.5rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* الأزرار العامة */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-gray-100);
    border: 1px solid var(--border-subtle);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.7);
    border-color: var(--blue-soft);
    color: #ffffff;
    transform: translateY(-2px);
}

/* قسم المشاريع والأقسام */
.portfolio-section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sub-badge {
    color: var(--blue-soft);
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-white);
    margin: 0.5rem 0 0.8rem;
}

.section-subtitle {
    color: var(--text-gray-400);
    font-size: 1rem;
}

/* أزرار الفلترة */
.filter-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-gray-400);
    padding: 8px 20px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-white);
    border-color: var(--border-blue);
}

.filter-btn.active {
    background: var(--blue-muted);
    border-color: var(--blue-soft);
    color: var(--blue-light);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* شبكة المشاريع البطاقية */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-blue);
    box-shadow: var(--shadow-hover);
}

.card-media {
    position: relative;
    height: 210px;
    width: 100%;
    background-color: var(--bg-surface-elevated);
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-media img {
    transform: scale(1.05);
}
 .category-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(12, 16, 23, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    color: var(--blue-light);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 25, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.icon-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blue-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transform: scale(0.8);
    transition: var(--transition);
}

.icon-link:hover {
    background: var(--blue-soft);
    transform: scale(1);
}

.card-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    color: var(--text-white);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.card-text {
    color: var(--text-gray-400);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.4rem;
    flex-grow: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.4rem;
}

.card-tags span {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-gray-300);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 6px;
}

.card-footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

.project-link {
    color: var(--blue-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--text-white);
    gap: 10px;
}

/* قسم التواصل السريع */
.contact-section {
    padding: 4rem 0 6rem;
}

.contact-box {
    background: linear-gradient(135deg, rgba(20, 27, 36, 0.95), rgba(15, 25, 40, 0.95));
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--shadow-card);
}

.contact-info h2 {
    color: var(--text-white);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.contact-info p {
    color: var(--text-gray-400);
    max-width: 580px;
}

/* تذييل الصفحة */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
    background: var(--bg-surface);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-gray-500);
}

.footer-links a {
    color: var(--text-gray-400);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--blue-soft);
}

/* التجاوب مع شاشات الجوال */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-links {
        position: fixed;
        top: 65px;
        right: -100%;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-subtle);
        transition: 0.3s ease-in-out;
    }

    .nav-links.open {
        right: 0;
    }

    .menu-btn {
        display: flex;
    }

    .contact-box {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}