/* ========================================
   قسم تطبيقات الجوال - Apps Section
   الملف: public/web/css/apps.css
======================================== */

/* الخلفية العامة */
.apps-section {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    overflow: hidden;
}

.apps-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://mohammed-almalgami.com/public/web/img/pattern-3.jpg');
    opacity: 0.03;
    pointer-events: none;
}

/* الأشكال الزخرفية */
.apps-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.apps-shapes .shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1), transparent 70%);
    top: -150px;
    left: -150px;
    animation: floatShape 20s ease-in-out infinite;
}

.apps-shapes .shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08), transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: floatShape 15s ease-in-out infinite reverse;
}

.phone-decoration {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    font-size: 150px;
    color: rgba(255, 215, 0, 0.03);
    pointer-events: none;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 30px) scale(1.1); }
}

/* ========================================
   رأس القسم
======================================== */
.apps-section .section-header {
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.apps-section .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(0, 212, 255, 0.1));
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 14px;
    color: #ffd700;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(10px);
}

.apps-section .section-badge i {
    font-size: 18px;
}

.apps-section .section-badge i:first-child {
    color: #3ddc84; /* Android green */
}

.apps-section .section-badge i:nth-child(2) {
    color: #a2aaad; /* Apple gray */
}

.apps-section .section-title {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
}

.apps-section .section-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.title-decoration .line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    border-radius: 3px;
}

.title-decoration i {
    color: #ffd700;
    font-size: 24px;
    animation: phoneBounce 2s ease-in-out infinite;
}

@keyframes phoneBounce {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(10deg); }
}

/* ========================================
   إحصائيات التطبيقات
======================================== */
.apps-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 35px 50px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 50px;
}

.apps-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.apps-stats .stat-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.08));
    border-radius: 14px;
    color: #ffd700;
    font-size: 22px;
    transition: all 0.3s ease;
}

.apps-stats .stat-item:hover .stat-icon {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    transform: rotate(10deg);
}

.apps-stats .stat-info {
    text-align: right;
}

.apps-stats .stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    display: inline;
}

.apps-stats .stat-suffix {
    font-size: 20px;
    color: #ffd700;
    font-weight: 700;
}

.apps-stats .stat-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.apps-stats .stat-divider {
    width: 1px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   فلتر التطبيقات
======================================== */
.apps-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    transform: translateY(-3px);
}

.filter-btn i {
    font-size: 16px;
}

/* ========================================
   شبكة التطبيقات
======================================== */
.apps-grid {
    position: relative;
    z-index: 2;
}

/* ========================================
   بطاقة التطبيق
======================================== */
.app-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3ddc84, #ffd700, #a2aaad);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-card:hover {
    transform: translateY(-15px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* تأثير التوهج */
.app-card .card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.app-card:hover .card-glow {
    opacity: 1;
}

/* شارة الأنظمة */
.app-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.app-badge i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.app-badge i.fa-android {
    color: #3ddc84;
}

.app-badge i.fa-apple {
    color: #a2aaad;
}

/* الشريط المميز */
.featured-ribbon {
    position: absolute;
    top: 25px;
    right: -35px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: #fff;
    padding: 8px 50px;
    font-size: 12px;
    font-weight: 700;
    transform: rotate(45deg);
    z-index: 5;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* ========================================
   معاينة التطبيق (إطار الهاتف)
======================================== */
.app-preview {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding: 20px 0;
}

.phone-frame {
    position: relative;
    width: 180px;
    height: 360px;
    background: linear-gradient(145deg, #2a2a4a, #1a1a2e);
    border-radius: 35px;
    padding: 10px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.app-card:hover .phone-frame {
    transform: scale(1.05) rotateY(-5deg);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

.phone-notch {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background: #0a0a0a;
    border-radius: 15px;
    z-index: 5;
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
}

.phone-notch::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 25%;
    transform: translateY(-50%);
    width: 40px;
    height: 6px;
    background: #333;
    border-radius: 5px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    border-radius: 28px;
    overflow: hidden;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-card:hover .phone-screen img {
    transform: scale(1.1);
}

.phone-screen .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: rgba(255, 255, 255, 0.4);
}

.phone-screen .no-image i {
    font-size: 40px;
}

.phone-screen .no-image span {
    font-size: 12px;
}

/* طبقة المعلومات */
.app-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    border-radius: 20px;
}

.app-card:hover .app-overlay {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    text-align: center;
}

.app-features {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.app-features .feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.app-features .feature i {
    font-size: 20px;
    color: #ffd700;
}

.app-features .feature span {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
    color: #1a1a2e;
}

/* ========================================
   معلومات التطبيق
======================================== */
.app-info {
    text-align: center;
    padding-top: 10px;
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.app-card:hover .app-title {
    color: #ffd700;
}

.app-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
    line-height: 1.6;
}

/* التقييم */
.app-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.app-rating .stars {
    display: flex;
    gap: 3px;
}

.app-rating .stars i {
    font-size: 14px;
    color: #ffd700;
}

.app-rating .stars i.far {
    color: rgba(255, 255, 255, 0.3);
}

.rating-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   أزرار التحميل
======================================== */
.app-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.4s ease;
    flex: 1;
    max-width: 150px;
}

.store-btn i {
    font-size: 24px;
}

.store-btn .btn-text {
    text-align: right;
    line-height: 1.3;
}

.store-btn .small {
    display: block;
    font-size: 9px;
    opacity: 0.8;
}

.store-btn .store-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
}

/* App Store */
.store-btn.app-store {
    background: linear-gradient(135deg, #000, #1a1a1a);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.store-btn.app-store:hover {
    background: linear-gradient(135deg, #1a1a1a, #333);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    color: #fff;
}

/* Play Store */
.store-btn.play-store {
    background: linear-gradient(135deg, #01875f, #00a073);
    color: #fff;
}

.store-btn.play-store:hover {
    background: linear-gradient(135deg, #00a073, #00c488);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(1, 135, 95, 0.4);
    color: #fff;
}

/* ========================================
   زر عرض المزيد
======================================== */
.load-more-wrapper {
    text-align: center;
    margin: 40px 0 60px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;
    color: #ffd700;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

.load-more-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: rotate(180deg);
}

/* ========================================
   قسم CTA
======================================== */
.apps-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 193, 7, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 28px;
    backdrop-filter: blur(10px);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cta-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ffab00);
    border-radius: 20px;
    color: #1a1a2e;
    font-size: 35px;
    animation: rocketPulse 2s ease-in-out infinite;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

@keyframes rocketPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cta-text h3 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.cta-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 450px;
}

.cta-actions {
    display: flex;
    gap: 15px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s ease;
}

.cta-btn.primary {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.cta-btn.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.4);
    color: #1a1a2e;
}

.cta-btn.secondary {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.cta-btn.secondary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.4);
    color: #fff;
}

/* ========================================
   التجاوب مع الشاشات
======================================== */
@media (max-width: 1199px) {
    .apps-section .section-title {
        font-size: 40px;
    }
    
    .apps-cta {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px;
    }
    
    .cta-content {
        flex-direction: column;
    }
    
    .cta-text p {
        max-width: 100%;
    }
}

@media (max-width: 991px) {
    .apps-section {
        padding: 80px 0;
    }
    
    .apps-section .section-title {
        font-size: 34px;
    }
    
    .apps-stats {
        flex-wrap: wrap;
        gap: 25px;
        padding: 30px;
    }
    
    .apps-stats .stat-divider {
        display: none;
    }
    
    .apps-stats .stat-item {
        flex: 0 0 45%;
        justify-content: center;
    }
    
    .phone-frame {
        width: 160px;
        height: 320px;
    }
}

@media (max-width: 767px) {
    .apps-section .section-title {
        font-size: 28px;
    }
    
    .apps-section .section-description {
        font-size: 15px;
    }
    
    .apps-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .phone-frame {
        width: 150px;
        height: 300px;
    }
    
    .app-buttons {
        flex-direction: column;
    }
    
    .store-btn {
        max-width: 100%;
        justify-content: center;
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-btn {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .apps-section {
        padding: 60px 0;
    }
    
    .apps-section .section-badge {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .apps-stats {
        padding: 25px;
    }
    
    .apps-stats .stat-item {
        flex: 0 0 100%;
    }
    
    .apps-stats .stat-number {
        font-size: 24px;
    }
    
    .app-card {
        padding: 20px;
    }
    
    .phone-frame {
        width: 140px;
        height: 280px;
    }
    
    .app-title {
        font-size: 18px;
    }
    
    .apps-cta {
        padding: 30px 20px;
    }
    
    .cta-text h3 {
        font-size: 22px;
    }
    
    .cta-text p {
        font-size: 14px;
    }
}

/* ========================================
   تأثير إخفاء/إظهار للفلتر
======================================== */
.app-card.hidden {
    display: none;
}

.app-card.show {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}