/* ===================================================================
   مكتب العدل الذهبي — ثيم هجين (محتوى فاتح + أشرطة كحلية + ذهبي)
   =================================================================== */
:root {
    --navy-900: #0a0f18;   /* أغمق كحلي */
    --navy-800: #0f1826;
    --navy-700: #141b29;
    --navy-600: #1c2740;
    --ink: #17202e;        /* نص داكن على خلفية فاتحة */
    --ink-soft: #4a5568;   /* نص ثانوي */
    --gold: #c9a227;       /* ذهبي أعمق قليلاً للتباين على الفاتح */
    --gold-bright: #d4af37;
    --gold-light: #f3e5ab;
    --paper: #f4f5f7;      /* خلفية فاتحة أساسية */
    --paper-2: #eceef2;
    --white: #ffffff;
    --line-light: #e2e5ea;
    --line-gold: rgba(201, 162, 39, 0.25);
    --shadow-sm: 0 4px 20px rgba(23, 32, 46, 0.06);
    --shadow-md: 0 18px 45px rgba(23, 32, 46, 0.12);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--paper);
    color: var(--ink-soft);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo { font-family: 'Amiri', serif; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* عناوين الأقسام */
.section-eyebrow {
    display: inline-block;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-family: 'Cairo', sans-serif;
}
.section-eyebrow::before {
    content: '';
    display: inline-block;
    width: 26px;
    height: 2px;
    background: var(--gold);
    vertical-align: middle;
    margin-left: 10px;
}
.section-title { text-align: center; margin-bottom: 55px; }
.section-title h2 { font-size: 2.6rem; color: var(--ink); line-height: 1.3; }
.section-title h2 span { color: var(--gold); }
.section-title p { margin-top: 14px; color: var(--ink-soft); max-width: 560px; margin-inline: auto; }

/* ===== الأزرار ===== */
.btn-primary, .btn-gold, .btn-outline {
    padding: 13px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    border: none;
    font-size: 0.98rem;
}
.btn-gold {
    background: linear-gradient(45deg, #b8860b, #e6c200);
    color: var(--navy-900);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(201, 162, 39, 0.5); }
.btn-primary {
    border: 1px solid var(--gold);
    color: var(--gold);
    background: transparent;
}
.btn-primary:hover { background: var(--gold); color: var(--navy-900); }
.btn-outline {
    border: 1.5px solid rgba(255,255,255,0.3);
    color: var(--white);
    background: transparent;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ===================================================================
   الهيدر (لاصق، فاتح، يتحوّل عند التمرير)
   =================================================================== */
header {
    position: fixed;
    top: 0; width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 5%;
    background: rgba(244, 245, 247, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-light);
    transition: var(--transition);
}
header.scrolled {
    padding: 12px 5%;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 6px 25px rgba(23, 32, 46, 0.08);
}
.logo { font-size: 27px; color: var(--ink); font-weight: 700; text-decoration: none; }
.logo span { color: var(--gold); }
nav a {
    color: var(--ink);
    text-decoration: none;
    margin: 0 14px;
    font-size: 0.98rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}
nav a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -5px; right: 0;
    width: 0; height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}
nav a:not(.btn-primary):hover { color: var(--gold); }
nav a:not(.btn-primary):hover::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px; height: 44px;
    background: transparent;
    border: 1px solid var(--line-gold);
    border-radius: 6px;
    cursor: pointer;
    z-index: 110;
}
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 0 auto; background: var(--gold); transition: var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===================================================================
   الهيرو (شريط كحلي غامق + صورة + طبقة داكنة)
   =================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    background:
        linear-gradient(rgba(10, 15, 24, 0.82), rgba(10, 15, 24, 0.92)),
        url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?q=80&w=1920&auto=format&fit=crop') center/cover no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    opacity: 0.15;
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 120px 5% 60px;
    animation: fadeUp 1.2s ease-out;
}
.hero .section-eyebrow { color: var(--gold-light); }
.hero .section-eyebrow::before { background: var(--gold-light); }
.hero h1 {
    font-size: 3.6rem;
    color: var(--white);
    line-height: 1.35;
    margin-bottom: 22px;
}
.hero h1 span { color: var(--gold-bright); }
.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 38px;
    max-width: 600px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.scroll-cue {
    position: absolute;
    bottom: 28px; left: 50%;
    transform: translateX(-50%);
    color: var(--gold-bright);
    font-size: 20px; z-index: 2;
    animation: bounce 2s infinite;
    text-decoration: none;
}

/* ===================================================================
   التخصصات (فاتح + بطاقات بيضاء)
   =================================================================== */
.services { padding: 100px 0; background: var(--paper); }
.services .section-title { text-align: center; }
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}
.service-card {
    background: var(--white);
    padding: 44px 32px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--line-light);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transform-style: preserve-3d;
}
.card-icon {
    width: 78px; height: 78px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--gold);
    background: linear-gradient(145deg, #fbf7e8, #f3ead0);
    border-radius: 50%;
    transition: var(--transition);
    transform: translateZ(30px);
}
.service-card h3 { font-size: 1.5rem; color: var(--ink); margin-bottom: 14px; transform: translateZ(20px); }
.service-card p { font-size: 0.98rem; color: var(--ink-soft); transform: translateZ(10px); }
.service-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--line-gold);
    transform: translateY(-6px);
}
.service-card:hover .card-icon {
    background: linear-gradient(145deg, var(--gold), #e6c200);
    color: var(--white);
}
.card-border {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}
.service-card:hover .card-border { transform: scaleX(1); }

/* ===================================================================
   شريط الأرقام (كحلي غامق)
   =================================================================== */
.stats-band {
    padding: 70px 0;
    background:
        linear-gradient(rgba(10, 15, 24, 0.94), rgba(10, 15, 24, 0.94)),
        url('https://www.transparenttextures.com/patterns/stardust.png');
    border-block: 1px solid var(--line-gold);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stat-item { position: relative; }
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0; top: 15%;
    height: 70%;
    width: 1px;
    background: var(--line-gold);
}
.stat-item i { color: var(--gold); font-size: 26px; margin-bottom: 12px; }
.stat-figure { font-family: 'Amiri', serif; font-size: 3rem; font-weight: 700; color: var(--gold-bright); line-height: 1; }
.stat-figure .stat-suffix { font-size: 2rem; }
.stat-item .stat-label { color: rgba(255,255,255,0.7); font-size: 0.95rem; margin-top: 10px; }

/* ===================================================================
   لماذا نحن / آلية العمل (فاتح + خطوات مرقّمة)
   =================================================================== */
.process { padding: 100px 0; background: var(--white); }
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 36px 24px 30px;
    background: var(--paper);
    border-radius: 12px;
    border: 1px solid var(--line-light);
    transition: var(--transition);
}
.step:hover { border-color: var(--line-gold); transform: translateY(-5px); box-shadow: var(--shadow-sm); }
.step-num {
    counter-increment: step;
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    margin-bottom: 18px;
}
.step-num::before { content: '0' counter(step); }
.step h4 { color: var(--ink); font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 0.93rem; }
.step-connector { display: none; }

/* ===================================================================
   آراء العملاء (فاتح + سلايدر)
   =================================================================== */
.testimonials { padding: 100px 0; background: var(--paper); }
.slider { position: relative; max-width: 760px; margin: 0 auto; }
.slides { position: relative; min-height: 240px; }
.slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity 0.6s ease;
    text-align: center;
    padding: 46px 40px;
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--line-light);
    box-shadow: var(--shadow-sm);
}
.slide.active { opacity: 1; visibility: visible; position: relative; }
.slide .quote-mark { color: var(--gold); font-size: 40px; opacity: 0.4; margin-bottom: 12px; }
.slide blockquote { font-size: 1.12rem; color: var(--ink); line-height: 1.9; margin-bottom: 24px; font-family: 'Amiri', serif; }
.slide .client { font-weight: 700; color: var(--ink); }
.slide .client-role { color: var(--gold); font-size: 0.88rem; }
.slider-dots { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.slider-dots button {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--line-light);
    cursor: pointer;
    transition: var(--transition);
}
.slider-dots button.active { background: var(--gold); width: 28px; border-radius: 5px; }

/* ===================================================================
   الفريق (فاتح)
   =================================================================== */
.team { padding: 100px 0; background: var(--white); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.member {
    background: var(--paper);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line-light);
    transition: var(--transition);
    text-align: center;
}
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line-gold); }
.member-photo {
    height: 240px;
    background: var(--navy-700) center/cover;
    position: relative;
}
.member-photo::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,15,24,0.35), transparent 55%);
}
.member-info { padding: 22px; }
.member-info h4 { color: var(--ink); font-size: 1.25rem; margin-bottom: 5px; }
.member-role { color: var(--gold); font-size: 0.9rem; margin-bottom: 14px; }
.member-socials { display: flex; justify-content: center; gap: 10px; }
.member-socials a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line-gold);
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}
.member-socials a:hover { background: var(--gold); color: var(--white); }

/* ===================================================================
   التواصل (فاتح)
   =================================================================== */
.contact { padding: 100px 0; background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; align-items: stretch; }
.contact-form {
    background: var(--white);
    padding: 42px;
    border-radius: 14px;
    border: 1px solid var(--line-light);
    box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 0.92rem; font-weight: 600; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--paper);
    border: 1px solid var(--line-light);
    border-radius: 8px;
    color: var(--ink);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9aa2b0; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}
.field select { cursor: pointer; }
.form-submit { width: 100%; justify-content: center; }
.form-status { margin-top: 15px; text-align: center; font-size: 0.95rem; min-height: 1.2em; }
.form-status.success { color: #15803d; }
.form-status.error { color: #dc2626; }

.contact-info {
    background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
    padding: 42px;
    border-radius: 14px;
    border: 1px solid var(--line-gold);
    color: var(--white);
}
.contact-info h3 { color: var(--white); font-size: 1.5rem; margin-bottom: 26px; }
.info-row {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: var(--transition);
}
a.info-row:hover { color: var(--gold-bright); }
.info-row i { color: var(--gold); font-size: 17px; width: 22px; text-align: center; }
.socials { display: flex; gap: 12px; margin-top: 28px; }
.socials a {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line-gold);
    color: var(--gold-bright);
    text-decoration: none;
    transition: var(--transition);
}
.socials a:hover { background: var(--gold); color: var(--navy-900); transform: translateY(-3px); }

/* ===================================================================
   الفوتر (كحلي غامق جداً + QR)
   =================================================================== */
.site-footer {
    background: var(--navy-900);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 28px;
    border-top: 1px solid var(--line-gold);
}
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo { font-size: 26px; color: var(--white); }
.footer-brand p { margin-top: 14px; font-size: 0.92rem; max-width: 320px; }
.footer-col h4 { color: var(--white); font-size: 1.05rem; margin-bottom: 18px; font-family: 'Cairo', sans-serif; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,0.7); text-decoration: none; margin-bottom: 12px; font-size: 0.92rem; transition: var(--transition); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-qr { text-align: center; }
.footer-qr #qrcode {
    display: inline-flex;
    padding: 10px;
    background: var(--white);
    border-radius: 10px;
}
.footer-qr #qrcode img, .footer-qr #qrcode canvas { display: block; }
.footer-qr span { display: block; margin-top: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 26px;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.footer-bottom .made { color: var(--gold); }

/* زر واتساب عائم */
.whatsapp-float {
    position: fixed;
    bottom: 26px; left: 26px;
    width: 58px; height: 58px;
    background: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    z-index: 90;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
    transition: var(--transition);
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1) translateY(-3px); }

/* ===================================================================
   حركات
   =================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===================================================================
   استجابة
   =================================================================== */
@media (max-width: 992px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
    .stat-item:nth-child(2)::after { display: none; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-qr { grid-column: span 2; }
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    nav#main-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 80%; max-width: 320px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        gap: 26px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: -10px 0 40px rgba(0,0,0,0.12);
        transition: right 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
        display: flex;
    }
    nav#main-nav.open { right: 0; }
    nav#main-nav a { margin: 0; font-size: 20px; }
    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1.05rem; }
    .section-title h2 { font-size: 2rem; }
    .stat-item::after { display: none !important; }
    .steps { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin-inline: auto; }
    .footer-qr { grid-column: auto; }
    .contact-form, .contact-info { padding: 28px; }
    /* إيقاف الخلفية الثابتة على الموبايل لتفادي مشاكل الأداء */
    .hero { background-attachment: scroll; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .hero { background-attachment: scroll; }
}
