:root {
    --primary-blue: #2f6bff;
    --dark-bg: #081225;
    --service-surface: #0a1832;
    --service-surface-2: #0c1d3d;
    --service-border: rgba(134, 170, 255, 0.14);
    --service-highlight: rgba(255, 255, 255, 0.04);
    --text-white: #f4f8ff;
    --text-muted: #b8c4d9;
    --dark-blue: #050a18;
    --white: #ffffff;
    --chinese-silver: #ccc;
    --main-bg: var(--dark-bg);
    --card-bg: var(--service-surface);
}

* { box-sizing: border-box; }

/* التنسيق الافتراضي (للانجليزي وأي لغة أخرى) */
body {
    margin: 0;
    padding: 0;
    background-color: var(--dark-blue);
    color: var(--white);
    /* Poppins هو الخط الأساسي، و Montserrat كبديل ممتاز */
    font-family: 'Poppins', 'Montserrat', sans-serif;
}

/* التنسيق الخاص باللغة العربية */
html[lang="ar"] body {
    /* Cairo هو الأنسب للعربية مع الاحتفاظ بالخطوط الأخرى للأرقام والكلمات الأجنبية */
    font-family: 'Cairo', 'Poppins', 'Montserrat', sans-serif;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 4%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s ease-in-out, padding 0.4s ease;
}

header.scrolled {
    background: rgba(5, 10, 24, 0.9);
    padding: 10px 4%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.logo img {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}
.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffffff;
    line-height: 1;
}
.logo-text .accent {
    color: var(--primary-blue);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 36px;
    margin: 0;
    padding: 0;
}
nav a {
    text-decoration: none;
    color: #e6ecf8;
    font-size: 18px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}
nav a:hover,
nav a.active { color: var(--primary-blue); }
nav a .chev {
    font-size: 10px;
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(134, 170, 255, 0.22);
    color: #e6ecf8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lang-switcher:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.lang-switcher i {
    font-size: 11px;
    opacity: 0.8;
}
.lang-switcher .lang-current {
    color: var(--primary-blue);
}
.lang-switcher .lang-caret {
    font-size: 9px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}
.lang-dropdown.open .lang-switcher .lang-caret {
    transform: rotate(180deg);
}

/* Language dropdown */
.lang-dropdown {
    position: relative;
    display: inline-flex;
}
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: rgba(8, 16, 36, 0.98);
    border: 1px solid rgba(134, 170, 255, 0.22);
    border-radius: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 38px rgba(0, 0, 0, 0.40);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    z-index: 1100;
}
.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
.lang-menu li {
    padding: 10px 14px;
    border-radius: 6px;
    color: #e6ecf8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}
.lang-menu li:hover {
    background: rgba(47, 107, 255, 0.15);
    color: var(--primary-blue);
}
.lang-menu li.active {
    color: var(--primary-blue);
    background: rgba(47, 107, 255, 0.10);
}
.lang-menu li.active::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
}
html[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}

.btn-start {
    background: var(--primary-blue);
    color: white;
    padding: 12px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 8px 18px rgba(47, 107, 255, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-start:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 10px 22px rgba(47, 107, 255, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8%;
    position: relative;
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(5, 10, 24, 0.20) 0%,
        rgba(5, 10, 24, 0.15) 55%,
        rgba(5, 10, 24, 0.55) 100%
    );
    pointer-events: none;
    z-index: -1;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-blue);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.hero-kicker .dots {
    display: inline-flex;
    gap: 4px;
}
.hero-kicker .dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: inline-block;
}
.hero-kicker .dots span:last-child { opacity: 0.45; }
.hero-kicker .kicker-light {
    color: #cfd8ea;
    font-weight: 500;
    letter-spacing: 0.14em;
}

.hero h1 {
    font-size: 3.8rem;
    margin: 0 0 22px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero h1 .line-blue {
    color: var(--primary-blue);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.hero p.hero-sub {
    max-width: 800px;
    font-size: 1.3rem;
    color: #ffffff;
    line-height: 1.7;
    margin: 0 0 36px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}
.btn-primary-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-blue);
    color: white;
    padding: 13px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 8px 18px rgba(47, 107, 255, 0.28);
    transition: transform 0.2s ease;
}
.btn-primary-cta:hover { transform: translateY(-1px); }

.btn-outline-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    padding: 13px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.02);
    transition: all 0.2s ease;
}
.btn-outline-cta:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.btn-primary-cta .arrow,
.btn-outline-cta .arrow { font-size: 10px; }

/* Page hero (smaller hero for interior pages) */
.page-hero {
    padding: 160px 8% 80px;
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 20% 30%, rgba(47, 107, 255, 0.18), transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(47, 107, 255, 0.10), transparent 45%),
        var(--dark-blue);
    text-align: center;
    border-bottom: 1px solid rgba(134, 170, 255, 0.10);
}
.page-hero h1 {
    margin: 14px 0 14px;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-white);
}
.page-hero h1 .accent { color: var(--primary-blue); }
.page-hero p {
    margin: 0 auto;
    max-width: 640px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Stats top row */
.stats-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
    padding: 60px 10% 24px;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
    text-align: center;
}
.stats-top .big-num {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    line-height: 1.1;
}
.stats-top .big-sub {
    color: #b8c4d9;
    font-size: 0.95rem;
    margin: 0;
}
.stats-top .center-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.stats-top .center-logo img {
    height: 64px;
    width: auto;
    opacity: 0.95;
}

/* Stats cards grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 8px 10% 40px;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}

.stat-card {
    position: relative;
    min-height: 170px;
    padding: 24px 26px 22px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; /* تم التعديل هنا لتوسيط العناصر */
    justify-content: center;
    text-align: center; /* تم التعديل هنا لتوسيط النص */
    transition: all 0.3s ease;
    background: linear-gradient(180deg, rgba(10, 24, 50, 0.96) 0%, rgba(9, 20, 42, 0.98) 100%);
    border: 1px solid rgba(134, 170, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        inset 0 -1px 0 rgba(255,255,255,0.015),
        0 18px 38px rgba(0, 0, 0, 0.30),
        0 4px 10px rgba(0, 0, 0, 0.18);
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(79, 128, 255, 0.14) 0%, rgba(79, 128, 255, 0.05) 22%, transparent 45%),
        radial-gradient(circle at bottom right, rgba(92, 143, 255, 0.03) 0%, transparent 28%);
    z-index: 0;
}
.stat-card::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 17px;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.025);
    z-index: 0;
}
.stat-card > * { position: relative; z-index: 2; }

.icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2f6bff 0%, #2154d8 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 8px 18px rgba(47, 107, 255, 0.22);
}
.icon-container i {
    color: #ffffff;
    font-size: 20px;
}

.stat-card h2 {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #f4f8ff;
}
.stat-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 400;
    color: #b8c4d9;
    opacity: 0.9;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(134, 170, 255, 0.22);
}

.main-section {
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}

.middle-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(180deg, #2f6bff 0%, #2154d8 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 8px 18px rgba(47, 107, 255, 0.22);
    transition: all 0.25s ease;
}
.middle-cta-wrap {
    display: flex;
    justify-content: center;
    margin: 10px 0 30px;
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
}
.middle-cta:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 10px 22px rgba(47, 107, 255, 0.28);
}
.middle-cta .arrow {
    font-size: 0.95rem;
    line-height: 1;
    opacity: 0.95;
}

/* Services */
.services {
    padding: 24px 10% 60px;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}
.services-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.service-box {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    padding: 34px 42px;
    border-radius: 28px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: linear-gradient(180deg, rgba(10, 24, 50, 0.96) 0%, rgba(9, 20, 42, 0.98) 100%);
    border: 1px solid rgba(134, 170, 255, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        inset 0 -1px 0 rgba(255,255,255,0.015),
        0 18px 38px rgba(0, 0, 0, 0.30),
        0 4px 10px rgba(0, 0, 0, 0.18);
}
.service-box::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at 78% 55%, rgba(79, 128, 255, 0.14) 0%, rgba(79, 128, 255, 0.05) 22%, transparent 45%),
        radial-gradient(circle at 20% 15%, rgba(92, 143, 255, 0.05) 0%, transparent 30%);
    z-index: 0;
}
.service-box::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 27px;
    border: 1px solid rgba(255,255,255,0.025);
    pointer-events: none;
    z-index: 0;
}

.service-content {
    flex: 0 0 44%;
    max-width: 520px;
    position: relative;
    z-index: 2;
}

.service-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 30px;
    padding: 0 14px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, #2154d8 100%);
    border: 1px solid rgba(134, 170, 255, 0.18);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 4px 10px rgba(0, 0, 0, 0.10);
}
.service-label i { font-size: 12px; }

.service-content h2 {
    margin: 0 0 16px;
    color: var(--text-white);
    font-size: 2.2rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.service-content p {
    margin: 0 0 22px;
    max-width: 480px;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.8;
    font-weight: 400;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    text-decoration: none;
}
.service-chip i { font-size: 13px; }

.service-chip.primary {
    background: linear-gradient(180deg, var(--primary-blue) 0%, #2154d8 100%);
    border-color: rgba(134, 170, 255, 0.16);
    color: var(--white);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 8px 18px rgba(47, 107, 255, 0.22);
}
.service-chip.light {
    background: linear-gradient(180deg, #f4f8ff 0%, #dfe9ff 100%);
    border-color: rgba(255,255,255,0.45);
    color: #3b63c9;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.75),
        0 6px 14px rgba(0, 0, 0, 0.10);
}
.service-chip.light i { color: #3b63c9; }

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #eef4ff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.92;
}
.service-link:hover { opacity: 1; }

.service-image {
    flex: 0 0 52%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 270px;
    position: relative;
    z-index: 1;
}
.service-image img {
    width: min(100%, 520px);
    max-width: 520px;
    object-fit: contain;
    transform: scale(1.1);
    transform-origin: right center;
}

/* Section heading (shared) */
.section-head {
    text-align: center;
    margin: 0 auto 42px;
    max-width: 720px;
}
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.section-kicker .dots {
    display: inline-flex;
    gap: 4px;
}
.section-kicker .dots span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: inline-block;
}
.section-kicker .dots span:last-child { opacity: 0.45; }
.section-title {
    margin: 0 0 12px;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-white);
    line-height: 1.15;
}
.section-title .accent { color: var(--primary-blue); }
.section-sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* Zigzag layout — cards alternate left/right */
.services .services-container {
    gap: 28px;
}
.services .service-box {
    width: 86%;
}
.services .service-box:not(.reverse) {
    align-self: flex-start;
}
.services .service-box.reverse {
    align-self: flex-end;
}

/* Icon-based visual */
.service-visual {
    flex: 0 0 52%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 270px;
    position: relative;
    z-index: 1;
}
.service-visual::before {
    content: "";
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(75, 125, 255, 0.30) 0%, rgba(75, 125, 255, 0.10) 35%, transparent 65%);
    filter: blur(6px);
    pointer-events: none;
    z-index: 0;
}
.service-visual::after {
    content: "";
    position: absolute;
    width: 90%;
    height: 70%;
    bottom: -10px;
    background:
        linear-gradient(rgba(132, 173, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(132, 173, 255, 0.08) 1px, transparent 1px);
    background-size: 34px 34px, 34px 34px;
    opacity: 0.55;
    transform: perspective(700px) rotateX(72deg);
    transform-origin: center bottom;
    pointer-events: none;
    z-index: 0;
}
.visual-orb {
    position: relative;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #3a78ff 0%, #1a46c2 100%);
    box-shadow:
        inset 0 3px 0 rgba(255,255,255,0.22),
        inset 0 -3px 0 rgba(0,0,0,0.18),
        0 30px 80px rgba(47, 107, 255, 0.50),
        0 10px 30px rgba(47, 107, 255, 0.35);
    z-index: 2;
}
.visual-orb::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.05) 40%, transparent 60%);
    pointer-events: none;
}
.visual-orb::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(134, 170, 255, 0.25);
    pointer-events: none;
}
.visual-orb i {
    position: relative;
    z-index: 2;
    font-size: 92px;
    color: #ffffff;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.45));
}

/* Why choose section */
.why-choose {
    padding: 60px 10%;
    background:
        radial-gradient(circle at center, rgba(35, 84, 190, 0.08), transparent 45%),
        var(--dark-bg);
}
.why-grid {
    display: grid;
    /* grid-template-columns: repeat(3, minmax(0, 1fr)); */
    gap: 18px;
}
.why-card {
    position: relative;
    overflow: hidden;
    padding: 28px 26px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(10, 24, 50, 0.96) 0%, rgba(9, 20, 42, 0.98) 100%);
    border: 1px solid rgba(134, 170, 255, 0.14);
    transition: transform 0.25s ease, border-color 0.25s ease;

    /* التعديل الجديد */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center; 
}
.why-card:hover {
    transform: translateY(-3px);
    border-color: rgba(134, 170, 255, 0.28);
}
.why-card .icon-container {
    width: 52px; height: 52px;
    margin-bottom: 20px;
}
.why-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-white);
}
.why-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Portfolio */
.portfolio {
    padding: 60px 10%;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.work-card {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(134, 170, 255, 0.14);
    background: linear-gradient(180deg, #0f1f45 0%, #0a1832 100%);
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
}
.work-card:hover { transform: translateY(-4px); }
.work-card .work-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transition: transform 0.6s ease;
}
.work-card:hover .work-bg { transform: scale(1.05); }
.work-card .work-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(5, 10, 24, 0.1) 0%, rgba(5, 10, 24, 0.55) 60%, rgba(5, 10, 24, 0.92) 100%);
}
.work-card .work-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 22px 24px 24px;
    z-index: 2;
}
.work-card .work-tag {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-blue);
}
.work-card h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.work-card p {
    margin: 0;
    color: #c2cce0;
    font-size: 0.85rem;
}
.work-card .work-arrow {
    position: absolute;
    top: 18px; right: 18px;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 14px;
    z-index: 2;
    transition: background 0.25s ease;
}
.work-card:hover .work-arrow { background: var(--primary-blue); border-color: var(--primary-blue); }

/* FAQ */
.faq {
    padding: 60px 10%;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}
.faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.faq-item {
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 24, 50, 0.96) 0%, rgba(9, 20, 42, 0.98) 100%);
    border: 1px solid rgba(134, 170, 255, 0.14);
    transition: border-color 0.25s ease;
}
.faq-item[open] { border-color: rgba(134, 170, 255, 0.32); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(47, 107, 255, 0.14);
    border: 1px solid rgba(134, 170, 255, 0.22);
    color: var(--primary-blue);
    font-size: 12px;
    transition: transform 0.25s ease;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-item .faq-body {
    padding: 0 24px 22px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* Contact */
.contact {
    padding: 60px 10%;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.10), transparent 45%),
        var(--dark-bg);
}
.contact-box {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 28px;
    padding: 40px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(10, 24, 50, 0.96) 0%, rgba(9, 20, 42, 0.98) 100%);
    border: 1px solid rgba(134, 170, 255, 0.14);
}
.contact-info h2 {
    margin: 0 0 14px;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
}
.contact-info p {
    margin: 0 0 24px;
    color: var(--text-muted);
    line-height: 1.7;
}
.contact-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.contact-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #d7e0f3;
    font-size: 0.95rem;
}
.contact-list .c-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2f6bff 0%, #2154d8 100%);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(47, 107, 255, 0.22);
}
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.contact-form .full { grid-column: 1 / -1; }
.contact-form label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a9b5cf;
    margin-bottom: 8px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    background: rgba(5, 10, 24, 0.55);
    border: 1px solid rgba(134, 170, 255, 0.18);
    border-radius: 10px;
    padding: 13px 14px;
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--primary-blue);
    background: rgba(5, 10, 24, 0.75);
}
.contact-form textarea {
    min-height: 130px;
    resize: vertical;
}
.contact-form .btn-submit {
    grid-column: 1 / -1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    padding: 13px 26px;
    border-radius: 10px;
    background: linear-gradient(180deg, #2f6bff 0%, #2154d8 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 8px 18px rgba(47, 107, 255, 0.22);
    transition: transform 0.2s ease;
}
.contact-form .btn-submit:hover { transform: translateY(-1px); }

/* About page */
.about-intro {
    padding: 80px 10%;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}
.about-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-intro-grid .about-text h2 {
    margin: 0 0 20px;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-white);
    line-height: 1.15;
}
.about-intro-grid .about-text h2 .accent { color: var(--primary-blue); }
.about-intro-grid .about-text p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}
.about-visual {
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    background: url('../images/background.png') center/cover no-repeat;
    border: 1px solid rgba(134, 170, 255, 0.18);
    position: relative;
    overflow: hidden;
}
.about-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 10, 24, 0.1) 0%, rgba(5, 10, 24, 0.6) 100%);
}

.values {
    padding: 60px 10%;
    background:
        radial-gradient(circle at center, rgba(35, 84, 190, 0.08), transparent 45%),
        var(--dark-bg);
}
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.team {
    padding: 60px 10%;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.team-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 24, 50, 0.96) 0%, rgba(9, 20, 42, 0.98) 100%);
    border: 1px solid rgba(134, 170, 255, 0.14);
    text-align: center;
    padding: 26px 20px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.team-card:hover {
    transform: translateY(-3px);
    border-color: rgba(134, 170, 255, 0.28);
}
.team-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #3a78ff 0%, #1a46c2 100%);
    color: #fff;
    font-size: 38px;
    font-weight: 700;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.22),
        0 12px 30px rgba(47, 107, 255, 0.35);
}
.team-card h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    color: var(--text-white);
}
.team-card .role {
    color: var(--primary-blue);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.team-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.timeline {
    padding: 60px 10%;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}
.timeline-list {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    padding-left: 32px;
}
.timeline-list::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-blue), rgba(47, 107, 255, 0.1));
}
.timeline-item {
    position: relative;
    margin-bottom: 30px;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(180deg, #3a78ff 0%, #1a46c2 100%);
    border: 3px solid var(--dark-bg);
    box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.45);
}
.timeline-item .year {
    font-size: 0.8rem;
    color: var(--primary-blue);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.timeline-item h3 {
    margin: 0 0 6px;
    color: var(--text-white);
    font-size: 1.15rem;
    font-weight: 700;
}
.timeline-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 60px 10%;
    background:
        radial-gradient(circle at top, rgba(35, 84, 190, 0.08), transparent 35%),
        var(--dark-bg);
}
.blog-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 24, 50, 0.96) 0%, rgba(9, 20, 42, 0.98) 100%);
    border: 1px solid rgba(134, 170, 255, 0.14);
    transition: transform 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(134, 170, 255, 0.28);
}
.blog-cover {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(134, 170, 255, 0.10);
}
.blog-body {
    padding: 22px 24px 26px;
}
.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.blog-meta .dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(134, 170, 255, 0.45);
}
.blog-card h3 {
    margin: 0 0 10px;
    color: var(--text-white);
    font-size: 1.15rem;
    line-height: 1.35;
    font-weight: 700;
}
.blog-card p {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}
.blog-card .read-more {
    color: var(--primary-blue);
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Footer */
footer {
    background: #040813;
    padding: 60px 10% 24px;
    border-top: 1px solid rgba(134, 170, 255, 0.10);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(134, 170, 255, 0.08);
}
.footer-brand .logo {
    margin-bottom: 18px;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    max-width: 340px;
    margin: 0 0 20px;
}
.socials {
    display: flex;
    gap: 10px;
}
.socials a {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(134, 170, 255, 0.14);
    color: #d7e0f3;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.socials a:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
    transform: translateY(-2px);
}
.footer-col h4 {
    margin: 0 0 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.02em;
}
.footer-col ul {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col a {
    color: #b8c4d9;
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--primary-blue); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 22px;
    color: #8e9bb5;
    font-size: 0.85rem;
}
.footer-bottom .foot-links {
    display: flex;
    gap: 22px;
}
.footer-bottom .foot-links a {
    color: #8e9bb5;
    text-decoration: none;
}
.footer-bottom .foot-links a:hover { color: var(--primary-blue); }

/* RTL adjustments */
html[dir="rtl"] .stat-card {
    text-align: right;
}
html[dir="rtl"] .service-visual {
    justify-content: flex-start;
}
html[dir="rtl"] .service-image img {
    transform-origin: left center;
}
html[dir="rtl"] .services .service-box:not(.reverse) {
    align-self: flex-end;
}
html[dir="rtl"] .services .service-box.reverse {
    align-self: flex-start;
}
html[dir="rtl"] .work-card .work-arrow {
    right: auto;
    left: 18px;
}
html[dir="rtl"] .timeline-list {
    padding-left: 0;
    padding-right: 32px;
}
html[dir="rtl"] .timeline-list::before {
    left: auto;
    right: 8px;
}
html[dir="rtl"] .timeline-item::before {
    left: auto;
    right: -32px;
}
html[dir="rtl"] .hero-kicker .dots span:last-child,
html[dir="rtl"] .section-kicker .dots span:last-child {
    opacity: 1;
}
html[dir="rtl"] .hero-kicker .dots span:first-child,
html[dir="rtl"] .section-kicker .dots span:first-child {
    opacity: 0.45;
}
html[dir="rtl"] .contact-form .btn-submit {
    justify-self: end;
}

/* responsive */
@media (max-width: 1100px) {
    .hero h1 { font-size: 3.2rem; }
    nav ul { gap: 22px; }
    .service-box { padding: 30px 26px; gap: 18px; }
    .service-image img { max-width: 430px; transform: scale(1.02); }
    .visual-orb { width: 180px; height: 180px; }
    .visual-orb i { font-size: 72px; }
    .service-visual::before { width: 340px; height: 340px; }
    .services .service-box { width: 92%; }
    .why-grid,
    .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-box { grid-template-columns: 1fr; padding: 30px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-intro-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
    header { padding: 14px 5%; }
    nav { display: none; }
    .hero { padding: 0 6%; }
    .hero h1 { font-size: 2.4rem; }
    .page-hero { padding: 120px 6% 60px; }
    .page-hero h1 { font-size: 2rem; }
    .stats-top {
        grid-template-columns: 1fr;
        padding: 40px 6% 16px;
        gap: 20px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 8px 6% 30px;
    }
    .services { padding: 20px 6% 40px; }
    .service-box {
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        padding: 28px 22px;
        border-radius: 22px;
    }
    .service-content, .service-image {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }
    .service-content h2 { font-size: 1.7rem; }
    .service-image {
        justify-content: center;
        min-height: 220px;
        margin-top: 10px;
    }
    .service-image img {
        max-width: 320px;
        transform: scale(1);
        transform-origin: center;
    }
    .hero-actions { flex-wrap: wrap; }
    .visual-orb { width: 150px; height: 150px; }
    .visual-orb i { font-size: 60px; }
    .service-visual { min-height: 200px; justify-content: center; }
    .service-visual::before { width: 260px; height: 260px; }
    .service-box.reverse .service-visual { justify-content: center; }
    .services .service-box,
    .services .service-box.reverse,
    .services .service-box:not(.reverse) {
        width: 100%;
        align-self: stretch;
    }
    .why-grid,
    .values-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-grid { grid-template-columns: 1fr; padding: 40px 6%; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .section-title { font-size: 1.8rem; }
    .services, .why-choose, .portfolio, .faq, .contact,
    .about-intro, .values, .team, .timeline { padding: 40px 6%; }
    .contact-form { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    footer { padding: 40px 6% 22px; }
    .header-right { gap: 10px; }
    .btn-start { padding: 10px 14px; font-size: 11px; }
}

.service-visual img {
    width: min(100%, 520px);
    max-width: 520px;
    object-fit: contain;
}

.service-visual img {
    width: min(100%, 520px);
    max-width: 520px;
    object-fit: contain;
    transform: scale(1.12);
    transform-origin: right center;
}
.service-visual img.mobile-game-img {
    transform: scale(1.2);
    /* تغيير المنشأ إلى bottom لضمان الثبات على القاعدة */
    transform-origin: right top; 
    display: block;
    margin-bottom: 0; /* التأكد من عدم وجود هوامش */
}

.service-visual img.rocket {
    height: min(100%, 350px);
    max-height: 350px;
    transform-origin: right center;
}

.service-visual img.vr {
    height: min(100%, 350px);
    max-height: 350px;
    transform-origin: right center;
}
.service-visual img.robot {
    height: min(100%, 350px);
    max-height: 350px;
    transform-origin: right center;
}

.service-visual img.quality {
    height: min(100%, 280px);
    max-height: 280px;
    transform-origin: right center;
}

.service-visual img.pc {
    height: min(100%, 280px);
    max-height: 280px;
    transform-origin: right center;
}

.service-visual img.modeling {
    width: min(100%, 650px);
    max-width: 650px;
    /* تغيير المنشأ إلى bottom لضمان الثبات على القاعدة */
    transform-origin: right center; 
    display: block;
    margin-bottom: 0; /* التأكد من عدم وجود هوامش */
}

.whatsapp-btn {
  position: fixed;
  bottom: 20px;      /* المسافة من تحت */
  right: 20px;       /* المسافة من اليمين */
  width: 60px;       /* حجم الزرار */
  height: 60px;
  background-color: #25d366; /* لون واتساب الأخضر */
  border-radius: 50%;        /* عشان يبقى دائري */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2); /* ظل خفيف */
  z-index: 1000;             /* عشان يظهر فوق كل العناصر */
  transition: transform 0.3s ease; /* أنيميشن بسيط لما الماوس ييجي عليه */
}

.whatsapp-btn img {
  width: 35px; /* حجم اللوجو جوه الدائرة */
  height: 35px;
}

/* تأثير عند مرور الماوس (Hover) */
.whatsapp-btn:hover {
  transform: scale(1.1); /* بيكبر شوية */
  background-color: #20ba5a;
}