:root {
    --primary-color: #00aeef; /* لون أزرق سماوي */
    --primary-hover: #008bc4;
    --accent-color: #111111; /* لون داكن مميز للفت الانتباه */
    --bg-color: #fafafa;
    --white: #ffffff;
    --pure-white: #ffffff; /* أبيض دائم للخطوط فوق الألوان الداكنة */
    --text-dark: #1f2937;
    --text-light: #4b5563;
    --border-color: #f1f5f9;
    --input-bg: #f8fafc;
    --card-gradient: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 70px;
}

/* ألوان الوضع الليلي */
body.dark-mode {
    --bg-color: #121212;
    --white: #1e1e1e;
    --text-dark: #f9fafb;
    --text-light: #9ca3af;
    --border-color: #334155;
    --input-bg: #111827;
    --card-gradient: linear-gradient(135deg, #1e293b, #0f172a);
    --header-bg: rgba(30, 30, 30, 0.98);
    --accent-color: #ffffff;
}

/* إعدادات أساسية */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* تفعيل تقنية View Transitions للانتقال بين الصفحات (أحدث تقنية) */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: fadeOut 0.4s ease-out forwards, scaleDown 0.4s ease-out forwards;
}

::view-transition-new(root) {
    animation: fadeIn 0.4s ease-out forwards, scaleUp 0.4s ease-out forwards;
}

@keyframes fadeOut { to { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleDown { to { transform: scale(0.98); } }
@keyframes scaleUp { from { transform: scale(1.02); } to { transform: scale(1); } }

/* حركة دخول الصفحة العامة */
@keyframes smoothLoad {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navbar */
#header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    background-color: transparent;
    transition: var(--transition);
    z-index: 1000;
}

#header.scrolled {
    background-color: var(--header-bg, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
}

.brand-logo {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

/* تأثير نبض إشارات الشعار */
.brand-logo .signal-1 { animation: signalPulse 1.5s infinite ease-in-out; }
.brand-logo .signal-2 { animation: signalPulse 1.5s infinite ease-in-out 0.2s; }
.brand-logo .signal-3 { animation: signalPulse 1.5s infinite ease-in-out 0.4s; }

@keyframes signalPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.brand-text {
    font-size: clamp(1.8rem, 3vw + 0.5rem, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(to left, var(--primary-color) 0%, #b3e5fc 30%, var(--accent-color) 50%, #b3e5fc 70%, var(--primary-color) 100%);
    background-size: 200% auto;
    color: var(--primary-color); /* لون احتياطي */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandShimmer 4s linear infinite;
    position: relative;
    display: inline-block;
}

.brand-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 50px;
    animation: brandLine 2s ease-in-out infinite alternate;
}

@keyframes brandShimmer {
    0% { background-position: 0% center; }
    100% { background-position: -200% center; }
}

@keyframes brandLine {
    0% { width: 15px; }
    100% { width: 35px; }
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.btn-cta {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--pure-white);
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.2);
}

.btn-cta:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 174, 239, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--pure-white);
    border-color: var(--primary-hover);
}

/* زر تبديل الوضع الليلي */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1.2;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-image {
    flex: 1;
    text-align: left;
    position: relative;
}

.profile-avatar {
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border: 8px solid var(--white);
    transform: rotate(-2deg);
    transition: var(--transition);
    object-fit: cover;
}

.profile-avatar:hover {
    transform: rotate(0deg) scale(1.02);
}

/* إعدادات الأقسام العامة (Section Headers) */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw + 0.5rem, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 800;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* أنيميشن كاميرا المراقبة (Security Camera) */
.camera-animation-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.security-camera {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.08));
}

.camera-head {
    transform-origin: 50px 60px; /* محور الدوران (عند مفصل الذراع) */
    animation: cameraScan 6s ease-in-out infinite; /* حركة مسح يميناً ويساراً */
}

.recording-light {
    animation: lightBlink 1s steps(2, start) infinite; /* وميض التسجيل */
}

@keyframes cameraScan {
    0%, 100% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
}

@keyframes lightBlink {
    0%, 49% { fill: #ef4444; opacity: 1; filter: drop-shadow(0 0 4px #ef4444); }
    50%, 100% { fill: #94a3b8; opacity: 0.3; filter: none; }
}

/* أنيميشن شاشة المراقبة (Monitor Screen) */
.monitor-animation-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.monitor-screen {
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
}

.screen-scan {
    animation: scanDown 3s linear infinite;
}

.radar-ping {
    animation: radarPulse 2s ease-out infinite;
    transform-origin: 82.5px 43.75px;
}

.tracking-box {
    animation: trackMove 4s ease-in-out infinite alternate;
}

@keyframes scanDown {
    0% { transform: translateY(0); opacity: 1; }
    90% { transform: translateY(26px); opacity: 1; }
    100% { transform: translateY(26px); opacity: 0; }
}

@keyframes radarPulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

@keyframes trackMove {
    0% { transform: translate(0, 0); }
    33% { transform: translate(8px, -3px); }
    66% { transform: translate(-3px, 4px); }
    100% { transform: translate(0, 0); }
}

/* صفحة خدماتنا - شبكة البطاقات */
.systems-section {
    padding: 2rem 0 3rem;
    background-color: var(--bg-color);
    min-height: calc(100vh - var(--header-height));
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.system-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.system-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.system-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 4px solid var(--primary-color);
}

.system-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 174, 239, 0.15);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.system-icon svg {
    width: 32px;
    height: 32px;
}

.system-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.system-info h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.system-card:hover .system-icon {
    background-color: var(--primary-color);
    color: var(--white);
}

.system-info p.short-desc {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.more-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.more-details.show {
    max-height: 800px; /* يسمح بارتفاع كافٍ للتفاصيل */
    opacity: 1;
    margin-bottom: 1.5rem;
}

.details-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.details-list li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.details-list li::before {
    content: "✓";
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.btn-read-more {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: auto;
}

.btn-read-more:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.system-info p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    flex-grow: 1;
}

/* صفحة تواصل معنا */
.contact-section {
    padding: 4rem 0 6rem;
    background-color: var(--bg-color);
    min-height: calc(100vh - var(--header-height));
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    background-color: var(--white);
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(0, 174, 239, 0.15);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.contact-icon svg {
    width: 35px;
    height: 35px;
    transition: var(--transition);
}

.contact-card:hover .contact-icon svg {
    transform: scale(1.1);
}

.contact-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.contact-card p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* نموذج التواصل الجديد (Contact Form) */
.contact-form-container {
    max-width: 800px;
    margin: 4rem auto 0;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.form-header p {
    color: var(--text-light);
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
    text-align: right;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--input-bg);
    color: var(--text-dark);
}

/* تخصيص شكل القائمة المنسدلة */
.contact-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: left 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-left: 2.5rem;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.15);
}

/* تنسيق حقل الهاتف مع مفتاح الدولة */
.phone-input-wrapper {
    position: relative;
}

.phone-input-wrapper .country-code {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-weight: 600;
    pointer-events: none; /* للسماح بالنقر على الحقل من خلاله */
}

.phone-input-wrapper input {
    padding-left: 60px; /* مساحة لمفتاح الدولة */
}

.contact-form textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 14px;
    margin-top: 1rem;
}

.success-message {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #10b981;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    animation: messagePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.error-message {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #ef4444;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    animation: messagePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes messagePop {
    0% { opacity: 0; transform: translateY(15px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* الحركات (Animations) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

.fade-in-left {
    animation: fadeInLeft 1s ease forwards;
}

/* التصميم المتجاوب (Mobile & Tablets) */
@media (max-width: 768px) {
    /* تحسين مقاسات الشعار الرئيسي في شاشات الجوال */
    .brand {
        gap: 8px;
    }
    .brand-logo {
        height: 38px;
    }
    .brand-text {
        font-size: 1.45rem;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .contact-form-container {
        padding: 2rem 1.5rem;
        margin-top: 3rem;
    }
    .contact-form input, .contact-form select {
        font-size: 16px; /* لمنع التكبير التلقائي في iOS */
    }
    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--header-bg, rgba(255, 255, 255, 0.98));
        backdrop-filter: blur(10px);
        width: 100%;
        height: calc(100vh - var(--header-height));
        justify-content: flex-start;
        transition: 0.4s;
        box-shadow: -5px 10px 20px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        padding: 3rem 0;
        gap: 2rem;
        width: 100%;
        text-align: center;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        padding: 4rem 1.5rem;
    }

    .hero-image {
        text-align: center;
        margin-top: 2rem;
    }

    .hero-description {
        max-width: 100%;
    }

    /* تصغير حجم أيقونات التواصل في الجوال */
    .footer-socials {
        gap: 5px;
        padding: 6px;
    }

    .social-icon {
        width: 36px;
        height: 36px;
    }

    .social-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* تذييل الصفحة (Footer) */
.footer {
    background-color: var(--accent-color);
    color: var(--pure-white);
    padding: 4rem 0 2rem;
    text-align: center;
}

.footer-socials {
    display: inline-flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    background-color: var(--input-bg);
    padding: 8px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--text-light);
    transition: var(--transition);
    text-decoration: none;
}

.social-icon svg {
    width: 22px;
    height: 22px;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-4px);
    color: var(--white);
}

.social-icon.whatsapp:hover {
    background-color: #10b981;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.social-icon.email:hover {
    background-color: #ea4335;
    box-shadow: 0 5px 15px rgba(234, 67, 53, 0.3);
}

.social-icon.instagram:hover {
    background-color: #e1306c;
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.3);
}

.social-icon.tiktok:hover {
    background-color: #000000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.footer p {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1rem;
}

/* زر الواتساب العائم */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px; /* في الزاوية اليسرى السفلية */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--pure-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: var(--transition);
    animation: whatsappPulse 2s infinite;
}

.floating-whatsapp svg {
    width: 35px;
    height: 35px;
}

.floating-whatsapp:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    background-color: #1ebe57;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* تصغير الزر العائم في شاشات الجوال */
@media (max-width: 768px) {
    .floating-whatsapp {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    .floating-whatsapp svg {
        width: 30px;
        height: 30px;
    }
}

/* --- أنيميشن حركة الصفحة الأساسية بعد نقلها للغلاف (Fix for Modal) --- */
.page-wrapper {
    animation: smoothLoad 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- تنسيقات كاميرات المراقبة والشاشة المنبثقة المنقولة --- */
.service-detail-header {
            text-align: center;
            margin-bottom: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .animated-camera-icon {
            width: 120px;
            height: 120px;
            margin-bottom: 1rem;
            color: var(--primary-color);
            filter: drop-shadow(0 5px 15px rgba(0, 174, 239, 0.2));
            animation: cameraFloat 3s ease-in-out infinite;
        }
        @keyframes cameraFloat {
            0%, 100% { transform: translateY(0) rotate(0); }
            50% { transform: translateY(-10px) rotate(2deg); }
        }
        .camera-lens {
            animation: lensPulse 2s ease-in-out infinite;
            transform-origin: center;
        }
        @keyframes lensPulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.7; transform: scale(0.95); }
        }
        .service-detail-header img {
            display: none;
        }
        .features-grid {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 0.5rem;
        }
        .feature-box {
            background: var(--white);
            padding: 1rem;
            border-radius: 16px;
            border: 1px solid var(--border-color);
            box-shadow: 0 5px 15px rgba(0,0,0,0.03);
            transition: var(--transition);
            width: 300px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
        }
        .dual-image-container {
            display: flex;
            width: 100%;
            height: 140px;
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 1rem;
            border: 1px solid var(--border-color);
            position: relative;
        }
        .dual-image-container img {
            width: 50%;
            height: 100%;
            object-fit: cover;
        }
        .image-divider {
            width: 2px;
            background-color: var(--primary-color);
            height: 100%;
            z-index: 1;
        }
        
        /* تنسيقات النافذة المنبثقة (Modal) المحسنة والديناميكية */
        .camera-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 10000;
            display: none; /* يتم تغييره إلى flex عبر JS */
            justify-content: center;
            align-items: center;
            padding: 20px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .camera-modal.show {
            display: flex;
            opacity: 1;
        }
        .modal-content {
            background: var(--bg-color);
            width: min(95%, 1000px); /* توسيع العرض ليتناسب بشكل أفضل مع شاشات الحاسوب */
            border-radius: 32px;
            position: relative;
            transform: translateY(20px) scale(0.95);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            max-height: 88vh; /* لتكون مريحة ولا تلامس الحواف العلوية والسفلية */
            display: flex;
            flex-direction: column;
            box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
            border: 1px solid var(--border-color);
            overflow: hidden;
            margin: auto;
        }
        .camera-modal.show .modal-content {
            transform: translateY(0) scale(1);
            opacity: 1;
        }
        .close-modal {
            position: absolute;
            top: 20px;
            left: 20px; /* RTL - left is far side */
            width: 44px;
            height: 44px;
            background: var(--white);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.8rem;
            cursor: pointer;
            color: var(--text-dark);
            transition: var(--transition);
            z-index: 100;
            border: 1px solid var(--border-color);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .close-modal:hover { 
            background: var(--primary-color);
            color: white;
            transform: rotate(90deg) scale(1.1);
        }
        #modal-body {
            padding: 50px 50px 40px; /* زيادة الهوامش الجانبية لأجهزة الحاسوب */
            overflow-y: auto;
            max-height: 100%;
        }
        #modal-body::-webkit-scrollbar {
            width: 6px;
        }
        #modal-body::-webkit-scrollbar-thumb {
            background-color: var(--border-color);
            border-radius: 10px;
        }
        .modal-header-info {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            margin-bottom: 2rem;
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 1.5rem;
        }
        .modal-brand-icon {
            width: 80px;
            height: 80px;
            background: var(--white);
            border-radius: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 2.5rem;
            flex-shrink: 0;
            box-shadow: 0 8px 16px rgba(0,0,0,0.05);
            border: 1px solid var(--border-color);
        }
        .modal-title-area h2 {
            color: var(--primary-color);
            margin-bottom: 0.5rem;
            font-size: 1.6rem;
            font-weight: 800;
        }
        .modal-title-area p {
            color: var(--text-light);
            line-height: 1.6;
            font-size: 0.95rem;
        }
        .modal-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
        }
        .modal-section-title {
            margin-bottom: 1.2rem;
            color: var(--text-dark);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.1rem;
            font-weight: 700;
        }
        .spec-item {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 12px;
            padding: 12px 15px;
            background: var(--white);
            border-radius: 12px;
            border: 1px solid var(--border-color);
            transition: var(--transition);
        }
        .spec-item span:last-child {
            color: var(--text-dark);
            font-weight: 600;
            font-size: 0.9rem;
        }
        .spec-item:hover {
            border-color: var(--primary-color);
            transform: translateX(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.03);
        }
        .spec-icon {
            font-size: 1.2rem;
        }
        .uses-box {
            background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
            color: white;
            padding: 20px;
            border-radius: 16px;
            display: flex;
            gap: 15px;
            align-items: flex-start;
            box-shadow: 0 8px 20px rgba(0, 174, 239, 0.2);
            line-height: 1.6;
            font-size: 0.95rem;
        }
        .uses-box span:first-child {
            font-size: 1.5rem;
        }
        .modal-cta-box {
            margin-top: 1.5rem;
            background: var(--white);
            padding: 20px;
            border-radius: 16px;
            text-align: center;
            border: 2px dashed var(--primary-color);
        }
        .modal-cta-box p {
            font-size: 0.95rem;
            color: var(--text-dark);
            margin-bottom: 1rem;
            font-weight: 700;
        }
        .modal-cta-box .btn-cta {
            display: block;
            width: 100%;
            text-decoration: none;
            padding: 14px;
            font-size: 1.05rem;
        }
        @media (max-width: 850px) {
            .modal-grid {
                grid-template-columns: 1fr;
            }
        }
        @media (max-width: 600px) {
            .camera-modal {
                align-items: flex-end; /* Bottom sheet effect */
                padding: 0;
            }
            .modal-content {
                width: 100%;
                max-height: 96vh; /* تم تكبير المساحة لتكاد تملأ الشاشة */
                height: auto;
                border-radius: 28px 28px 0 0;
                transform: translateY(100%);
                padding-top: 15px; /* مساحة لشريط السحب الوهمي */
            }
            /* مؤشر السحب (Drag Handle) */
            .modal-content::before {
                content: '';
                position: absolute;
                top: 12px;
                left: 50%;
                transform: translateX(-50%);
                width: 50px;
                height: 5px;
                background-color: #cbd5e1;
                border-radius: 10px;
                z-index: 101;
            }
            .camera-modal.show .modal-content {
                transform: translateY(0);
            }
            #modal-body {
                padding: 40px 20px 20px; /* مساحة علوية لزر الإغلاق ومؤشر السحب */
            }
            .modal-header-info {
                flex-direction: column;
                text-align: center;
                gap: 1rem;
            }
            .close-modal {
                top: 20px;
                left: 20px;
                width: 36px;
                height: 36px;
                font-size: 1.5rem;
                background: var(--bg-color);
            }
        }
        .feature-box {
            cursor: pointer;
        }
        
        .feature-box:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.08);
            border-color: var(--primary-color);
        }
        .feature-box h4 {
            color: var(--primary-color);
            margin-bottom: 0.5rem;
            font-size: 1.4rem;
            font-weight: 700;
        }
        .feature-box p {
            color: var(--text-light);
            margin-bottom: 1rem;
            line-height: 1.7;
        }
        .feature-box ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .feature-box ul li {
            padding-right: 1.8rem;
            margin-bottom: 0.8rem;
            position: relative;
            color: var(--text-dark);
            font-weight: 600;
        }
        .feature-box ul li::before {
            content: "✓";
            position: absolute;
            right: 0;
            color: var(--primary-color);
            font-weight: bold;
        }

.exclusive-badge {
    font-size: 0.65rem;
    background: linear-gradient(90deg, #663399, #a366ff, #663399);
    background-size: 200% auto;
    color: #ffffff;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 900;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
    animation: badgeShimmer 2s linear infinite;
    box-shadow: 0 0 8px rgba(102, 51, 153, 0.4);
    border: 1px solid rgba(102, 51, 153, 0.3);
}

@keyframes badgeShimmer {
    0% { background-position: 0% center; }
    100% { background-position: -200% center; }
}
