/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background-color: #ffffff;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* CSS Variables - Simplified Purple Theme */
:root {
    --purple: rgb(191, 153, 230);
    --light-purple: rgb(242, 230, 255);
    --white: rgb(255, 255, 255);
    --text: rgb(38, 26, 51);
    --gray: rgb(102, 102, 102);
    --border: rgba(191, 153, 230, 0.15);
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.nav-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Language Switcher */
.language-switcher {
    position: relative;
    margin-left: 15px;
}

/* Hide mobile language switcher on desktop */
.mobile-language-switcher {
    display: none;
}

.language-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.language-toggle:hover {
    border-color: var(--purple);
    background: var(--light-purple);
    transform: scale(1.05);
}

.current-flag {
    transition: transform 0.2s ease;
}

.language-switcher:hover .current-flag {
    transform: scale(1.1);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.language-option-flag {
    font-size: 1.1rem;
}

.language-option:hover {
    background: var(--light-purple);
}

.language-option:first-child {
    border-radius: 12px 12px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 12px 12px;
}

/* RTL Support for Arabic */
.rtl {
    direction: rtl;
}

.rtl .nav-container,
.rtl .hero-container,
.rtl .feature-story-item,
.rtl .footer-content {
    direction: rtl;
}

.rtl .language-dropdown {
    right: auto;
    left: 0;
}

.rtl .feature-story-item {
    text-align: right;
}

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

/* Hero Section */
.hero {
    padding: 120px 0 20px;
    background: var(--white);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-description {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 15px;
    line-height: 1.6;
}

.hero-description br {
    display: block !important;
}

.hero-cta {
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: rgb(171, 133, 210);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(191, 153, 230, 0.3);
}

/* Screenshots Showcase */
.screenshots-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.screenshot-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.screenshot-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.screenshot {
    width: 100%;
    height: auto;
    border-radius: 16px;
}

/* Features Section */
.features {
    padding: 20px 0 60px;
    background: var(--white);
}

.features-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 0.1em;
}

.features-story {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 0 20px;
}

.feature-story-item {
    text-align: center;
    padding: 20px 15px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.feature-story-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px;
    line-height: 1.3;
    text-align: center;
}

.feature-story-content p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 1rem;
    text-align: center;
}

.feature-story-content p br {
    display: block;
    margin: 0;
}

.feature-list {
    list-style: none;
    padding: 0;
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
}

.feature-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.feature-list li:before {
    content: '•';
    color: var(--purple);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.badge {
    background: var(--light-purple);
    color: var(--purple);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.feature-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.feature-point {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.95rem;
}

.point-icon {
    color: var(--purple);
    font-weight: bold;
    font-size: 1.1rem;
}

.feature-highlights {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.highlight {
    color: var(--purple);
    font-weight: 600;
    font-size: 0.9rem;
}

.highlight-separator {
    color: var(--border);
    font-size: 0.8rem;
}

/* Download Section */
.download {
    padding: 30px 0;
    background: rgba(242, 230, 255, 0.3);
    text-align: center;
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
}

.download-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 15px;
}

.download-description {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 25px;
    line-height: 1.5;
}

.download-button-container {
    margin-bottom: 15px;
}

.app-store-button {
    display: inline-block;
    transition: transform 0.2s;
}

.app-store-button:hover {
    transform: scale(1.05);
}

.app-store-logo {
    width: 200px;
    height: auto;
}

.download-note {
    color: var(--gray);
    font-size: 1rem;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--text);
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 400px;
    text-align: left;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.footer-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.footer-brand-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.footer-brand-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-top: 15px;
    margin-left: -16px;
    text-align: left;
}

.footer-links {
    display: flex;
    gap: 60px;
}

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

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

.footer-section-links li {
    margin-bottom: 8px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--purple);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
}

.footer-made-with {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-heart {
    color: var(--purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-container {
        position: relative;
    }
    
    /* Show language switcher in nav-container on mobile */
    .mobile-language-switcher {
        display: block;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        z-index: 1001;
    }
    
    /* Hide desktop language switcher on mobile */
    .nav-links .language-switcher {
        display: none;
    }
    
    .hero-container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        white-space: normal;
    }
    
    .hero-description {
        font-size: 1.2rem;
        padding: 0 20px;
        line-height: 1.5;
        orphans: 2;
        widows: 2;
        word-spacing: 0.1em;
    }
    
    .nav-title {
        white-space: nowrap;
    }
    
    .footer-brand-title {
        white-space: nowrap;
    }
    
    .features-story {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .feature-story-item {
        width: 100%;
    }
    
    .feature-story-content {
        padding: 0;
    }
    
    .screenshot {
        width: 100%;
        height: auto;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    /* Center download section content on mobile */
    .download-content {
        text-align: center;
    }
    
    .download-button-container {
        display: flex;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-brand {
        text-align: center;
        max-width: none;
    }
    
    .footer-logo-container {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-brand-text {
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        text-align: center;
        line-height: 1.1;
        padding: 0 10px;
        white-space: normal;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 20px;
        line-height: 1.4;
        text-align: center;
    }
    
    .download-title {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    .download-title br {
        display: block !important;
    }
        line-height: 1.4;
        padding: 0 10px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-cta {
        text-align: center;
    }
    
    .download-title {
        font-size: 2rem;
        text-align: center;
        line-height: 1.1;
        word-spacing: -2px;
    }
    
    .download-description {
        text-align: center;
        line-height: 1.4;
        padding: 0 15px;
    }
    
    .nav-title {
        font-size: 1rem;
        white-space: nowrap;
    }
    
    .footer-brand-title {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    
    .footer-description {
        font-size: 0.9rem;
        line-height: 1.5;
        padding: 0 15px;
    }
    
    .screenshots-showcase {
        max-width: 400px;
        gap: 25px;
        margin: 0 auto;
    }
    
    .screenshot-card {
        padding: 20px;
    }
}