/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    --navy: #0a192f;
    --slate: #112240;
    --light-slate: #1e3a5f;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --accent: #64ffda;
    --accent-dim: rgba(100, 255, 218, 0.12);
    --white: #ffffff;
    --border-subtle: rgba(100, 255, 218, 0.1);
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.4);
    --radius-card: 20px;
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Inter', sans-serif;
    background: var(--navy);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================================
   خلفية شبكة
   ============================================================ */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(100, 255, 218, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   الحاوية الرئيسية
   ============================================================ */
.main-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.8rem 4rem;
}

/* ============================================================
   الهيدر
   ============================================================ */
.hero {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
    opacity: 0;
    transform: translateY(40px);
    animation: heroReveal 1s ease forwards 0.3s;
}

@keyframes heroReveal {
    to { opacity: 1; transform: translateY(0); }
}

.avatar-ring {
    width: 130px;
    height: 130px;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent), transparent 70%);
    box-shadow: 0 0 50px rgba(100, 255, 218, 0.08);
    transition: var(--transition-smooth);
}

.avatar-ring:hover {
    box-shadow: 0 0 80px rgba(100, 255, 218, 0.15);
    transform: scale(1.02);
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--navy);
    border: 2px solid var(--navy);
}

.hero h1 {
    font-size: 3.6rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.hero h1 span {
    color: var(--accent);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    opacity: 0.3;
    border-radius: 4px;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    font-weight: 400;
}

.subtitle .highlight {
    color: var(--accent);
    font-weight: 600;
}

.divider-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 0.8rem auto 1.2rem;
    border-radius: 4px;
    opacity: 0.6;
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 1.8rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ============================================================
   أزرار التواصل
   ============================================================ */
.contact-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.8rem;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(100, 255, 218, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    transition: var(--transition-smooth);
    backdrop-filter: blur(4px);
}

.contact-btn i {
    color: var(--accent);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.contact-btn:hover {
    background: rgba(100, 255, 218, 0.12);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(100, 255, 218, 0.06);
}

.contact-btn:hover i {
    transform: scale(1.1);
}

/* ============================================================
   عنوان المشاريع
   ============================================================ */
.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 4rem 0 2.5rem;
    text-align: center;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.section-title i {
    color: var(--accent);
    font-size: 2rem;
}

.section-title::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin-right: 0.8rem;
}

.section-title::before {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: linear-gradient(270deg, var(--accent), transparent);
    margin-left: 0.8rem;
}

/* ============================================================
   بطاقات المشاريع
   ============================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--slate);
    border-radius: var(--radius-card);
    padding: 2rem 1.6rem 1.8rem;
    text-align: center;
    border: 1px solid rgba(100, 255, 218, 0.06);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(100, 255, 218, 0.15);
    box-shadow: var(--shadow-card);
}

.project-card .icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.8rem;
    border-radius: 16px;
    background: rgba(100, 255, 218, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    transition: var(--transition-smooth);
    border: 1px solid rgba(100, 255, 218, 0.06);
}

.project-card:hover .icon-wrap {
    background: rgba(100, 255, 218, 0.12);
    transform: scale(1.05) rotate(-2deg);
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.project-link {
    display: inline-block;
    padding: 0.45rem 1.8rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--accent);
    border: 1px solid rgba(100, 255, 218, 0.15);
    transition: var(--transition-smooth);
    background: transparent;
}

.project-link:hover {
    background: var(--accent);
    color: var(--navy);
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.15);
}

.project-link:hover i {
    transform: translateX(-4px);
}

/* ============================================================
   قسم التسويق
   ============================================================ */
.marketing-section {
    margin-top: 4rem;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-card);
    background: rgba(17, 34, 64, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 255, 218, 0.06);
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-smooth);
}

.marketing-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.marketing-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.marketing-section h2 i {
    color: var(--accent);
}

.marketing-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 1.2rem;
    margin: 1.8rem 0 1.5rem;
}

.marketing-tags .tag {
    padding: 0.4rem 1.4rem;
    border-radius: 60px;
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.06);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.marketing-tags .tag i {
    color: var(--accent);
    margin-left: 0.4rem;
}

.marketing-tags .tag:hover {
    background: rgba(100, 255, 218, 0.08);
    border-color: rgba(100, 255, 218, 0.15);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.marketing-quote {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 1.8rem;
    line-height: 1.8;
}

.marketing-quote i {
    color: var(--accent);
    margin: 0 0.3rem;
}

.cta-btn {
    display: inline-block;
    padding: 0.8rem 3rem;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    background: var(--accent);
    color: var(--navy);
    transition: var(--transition-smooth);
    box-shadow: 0 8px 30px rgba(100, 255, 218, 0.1);
}

.cta-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 50px rgba(100, 255, 218, 0.2);
}

.cta-btn i {
    margin-left: 0.5rem;
}

/* ============================================================
   القائمة الجانبية - HOVER EFFECT
   ============================================================ */
.mh_share_float {
    position: fixed;
    right: 25px;
    bottom: 125px;
    transform: translateY(-50%);
    z-index: 999;
}

.mh_share {
    position: relative;
}

.mh_share ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 15px;
}

.mh_share ul li {
    display: block;
}

/* الزر الرئيسي (أيقونة المشاركة) */
.post_share_btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(100, 255, 218, 0.08);
    border: 1px solid rgba(100, 255, 218, 0.12);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--accent);
    font-size: 1.3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    align-content: center;
    text-align: center;
}

.post_share_btn:hover {
    background: rgba(100, 255, 218, 0.15);
    transform: scale(1.05);
}

.post_share_btn i {
    color: var(--accent);
}

/* أزرار المشاركة - مخفية بشكل افتراضي */
.mh_share ul li:not(.post_share_btn) {
    opacity: 0;
    transform: translateX(30px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    height: 0;
    margin: 0;
    overflow: hidden;
}

/* عند تمرير الماوس على القائمة - تظهر الأزرار */
.mh_share:hover ul li:not(.post_share_btn) {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    height: auto;
    margin: 0;
    overflow: visible;
}

/* ترتيب ظهور الأزرار بتأخير */
.mh_share:hover ul li:nth-child(2) { transition-delay: 0.05s; }
.mh_share:hover ul li:nth-child(3) { transition-delay: 0.10s; }
.mh_share:hover ul li:nth-child(4) { transition-delay: 0.15s; }

/* تصميم أزرار المشاركة */
.mh_share ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(17, 34, 64, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 255, 218, 0.08);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    font-size: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.mh_share ul li a i {
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.mh_share ul li a:hover {
    background: rgba(100, 255, 218, 0.12);
    border-color: var(--accent);
    transform: translateX(-6px) scale(1.05);
}

.mh_share ul li a:hover i {
    color: var(--accent);
}

/* ألوان خاصة لكل منصة عند التمرير */
.mh_share ul li.linkedin a:hover {
    background: rgba(0, 119, 181, 0.15);
    border-color: #0077B5;
}
.mh_share ul li.linkedin a:hover i { color: #0077B5; }

.mh_share ul li.gmail a:hover {
    background: rgba(234, 67, 53, 0.15);
    border-color: #EA4335;
}
.mh_share ul li.gmail a:hover i { color: #EA4335; }

.mh_share ul li.whatsapp a:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: #25D366;
}
.mh_share ul li.whatsapp a:hover i { color: #25D366; }

.post_share_item_title {
    display: none;
}

/* ============================================================
   زر العودة للأعلى
   ============================================================ */
.mhc_scroll_top {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(17, 34, 64, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 255, 218, 0.08);
    color: var(--accent);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 999;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.mhc_scroll_top.mh-visible {
    display: flex;
}

.mhc_scroll_top:hover {
    background: rgba(100, 255, 218, 0.12);
    border-color: var(--accent);
    transform: scale(1.05) translateY(-3px);
}

/* ============================================================
   زر نموذج التواصل السريع
   ============================================================ */
.mh_quick_form_button {
    position: fixed;
    bottom: 28px;
    right: 25px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #4cd9c0);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 999;
    font-size: 1.6rem;
    box-shadow: 0 8px 30px rgba(100, 255, 218, 0.25);
    border: none;
}

.mh_quick_form_button:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(100, 255, 218, 0.35);
}

.mh_quick_form_button i {
    color: var(--navy);
}

/* ============================================================
   النموذج المنبثق (Modal)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--slate);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(100, 255, 218, 0.06);
    box-shadow: var(--shadow-card);
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-content p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.modal-content input,
.modal-content textarea {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 255, 218, 0.06);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition-smooth);
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(100, 255, 218, 0.03);
}

.modal-content textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-content .submit-btn {
    padding: 0.9rem;
    border-radius: 12px;
    background: var(--accent);
    color: var(--navy);
    border: none;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: 'Cairo', sans-serif;
}

.modal-content .submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(100, 255, 218, 0.15);
}

/* ============================================================
   الفوتر
   ============================================================ */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(100, 255, 218, 0.04);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer i {
    color: var(--accent);
    margin: 0 0.3rem;
}

/* ============================================================
   استجابة
   ============================================================ */
@media (max-width: 700px) {
    .hero h1 { font-size: 2.4rem; }
    .subtitle { font-size: 1rem; }
    .section-title { font-size: 1.8rem; }
    .section-title::before,
    .section-title::after { max-width: 30px; }
    .marketing-section { padding: 2rem 1.2rem; }
    .contact-btn { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
    .mh_share_float { right: 10px; }
    .post_share_btn { width: 42px; height: 42px; font-size: 1.1rem; }
    .mh_share ul li a { width: 42px; height: 42px; }
}

@media (max-width: 450px) {
    .hero h1 { font-size: 1.9rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .mh_share_float { right: 6px; }
    .post_share_btn { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }
    .mh_share ul li a { width: 38px; height: 38px; border-radius: 10px; }
    .mhc_scroll_top { width: 42px; height: 42px; right: 12px; bottom: 80px; border-radius: 10px; }
    .mh_quick_form_button { width: 48px; height: 48px; right: 12px; bottom: 22px; font-size: 1.3rem; }
}