/* Import the base styles and modify for Arabic RTL */
@import url('style-en.css');

/* RTL specific overrides */
html {
    direction: rtl;
}

body {
    font-family: 'Noto Naskh Arabic', 'Poppins', sans-serif;
    direction: rtl;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

/* Navigation RTL adjustments */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    direction: ltr !important;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-direction: row-reverse;
    direction: ltr;
    order: 2;
    margin-left: auto;
        direction: ltr !important;

}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-direction: row-reverse;
    order: 1;
    margin-right: auto;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero section RTL */
.hero-container {
    grid-template-columns: 1fr 1fr;
}

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

.hero-buttons {
    justify-content: flex-end;
}

.hero-stats {
    justify-content: flex-end;
}

/* Arabic typography improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.6;
    word-spacing: 0.1em;
}

p, li {
    line-height: 1.8;
    word-spacing: 0.05em;
}

/* Features RTL */
.feature-list li {
    padding-right: 1.5rem;
    padding-left: 0;
    text-align: right;
}

.feature-list li::before {
    right: 0;
    left: auto;
}

.feature-card {
    text-align: right;
}

.feature-card h3 {
    text-align: right;
    margin-bottom: 1rem;
}

.feature-card p {
    text-align: right;
    margin-bottom: 1.5rem;
}

/* Steps RTL */
.step-content {
    text-align: right;
}

.step-content h3 {
    text-align: right;
    margin-bottom: 1rem;
}

.step-content p {
    text-align: right;
    margin-bottom: 1.5rem;
}

.step-features {
    justify-content: flex-end;
    direction: rtl;
}

.step-tag {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Categories RTL */
.category-card {
    text-align: center;
}

.category-card h4 {
    text-align: center;
}

/* Technology cards RTL */
.tech-card {
    text-align: right;
}

.tech-card h4 {
    text-align: right;
    margin-bottom: 1rem;
}

.tech-card p {
    text-align: right;
}

/* Download section RTL */
.download-content {
    grid-template-columns: 1fr 1fr;
}

.download-text {
    text-align: right;
}

.download-text h2 {
    text-align: right;
    margin-bottom: 1.5rem;
}

.download-text p {
    text-align: right;
    margin-bottom: 2rem;
}

.download-features {
    text-align: right;
}

.download-feature {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row-reverse;
}

.download-feature i {
    margin-left: 0.75rem;
    margin-right: 0;
}

.download-buttons {
    justify-content: flex-end;
    gap: 1rem;
}

/* Footer RTL */
.footer-content {
    text-align: right;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    direction: rtl;
}

.footer-section {
    text-align: right;
}

.footer-section:first-child {
    order: 0;
    text-align: right;
}

.footer-section h4 {
    text-align: right;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    text-align: right;
}

.footer-section ul li {
    text-align: right;
}

.footer-logo {
    flex-direction: row-reverse;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.social-links {
    justify-content: flex-start;
    direction: rtl;
}

.contact-info {
    text-align: right;
}

.contact-info p {
    text-align: right;
    justify-content: flex-end;
    display: flex;
    flex-direction: row-reverse;
}

.contact-info p i {
    margin-left: 0.75rem;
    margin-right: 0;
}

.footer-bottom {
    flex-direction: row-reverse;
    justify-content: space-between;
}

.footer-bottom p {
    text-align: right;
}

.footer-links {
    justify-content: flex-end;
}

.footer-links {
    order: -1;
}

.social-links {
    justify-content: flex-end;
}

.contact-info {
    text-align: right;
}

/* Mobile RTL adjustments */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .download-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .download-features {
        text-align: center;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    body {
        padding-top: 60px;
    }
    
    .hero {
        margin-top: -10px;
        min-height: calc(100vh - 60px);
    }
    
    .hero-title {
        margin-top: 20px;
    }
    
    .nav-container {
        flex-direction: row;
        direction: ltr;
    }
    
    .hamburger {
        display: flex;
        order: 1;
    }
    
    .nav-logo {
        order: 2;
    }
    
    .hamburger:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .hamburger span {
        width: 25px;
        height: 3px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .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, -6px);
    }
    
    .nav-logo {
        order: 2;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(84, 203, 0, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 1.5rem;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        order: 3;
    }
    
    .nav-menu.show, .nav-menu.active {
        right: 0;
    }
    
    .nav-menu .nav-link {
        padding: 1rem 2rem;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover {
        transform: translateX(10px);
    }
}

/* Typography improvements for Arabic */
.hero-title {
    line-height: 1.2;
    font-weight: 700;
}

.section-header h2 {
    font-weight: 600;
}

.feature-card h3,
.step h3,
.tech-card h4,
.category-card h4 {
    font-weight: 600;
}

/* Improve spacing for Arabic text */
.hero-subtitle {
    line-height: 1.8;
}

.feature-card p,
.step p,
.tech-card p {
    line-height: 1.8;
}

/* RTL specific button adjustments */
.btn {
    flex-direction: row-reverse;
}

.download-badge {
    flex-direction: row-reverse;
}

.download-badge .badge-text {
    text-align: right;
}

/* Icon adjustments for RTL */
.step:hover .step-features .step-tag {
    transform: translateX(-5px);
}

.nav-link:hover::after {
    left: auto;
    right: 0;
}

/* Better Arabic font rendering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improve Arabic readability */
.hero-title,
.section-header h2,
.feature-card h3,
.step h3 {
    font-feature-settings: 'liga' 1, 'calt' 1;
}

/* Fix alignment for mixed content */
.stat-text,
.badge-small,
.badge-large {
    direction: rtl;
    text-align: center;
}