/* ============================================= */
/* 1. المتغيرات العامة والإعدادات الأساسية       */
/* ============================================= */
:root {
    --primary: #1a5f7a;
    --primary-light: #2c8da8;
    --secondary: #e8b923;
    --dark: #0f2c3d;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #1a5f7a 0%, #2c8da8 100%);
    --shadow: 0 10px 40px rgba(26, 95, 122, 0.15);
    --shadow-hover: 0 20px 60px rgba(26, 95, 122, 0.25);
}

[data-theme="dark"] {
    --primary: #2c8da8;
    --primary-light: #4db8d4;
    --secondary: #f0c94a;
    --dark: #e2e8f0;
    --light: #0f172a;
    --gray: #94a3b8;
    --white: #1e293b;
    --gradient: linear-gradient(135deg, #1a5f7a 0%, #2c8da8 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.8;
    transition: background 0.4s ease, color 0.4s ease;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--light);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* ============================================= */
/* 2. شريط التنقل (Navbar)                      */
/* ============================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 0.8rem 5%;
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
    justify-self: start;
}

.navbar.scrolled .logo {
    color: var(--primary);
}

[data-theme="dark"] .navbar.scrolled .logo {
    color: var(--primary-light);
}

.logo .service-icon {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 3.5rem;
    list-style: none;
    align-items: center;
    justify-self: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 900;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.navbar.scrolled .nav-links a {
    color: var(--dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--secondary);
}

.theme-toggle {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    justify-self: end;
}

.theme-toggle:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: rotate(20deg);
}

.navbar.scrolled .theme-toggle {
    background: rgba(26, 95, 122, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .navbar.scrolled .theme-toggle {
    background: rgba(44, 141, 168, 0.2);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.mobile-controls {
    display: none;
}

.service-icon { 
    width: 130px !important;
    height: 60px !important;
    margin-bottom: 5px !important;
    border : 2px solid #0077b5;
}

@media (max-width: 768px) {
.service-icon { 
    margin-bottom: 5px !important;
    width: 105px !important;
}
.logo {
    line-height: 1.1;
}
}

@media (min-width: 761px) and (max-width: 1500px) {
.logo {
    line-height: 1.1;
}
}
/* ============================================= */
/* 18. تحسين عرض النافبار للشاشات المتوسطة      */
/* ============================================= */

@media (min-width: 769px) and (max-width: 1079px) {
    /* تقليل المسافات بين روابط النافبار */
    .nav-links {
        gap: 2.2rem;
    }
    
    /* تكبير حجم الخط */
    .nav-links a {
        font-size: 1rem;
        font-weight: 800;
        padding: 0.5rem 0.8rem;
    }
    
    /* تكبير شعار الموقع قليلاً */
    .logo {
        font-size: 1.6rem;
    }
    
    /* تصغير أيقونة الخدمة */
    .service-icon {
        width: 95px !important;
        height: 48px !important;
    }
    
    /* تصغير أزرار التبديل */
    .theme-toggle,
    .lang-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .lang-toggle span {
        font-size: 0.65rem;
    }
    
    /* تنظيم المسافات في النافبار */
    .navbar {
        padding: 0.8rem 3%;
        grid-template-columns: 1fr auto 1fr;
    }
    
    .navbar.scrolled {
        padding: 0.6rem 3%;
    }
    
    /* التحكم في عرض الروابط لمنع التكسير */
    .nav-links {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    
    /* تقليل المسافة بين الشعار والروابط */
    .logo {
        gap: 0.4rem;
    }
}

@media (min-width: 769px) and (max-width: 920px) {
    /* للشاشات الأضيق ضمن النطاق المتوسط */
    .nav-links {
        gap: 1.6rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        font-weight: 800;
        padding: 0.4rem 0.5rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .service-icon {
        width: 80px !important;
        height: 40px !important;
    }
    
    .theme-toggle,
    .lang-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    
    .navbar {
        padding: 0.6rem 2%;
    }
    
    .navbar.scrolled {
        padding: 0.5rem 2%;
    }
}

/* ============================================= */
/* 19. إصلاح اختفاء الأيقونات في نطاق ضيق       */
/* ============================================= */

@media (min-width: 769px) and (max-width: 833px) {
    /* تقليل المسافات أكثر */
    .nav-links {
        gap: 1rem !important;
    }
    
    .nav-links a {
        font-size: 0.8rem !important;
        padding: 0.3rem 0.4rem !important;
    }
    
    .logo {
        font-size: 1.1rem !important;
    }
    
    .service-icon {
        width: 65px !important;
        height: 33px !important;
    }
    
    /* تصغير الأيقونات جداً عشان تفضل ظاهرة */
    .theme-toggle,
    .lang-toggle {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
        min-width: 32px !important;
        flex-shrink: 0 !important;
    }
    
    .lang-toggle span {
        font-size: 0.5rem !important;
    }
    
    /* منع أي عنصر من الانكماش */
    .theme-toggle,
    .lang-toggle,
    .nav-controls {
        flex-shrink: 0 !important;
    }
    
    .navbar {
        padding: 0.5rem 2% !important;
        gap: 0.3rem;
    }
    
    .navbar.scrolled {
        padding: 0.4rem 2% !important;
    }
    
    /* تقليل المسافة بين الشعار والروابط */
    .logo {
        gap: 0.2rem !important;
    }
    
    /* التحكم في عرض النافبار */
    .nav-controls {
        gap: 0.4rem !important;
    }
}
/* ============================================= */
/* 3. الاستجابة للأجهزة المحمولة (Mobile)        */
/* ============================================= */
@media (max-width: 768px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 40%;
        height: 80vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem;
        transition: right 0.4s ease;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        align-items: flex-start;
        border-radius: 20px 0 0 20px;
        border-left: 4px solid var(--secondary);
        justify-self: auto;
        z-index: 999;
    }

    [data-theme="dark"] .nav-links {
        background: #1e293b;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--dark) !important;
        font-size: 1.2rem;
        width: 100%;
        padding: 1rem 0;
    }

    .nav-links a::after {
        bottom: 5px;
    }

    .theme-toggle {
        display: none !important;
    }

    .mobile-controls {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
    }

    .theme-toggle-mobile {
        display: flex;
        background: rgba(255,255,255,0.15);
        border: 2px solid rgba(255,255,255,0.3);
        color: var(--white);
        width: 45px;
        height: 45px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.2rem;
        transition: all 0.3s ease;
    }

    .theme-toggle-mobile:hover {
        background: var(--secondary);
        color: var(--dark);
        transform: rotate(20deg);
    }

    .navbar.scrolled .theme-toggle-mobile {
        background: rgba(26, 95, 122, 0.1);
        border-color: var(--primary);
        color: var(--primary);
    }

    [data-theme="dark"] .navbar.scrolled .theme-toggle-mobile {
        background: rgba(44, 141, 168, 0.2);
        border-color: var(--primary-light);
        color: var(--primary-light);
    }

    .mobile-menu {
        display: block;
        font-size: 1.5rem;
        color: var(--white);
        cursor: pointer;
        z-index: 1001;
    }

    .navbar.scrolled .mobile-menu {
        color: var(--primary);
    }

    [data-theme="dark"] .navbar.scrolled .mobile-menu {
        color: var(--primary-light);
    }
}

/* ============================================= */
/* 4. قسم البطل (Hero Section)                  */
/* ============================================= */
.hero {
    min-height: 100vh;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 5% 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(232, 185, 35, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-text h1 span {
    color: var(--secondary);
    display: block;

}

.hero-text .subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-text p {
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    margin-bottom: 5rem;
    max-width: 700px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-family: 'Cairo', sans-serif;
}

.btn-primary {
    background: var(--secondary);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(232, 185, 35, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 185, 35, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-image .img-container {
    width: 420px;
    height: 420px;
    border-radius: 32% 68% 68% 32% / 32% 32% 68% 68%;
    overflow: hidden;
    border: 6px solid rgba(255,255,255,0.25);
    box-shadow: 0 25px 70px rgba(0,0,0,0.35);
    animation: morph 8s ease-in-out infinite;
    position: relative;
    background: rgba(255,255,255,0.08);
    margin: 0 auto;
}

@keyframes morph {
    0%, 100% { border-radius: 32% 68% 68% 32% / 32% 32% 68% 68%; }
    50% { border-radius: 68% 32% 32% 68% / 68% 68% 32% 32%; }
}

.hero-image img {
    width: 110%;
    height: 110%;
    object-fit:cover;
    transform: translate(-5%, -5%);
}


/* ============================================= */
/* 5. شريط الإحصائيات (Stats Bar)               */
/* ============================================= */
.stats-bar {
background: var(--white);
padding: 3rem 5%;
margin-top: -5rem;  /* غيرت من -3rem إلى 3rem */
position: relative;
z-index: 10;
border-radius: 20px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
box-shadow: var(--shadow);
display: grid;
/*grid-template-columns: repeat(1, 1fr);*/
gap: 2rem;
text-align: center;
transition: background 0.4s ease;
border: 1px solid BLACK;
}

[data-theme="dark"] .stats-bar {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.05);
}

/*.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;
}*/

.stat-item p {
    color: var(--gray);
    font-weight: 900;
    font-size: 40px;
    margin-top: .1rem;
}

@media screen and (max-width: 768px) {
    .stats-bar {
      height: 130px;
    }
    .stat-item p {
    color: var(--gray);
    font-weight: 850;
    font-size: 27px;
    transform: translateY(-13px); /* يرفع النص لأعلى */

}
}

@media (min-width: 296px) and (max-width: 419px) {
    .stat-item p {
    transform: translateY(-27px); /* يرفع النص لأعلى */
}
}

@media (min-width: 769px) and (max-width: 992px) {

    .stats-bar {
        height: 130px;
        white-space: nowrap;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .stat-item {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .stat-item p {
        margin: 0;
        text-align: center;
        transform: none;
    }
}
/* ============================================= */
/* 6. الأقسام العامة (General Sections)         */
/* ============================================= */
section {
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* ============================================= */
/* 7. قسم "عنّي" (About)                       */
/* ============================================= */
.about {
    background: var(--white);
    transition: background 0.4s ease;
}

[data-theme="dark"] .about {
    background: #0f172a;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--gradient);
    color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
}

.experience-badge h4 {
    font-size: 2rem;
    font-weight: 800;
}

.experience-badge p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.skill-tag {
    background: rgba(26, 95, 122, 0.1);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: default;
}

[data-theme="dark"] .skill-tag {
    background: rgba(44, 141, 168, 0.15);
    color: var(--primary-light);
}

.skill-tag:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============================================= */
/* 8. قسم الخدمات (Services)                    */
/* ============================================= */
.services {
    background: var(--light);
    transition: background 0.4s ease;
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #000000;
}

[data-theme="dark"] .service-card {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.05);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--gradient);
    opacity: 0.05;
    border-radius: 0 0 0 100%;
    transition: all 0.4s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover), 4px 0 15px rgba(26, 95, 122, 0.3);
    border: 2px solid var(--primary);
}

[data-theme="dark"] .service-card:hover {
    border: 2px solid var(--secondary);
    box-shadow: var(--shadow-hover), 4px 0 15px rgba(240, 201, 74, 0.3);
}

.service-card:hover::before {
    width: 150px;
    height: 150px;
    opacity: 0.1;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--white);
    transition: transform 0.3s;
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.8;
}

@media screen and (max-width: 768px) {
    .services-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        box-sizing: border-box;
    }

    .service-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* ============================================= */
/* 9. قسم الخبرة (Experience / Timeline)        */
/* ============================================= */
.experience {
    background: var(--white);
    transition: background 0.4s ease;
}

[data-theme="dark"] .experience {
    background: #0f172a;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item {
    position: relative;
    padding-right: 60px;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    right: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 4px solid var(--secondary);
    border-radius: 50%;
    z-index: 1;
}

[data-theme="dark"] .timeline-dot {
    background: #0f172a;
}

.timeline-content {
    background: var(--light);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-right: 4px solid var(--primary);
    border-left: 4px solid var(--primary);
    transition: background 0.4s ease;
}

[data-theme="dark"] .timeline-content {
    background: #1e293b;
    border-right: 4px solid var(--primary-light);
    border-left: 4px solid var(--primary-light);
}

.timeline-content h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content .company {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .timeline-content .company {
    color: var(--primary-light);
}

.timeline-content .date {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-content p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ============================================= */
/* 10. قسم الشهادات (Certifications)           */
/* ============================================= */
.certs {
    background: var(--light);
    transition: background 0.4s ease;
}

.certs-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.cert-card {
    background: #ffffff;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    border: 4px solid #cbd5e1;
    animation: shadowRotate 6s linear infinite;
    transition: all 0.3s ease;
    margin: 0 5px;
    position: relative;
}

[data-theme="dark"] .cert-card {
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.15);
    animation: shadowRotateDark 6s linear infinite;
}

[data-theme="dark"] .cert-card:hover {
    animation: none;
    border-color: var(--secondary);
    box-shadow: 20px 15px 40px rgba(0, 0, 0, 0.7);
}

.cert-card:hover {
    animation: none;
    transform: translateY(-10px);
    border-color: var(--secondary);
    box-shadow: 20px 15px 40px rgba(26, 95, 122, 0.3);
}

.cert-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

[data-theme="dark"] .cert-card i {
    color: var(--primary-light);
}

.cert-card h4 {
    color: var(--dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.cert-card span {
    color: var(--gray);
    font-size: 0.85rem;
}

@keyframes shadowRotate {
    0%   { box-shadow: 15px 10px 30px rgba(0, 0, 0, 0.15); }
    25%  { box-shadow: -15px 10px 30px rgba(0, 0, 0, 0.15); }
    50%  { box-shadow: -15px -10px 30px rgba(0, 0, 0, 0.15); }
    75%  { box-shadow: 15px -10px 30px rgba(0, 0, 0, 0.15); }
    100% { box-shadow: 15px 10px 30px rgba(0, 0, 0, 0.15); }
}

@keyframes shadowRotateDark {
    0%   { box-shadow: 15px 10px 30px rgba(0, 0, 0, 0.5); }
    25%  { box-shadow: -15px 10px 30px rgba(0, 0, 0, 0.5); }
    50%  { box-shadow: -15px -10px 30px rgba(0, 0, 0, 0.5); }
    75%  { box-shadow: 15px -10px 30px rgba(0, 0, 0, 0.5); }
    100% { box-shadow: 15px 10px 30px rgba(0, 0, 0, 0.5); }
}

/* ============================================= */
/* ============================================= */
/* 11. قسم التواصل (Contact)                    */
/* ============================================= */
.contact { background: var(--gradient); position: relative; overflow: hidden; }
.contact::before { content: ''; position: absolute; top: -100px; left: -100px; width: 300px; height: 300px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.contact .section-header h2, .contact .section-header p { color: var(--white); font-weight: 600; }
.contact .section-header h2::after { background: var(--secondary); }
.contact-content { width: min(1100px, 100%); margin: 0 auto; display: block; }
.contact-info { width: 100%; display: flex; flex-direction: column; gap: 2rem; position: relative; }
.contact-details-grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.contact-card { min-width: 0; min-height: 105px; padding: 1.25rem 1.1rem; display: flex; align-items: center; gap: 1rem; color: var(--white); text-decoration: none; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18); border-radius: 18px; box-shadow: 0 12px 30px rgba(0,0,0,0.10); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .3s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease; }
.contact-card:hover { transform: translateY(-6px); background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.38); box-shadow: 0 18px 40px rgba(0,0,0,0.18); }
.contact-card > i { width: 52px; height: 52px; min-width: 52px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); border-radius: 14px; font-size: 1.25rem; color: var(--white); transition: all .3s ease; }
.contact-card:hover > i { background: var(--secondary); color: var(--dark); transform: rotate(360deg); }
.contact-card > div { min-width: 0; flex: 1; }
.contact-card h4 { font-size: 1rem; margin-bottom: .25rem; color: var(--white); }
.contact-card p { margin: 0; color: rgba(255,255,255,.82); font-size: .9rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }
.social-links { width: 100%; min-height: 70px; display: flex; justify-content: center; align-items: center; gap: 1.15rem; margin: 0; position: relative; z-index: 5; }
.social-links > a, .social-links .share-btn { width: 56px; height: 56px; min-width: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22); color: var(--white); font-size: 1.3rem; text-decoration: none; transition: all .3s ease; flex-shrink: 0; }
.social-links > a:hover { background: var(--secondary); color: var(--dark); transform: translateY(-6px) scale(1.05); }
.social-links > a.linkedin i { color: #0a66c2; }
.social-links > a.whatsapp i { color: #25d366; }
.social-links > a:hover i { color: var(--dark); }
.social-links.open > a.linkedin, .social-links.open > a.whatsapp { opacity: 0; transform: scale(0); visibility: hidden; pointer-events: none; position: absolute; }
.contact-form { display: none; }

/* ============================================= */
/* 12. قائمة المشاركة المنبثقة (Share Dropdown) */
/* ============================================= */
 */
/* ============================================= */
.share-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
    transition: all 0.25s ease;
    position: relative;
    z-index: 10;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
}

.share-btn.active {
    transform: translateY(6px) rotate(45deg);
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}

.social-dropdown {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: var(--white);
    color: var(--dark);
    padding: 12px 20px;
    border: 1px solid rgba(26, 95, 122, 0.08);
    border-radius: 50px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    z-index: 20;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
}

[data-theme="dark"] .social-dropdown {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

[data-theme="dark"] .social-dropdown .tooltip {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] .social-dropdown .tooltip::after {
    border-color: #ffffff transparent transparent transparent;
}

.share-container.opened .social-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.social-link {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #64748b;
    background: #fff;
    text-decoration: none;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    border: 2px solid #000000;
}

.social-link.show {
    opacity: 1;
    transform: scale(1);
}

.facebook { background: #ffffff; }
.facebook i { color: #1877f2; }
.twitter { background: #ffffff; }
.twitter i { color: #000000; }
.instagram { background: #ffffff; }
.instagram i { color: #e4405f; }
.linkedin { background: #ffffff; }
.linkedin i { color: #0077b5; }
.whatsapp { background: #ffffff; }
.whatsapp i { color: #25d366; }
.telegram { background: #ffffff; }
.telegram i { color: #0088cc; }

.tooltip {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--dark);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--dark) transparent transparent transparent;
}

.social-link:hover .tooltip {
    transform: translateX(-50%) scale(1);
    top: -50px;
}

.subtitle {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #94a3b8;
    font-size: 19px;
    font-weight: bold;
    z-index: 1;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.subtitle.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================================= */
/* 13. التذييل (Footer) وزر الصعود للأعلى       */
/* ============================================= */
footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    transition: background 0.4s ease;
}

[data-theme="dark"] footer {
    background: #020617;
    color: #ffffff !important;  /* إضافة: جعل النص أبيض */

}

footer span {
    color: var(--secondary);
}

#scrollTopBtn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #000;
    font-size: 1.2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.9);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease,
                background 0.4s ease;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#scrollTopBtn:hover {
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

#scrollTopBtn:active {
    transform: translateY(-2px) scale(0.98);
}

[data-theme="dark"] #scrollTopBtn {
    background: linear-gradient(135deg, #c0c0c0, #9ca3af);
    color: #111;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

/* ============================================= */
/* 14. مؤثرات الحركة والتحميل (Loader & Anim)   */
/* ============================================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

[data-theme="dark"] .loader {
    background: #0f172a;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================= */
/* 15. الروابط النشطة (Active Nav Link)         */
/* ============================================= */
.nav-links a {
    position: relative;
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 12px;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
}

.nav-links a.active {
    transform: translateY(-2px);
}

.nav-links a.active::before {
    opacity: 1;
    background: linear-gradient(120deg, #facc15, #f59e0b, #fb923c, #facc15);
    background-size: 300% 300%;
    animation: liquidMove 4s linear infinite;
    box-shadow: inset 4px 4px 10px rgba(0,0,0,0.15), inset -4px -4px 10px rgba(255,255,255,0.4);
}

[data-theme="dark"] .nav-links a.active::before {
    background: linear-gradient(120deg, rgba(192,192,192,0.25), rgba(229,231,235,0.35), rgba(156,163,175,0.25), rgba(192,192,192,0.25));
    background-size: 300% 300%;
    box-shadow: inset 4px 4px 12px rgba(0,0,0,0.7), inset -4px -4px 12px rgba(255,255,255,0.05);
}

.nav-links a.active {
    color: #000 !important;
}

[data-theme="dark"] .nav-links a.active {
    color: #e5e7eb !important;
}

@keyframes liquidMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (max-width: 768px) {
    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem;
    }

    .nav-links a::before {
        border-radius: 8px;
    }
}

/* ============================================= */
/* 16. التجاوب مع الشاشات المختلفة (Responsive) */
/* ============================================= */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image .img-container {
        width: 340px;
        height: 340px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .certs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image .img-container {
        width: 280px;
        height: 280px;
    }

    .services-grid,
    .certs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        grid-template-columns: 1fr;
        margin-top: -2rem;
    }

    section {
        padding: 4rem 5%;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .social-dropdown {
        top: 60px;
        gap: 8px;
        padding: 10px 15px;
        border-radius: 30px;
    }

    .social-link {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .tooltip {
        font-size: 11px;
        top: -40px;
    }

    .social-links {
        margin-bottom: 2rem;
        width: 100%;
        justify-content: center;
    }

    #scrollTopBtn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================= */
/* 17. أزرار تبديل اللغة                         */
/* ============================================= */

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-self: end;
}

.lang-toggle {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    gap: 0;
    font-family: 'Cairo', sans-serif;
}

.lang-toggle:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: rotate(10deg);
}

.lang-toggle span {
    font-size: 0.7rem;
    margin-left: 2px;
}

.navbar.scrolled .lang-toggle {
    background: rgba(26, 95, 122, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .navbar.scrolled .lang-toggle {
    background: rgba(44, 141, 168, 0.2);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.lang-toggle-mobile {
    display: none;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.lang-toggle-mobile:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: rotate(10deg);
}

.navbar.scrolled .lang-toggle-mobile {
    background: rgba(26, 95, 122, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .navbar.scrolled .lang-toggle-mobile {
    background: rgba(44, 141, 168, 0.2);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    transition: font-family 0.3s ease;
}

@media (max-width: 768px) {
    .nav-controls {
        display: none !important;
    }
    
    .lang-toggle-mobile {
        display: flex;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
}

/* تغيير اتجاه النص في الوضع الإنجليزي */
html[lang="en"] .hero-text p {
    text-align: left;
}

html[lang="en"] .about-text {
    text-align: left;
}

html[lang="en"] .service-card {
    text-align: left;
}

html[lang="en"] .timeline-content {
    text-align: left;
    border-right: none;
    border-left: 4px solid var(--primary);
}

[data-theme="dark"] html[lang="en"] .timeline-content {
    border-left: 4px solid var(--primary-light);
}

html[lang="en"] .timeline-item {
    padding-right: 0;
    padding-left: 60px;
}

html[lang="en"] .timeline::before {
    right: auto;
    left: 20px;
}

html[lang="en"] .timeline-dot {
    right: auto;
    left: 11px;
}

html[lang="en"] .section-header h2::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

html[lang="en"] .contact-item {
    direction: ltr;
}

html[lang="en"] .form-group {
    text-align: left;
}

html[lang="en"] .contact-form .btn-primary {
    direction: ltr;
}

/* ============================================= */
/* 20. Contact Section - Responsive Final Rules  */
/* ============================================= */
@media (max-width: 900px) {
    .contact-content { width: 100%; }
    .contact-details-grid { gap: 1rem; }
    .contact-card { padding: 1rem .85rem; gap: .75rem; }
    .contact-card > i { width: 48px; height: 48px; min-width: 48px; font-size: 1.1rem; }
    .contact-card h4 { font-size: .92rem; }
    .contact-card p { font-size: .82rem; }
}
@media (max-width: 600px) {
    .contact-details-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
    .contact-card { min-height: 96px; padding: .8rem .45rem; flex-direction: column; justify-content: center; text-align: center; gap: .45rem; border-radius: 15px; }
    .contact-card > i { width: 42px; height: 42px; min-width: 42px; border-radius: 11px; font-size: 1rem; }
    .contact-card h4 { font-size: .78rem; margin-bottom: .15rem; white-space: nowrap; }
    .contact-card p { font-size: .68rem; line-height: 1.35; overflow-wrap: anywhere; }
    .social-links { gap: .8rem; min-height: 62px; }
    .social-links > a, .social-links .share-btn { width: 52px; height: 52px; min-width: 52px; font-size: 1.2rem; }
    .social-dropdown { top: 64px; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; padding: 10px 12px; gap: 8px; }
    .social-dropdown::-webkit-scrollbar { display: none; }
}
@media (max-width: 380px) {
    .contact-details-grid { gap: .35rem; }
    .contact-card { min-height: 92px; padding: .65rem .25rem; }
    .contact-card > i { width: 38px; height: 38px; min-width: 38px; font-size: .9rem; }
    .contact-card h4 { font-size: .7rem; }
    .contact-card p { font-size: .61rem; }
    .social-links { gap: .65rem; }
    .social-links > a, .social-links .share-btn { width: 48px; height: 48px; min-width: 48px; }
}
html[lang="en"] .contact-card { direction: ltr; text-align: left; }
html[lang="en"] .social-links { direction: ltr; }
