/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
}

/* RTL Support for Arabic */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .header-container,
html[dir="rtl"] .app-card-header,
html[dir="rtl"] .app-card-stats,
html[dir="rtl"] .app-card-features,
html[dir="rtl"] .app-card-platforms {
    direction: rtl;
}

/* Header Styles */
.store-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.store-logo {
    width: 40px;
    height: 40px;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: #1d1d1f;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #0071e3;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-selector select {
    appearance: none;
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    padding: 0.5rem 2rem 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
}

.language-selector select:hover {
    border-color: #0071e3;
}

.language-selector select:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #dc2626 0%, #dc2626 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Apps Section */
.apps-section {
    padding: 3rem 2rem;
}

.apps-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.apps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 100%;
}

/* App Card Styles */
.app-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    min-width: 0;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.app-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    flex-shrink: 0;
}

.app-card-info {
    flex: 1;
    min-width: 200px;
}

.app-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.app-card-developer {
    color: #86868b;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.app-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stars {
    color: #ff9500;
    font-size: 1rem;
}

.rating-text {
    color: #86868b;
    font-size: 0.9rem;
}

.app-card-button {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.app-card-button.primary {
    background: #0071e3;
    color: white;
}

.app-card-button.primary:hover {
    background: #0077ed;
    transform: scale(1.05);
}

/* App Card Stats */
.app-card-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #e5e5e7;
    border-bottom: 1px solid #e5e5e7;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-label {
    color: #86868b;
    font-size: 0.9rem;
}

/* App Card Screenshots - Swiper */
.app-card-screenshots {
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    overflow: visible;
}

.app-card-screenshots.swiper {
    overflow: hidden;
    padding-bottom: 1.5rem;
}

.app-card-screenshots .swiper-slide {
    width: 140px;
    height: auto;
}

.app-card-screenshots .swiper-slide img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.app-card-screenshots .swiper-pagination {
    bottom: 0;
    position: relative;
    margin-top: 0.75rem;
}

.app-card-screenshots .swiper-pagination-bullet {
    background: #d2d2d7;
    opacity: 1;
    width: 8px;
    height: 8px;
}

.app-card-screenshots .swiper-pagination-bullet-active {
    background: #dc2626;
}

/* App Card Description */
.app-card-description {
    margin-bottom: 1.5rem;
}

.app-card-description p {
    color: #424245;
    line-height: 1.6;
}

/* App Card Features */
.app-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: #f5f5f7;
    padding: 0.5rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    color: #1d1d1f;
}

/* App Card Platforms */
.app-card-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.platform-badge {
    padding: 0.4rem 1rem;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.platform-badge:hover {
    background: #f5f5f7;
    border-color: #0071e3;
    color: #0071e3;
}

/* Features Section */
.features-section {
    background: white;
    padding: 4rem 2rem;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: #f5f5f7;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    margin-bottom: 1rem;
    color: #dc2626;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.feature-card p {
    color: #86868b;
    font-size: 0.95rem;
}

/* Support Section */
.support-section {
    padding: 3rem 2rem;
    background: #f5f5f7;
}

.support-container {
    max-width: 1200px;
    margin: 0 auto;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.support-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.support-icon {
    margin-bottom: 1rem;
    color: #dc2626;
}

.support-icon svg {
    width: 32px;
    height: 32px;
}

.support-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.support-card p {
    color: #86868b;
}

/* Footer */
.store-footer {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 3rem 2rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
	display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section a {
    color: #86868b;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #f5f5f7;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #424245;
    color: #86868b;
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .support-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 105;
    }
    
    .header-nav.active {
        right: 0;
    }
    
    .header-nav .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid #e5e5e7;
        width: 100%;
    }
    
    .language-selector {
        width: 100%;
    }
    
    .language-selector select {
        width: 100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .app-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-card-button {
        align-self: flex-start;
        margin-top: 1rem;
    }
    
    .app-card-stats {
        flex-direction: row;
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .support-grid {
        grid-template-columns: 1fr;
    }
    
    .app-card-screenshots .swiper-slide {
        width: 120px;
    }    
}

/* Mobile phones */
@media (max-width: 480px) {
    .header-container {
        padding: 1rem;
    }
    
    .logo-section h1 {
        font-size: 1.2rem;
    }
    
    .hero-section {
        padding: 2.5rem 1rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .apps-section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .app-card {
        padding: 1rem;
    }
    
    .app-card-icon {
        width: 60px;
        height: 60px;
    }
    
    .app-card-title {
        font-size: 1.2rem;
    }
    
    .app-card-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }
    
    .app-card-screenshots .swiper-slide {
        width: 110px;
    }
    
    .feature-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .platform-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
    
    .features-section {
        padding: 2rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .feature-card h3 {
        font-size: 1rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }
    
    .support-section {
        padding: 2rem 1rem;
    }
    
    .support-card {
        padding: 1.5rem;
    }
    
    .store-footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .logo-section h1 {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .app-card-info {
        min-width: 150px;
    }
}

/* Menu overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}