/* ============================================
   CSS Variables & Reset
   ============================================ */

:root {
    /* Colors */
    --primary-color: #6B46C1;
    --secondary-color: #4C1D95;
    --accent-color: #A78BFA;
    --background: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --success: #10B981;
    --error: #EF4444;
    --border-color: #E5E7EB;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'Cairo', 'Tajawal', 'Noto Sans Arabic', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px;
    --section-padding-mobile: 40px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

[dir="rtl"] {
    direction: rtl;
    font-family: var(--font-arabic);
}

[dir="rtl"] body {
    font-family: var(--font-arabic);
}

/* ============================================
   Container & Layout
   ============================================ */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.lang-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.lang-flag {
    font-size: 1.2rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-btn {
    display: inline-block;
    transition: var(--transition);
}

.download-btn img {
    height: 50px;
    width: auto;
    display: block;
}

.download-btn:hover {
    transform: scale(1.05);
}

.download-btn-large img {
    height: 60px;
}

/* APK Download Button Styles - Enhanced */
.apk-download {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
    position: relative;
    overflow: hidden;
    font-weight: 600;
}

.apk-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.apk-download:hover::before {
    left: 100%;
}

.apk-download:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.4);
}

.apk-download:active {
    transform: translateY(-1px) scale(0.98);
}

.download-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: pulse 2s ease-in-out infinite;
}

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

.download-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.download-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.download-version {
    font-size: 0.85rem;
    opacity: 0.95;
    font-weight: 500;
    margin-top: 2px;
}

.download-meta {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    align-items: center;
}

.download-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.apk-download-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--text-primary);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 350px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.apk-download-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.apk-download-large:hover::before {
    opacity: 0.05;
}

.apk-download-large:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(107, 70, 193, 0.3);
    border-color: var(--primary-color);
}

.apk-download-large:active {
    transform: translateY(-4px) scale(0.98);
}

.apk-download-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.download-icon-large {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    animation: float 3s ease-in-out infinite;
}

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

.download-info-large {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.download-text-large {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.download-version-large {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(107, 70, 193, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
}

.download-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.install-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.install-note p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.trust-icon {
    font-size: 1.2rem;
}

.hero-download {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.phone-mockup {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

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

.phone-frame {
    width: 300px;
    height: 600px;
    background: #000;
    border-radius: 40px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    background: var(--primary-color);
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ============================================
   Section Styles
   ============================================ */

section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Features Section
   ============================================ */

.features {
    background: var(--background);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Screenshots Section
   ============================================ */

.screenshots {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.screenshots-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.screenshots-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 0;
    scrollbar-width: none;
}

.screenshots-container::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex: 0 0 calc(33.333% - 1.5rem);
    scroll-snap-align: center;
}

.phone-frame-small {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
    background: #000;
    border-radius: 30px;
    padding: 10px;
    box-shadow: var(--shadow-lg);
}

.phone-frame-small img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

[dir="rtl"] .carousel-prev {
    left: auto;
    right: -25px;
}

[dir="rtl"] .carousel-next {
    right: auto;
    left: -25px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* ============================================
   How It Works Section
   ============================================ */

.how-it-works {
    background: var(--background);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.step-icon {
    font-size: 4rem;
    margin: 2rem 0 1rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   FAQ Section
   ============================================ */

.faq {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

[dir="rtl"] .faq-question {
    text-align: right;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
    font-weight: 300;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Download CTA Section
   ============================================ */

.download-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.download-cta .section-title,
.download-cta .section-subtitle {
    color: white;
}

.download-section {
    max-width: 800px;
    margin: 0 auto;
}

.download-buttons-large {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.system-requirements {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.system-requirements h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.requirements-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.requirement-item {
    display: flex;
    gap: 0.5rem;
}

.requirement-item strong {
    font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-logo img {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-icon {
    font-size: 1.2rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

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

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ============================================
   RTL Support
   ============================================ */

[dir="rtl"] .hero-content {
    direction: rtl;
}

[dir="rtl"] .header-content {
    direction: rtl;
}

[dir="rtl"] .nav-list {
    direction: rtl;
}

[dir="rtl"] .trust-indicators {
    direction: rtl;
}

[dir="rtl"] .hero-download {
    direction: rtl;
}

[dir="rtl"] .features-grid {
    direction: rtl;
}

[dir="rtl"] .steps {
    direction: rtl;
}

[dir="rtl"] .footer-content {
    direction: rtl;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-image {
        order: -1;
    }
    
    .phone-frame {
        width: 250px;
        height: 500px;
    }
    
    .screenshot-item {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 40px;
    }
    
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: 2rem;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .btn-download-header {
        display: none;
    }
    
    .phone-frame {
        width: 200px;
        height: 400px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-item {
        flex: 0 0 85%;
    }
    
    .carousel-prev,
    .carousel-next {
        display: none;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .download-buttons-large {
        flex-direction: column;
        align-items: center;
    }
    
    .requirements-list {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-download {
        flex-direction: column;
    }
    
    .download-btn img {
        height: 45px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
