/* ========================================
   تنسيقات كاملة لصفحة index.html
   مستقلة تماماً عن style.css
   ======================================== */

/* ==========================================
   إعادة تعيين وإعدادات عامة
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #f8f9fa;
}

/* ==========================================
   Container
========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    direction: rtl;
}

/* ==========================================
   Header & Navigation
========================================== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    pointer-events: auto;

}

.nav-overlay.active {
    display: block;
}

/* ==========================================
   Buttons
========================================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border-color: #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-block {
    width: 100%;
}

/* ==========================================
   Hero Section
========================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    overflow: hidden;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease;
}

.hero-image {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    animation: fadeInUp 1.4s ease;
        
}

.hero-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Features Section
========================================== */
.features {
    padding: 80px 0;
    background: #f8f9fa;
    overflow: hidden;
}

.section-title {
    text-align: right;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    display: block;
    width: 100%;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    margin: 0;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.8;
}

/* ==========================================
   CTA Section
========================================== */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.8;
    padding: 0 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn {
    margin-top: 1rem;
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* ==========================================
   Footer
========================================== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
    font-size: 1.2rem;
}

.footer-section p {
    color: #bbb;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: white;
    text-decoration: none;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-3px);
}

/* ==========================================
   Modal Styles
========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease;
    direction: rtl;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: all 0.3s;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
}

.close:hover {
    color: #e74c3c;
    background: #f8f9fa;
    transform: rotate(90deg);
}

.modal h2 {
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal h2 i {
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
    font-size: 14px;
}

.form-group label i {
    color: #667eea;
    margin-left: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #7f8c8d;
    text-align: right;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 40px;
}

.modal-footer-text {
    text-align: center;
    margin-top: 25px;
    color: #7f8c8d;
    font-size: 15px;
}

.modal-footer-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.modal-footer-text a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ==========================================
   Responsive Design - شاشات متوسطة
========================================== */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   Responsive Design - الموبايل
========================================== */
@media (max-width: 768px) {
    /* Navigation */
    .hamburger {
        display: flex;
    }

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    transition: right 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
    isolation: isolate;

}

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 15px 25px;
        width: 100%;
        text-align: right;
        border-radius: 0;
    }

    /* Hero */
    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Features */
    .features {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        text-align: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem;
    }

    /* CTA */
    .cta {
        padding: 60px 0;
    }

    .cta h2 {
        font-size: 1.8rem;
    }

    .cta p {
        font-size: 1rem;
        padding: 0 15px;
    }

    .cta .btn {
        width: 100%;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cta h2 {
        font-size: 1.5rem;
    }

    .nav-menu {
        width: 100%;
    }
}

/* زر إغلاق القائمة في الموبايل */
.close-mobile-menu {
    display: none;
}



@media (max-width: 768px) {
    .close-mobile-menu {
        display: block;
        padding: 10px 20px;
        text-align: left;
    }

    .close-mobile-menu button {
        background: #e74c3c;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        width: 100%;
    }
}

/* ===================================
   FORCE SHOW CLOSE BUTTON
   =================================== */

@media (max-width: 768px) {
    #navMenu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        height: 100vh !important;
        width: 280px !important;
        background: #fff !important;
        z-index: 99999 !important;
        overflow-y: auto !important;
        padding-top: 10px !important;
    }

    #navMenu.active {
        right: 0 !important;
    }

    #navMenu .close-mobile-menu {
        display: block !important;
        padding: 15px !important;
    }

    #navMenu .close-mobile-menu button {
        width: 100% !important;
        background: #e74c3c !important;
        color: #fff !important;
        border: none !important;
        padding: 12px !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        cursor: pointer !important;
    }
}

/* ===== روابط السياسات في الفوتر ===== */
.footer-legal {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-legal a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: #667eea;
}