/* ===== style.css - الستايل الكامل ===== */

/* -------------------- الأساسيات -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #111920;
    --bg-glass: rgba(20, 30, 40, 0.65);
    --text-primary: #e8edf3;
    --text-secondary: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    --accent: #4b9bc7;
    --accent-glow: rgba(75, 155, 199, 0.25);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius: 24px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== خلفية تحت الهيدر فقط ===== */
.bg-overlay {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 500px;
    z-index: 0;
    background-image: url('Images/bg-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.06;
    pointer-events: none;
}

body.dark .bg-overlay {
    opacity: 0.06;
}

/* ===== الحاوية الرئيسية ===== */
main {
    position: relative;
    z-index: 1;
}

/* ===== حاوية عامة ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== Glassmorphism ===== */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

/* ===== الهيدر ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    background: rgba(10, 14, 20, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}
.header-logo i { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 24px;
    font-weight: 500;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:last-child {
    background: #25d366;
    color: #fff;
    padding: 6px 16px;
    border-radius: 40px;
    font-weight: 600;
}
.nav-links a:last-child:hover {
    background: #1da851;
    transform: scale(1.04);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 40px;
    padding: 4px;
    border: 1px solid var(--border-glass);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.lang-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}
.lang-btn:hover:not(.active) { background: rgba(255,255,255,0.05); }

.dark-toggle {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: 40px;
    padding: 8px 14px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.dark-toggle:hover { background: var(--accent-glow); }

/* ===== Hero Section ===== */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 60px 0 40px;
    min-height: 70vh;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin: 16px 0 32px;
    border-right: 4px solid var(--accent);
    padding-right: 16px;
}
body.en .hero-sub {
    border-right: none;
    border-left: 4px solid var(--accent);
    padding-right: 0;
    padding-left: 16px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--accent);
    color: #fff;
    border-radius: 60px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 30px var(--accent-glow);
    transition: var(--transition);
}
.btn-primary:hover {
    transform: scale(1.04);
    box-shadow: 0 0 50px var(--accent-glow);
}
.btn-secondary {
    display: inline-block;
    padding: 14px 36px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border-radius: 60px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* ===== البطاقات الثلاث بنفس العرض ===== */
.hero-visual {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    width: 100%;
}
.floating-card {
    padding: 20px 16px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    text-align: center;
    animation: float 3s ease-in-out infinite;
    min-height: 140px;
    width: 100%;
}
.floating-card i { 
    font-size: 2.4rem; 
    color: var(--accent);
}
.floating-card span {
    font-size: 0.95rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ===== الأقسام العامة ===== */
.section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-glass);
}
.section:last-of-type { border-bottom: none; }

.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.section-title i { color: var(--accent); }

/* ===== Systems ===== */
.system-block {
    margin-bottom: 60px;
}
.system-block:last-child { margin-bottom: 0; }

.system-block-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    border-radius: var(--radius);
    padding: 30px;
}

.system-block.reverse .system-block-content {
    direction: ltr;
}
body.ar .system-block.reverse .system-block-content .system-block-text {
    direction: rtl;
}
body.en .system-block.reverse .system-block-content .system-block-text {
    direction: ltr;
}

.system-block-text h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.system-block-text h3 i { color: var(--accent); }
.system-block-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.system-block-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.system-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-glass);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: var(--transition);
}
.system-img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 48px rgba(75, 155, 199, 0.2);
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.gallery-grid .img-placeholder:hover {
    transform: scale(1.04);
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}
.gallery-grid .img-placeholder i { font-size: 2.4rem; color: var(--accent); }

.gallery-grid .img-placeholder {
    padding: 8px;
    min-height: 140px;
    overflow: hidden;
}
.gallery-grid .img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.gallery-grid .img-placeholder i,
.gallery-grid .img-placeholder span {
    display: none;
}

/* ===== Video ===== */
.video-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-card {
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

/* ===== Why ===== */
.why-content {
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Contact ===== */
.contact-box {
    padding: 50px;
    border-radius: var(--radius);
    text-align: center;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
}
.contact-box h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.contact-box h2 i { color: #25d366; }

/* ===== زر الواتساب بزر بحواف ===== */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-size: 2.8rem;
    transition: var(--transition);
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 40px rgba(37, 211, 102, 0.25);
}
.whatsapp-btn:hover {
    transform: scale(1.08) rotate(-3deg);
    border-color: #fff;
    box-shadow: 0 0 60px rgba(37, 211, 102, 0.4);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-glass);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-site {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 18px;
    border-radius: 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}
.footer-site:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
}
.footer-site i {
    color: var(--accent);
    font-size: 0.9rem;
}

.back-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}
.back-top-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-visual { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero-section { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { 
        border-right: none; 
        padding-right: 0;
    }
    body.en .hero-sub {
        border-left: none;
        padding-left: 0;
    }
    .hero-cta { justify-content: center; }
    .hero-title { font-size: 2.6rem; }
    .hero-visual { grid-template-columns: 1fr 1fr; }
    
    .system-block-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .system-block.reverse .system-block-content {
        direction: rtl;
    }
    body.en .system-block.reverse .system-block-content {
        direction: ltr;
    }
    .system-block.reverse .system-block-content .system-block-text {
        direction: rtl;
    }
    body.en .system-block.reverse .system-block-content .system-block-text {
        direction: ltr;
    }
    
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: 1fr 1fr; }
    
    .nav-links { display: none; }
    .header-inner { justify-content: center; }
    .header-actions { flex-wrap: wrap; justify-content: center; }
    .bg-overlay { height: 300px; top: 70px; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .contact-box { padding: 30px 20px; }
    .hero-title { font-size: 2rem; }
    .hero-visual { grid-template-columns: 1fr; }
    .system-block-content { padding: 16px; }
    .whatsapp-btn { width: 60px; height: 60px; font-size: 2.2rem; }
    .bg-overlay { height: 200px; top: 65px; }
}

/* ===== الثيم الفاتح (اختياري) ===== */
body:not(.dark) {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e8edf3;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text-primary: #1a2634;
    --text-secondary: #2c3e50;
    --border-glass: rgba(0, 0, 0, 0.08);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body:not(.dark) .header {
    background: rgba(255, 255, 255, 0.85);
}

body:not(.dark) .bg-overlay {
    opacity: 0.03;
}

body:not(.dark) .footer-site {
    background: rgba(255, 255, 255, 0.5);
}

body:not(.dark) .whatsapp-btn {
    border-color: rgba(0, 0, 0, 0.1);
}

/* ===== Lightbox (تكبير الصور) ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-caption {
    color: #fff;
    font-size: 1.1rem;
    margin-top: 16px;
    text-align: center;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 24px;
    border-radius: 40px;
    backdrop-filter: blur(8px);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    opacity: 0.7;
}

.lightbox-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* ===== للغة العربية ===== */
body.ar .lightbox-close {
    right: auto;
    left: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 75vh;
    }
    .lightbox-close {
        top: 16px;
        right: 20px;
        font-size: 2.5rem;
    }
    body.ar .lightbox-close {
        right: auto;
        left: 20px;
    }
    .lightbox-caption {
        font-size: 0.9rem;
        padding: 6px 16px;
    }
}