/* 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: rtl;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    order: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-direction: row;
    order: 2;
    direction: rtl;
}

.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;
}

/* Latest Topics from Store Section - RTL */
.store-latest-section {
    direction: rtl;
    text-align: right;
}

.section-header {
    text-align: right !important;
}

.section-header h2 {
    text-align: right !important;
}

.section-header p {
    text-align: end !important;
    margin: 0 0 0 auto;
}

.section-title-wrapper {
    text-align: right;
}

.view-all-btn i {
    margin-right: 0.5rem;
    margin-left: 0;
}

.view-all-btn:hover i {
    transform: translateX(-5px);
}

.topic-category-badge {
    right: 12px;
    left: auto;
}

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

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

.topic-meta {
    justify-content: flex-start;
}

.meta-item {
    flex-direction: row-reverse;
}

.cta-content {
    flex-direction: row;
    text-align: right;
}

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

.cta-text h3 {
    text-align: right;
}

.cta-text p {
    text-align: right;
}

.cta-button i {
    margin-left: 0.6rem;
    margin-right: 0;
}

.cta-button:hover i {
    transform: translateX(-5px);
}

/* Tikrary Store Promotional Card - RTL */
.store-promo-card {
    position: relative;
    background: linear-gradient(135deg, #54cb00 0%, #4ade80 100%);
    color: white;
    padding: 2.5rem 2rem;
    overflow: hidden;
    text-align: center;
}

.store-promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.store-promo-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    right: auto;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.store-promo-badge i {
    font-size: 0.8rem;
    color: #FFD700;
}

.store-promo-icon {
    position: relative;
    z-index: 1;
}

.store-promo-icon i {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

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

.store-promo-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.store-promo-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 1;
}

.store-promo-features {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    align-items: center;
}

.store-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: white;
}

.store-feature i {
    font-size: 1rem;
    color: #FFD700;
    margin-left: 0;
    margin-right: 0;
}

.store-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: white;
    color: #54cb00;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}

.store-promo-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.store-promo-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.store-promo-btn:hover i {
    transform: translateX(-5px);
}

.store-promo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(84, 203, 0, 0.3);
}

/* 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 {
    direction: rtl !important;
}

.download-content {
    grid-template-columns: 1fr 1fr;
    direction: rtl !important;
}

.download-text {
    text-align: right !important;
    direction: rtl !important;
}

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

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

.download-note {
    text-align: right !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    direction: rtl !important;
}

.download-note i {
    order: 2;
    margin-left: 0;
    margin-right: 0;
}

.download-features {
    text-align: right !important;
    direction: rtl !important;
}

.download-feature {
    justify-content: flex-start !important;
    text-align: right !important;
    flex-direction: row !important;
    direction: rtl !important;
}

.download-feature i {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
    order: 2;
}

.download-feature span {
    order: 1;
    text-align: right;
}

.download-buttons {
    justify-content: flex-start !important;
    gap: 1rem;
    direction: rtl !important;
}

/* 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.footer-brand {
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
}

.footer-section.footer-brand p {
    text-align: right !important;
}

.footer-tagline {
    text-align: right !important;
    direction: rtl !important;
    width: 100% !important;
}

.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;
    list-style: none;
    padding: 0;
}

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

.footer-nav {
    direction: rtl;
}

.footer-nav li a {
    text-align: right;
}

.footer-logo {
    text-align: right !important;
    direction: rtl !important;
    justify-content: flex-start !important;
}

.footer-logo span {
    text-align: right !important;
}

.social-links {
    direction: rtl !important;
    gap: 1rem !important;
}

.social-links a {
    text-align: center;
}

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

.contact-info p {
    text-align: right;
    justify-content: flex-start;
    display: flex;
    flex-direction: row;
    direction: rtl;
    gap: 0.5rem;
}

.contact-info p i {
    margin-left: 0;
    margin-right: 0;
    order: 2;
}

.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 {
}

.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;
    }
    
    .store-latest-section {
        padding: 3rem 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .view-all-btn {
        width: 100%;
        justify-content: center;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .topic-image {
        height: 180px;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-text {
        text-align: center;
    }
    
    .cta-text h3 {
        font-size: 1.4rem;
    }
    
    .cta-text p {
        font-size: 1rem;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    .store-promo-card {
        grid-column: 1 / -1;
    }
    
    .store-promo-icon i {
        font-size: 2.8rem;
    }
    
    .store-promo-title {
        font-size: 1.1rem;
    }
    
    .store-promo-desc {
        font-size: 0.85rem;
    }
    
    .store-promo-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    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 !important;
    direction: rtl !important;
}

.download-badge i {
    order: 2 !important;
    margin-left: 0 !important;
    margin-right: 12px !important;
}

.download-badge .badge-text {
    text-align: right !important;
    order: 1;
}

.badge-label,
.badge-store {
    text-align: right !important;
}

/* 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;
}