/* ===== المتغيرات العامة ===== */
:root{
    --blue-900:#062a5a;
    --blue-800:#0a3a75;
    --blue-700:#0b4da2;
    --blue-600:#043146;
    --blue-500:#043146;
    --blue-100:#dbe9ff;
    --blue-50:#eef5ff;
    --white:#ffffff;
    --text:#16233a;
    --muted:#5b6b82;
    --shadow-sm:0 4px 14px rgba(6,42,90,.07);
    --shadow-md:0 12px 32px rgba(6,42,90,.10);
    --shadow-lg:0 24px 60px rgba(6,42,90,.15);
    --radius:18px;
}

/* ===== إعدادات أساسية ===== */
*{ scroll-behavior:smooth; }

html{ scroll-padding-top:86px; }

body{
    font-family:'Cairo', system-ui, sans-serif;
    color:var(--text);
    background:var(--white);
    overflow-x:hidden;
}

h1,h2,h3,h4,h5{ font-weight:800; line-height:1.45; }
p{ line-height:2; color:var(--muted); }

::selection{ background:var(--blue-600); color:#fff; }

section{ padding:100px 0; position:relative; }

/* ===== الشريط العلوي ===== */
.navbar{
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    padding:.85rem 0;
    transition:.35s ease;
    border-bottom:1px solid rgba(6,42,90,.06);
}
.navbar.scrolled{
    padding:.55rem 0;
    box-shadow:var(--shadow-md);
}

.navbar-brand{
    font-weight:900;
    font-size:1.45rem;
    color:var(--blue-800) !important;
    display:flex;
    align-items:center;
    gap:.55rem;
    letter-spacing:-.3px;
}
.brand-icon{
    width:42px;height:42px;
    display:grid;place-items:center;
    border-radius:12px;
    background:linear-gradient(135deg,var(--blue-600),var(--blue-800));
    color:#fff;
    font-size:1.25rem;
    box-shadow:0 8px 18px -6px rgba(20,102,216,.7);
}

.navbar-nav .nav-link{
    font-weight:700;
    color:var(--text);
    margin:0 .35rem;
    padding:0.5rem 1.2rem !important;
    position:relative;
    transition:.25s;
}
.navbar-nav .nav-link::after{
    content:"";
    position:absolute;
    bottom:0; right:50%;
    transform:translateX(50%) scaleX(0);
    width:70%; height:3px;
    border-radius:3px;
    background:linear-gradient(90deg,var(--blue-500),var(--blue-700));
    transition:transform .3s ease;
    transform-origin:center;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active{ color:var(--blue-600); }
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after{ transform:translateX(50%) scaleX(1); }

.navbar-toggler{ border:0; box-shadow:none !important; font-size:1.5rem; color:var(--blue-700); }

.btn-brand{
    background:linear-gradient(259deg, #033045, #000408);
    color:#fff;
    border:0;
    border-radius:14px;
    padding:.75rem 1.9rem;
    font-weight:700;
    box-shadow:0 12px 24px -10px rgba(20,102,216,.85);
    transition:.3s ease;
}
.btn-brand:hover{
    color:#fff;
    transform:translateY(-3px);
    box-shadow:0 18px 30px -12px rgba(20,102,216,.95);
}

.btn-outline-brand{
    border:2px solid rgba(255,255,255,.65);
    color:#fff;
    border-radius:14px;
    padding:.7rem 1.9rem;
    font-weight:700;
    transition:.3s ease;
    backdrop-filter:blur(6px);
}
.btn-outline-brand:hover{ background:#fff; color:var(--blue-800); border-color:#fff; }

/* ===== القسم الرئيسي (Hero) ===== */
.hero{
    min-height:100vh;
    display:flex;
    align-items:center;
    padding-top:120px;
    padding-bottom:90px;
    color:#fff;
    background:
            linear-gradient(308deg, rgba(6,42,90,.94) 0%, rgb(2 8 16 / 86%) 48%, rgba(20,102,216,.62) 100%),
            url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    position:relative;
    overflow:hidden;
}
.hero::after{
    content:"";
    position:absolute;
    inset:auto -10% -55% auto;
    width:620px;height:620px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(255,255,255,.14), transparent 65%);
    pointer-events:none;
}

.hero-badge{
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.28);
    padding:.5rem 1.15rem;
    border-radius:50px;
    font-size:.9rem;
    font-weight:600;
    margin-bottom:1.6rem;
    backdrop-filter:blur(8px);
}

.hero h1{
    font-size:clamp(2.1rem, 4.6vw, 3.9rem);
    font-weight:900;
    line-height:1.35;
    margin-bottom:1.3rem;
}
.hero h1 span{
    background:linear-gradient(90deg,#8fc4ff,#ffffff);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}
.hero p.lead{
    color:rgba(255,255,255,.86);
    font-size:1.1rem;
    max-width:560px;
    margin-bottom:2.2rem;
}

.hero-stats{
    display:flex;
    flex-wrap:wrap;
    gap:2.6rem;
    margin-top:3.4rem;
    padding-top:2rem;
    border-top:1px solid rgba(255,255,255,.22);
}
.hero-stats .num{
    font-size:2rem;
    font-weight:900;
    line-height:1;
    display:block;
}
.hero-stats .lbl{
    font-size:.9rem;
    color:rgba(255,255,255,.75);
    margin-top:.45rem;
    display:block;
}

/* ===== عناوين الأقسام ===== */
.section-label{
    display:inline-block;
    color:var(--blue-600);
    background:var(--blue-50);
    border:1px solid var(--blue-100);
    font-weight:700;
    font-size:.85rem;
    padding:.42rem 1.1rem;
    border-radius:50px;
    margin-bottom:1rem;
}
.section-title{
    font-size:clamp(1.8rem,3.2vw,2.6rem);
    font-weight:900;
    color:var(--blue-900);
    margin-bottom:1rem;
}
.section-sub{
    max-width:640px;
    margin:0 auto 3.2rem;
    color:var(--muted);
}
.title-line{
    width:72px;height:5px;border-radius:5px;
    background:linear-gradient(90deg,var(--blue-500),var(--blue-800));
    margin:1.1rem auto 0;
}

/* ===== الخدمات ===== */
#services{ background:linear-gradient(180deg,#f7fafd 0%, #ffffff 100%); }

.service-card{
    background:#fff;
    border:1px solid rgba(6,42,90,.07);
    border-radius:var(--radius);
    padding:2.4rem 1.9rem;
    height:100%;
    transition:.35s cubic-bezier(.2,.8,.2,1);
    position:relative;
    overflow:hidden;
}
.service-card::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:4px;
    background:linear-gradient(90deg,var(--blue-500),var(--blue-800));
    transform:scaleX(0);
    transform-origin:right;
    transition:transform .4s ease;
}
.service-card:hover{
    transform:translateY(-10px);
    box-shadow:var(--shadow-lg);
    border-color:transparent;
}
.service-card:hover::before{ transform:scaleX(1); }

.service-icon{
    width:66px;height:66px;
    border-radius:18px;
    display:grid;place-items:center;
    font-size:1.7rem;
    color:var(--blue-700);
    background:var(--blue-50);
    margin-bottom:1.4rem;
    transition:.35s ease;
}
.service-card:hover .service-icon{
    background:linear-gradient(135deg,var(--blue-600),var(--blue-800));
    color:#fff;
    transform:rotate(-6deg) scale(1.06);
}
.service-card h3{ font-size:1.2rem; color:var(--blue-900); margin-bottom:.75rem; }
.service-card p{ font-size:.95rem; margin-bottom:0; }

/* ===== من نحن ===== */
.about-img-wrap{ position:relative; }
.about-img{
    width:100%;
    border-radius:26px;
    box-shadow:var(--shadow-lg);
    object-fit:cover;
    height:100%;
    min-height:380px;
}
.about-badge{
    position:absolute;
    bottom:-26px;
    inset-inline-start:-16px;
    background:#fff;
    border-radius:20px;
    padding:1.35rem 1.7rem;
    box-shadow:var(--shadow-lg);
    display:flex;
    align-items:center;
    gap:1rem;
    border:1px solid rgba(6,42,90,.06);
}
.about-badge .bi{
    font-size:1.9rem;
    color:var(--blue-600);
}
.about-badge strong{ display:block; font-size:1.55rem; color:var(--blue-900); line-height:1.1; }
.about-badge small{ color:var(--muted); font-size:.82rem; }

.about-list{ list-style:none; padding:0; margin:1.8rem 0 2.2rem; }
.about-list li{
    display:flex;
    align-items:flex-start;
    gap:.8rem;
    margin-bottom:1rem;
    font-weight:600;
    color:var(--text);
}
.about-list .bi{
    flex:none;
    width:26px;height:26px;
    border-radius:50%;
    display:grid;place-items:center;
    background:var(--blue-50);
    color:var(--blue-600);
    font-size:.8rem;
    margin-top:6px;
}

/* ===== تواصل معنا ===== */
#contact{
    background:
            linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}
.contact-card{
    background:#fff;
    border-radius:24px;
    padding:2.6rem;
    box-shadow:var(--shadow-md);
    border:1px solid rgba(6,42,90,.06);
    height:100%;
}
.info-item{
    display:flex;
    align-items:center;
    gap:1.1rem;
    padding:1.05rem 0;
    border-bottom:1px dashed rgba(6,42,90,.12);
}
.info-item:last-child{ border-bottom:0; }
.info-item .icon{
    flex:none;
    width:52px;height:52px;
    border-radius:15px;
    display:grid;place-items:center;
    background:linear-gradient(135deg,var(--blue-600),var(--blue-800));
    color:#fff;
    font-size:1.2rem;
    box-shadow:0 10px 20px -10px rgba(20,102,216,.9);
}
.info-item small{ color:var(--muted); display:block; font-size:.82rem; margin-bottom:.15rem; }
.info-item strong{ color:var(--blue-900); font-size:1rem; font-weight:700; }

.form-control, .form-select{
    border-radius:13px;
    border:1.5px solid #e2e9f3;
    padding:.8rem 1.05rem;
    font-family:inherit;
    background:#fbfdff;
    transition:.25s;
}
.form-control:focus, .form-select:focus{
    border-color:var(--blue-500);
    box-shadow:0 0 0 4px rgba(30,124,240,.14);
    background:#fff;
}
.form-label{ font-weight:700; font-size:.9rem; color:var(--blue-900); margin-bottom:.45rem; }

/* ===== التذييل ===== */
footer{
    background:linear-gradient(270deg, #afafaf, #041f42);
    color:rgba(255,255,255,.72);
    padding:70px 0 0;
}
footer h5{
    color:#fff;
    font-size:1.05rem;
    margin-bottom:1.3rem;
    font-weight:800;
}
footer a{
    color:rgba(255,255,255,.72);
    text-decoration:none;
    transition:.25s;
    display:inline-block;
    padding:.28rem 0;
}
footer a:hover{ color:#8fc4ff; transform:translateX(-5px); }
.footer-brand{
    display:flex;align-items:center;gap:.6rem;
    color:#fff; font-weight:900; font-size:1.4rem; margin-bottom:1.1rem;
}
#social-links-header a{
    color: #033045;
}
#social-links-header a:hover{
    color: #ffffff;
}
.social-links{ display:flex; gap:.65rem; margin-top:1.2rem; }
.social-links a{
    width:42px;height:42px;
    border-radius:12px;
    display:grid;place-items:center;
    background:rgba(255,255,255,.09);
    color:#fff;
    font-size:1.05rem;
    transition:.3s;
}
.social-links a:hover{
    background:var(--blue-600);
    transform:translateY(-4px);
    color: #ffffff;
}
.footer-bottom{
    margin-top:55px;
    border-top:1px solid rgba(255,255,255,.12);
    padding:1.5rem 0;
    font-size:.88rem;
    text-align:center;
}

/* ===== زر العودة للأعلى ===== */
#toTop{
    position:fixed;
    bottom:26px;
    inset-inline-start:26px;
    width:50px;height:50px;
    border-radius:14px;
    border:0;
    display:grid;place-items:center;
    background:linear-gradient(135deg,var(--blue-600),var(--blue-800));
    color:#fff;
    font-size:1.2rem;
    box-shadow:0 14px 28px -10px rgba(20,102,216,.9);
    opacity:0;
    visibility:hidden;
    transform:translateY(14px);
    transition:.35s ease;
    z-index:1040;
}
#toTop.show{ opacity:1; visibility:visible; transform:translateY(0); }

/* ===== ظهور تدريجي عند التمرير ===== */
.reveal{
    opacity:0;
    transform:translateY(34px);
    transition:opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.reveal.visible{ opacity:1; transform:none; }

@media (max-width:991.98px){
    .navbar-collapse{
        background:#fff;
        margin-top:.85rem;
        padding:1rem 1.2rem;
        border-radius:16px;
        box-shadow:var(--shadow-md);
    }
    .navbar-nav .nav-link{ padding:.7rem 0 !important; }
    .navbar-nav .nav-link::after{ display:none; }
    .hero{ min-height:auto; text-align:center; }
    .hero p.lead{ margin-inline:auto; }
    .hero-stats{ justify-content:center; gap:2rem; }
    .about-badge{ inset-inline-start:12px; bottom:-20px; padding:1rem 1.2rem; }
    section{ padding:70px 0; }
}