/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS.CSS - NEON INFRASTRUCTURE
   الملاحة. البطاقات. التذييل. كل شيء متوهج.
═══════════════════════════════════════════════════════════════════════════ */

/* --- NAVIGATION --- */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.nav-logo img {
    height: 50px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.nav-logo span {
    font-size: 1.2rem;
    font-weight: 900;
    background: var(--grad-hyper);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.5));
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-item {
    position: relative;
    padding: 10px 0;
}

.nav-link {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
}

/* Elite Color Sequence - Desktop */
.nav-item:nth-child(4) .nav-link {
    /* البداية / الرئيسية */
    color: #00f2ff;
    text-shadow: 0 0 10px rgba(0, 242, 255, .4);
}

.nav-item:nth-child(3) .nav-link {
    /* المنتجات */
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, .4);
}

.nav-item:nth-child(2) .nav-link {
    /* الباقات */
    color: #ff007a;
    text-shadow: 0 0 10px rgba(255, 0, 122, .4);
}

.nav-item:nth-child(1) .nav-link {
    /* تواصل معنا */
    color: #9d00ff;
    text-shadow: 0 0 10px rgba(157, 0, 255, .4);
}

.nav-link:hover {
    text-shadow: 0 0 20px currentColor;
    transform: translateY(-2px);
    filter: brightness(1.4);
}

/* --- MEGA MENU --- */
.mega-menu {
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%) translateY(20px);
    width: 600px;
    background: rgba(2, 4, 12, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 242, 255, 0.1);
    z-index: 1100;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
}

.mega-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 15px;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid transparent;
}

.mega-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.mega-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.mega-info {
    display: flex;
    flex-direction: column;
}

.mega-menu-title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.mega-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 4px 0 0 0;
}

/* Item Colors */
.mega-item[data-product="streamsync"] {
    --p-color: #00f2ff;
}

.mega-item[data-product="player"] {
    --p-color: #6366F1;
}

.mega-item[data-product="themes"] {
    --p-color: #A855F7;
}

.mega-item[data-product="custom"] {
    --p-color: #fbbf24;
}

.mega-item:hover .mega-menu-title {
    color: var(--p-color);
    text-shadow: 0 0 10px var(--p-color);
}

.nav-cta {
    background: var(--grad-bright);
    color: #000;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.5), 0 0 20px rgba(0, 242, 255, 0.3);
    transition: 0.3s;
    border: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-cta:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 50px rgba(0, 242, 255, 0.7);
}

/* --- FOOTER --- */
footer {
    width: 100%;
    padding: 80px 5% 40px;
    position: relative;
    background: linear-gradient(180deg, transparent, rgba(0, 242, 255, 0.02));
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-glow-line {
    width: 250px;
    height: 3px;
    background: var(--grad-hyper);
    box-shadow: 0 0 30px var(--neon-blue), 0 0 60px var(--neon-purple);
    border-radius: 3px;
}

.footer-copyright {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.footer-links a:hover {
    filter: brightness(1.3);
    text-shadow: 0 0 15px var(--neon-blue);
}

/* --- PACKAGE CARDS GRID --- */
.packages-grid,
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 35px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.package-card {
    background: linear-gradient(135deg, rgba(5, 5, 15, 0.8), rgba(10, 10, 25, 0.6));
    border: 1px solid rgba(0, 242, 255, 0.15);
    backdrop-filter: blur(25px);
    padding: 45px;
    border-radius: 30px;
    text-align: right;
    display: flex;
    flex-direction: column;
    transition: all 0.5s var(--ease-luxury);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 60px rgba(0, 242, 255, 0.02);
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

.package-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-hyper);
    opacity: 0;
    transition: 0.5s;
}

.package-card:hover::before {
    opacity: 1;
}

.package-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 50px 100px rgba(0, 242, 255, 0.15), inset 0 0 80px rgba(0, 242, 255, 0.03);
}

/* --- HUD PANEL --- */
#hud-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.hud-panel {
    background: rgba(5, 5, 15, 0.95);
    border: 2px solid var(--neon-blue);
    padding: 45px;
    border-radius: 25px;
    width: 90%;
    max-width: 520px;
    backdrop-filter: blur(30px);
    pointer-events: auto;
    box-shadow: 0 0 80px rgba(0, 242, 255, 0.3), inset 0 0 40px rgba(0, 242, 255, 0.05);
    transform: scale(0.9);
    opacity: 0;
    transition: 0.4s var(--ease-luxury);
    border-right: 5px solid var(--neon-blue);
}

.hud-panel.active {
    transform: scale(1);
    opacity: 1;
}

.hud-title {
    background: var(--grad-hyper);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 900;
}

.hud-desc {
    color: var(--neon-cyan);
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.8;
    text-shadow: 0 0 10px rgba(0, 255, 213, 0.3);
}

.hud-features {
    list-style: none;
    margin-bottom: 30px;
    padding: 0;
}

.hud-features li {
    color: var(--neon-blue);
    margin-bottom: 12px;
    font-size: 0.95rem;
    padding-right: 20px;
    position: relative;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
}

.hud-features li::before {
    content: "▸";
    position: absolute;
    right: 0;
    color: var(--neon-pink);
}

.hud-cta {
    display: block;
    text-align: center;
    padding: 16px;
    background: var(--grad-hyper);
    color: #fff;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.3);
    transition: 0.3s;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hud-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 242, 255, 0.5);
}

/* --- POLICY MODAL --- */
.policy-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.policy-modal.active {
    display: flex;
}

.policy-content {
    background: rgba(5, 5, 15, 0.95);
    border: 1px solid var(--neon-blue);
    padding: 50px;
    border-radius: 25px;
    max-width: 650px;
    /* Slightly wider for protocols */
    width: 90%;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 242, 255, 0.2);
}

/* Protocol Styling */
.protocol-intro {
    font-size: 1rem;
    line-height: 1.8;
    color: #e2e8f0;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.protocol-list {
    list-style: none;
    padding: 0;
}

.protocol-list li {
    margin-bottom: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.protocol-list li:hover {
    border-color: var(--neon-blue);
    background: rgba(0, 242, 255, 0.05);
}

.protocol-list strong {
    color: var(--neon-cyan);
    display: block;
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.policy-close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    color: var(--neon-blue);
    cursor: pointer;
    transition: 0.3s;
}

.policy-close:hover {
    color: var(--neon-pink);
    transform: scale(1.2);
}

/* --- NEXUS LABELS --- */
.nexus-label {
    position: fixed;
    color: var(--neon-cyan);
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: 0.3s;
    text-shadow: 0 0 15px rgba(0, 255, 213, 0.6);
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 213, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE - ملاحة أنيقة للهواتف
═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .glass-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        flex-wrap: nowrap;
        padding: 0 5%;
        height: 80px;
        justify-content: center !important;
        z-index: 1000000;
    }

    .nav-logo {
        order: 1;
    }

    .nav-logo img {
        height: 45px;
    }

    .nav-logo span {
        font-size: 1.1rem;
        display: block !important;
    }

    .nav-cta-container {
        display: none;
    }

    /* إخفاء الروابط الأصلية من الهيدر تماماً لمنع الزحام والتغطية */
    .glass-nav .nav-links {
        display: none !important;
    }

    /* إنشاء شريط سفلي جديد كلياً ومستقل */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 25px;
        left: 5%;
        right: 5%;
        background: rgba(5, 5, 15, 0.95);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(0, 242, 255, 0.3);
        border-radius: 50px;
        padding: 12px 20px;
        display: flex;
        /* إظهاره فقط في الموبايل عبر الفئة */
        justify-content: space-around;
        gap: 5px;
        z-index: 100000;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 5px;
        background: transparent !important;
        font-weight: 700;
        transition: 0.3s;
    }

    /* ألوان العناوين (إبهار وتناسق) */
    .mobile-bottom-nav .nav-link:nth-child(4) {
        /* البداية */
        color: #00f2ff;
        /* أزرق سماوي */
        text-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
    }

    .mobile-bottom-nav .nav-link:nth-child(3) {
        /* منتجاتنا */
        color: #fbbf24;
        /* ذهبي ملكي */
        text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    }

    .mobile-bottom-nav .nav-link:nth-child(2) {
        /* الباقات */
        color: #ff007a;
        /* وردي فاقع */
        text-shadow: 0 0 10px rgba(255, 0, 122, 0.4);
    }

    .mobile-bottom-nav .nav-link:nth-child(1) {
        /* تواصل */
        color: #9d00ff;
        /* بنفسجي مشع */
        text-shadow: 0 0 10px rgba(157, 0, 255, 0.4);
    }

    /* الـ Mega Menu في الجوال تظهر فوق الشريط السفلي */
    .mega-menu {
        position: absolute;
        bottom: 80px;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(20px);
        grid-template-columns: 1fr 1fr;
        padding: 15px;
    }

    .nav-item:hover .mega-menu {
        transform: translateY(0);
    }

    .mega-item {
        padding: 10px;
    }

    .mega-icon {
        width: 40px;
        height: 40px;
    }

    .mega-title {
        font-size: 0.8rem;
    }

    .mega-desc {
        display: none;
    }
}

@media (max-width: 480px) {
    .glass-nav {
        padding: 12px 3%;
    }

    .nav-logo span {
        display: none;
    }

    .nav-cta {
        padding: 8px 18px;
        font-size: 0.7rem;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}