/* ===== Reset احترافي بدل * ===== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption, footer,
header, hgroup, menu, nav, output, ruby, section,
summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; border-spacing: 0; }

:root {
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-2: #cbd5e1;
    --primary: #1e40af;
    --primary-2: #1d4ed8;
    --accent: #0ea5e9;
    --success: #065f46;
    --danger: #991b1b;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Navbar ===== */
.navbar {
    background: var(--dark-2);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.navbar .logo img { height: 45px; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { 
    color: var(--gray-2); 
    font-weight: 600; 
    transition: 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 700;
}
.btn-primary:hover { background: var(--primary-2); }
.menu-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--light); }

/* ===== محتوى الصفحات ===== */
main { min-height: 70vh; }
.page-content { padding: 60px 0; }
.page-content h1 { 
    font-size: 2.5rem; 
    margin-bottom: 20px; 
    text-align: center;
    color: var(--light);
}
.page-content .subtitle {
    text-align: center;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

/* ===== Hero Section ===== */
.hero {
    background: url('/assets/img/hero-bg.jpg') center/cover no-repeat;
    padding: 120px 0;
    text-align: center;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; color: var(--gray-2); margin-bottom: 30px; }

/* ===== Cards & Grid ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}
.card {
    background: var(--dark-2);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.card i { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; }
.card h3 { margin-bottom: 15px; color: var(--light); }
.card p { color: var(--gray); line-height: 1.8; }

/* ===== Services Detail ===== */
.services-detail-grid {
    display: grid;
    gap: 40px;
}
.service-detail {
    background: var(--dark-2);
    padding: 40px;
    border-radius: 12px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.service-icon {
    background: var(--dark);
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.service-icon i { font-size: 2rem; color: var(--accent); }
.service-detail h3 { color: var(--accent); margin-bottom: 15px; font-size: 1.5rem; }
.service-detail p { color: var(--gray-2); line-height: 1.8; margin-bottom: 15px; }
.service-detail ul { color: var(--gray-2); padding-right: 20px; line-height: 2; }

/* ===== Forms ===== */
.form-box {
    background: var(--dark-2);
    padding: 40px;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.form-box h2 { margin-bottom: 25px; text-align: center; color: var(--light); }
.form-group { margin-bottom: 20px; }
.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    color: var(--gray-2); 
    font-weight: 600;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--dark);
    border: 1px solid var(--dark-3);
    border-radius: 8px;
    color: var(--light);
    font-size: 15px;
    transition: 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}
.btn:hover { background: var(--primary-2); }

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}
.alert-success { background: var(--success); color: #d1fae5; }
.alert-error { background: var(--danger); color: #fee2e2; }

/* ===== Info Box ===== */
.info {
    background: var(--dark-2);
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
}
.info h3 { margin-bottom: 20px; color: var(--light); }
.info p { color: var(--gray-2); margin-bottom: 12px; }
.info a { color: var(--accent); }
.info a:hover { text-decoration: underline; }
.info i { width: 25px; color: var(--accent); }

/* ===== Back Button ===== */
.back-btn {
    display: inline-block;
    margin-top: 30px;
    color: var(--accent);
    font-weight: 600;
}
.back-btn:hover { text-decoration: underline; }

/* ===== CTA Section ===== */
.cta-section {
    background: var(--dark-2);
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    margin-top: 60px;
}
.cta-section h2 { margin-bottom: 15px; }

/* ===== Demo Box & Modal ===== */
.demo-box {
    position: relative;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--dark-3);
    height: 200px;
    background: var(--dark);
}
.demo-box iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    opacity: 0;
    transition: 0.3s;
}
.demo-box iframe.loaded { opacity: 1; }
.demo-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gray);
}
.demo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--light);
    opacity: 0;
    transition: 0.3s;
}
.demo-box:hover .demo-overlay { opacity: 1; }
.demo-overlay i { font-size: 2rem; }

.demo-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.demo-modal.active { display: flex; }
.modal-wrapper {
    background: var(--dark-2);
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-top {
    padding: 20px;
    background: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-modal {
    background: var(--danger);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}
.modal-frame-wrap {
    flex: 1;
    position: relative;
    background: white;
}
.modal-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.modal-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: var(--dark-2);
    color: var(--gray);
}
.modal-loader.hidden { display: none; }

/* ===== Footer ===== */
footer {
    background: var(--dark-2);
    padding: 50px 0 20px;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: var(--light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a {
    color: var(--gray);
    transition: 0.3s;
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-col ul li i { margin-left: 8px; color: var(--accent); }
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.social-links a {
    width: 40px;
    height: 40px;
    background: var(--dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: 0.3s;
}
.social-links a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}
.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--dark-3);
    color: var(--gray);
    font-size: 14px;
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    font-size: 32px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    transition: 0.3s;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(37, 211, 102, 0.6);
}
@keyframes pulse {
    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); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 75px;
        right: -100%;
        background: var(--dark-2);
        width: 280px;
        height: calc(100vh - 75px);
        flex-direction: column;
        padding: 30px;
        transition: 0.3s;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    }
    .nav-links.active { right: 0; }
    .service-detail { flex-direction: column; text-align: center; }
    .service-icon { margin: 0 auto; }
    .page-content h1 { font-size: 2rem; }
    .grid { grid-template-columns: 1fr; }
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 2rem; }
}
@media (max-width: 576px) {
    .whatsapp-float { 
        width: 50px; 
        height: 50px; 
        bottom: 20px; 
        left: 20px; 
        font-size: 28px; 
    }
    .form-box { padding: 25px; }
    .modal-wrapper { height: 95vh; }
    .service-detail { padding: 25px; }
}